Announcement Announcement Module
No announcement yet.
Using static WSDL that imports an XSD must be able to resolve schemaLocation URI Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • Using static WSDL that imports an XSD must be able to resolve schemaLocation URI

    I decided to hand code my WSDL vs. using the Dynamic Spring WS WSDL generator (similar to how the Spring WS tutorial does) to avoid confusing my XSD with Spring specific elements for mapping the payload (ie OrderRequest) .

    One thing I ran into that the tutorial I guess assumes is that the "schemaLocation" when you do an <xs:import> in the WSDL must be resolvable. Meaning that if I just put myschema.xsd in the "schemaLocation" then I run into issues when using tools like SoapUI, etc which use the WSDL to generate sample SOAP requests for testing/debugging purposes.

    Doesn't work:
    <xs:import targetNamespace="" schemaLocation="myschema.xsd" />

    <xs:import targetNamespace="" schemaLocation="http://myserver/schemas/myschema.xsd" />

    Is there something I am missing here with using an <xs:import/> in my WSDL? Once I put the XSD at a URI that could be resolved "http://myserver/schemas/myschema.xsd" and stopped using a relative URI such as "myschema.xsd", everything worked fine.


  • #2

    Figured out the issue...

    The problem is how you configure our MessageDispatchServlet servlet mappings as if you have /* mapped then when an XSD request comes in it will try to handle the request for the XSD and nothing will be returned.

    What I did is just mapped /services/* to the MessageDispatchServlet and then I put my static WSDL in a wsdl directory with the required XSD being imported by the wsdl.


    • #3

      Did you have to change any configuration to publish your included XSD? I am currently having great difficulty in getting SOAPUI and Eclipse to consume my WSDL because of access to the imported/included schemas on my local WebLogic server. I keep getting HTTP 403 errors.

      Any help you can provide would be much appreciated.