[ https://issues.apache.org/jira/browse/AXIS2-1790?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Nandana Mihindukulasooriya reopened AXIS2-1790: ----------------------------------------------- > schemaLocation element of import statements should contain URI reference to > schema document. > -------------------------------------------------------------------------------------------- > > Key: AXIS2-1790 > URL: https://issues.apache.org/jira/browse/AXIS2-1790 > Project: Axis 2.0 (Axis2) > Issue Type: Improvement > Components: wsdl > Affects Versions: 1.1 > Environment: Windows XP, Java 5 Update 9 > Reporter: Aaron Gourley > Assignee: Deepal Jayasinghe > Attachments: axis2-kernel-SNAPSHOT.jar, > schema-import-generation.patch, XsdAndWsdlImportTestService.aar > > > From W3C schemaLocation spec: > http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/structures.html#composition-schemaImport > Additional reference: > http://www.stylusstudio.com/w3c/schema0/schemaLocation.htm#attribute-schemaLocation > <import > id = ID > namespace = anyURI > schemaLocation = anyURI > {any attributes with non-schema namespace . . .}> > Content: (annotation?) > </import> > "In a schema, the include element has a required schemaLocation attribute, > and it contains a URI reference which must identify a schema document." > Axis2 is currently using a relative SchemaLocation, which on its own can not > be used to identify the schema document. This actually causes a > compatibility problem between Glue clients and such WSDLs published by Axis2. > WSDL published by Axis2: > <wsdl:definitions > targetNamespace="http://www.csapi.org/wsdl/parlayx/terminal_location/v2_0/service"> > <wsdl:documentation>TerminalLocation</wsdl:documentation> > <wsdl:types> > <xsd:schema attributeFormDefault="unqualified" > elementFormDefault="qualified" > targetNamespace="http://www.csapi.org/schema/parlayx/terminal_location/v2_0/local"> > <xsd:import > namespace="http://www.csapi.org/schema/parlayx/terminal_location/v2_0" > schemaLocation="TerminalLocation?xsd=xsd0"/> > <xsd:import > namespace="http://www.csapi.org/schema/parlayx/common/v2_0" > schemaLocation="TerminalLocation?xsd=xsd2"/> > ..... > <wsdl:service name="TerminalLocation"> > <wsdl:port name="TerminalLocationSOAP11port_http" > binding="tns:TerminalLocationSOAP11Binding"> > <soap:address > location="http://localhost:9080/TerminalLocationService/services/TerminalLocation"/> > </wsdl:port> > <wsdl:port name="TerminalLocationSOAP12port_http" > binding="tns:TerminalLocationSOAP12Binding"> > <soap12:address > location="http://localhost:9080/TerminalLocationService/services/TerminalLocation"/> > </wsdl:port> > <wsdl:port name="TerminalLocationHttpport1" > binding="tns:TerminalLocationHttpBinding"> > <http:address > location="http://localhost:9080/TerminalLocationService/rest/TerminalLocation"/> > </wsdl:port> > </wsdl:service> > </wsdl:definitions> > When Glue parses this WSDL, it simply creates a URI from the string > "TerminalLocation?xsd=xsd0". Since the prefix > ("http://localhost:9080/TerminalLocationService/services/") is not shown in > the WSDL, a FileNotFoundException occurs and the bind fails. I have not been > able to find a workaround using Glue. > I realize that the easy solution is to say that this is a Glue problem, but > would it be at all possible to include the address location in the generated > WSDL? > Suggested fix: > 1. In AxisService's adjustSchemaLocation(XmlSchema, XmlSchemaExternal, > Hashtable, Hashtable) method: > - Change getName() in default mode to getEndpoint() > 2. In AxisService2WSDL2's generateOM() method: > - add call to > axisService.setCustomSchemaNamePrefix(axisService.getEndpoint() + "?xsd=") > before call to populateSchemaMappings() is made. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]