cancel
Showing results for 
Search instead for 
Did you mean: 

Differences in request from IX to WebService (SOAP ENVELOPE)

former_member737583
Participant
0 Kudos

Hi!

I'm trying to receive correct response from WebService. I read almost all blogs trying to find solution into my problem. Using TCPGateway and some logs from WebService I think I found place from where "HTTP 411 error - length required" comes. It is because SAP adds some extra information into SOAP header.

When I use SOAP Envelope my request looks:


POST / HTTP/1.0

Accept: */*

Host: 192.168.132.179:54000

User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505

Content-ID: <soap-02cce7702b1a11dd9902000c29ee261e[at]sap.com>

Content-Type: text/xml; charset=utf-8

Content-Disposition: attachment;filename="soap-02cce7702b1a11dd9902000c29ee261e[at]sap.com.xml"

Content-Description: SOAP

Content-Length: 259

SOAPACTION: 


<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'><SOAP:Header/><SOAP:Body><ns0:Sd2Ids_SzfExport xmlns:ns0='http://www.dat.de/sdii/ids/Sd2SOAP.wsdl'><arg1>1234567899-0</arg1><arg2>1</arg2></ns0:Sd2Ids_SzfExport></SOAP:Body></SOAP:Envelope>

When I DO NOT USE SOAP Envelope my request looks:


POST / HTTP/1.0

Accept: */*

Host: 192.168.132.179:54000

User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505

content-id: payload-DD2B1AE2E8E735F182A00002A547E483[at]sap.com

Content-Type: text/xml

Content-Length: 175

SOAPACTION: 



<?xml version="1.0" encoding="UTF-8"?>
<ns0:Sd2Ids_SzfExport xmlns:ns0="http://www.dat.de/sdii/ids/Sd2SOAP.wsdl"><arg1>1234567899-0</arg1><arg2>1</arg2></ns0:Sd2Ids_SzfExport>

*Question

How can I force XI to DO NOT generate in SOAP header below lines and still using SOAP Envelope?*


Content-Disposition: attachment;filename="soap-02cce7702b1a11dd9902000c29ee261e[at]sap.com.xml"

Content-Description: SOAP

Accepted Solutions (0)

Answers (2)

Answers (2)

prateek
Active Contributor
0 Kudos

U may write a java mapping code to edit the soap envelop

Regards,

Prateek

Former Member
0 Kudos

Hi,

Plz don't mind if you don't wish to include any SOAP related header information then, Is there any specifci need of using the SOAP enevlope. you can uncheck the usage of SOAP enevlope.

Else probably you may need to design your own Adapter module to achieve this kind of requirment.

Thanks

Swarup

former_member737583
Participant
0 Kudos

Yes, there is a need to use SOAP ENVELOPE - WebService requires it. I found information that I can use transformations "Transform.ContentDisposition" but I can't find any helping examples which satisfy my needs.

Former Member
0 Kudos

Hi,

Then you should have to go for either design own Adapter module to supress the SOAP enevlope details or as Prateek had said try with Java mapping.

Thanks

Swarup

Edited by: Swarup Sawant on May 26, 2008 2:46 PM

former_member737583
Participant
0 Kudos

I did a small additional test. I pasted the same XI request which produces error into Altova and I send it to WebService... and surprise - I got a good answer. So I've checked logs in WebService and probably I found the real reason of my problems. SAP calculates length as 259 and Altova as 261 chars. I've checked in text editor how long is XI request and it is... 261 chars long!

Any ideas how can I force content-length to display correct value?

henrique_pinto
Active Contributor
0 Kudos

Hi Thomas,

are there any scpecial chars (non-ascii) in your message?

If yes, then you have to set the proper encoding of the incoming message for the proper size to be measured.

Best regards,

Henrique.

former_member737583
Participant
0 Kudos

My whole message looks:


<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Header/>
  <SOAP:Body>
    <ns0:Sd2Ids_SzfExport xmlns:ns0='http://www.dat.de/sdii/ids/Sd2SOAP.wsdl'>
     <arg1>1234567899-0</arg1>
     <arg2>1</arg2>
    </ns0:Sd2Ids_SzfExport>
  </SOAP:Body>
</SOAP:Envelope>

I do not see here any non-ascii characters

Edited by: Tomasz Suchanek on May 26, 2008 10:49 AM