· Apr 20

There's any way to edit a SOAP header?

Hello everyone, I need some help. 

I have to send some events for a government WebService that I already imported the WSDL and XSD's and It worked fine and I'm able to build the message and connect into the service, but It has been rejected with the message that the XML is wrong and the only diference between the Caché SOAP message to all the examples that the government gave us is the header:


This is how the Government is expecting the message:

<?xml version="1.0" encoding="utf-8"?>
			-----------------Dynamic XML Body------------------


And this is how It's generate in Cache:

  <  ?xml version="1.0" encoding="UTF-8" ?>
                              -----------------Dynamic XML Body------------------ 



So, there's any way to edit It before invoke the webMethod or any configuration that made it during the process?

Thank you so much!!

Product version: Ensemble 2018.1
Discussion (10)2
Log in or sign up to continue

I agree with you Enrico, to me It isn't the reason of the error, but I would like to try this change before waiting for a long time te answer of the government support that is really slow over here hehehe.

So, there is not a SOAP fault, the system only send a message like "malformed XML" as we forgot some tag or something else, but me and another analyst did a double check and is perfect as the documentation says.


Hello, Enrico, thank you so much for your time, I'm calling the WS directly from the class generated in the SOAP Wizard, we use Caché 2018.1 over here and I did a double check today in the documentation and found a parameter that solve my problem with the prefix.

If for any reason you need to change it, just set this parameter into the class generated by the SOAP Wizard.

Parameter SOAPPREFIX = "AnythingYouNeed"