cancel
Showing results for 
Search instead for 
Did you mean: 

Do not use SOAP envelope

Former Member
0 Kudos

I have a scenario in which a Webservice is called from PI; as the webservice request some specific fields in the SOAP-header I have found that I should check the "Do not use SOAP envelope" option in the SOAP-receiver channel.

I have searched the forum/SDN for examples of how to create the SOAP envelope including the required header fields. I have found some posts refering to XSLT-mapping; however I'm not famliar with XSLT so I'm looking for an example or guide how to create the SOAP envelope for this scenario.

Can anybody be of assistance?

Kind regards,

John.

Accepted Solutions (0)

Answers (3)

Answers (3)

udo_martens
Active Contributor
0 Kudos

Hi John,

you can create a style like:

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="/">
		<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns0="myTargetNS">
			<soapenv:Header/>
			<soapenv:Body>
				<xsl:copy-of select="*"/>
			</soapenv:Body>
		</soapenv:Envelope>
	</xsl:template>
</xsl:stylesheet>

Just create the envelope by copy and paste and add the content by xsl:copy-of.

Regards,

Udo

markangelo_dihiansan
Active Contributor
0 Kudos

Hello,

What you can do is to load the WSDL into a third-party program such as SOAP UI. From there, it will generate an empty request comprising of the soap envelope, header and body. You can duplicate this request by:

1.) Create the header data type

2.) Create the body data type

3.) Create the envelope data type and inside it is the header and body data type

4.) Use Java Mapping to add prefixes and namespaces in your envelope

Hope this helps,

Mark

Former Member
0 Kudos

Here is a sample of an xlst I used for this purpose.

<?xml version="1.0" encoding="ISO-8859-1"?>

<xsl:stylesheet version="1.0"

xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<xsl:template match="/">

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

<soapenv:Header/>

<soapenv:Body>

<p262:operationName xmlns:p262="http://othersite.com">

<xsl:apply-templates/>

</p262:operationName>

</soapenv:Body>

</soapenv:Envelope>

</xsl:template>

<xsl:template match="shippingOptions">

<shippingOptions>

<xsl:apply-templates select="destination" />

<equipmentId><xsl:value-of select="equipmentId"/></equipmentId>

<xsl:apply-templates select="origin" />

</shippingOptions>

</xsl:template>

<xsl:template match="destination">

<destination>

<countryCode><xsl:value-of select="countryCode"/></countryCode>

<postalCode><xsl:value-of select="postalCode"/></postalCode>

</destination>

</xsl:template>

<xsl:template match="origin">

<origin>

<countryCode><xsl:value-of select="countryCode"/></countryCode>

<postalCode><xsl:value-of select="postalCode"/></postalCode>

</origin>

</xsl:template>

</xsl:stylesheet>