Open Tomas-Kraus opened 19 years ago
@glassfishrobot Commented Reported by uday99
@glassfishrobot Commented uday99 said: Created an attachment (id=5) contains wsdl and schema for reproducing this error
@glassfishrobot Commented File: fwTests.zip Attached By: uday99
@glassfishrobot Commented Was assigned to jax-rpc-issues
@glassfishrobot Commented This issue was imported from java.net JIRA JAX_RPC-10
I have nested xs:include(s) from the schema inlined in the wsdl. All the included schemas have no target namespace and do not have any prefix on the element's type. When I include it in the WSDL I was expecting that the including schema's (one inlined in the wsdl) targetNamespace applies to each of the included schema.
When I run wscompile to gererate server classes from my WSDL the compiler gives --Undeclared namespace prefix ""- error. Here is the print stack from ws-compile:
generate-sei-service: [java] modeler error: model error: undeclared namespace prefix: "" [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildM odel(WSDLModelerBase.java:274) [java] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelIn fo.java:88) [java] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java :63) [java] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.j ava:714) [java] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43) [java] at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
[java] CAUSE:
[java] model error: undeclared namespace prefix: "" [java] at com.sun.xml.rpc.processor.schema.InternalSchemaBuilderBase.bu ildElementDeclaration(InternalSchemaBuilderBase.java:130) [java] at com.sun.xml.rpc.processor.schema.InternalSchema.findElementDe claration(InternalSchema.java:92) [java] at com.sun.xml.rpc.processor.modeler.wsdl.SchemaAnalyzerBase.sch emaElementTypeToLiteralType(SchemaAnalyzerBase.java:206) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.getEle mentTypeToLiteralType(WSDLModelerBase.java:5441) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.proces sSOAPOperationDocumentLiteralStyle(WSDLModelerBase.java:3708) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.proces sSOAPOperation(WSDLModelerBase.java:909) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.proces sPort(WSDLModelerBase.java:763) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.proces sService(WSDLModelerBase.java:519) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.intern alBuildModel(WSDLModelerBase.java:354) [java] at com.sun.xml.rpc.processor.modeler.wsdl.WSDLModelerBase.buildM odel(WSDLModelerBase.java:238) [java] at com.sun.xml.rpc.processor.config.ModelInfo.buildModel(ModelIn fo.java:88) [java] at com.sun.xml.rpc.processor.Processor.runModeler(Processor.java :63) [java] at com.sun.xml.rpc.tools.wscompile.CompileTool.run(CompileTool.j ava:714) [java] at com.sun.xml.rpc.util.ToolBase.run(ToolBase.java:43) [java] at com.sun.xml.rpc.tools.wscompile.Main.main(Main.java:22)
Here is my WSDL: <?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://namespaces.test.com/nex/eai" xmlns:tns1="http://CreateParty" xmlns:tns2="http://UpdateParty" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="TestService" targetNamespace="http://namespaces.test.com/nex/eai" >
Included schema: (one example.
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema elementFormDefault="unqualified" attributeFormDefault="unqualified" version="1.0" xmlns:xs="http://www.w3.org/2001/XMLSchema" >