axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ralitsa Hristova (JIRA)" <>
Subject [jira] Updated: (AXIS2-1790) schemaLocation element of import statements should contain URI reference to schema document.
Date Fri, 13 Jun 2008 13:36:45 GMT


Ralitsa Hristova updated AXIS2-1790:

    Attachment: axis2-kernel-SNAPSHOT.jar

Here is a service that can be used for testing. It uses an original wsdl which contains both
- wsdl:import and xsd:import. The service is configured in its services.xml to generate absolute
URIs by setting the parameter-flag 'generateAbsoluteLocationURIs' to true.

Attached is also axis2-kernel.jar built with this change.

Thanks and regards,

> schemaLocation element of import statements should contain URI reference to schema document.
> --------------------------------------------------------------------------------------------
>                 Key: AXIS2-1790
>                 URL:
>             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:
> Additional reference:
> <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="">
> <wsdl:documentation>TerminalLocation</wsdl:documentation>
>     <wsdl:types>
>         <xsd:schema attributeFormDefault="unqualified" elementFormDefault="qualified"
>             <xsd:import namespace=""
>             <xsd:import namespace=""
>      .....
>     <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)
>     - 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:
For additional commands, e-mail:

View raw message