1

I'm using Scala + JAX-WS to build a simple SOAP server, but have run into issues with the auto generated locations in the WSDL. The service is published like this:

val endpoint = Endpoint(new MySoapServer())
endpoint.publish("http://10.2.2.100")

Which creates the following elements in the WSDL

<service name="MyService">
  <port name="MyPort" binding="tns:MyPortBinding">
    <soap:address location="http://10.2.2.100"/>
  </port>
</service>

and

<xsd:schema>
  <xsd:import schemaLocation="http://10.2.2.100/?xsd=1"/>
</xsd:schema>

However, the server sits behind a proxy that only accepts https requests, so those urls are useless...

How can I modify both the schemaLocation and soap:address location elements, so that they read https://10.2.2.100?

I've tried using X-Forwarded-Proto, as suggested here, but still no luck...

Community
  • 1
  • 1
Mathew
  • 8,203
  • 6
  • 37
  • 59
  • Maybe I'm missing something here: can you not just change the address string in your published endpoint to create the desired address? Or generate a wsdl, hand-correct the address and then either refer to that wsdl in your `MySoapServer` or give the doctored wsdl to your client – kolossus May 11 '15 at 04:08
  • I can't change the string; the endpoint only handles http protocol. The second suggestion would work, but then I'd end up having to maintain a SOAP service that's both object- and contract-first (kinda). Currently, I'm thinking the best thing to do is bit the bullet and make the move to a contract-first service using a hand-written wsdl, scalaxb, and spray... – Mathew May 11 '15 at 09:37

0 Answers0