I have a client generated from a wsdl. The generation gives me the
following classes:
XXX
XXXProxy
XXXService
XXXServiceLocator
XXXSoapBindingStub
For this particular web service the vendor has informed me that I need to
include special properties in the SOAP header. The correct SOAP header
looks like this:
<soapenv:Header>
<ns1:gw_auth_user_prop
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns1="http://www.guidewire.com/soap">user</ns1:gw_auth_user_prop>
<ns2:gw_auth_password_prop
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next"
soapenv:mustUnderstand="0"
xmlns:ns2="http://www.guidewire.com/soap">password</ns2:gw_auth_password_prop>
</soapenv:Header>
I have tried to instantiate XXXSoapBindingStub and create a custom
header and then call XXXSoapBindingStub.setHeader(), however I am
getting unexpected behavior and I don't think I'm doing things "the
right way".
What is the correct way to use a generated client, but simply modify
the header message being sent to conform to the above format?