on 04-28-2014 12:35 PM
Hi Experts,
i´m trying to make a Szenario (WS <-->Exchange web Service). In the Design-Time i have made an OM with 2 Steps for the Request, by customizing the SOAP Envelope. and the Mapping of business data. The Outgoing-Request after MApping is 1-1 with this from Microsoft.
CreateItem operation (calendar item)
in the Configuration i have in der Receiver Channel as follows.
The Receiver Response from the exchange web Service shows like:
<?xml version="1.0" encoding="utf-8" ?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<t:ServerVersionInfo MajorVersion="8" MinorVersion="0" MajorBuildNumber="685" MinorBuildNumber="8"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types" />
</soap:Header>
<soap:Body>
<CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages"
xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"
xmlns="http://schemas.microsoft.com/exchange/services/2006/messages">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="AAAlAFV" ChangeKey="DwAAABYA" />
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</CreateItemResponse>
</soap:Body>
</soap:Envelope>
First question:
Should i remove the Envelope an the Header from the web Service response? If yes How?
Second Question
Without removing the Envelope and Header i get this Error on the receiver Channel:
Thank you very much
Kind Regards
Abdel
first try to test the WS from test tools like SOAPUI. That will give you and idea about the actual Request and Response structures of the Webservice.
Now if you have chosen to customize the calls, and if you are enhancing the envelope, the adapter settings need to reflect the same.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Vijay,
with the SOAPUI all is ok (without PI)
Request:
Response:
<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
<s:Header>
<h:ServerVersionInfo MajorVersion="14" MinorVersion="2" MajorBuildNumber="318" MinorBuildNumber="2" xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/>
</s:Header>
<s:Body xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<m:CreateItemResponse xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
<m:ResponseMessages>
<m:CreateItemResponseMessage ResponseClass="Success">
<m:ResponseCode>NoError</m:ResponseCode>
<m:Items>
<t:CalendarItem>
<t:ItemId Id="AAAYAGZjdF9vbHhkYXRlbkBhbXByaW9uLm5ldABGAAAAAADeh5YuiTHVTqVbo0rkQ6CfBwBG71eAu8dTSYKO3kgyUGN9AAAA+R61AABG71eAu8dTSYKO3kgyUGN9AAAA+YgIAAA=" ChangeKey="DwAAABYAAABG71eAu8dTSYKO3kgyUGN9AAAA+Zx2"/>
</t:CalendarItem>
</m:Items>
</m:CreateItemResponseMessage>
</m:ResponseMessages>
</m:CreateItemResponse>
</s:Body>
</s:Envelope>
HTTP:Header:
Thank u very much
Hi Abdeljalil,
First question:
Should i remove the Envelope an the Header from the web Service response? If yes How?
>> I think once you check "Do not Use SOAP Envelope" it applies to request and response. So your response mapping should consider that the response message will have SOAP Envelope and Body. Perhaps for this mapping you could use a xslt mapping which returns your MT based ond SOAP response.
Second Question
Without removing the Envelope and Header i get this Error on the receiver Channel:
>> Check what is the SOAP message your are sending to the webservice in PI. As you mentioned, it should have the same SOAP format as when you are using SOAPUI. Perhaps the message is not well formed.
Regards.
Hi Antonio,
thanks for ur reply,
For the Question 2:
The request after Mapping Steps is well formed. I Took this request an i put it in SOAPUI, and i had no Error (without SAP PI).
For ur first answer: Should i put the xsl-Response Mapping (Customised Envelope) before the business Data Mapping? If yes. I would become a MT-Structur (in XML) an without SOAP-Construct.
Thanks again
Kind Regards
Abdel
I suggest you to use a xslt mapping in your operation mapping in the Response (there is no need to use a message mapping).
For instance (this is a simply xslt code):
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<ns1:MT_yourMT xmlns:ns1="http://yournamespace">
<yourfield1><xsl:value-of select="/*/*/*/field1fromSOAP"/></yourfield1>
<yourfield2><xsl:value-of select="/*/*/*/field2fromSOAP"/></yourfield2>
</ns1:MT_yourMT>
</xsl:template>
</xsl:stylesheet>
This xslt mapping will return
<ns1:MT_yourMT>
<yourfield1>value1</yourfield1>
<yourfield2>value2</yourfield2>
</ns1:MT_yourMT>
So if the xslt mapping fits your mapping needs, there will be no need for a message mapping after it.
Regards.
User | Count |
---|---|
86 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.