Newsletter sign-up
View all newsletters

Enterprise Java Newsletter
Stay up to date on the latest tutorials and Java community news posted on JavaWorld

JavaWorld Daily Brew

Do you have any idea of how to do?



Hi all,

Please help me to solve this problem,

we have created a wsdl (webservice) for one of our clients and deployed in their apache tomcat server. i have problem with SOAP:Address location and schemaLocation. Story goes like this:

say my webservice is Myservice.wsdl and hosted in "www.Mydomain.com/Mywebservice" and port is 80. developed using Java(Netbeans)

So my problem is :
When a client calls this webservice as Myservice?wsdl from a remote location the result of " http://www.MyDomain.com/MyWebService/Myservice?wsdl" as follows :

-----------------------------------------------------------------------------
<!-- My WSDL -->
........
<types>
<xsd:schema>
  <xsd:import namespace="http://MyWebService.Myservice.MYdomain.com/"
       schemaLocation="http://localhost:80/MyWebService/Myservice?xsd=1" />
  </xsd:schema>
  </types>
.....
.....
<service name="Myservice">
<port name="MyPort" binding="tns:MyPortBinding">
  <soap:address location="http://localhost:80/MyWebService/Myservice" /> 
  </port>
  </service>
  </definitions>
<!-- end of WSDL -->
------------------------------------------------------------------------------

the client cannot create a stub on this, because it is having SOAP:Address location and schemaLocation as Localhost. I tryied to hard code the locations but as this is dynamic binding, locations are automatically changes to localhost. (this is due to proxy settings on server, i think....?)

Server side is Apache tomcat 6. and i want a solution without touching to server side configuration. (because my client does not like to change their server.xml or proxies or other settings due to security reasons + other applications are running on this server ). Are there any way to resolve this by hard coding the wsdl or any other way. ( if there is no solution, a server side modifications can be accepted without damaging their original settings)

I really appreciate if you could help on this, and if you need more info on this please let me know,

many many thanks,

Nilantha Ganegama