on 09-16-2009 8:17 PM
Hello,
I am trying to put data into soap header using soap receiver adapter. Seems like building the complete soap message is the right way to go. Thus I wrote a java program to build the complete soap message (soap envelop, soap header and soap body which contains the message PI received from the sender). Mapping program works well. However when I ran the scenario, I got Error "SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 415 Unsupported Media Type" when calling the receiver's web service (the SOAP receiver adapter CC have the "Do Not use SOAP Envelop" checked). Anyone knows why I got this error? From google, seems like this error is because the http's content-type is set to other type, rather than "text/xml". However in soap CC there is no option to control this.
The message sent to the receiver is (after mapping);
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header>
<SOAP-SEC:Signature xmlns:SOAP-SEC="http://schemas.xmlsoap.org/soap/security/2000-12" MyAttr="value">My Test Value</SOAP-SEC:Signature>
</SOAP-ENV:Header>
<SOAP-ENV:Body>
<ns1:UpdateEquipment xmlns:ns1="http://mycomp.com/mywebservice">
<ns1:EquipmentNumber>000000012345</ns1:EquipmentNumber>
<ns1:LicensePlate>654321</ns1:LicensePlate>
</ns1:UpdateEquipment>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Anyone can help?
Thanks
When you check "Do Not use SOAP Envelop", the SOAP adapter chooses application/xml instead of text/xml.
You can change the content type with help of the MessageTransformBean. You put the bean in the module chain of the receiver channel and add the parameter Transform.ContentType = text/xml
See
http://help.sap.com/saphelp_nwpi71/helpdata/EN/57/0b2c4142aef623e10000000a155106/frameset.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Stefan, you are genius. I love you!
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.