bet365 / soap

Make it easy to use SOAP from Erlang
Apache License 2.0
200 stars 75 forks source link

How to use soap in service with different environments? #18

Closed kpy3 closed 7 years ago

kpy3 commented 7 years ago

Hello,

I have remote service with almost the same WSDL interface, the only difference is it's environment: test and production. Test uses own targetNamespace which is different form production. What is the best way to deal with such kind services using soap? Should I generate two client and switch them in runtime, or does soap have any instruments for configure namespace for programmatically?

cmullaparthi commented 7 years ago

You don't need to generate two different clients. You can specify the URL to use in the Options field. See https://github.com/bet365/soap/blob/master/doc/soap_client_tutorial.md#using-the-generated-client