cancel
Showing results for 
Search instead for 
Did you mean: 

com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type error

former_member737583
Participant
0 Kudos

My scenario looks simple SPROXY => XI => WebService with synchronous communication.

When I'm trying to connect into my WebService using testing functionality of SPROXY I'm still finish with error:


com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 411 Length Required

I found in few topics on forum that this error message is related due to missing wsdl information (see also thi PDF: https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/40728f7b-0401-0010-d9bc-8c7...

I asked WebService author where I can find wsdl file, but he said that they do not have them (!). I tried also to check the place of wsdl file adding to WebService adress ?wsdl - without success!

So only one information which I've is a server (target) address, port number and how my soap request should looks like. Using those information I'm able to connect into WebService using Altova or SoapUI but from XI I'm not able.

I used also TCPGateway to trace soap request and I see that Altova sends this info WebService


POST / HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
User-Agent: EasySoap++/0.8.0
Host: 192.168.132.179:54000
Content-Length: 431
Connection: Keep-Alive
Cache-Control: no-cache

<E:Envelope xmlns:E="http://schemas.xmlsoap.org/soap/envelope/" xmlns:A="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.w3.org/2001/XMLSchema" E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"><E:Body><m:Sd2Ids_SzfExport xmlns:m="http://www.dat.de/sdii/ids/Sd2SOAP.wsdl"><arg1>1234567899-0</arg1><arg2>2</arg2></m:Sd2Ids_SzfExport></E:Body></E:Envelope>

but XI sends a little bit different


POST / HTTP/1.0
Accept: */*
Host: 192.168.132.179:54000
User-Agent: SAP-Messaging-com.sap.aii.messaging/1.0505
Content-ID: <soap-a4773bc021ce11dda3fd000c29ee261e[at]sap.com>
Content-Type: text/xml; charset=utf-8
Content-Disposition: attachment;filename="soap-a4773bc021ce11dda3fd000c29ee261e[at]sap.com.xml"
Content-Description: SOAP
Content-Length: 234
SOAPACTION: "Sd2Ids_SzfExport"
X-XMB_WS_ENCODED: version=3.0&MessageClass=ApplicationMessage&ProcessingMode=synchronous&MessageId=dd21ce4f-4cc1-9ff1-82a0-0002a547e483&TimeSent=2008-05-14T15%3A56%3A27Z&Sender.Party=%3A%3A&Sender.Service=DBMIFD&Receiver.Party=%3A%3A&Receiver.Service=dat_de_silverdat_II&Interface=http%3A%2F%2Fwww.dat.de%2Fsdii%2Fids%2FSd2SOAP.wsdl%5ESzfExport_XI2SD2&QualityOfService=BestEffort

<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/><arg2/></ns0:Sd2Ids_SzfExport></SOAP:Body></SOAP:Envelope>

First difference which I see here is information that XI use HTTP 1.0 and Altova is using HTTP 1.1. I do not know why XI use 1.0 when I set SOAP 1.1. Maybe it is because XI is set to use HTTP 1.0 (but there is no other option)

I will reward (as usually) all helping answers with points

Accepted Solutions (0)

Answers (3)

Answers (3)

stefan_grube
Active Contributor
0 Kudos

> com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 411 Length Required

This means, that the response message is no SOAP message. This happens always in case of an HTTP 4xx error.

> I asked WebService author where I can find wsdl file, but he said that they do not have them (!).

A WSDL helps to create correct message, but is not required for XI.

> I used also TCPGateway to trace soap request and I see that Altova sends this info WebService

look at the response also, there should be some information about the error.

> but XI sends a little bit different

> SOAPACTION: "Sd2Ids_SzfExport"

remove the value in SOAP action in SOAP adapter channel

> X-XMB_WS_ENCODED: version=3.0&MessageClass=ApplicationMessage&ProcessingMode=synchronous&MessageId=dd21ce4f-4cc1-9ff1-82a0-0002a547e483&TimeSent=2008-05-14T15%3A56%3A27Z&Sender.Party=%3A%3A&Sender.Service=DBMIFD&Receiver.Party=%3A%3A&Receiver.Service=dat_de_silverdat_II&Interface=http%3A%2F%2Fwww.dat.de%2Fsdii%2Fids%2FSd2SOAP.wsdl%5ESzfExport_XI2SD2&QualityOfService=BestEffort

uncheck all check boxes in SOAP adapter channel. Apply only target URL, user and password

> First difference which I see here is information that XI use HTTP 1.0 and Altova is using HTTP 1.1.

That should not matter

>I do not know why XI use 1.0 when I set SOAP 1.1.

SOAP version and HTTP version are not related.

former_member737583
Participant
0 Kudos

I think that a response has a right format (see below)

HTTP/1.1 200 OK

Content-Length: 103367

Content-Type: text/xml; charset=ISO-8859-1

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


<E:Envelope xmlns:E="http://schemas.xmlsoap.org/soap/envelope/" xmlns:A="http://schemas.xmlsoap.org/soap/encoding/" xmlns:s="http://www.w3.org/2001/XMLSchema-instance" xmlns:y="http://www.w3.org/2001/XMLSchema" E:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
- <E:Body>
- <Result>
  <Function s:type="y:string">Sd2Ids_SzfExport</Function> 
  <r s:type="y:string"><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>here is a big XML</r> 
  </Result>
  </E:Body>
  </E:Envelope>

stefan_grube
Active Contributor
0 Kudos

> Content-Type: text/xml; charset=ISO-8859-1

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

and here:

> <r s:type="y:string"><?xml version="1.0" encoding="UTF-8" standalone="yes" ?>here is a big XML</r>

Maybe there are UTF-8 characters which lead to the error.

Regards

Stefan

former_member737583
Participant
0 Kudos

That's my quess to, but I can't change it. Maybe it will be easier to change content type to UTF-8. I have no influence encoding of WebService response

Former Member
0 Kudos

I faced the same problem,

Try putting a port 80 after the host name.

If a proxy sits then the port resolution wont be happening as desired.

Thanks

Sebin

GabrielSagaya
Active Contributor
0 Kudos

By default the SOAP adapter sends the SOAP message the content type text/xml. So you need not do anything special.

When you check "Do not use SOAP envelope", the default contnet type is application/xml. You can change the content type like this: Go to the SOAP receiver communication channel module tab. Add the module "localejbs/AF_Modules/MessageTransformBean" before the standard module. Add the parameter name Transform.ContentType and value text/xml

former_member737583
Participant
0 Kudos

What shoul I write as a ModuleKey. It is a simple name which I can freely chose? Second question "DO NOT Use SOAP Envelope should be checked?"