Search code examples
javaweb-servicessoapxsdjava-metro-framework

XSD file path in WSDL include is wrong


I'm more or less a beginner with web services but I've tried googling this with no results.

I have a web service written in Java using the Metro stack that runs fine when I run it on a local JBoss 5.1.0 instance but when I move it to our test server I start getting problems.

The service deploys correctly and I can view the WSDL as usual: https://myserver.myorg/path/service?wsdl

However, wsimport failed to generate client stubs from here and when I took a closer look at the WSDL I saw this:

<xsd:schema>
  <xsd:import namespace="http://mynamespace/" schemaLocation="https://testserver.myorg:443/path/Service?null"/>
</xsd:schema>

Instead of what I would see when I ran it locally, which had the schemaLocation set to http://localhost:8080/path/Service?xsd=1

When I try putting in xsd=1 instead of null manually in a web browser, I get a 404 error.

Does anybody know what might cause this and how to fix it?

Thanks, Raj.


Solution

  • The test JBoss server is restarted weekly and following the restart, the XSD file is appearing properly. Sorry for the noise - I should learn to turn it off and on again before posting :).