How Do I Receive a SOAP Header and Send a Result? (Magic xpa 3.x)
When you are providing a Web service, you may need to send out a SOAP header. Here is how to do this in a Magic xpa program.
Magic xpa Web Services programs are Batch programs, marked External, which send back some result. Magic xpa formats the SOAP wrapper for you.
To add a Header to this wrapper:
-
Format the Header XML as needed. The XML must be encased in a root element called EDEV_SOAP_HEADERS:
<EDEV_SOAP_HEADERS>
...
</EDEV_SOAP_HEADERS>
-
Store the XML in an Alpha or BLOB element. In the example, it is called vSOAP Header.
-
In the SOAP Server program, go to Task Properties->Advanced.
-
Set the Header variable to point to your XML variable.
Now the header will be sent in the SOAP response.