Soap Headers in ActiveVOS
Purpose
This document is to describe how to handle Soap headers in Informatica ActiveVOS.
Overview.
There are two ways that ActiveVOS may have to deal with SOAP headers, either by consuming a message with soap headers or having to call a service and passing soap headers with the services call. IN this document we will talk about each situation separately.
Consuming Soap Headers
If an inbound message contains Soap header elements and you need to see those elements, use the
abx:getInboundSOAPHeader() function.
This will return an element that contains 0-many headers so you will want to copy it to either a variable of type soap:header
soapenv:Header xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
or to a variable of type anyType.
anyType is a standard type available out of the box.
Once you have the variable with your header elements you can treat it like any other xml.
Deploy your code and test.
Providing Soap Headers
The other way soap headers are used is when we need to SEND soap headers. This is done in the Partner information. Usually the partner Information is set up in the PDD but since reference headers. Since soap headers are on a case by case basis they cannot be set up using the pdd wizard.
Instead we use the Dynamic endpoint to populate the endpoint information for the service call.
1. Create your process with a service call
2. Create a pdd for your process
3. Edit the external service partner line
4. Set the Invoke handler to WSA address
5. Start off with the enpoint type set to static.
6. Click the Ellipsis to fill in the service parameters.
7. In the Endpoint reference wsdl enter the values.
8. You will end up with something like this.
wsa:EndpointReference xmlns:ns5="http://informatica.com/utilities/wsdl/testwithxml"
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:wsa="http://www.w3.org/2005/08/addressing" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
wsa:Addresshttp://localhost:8280/active-bpel/services/MyService</wsa:Address
wsa:Metadata
wsa:ServiceName PortName="MyServicePort"ns5:MyService</wsa:ServiceName
</wsa:Metadata
</wsa:EndpointReference
9. Copy this xml and change the Endpoint type to static.
10. Open your bpel
11. Create a script before you call the service – before the Invoke if you do not already have a script.
12. Add a new copy statement to the script
- In the from section choose Type: Expression and paste in the xml
- In the To section choose Type: Partner.
- Choose the partner name for service you are calling.
- Click the expression builder button for the FROM portion
Ø We want to add reference parameters – these will appear as soap headers in the message
- Add the following before </wsa:EndpointReference
wsa:ReferenceParameters
</wsa:ReferenceParameters
- Add the soap header elements between the open and close tag.
- Save.
13. Deploy your code and test.
Page 4 of 4