Add SoapHeader to org.springframework.ws.WebServiceMessage

Basically, you need to use a WebServiceMessageCallback in your client to modify the message after its creation but before it is sent. To rest of the code has been described pretty accurately by @skaffman so the whole stuff might look like this: public void marshalWithSoapActionHeader(MyObject o) { webServiceTemplate.marshalSendAndReceive(o, new WebServiceMessageCallback() { public void doWithMessage(WebServiceMessage message) … Read more

A Good C++ Library for SOAP

Check out Apache Axis. That is my all times favorite SOAP implementation. It’s SOAP done right! Exists for C++ and Java. http://ws.apache.org/axis/ And in best traditions of Apache Foundation, it is FREE and OPENSOURCE. So, enjoy!

Inspect XML created by PHP SoapClient call before/without sending the request

Upfront remark: In order to use the __getLastRequest() method successfully, you have to set the ‘trace’ option to true on client construction: $client = new SoapClient(‘wsdldoc.asmx?WSDL’, array(‘trace’ => TRUE)); This way, your request will still be sent (and therefore still fail), but you can inspect the sent xml afterwards by calling $client->__getLastRequest(). Main answer: To … Read more

How do I see the actual XML generated by PHP SOAP Client Class?

Use getLastRequest. It returns the XML sent in the last SOAP request. echo “REQUEST:\n” . $SOAP->__getLastRequest() . “\n”; And remember, this method works only if the SoapClient object was created with the trace option set to TRUE. Therefore, when creating the object, use this code: $SOAP = new SoapClient($WDSL, array(‘trace’ => 1));