cancel
Showing results for 
Search instead for 
Did you mean: 

Error with Do Not use SOAP envelope

bhavesh_kantilal
Active Contributor
0 Kudos

All,

I used the do not send SOAP envelope option in the SOAP receiver adapter.

Instead of XSLT, I used JAVA mapping to create the entire SOAP message ( Am more comfortable with Java and this is just a trial) , and this is the output of my java mapping with the SOAP envelope created,

<i><?xml version="1.0" encoding="UTF-8"?><soap:Envelope xmlns:soap="http://www.w3.org/2001/12/soap-envelope"soap:encodingStyle="http://www.w3.org/2001/12/soap-encoding"><soap:Header></soap:Header><soap:Body><ns1:GetQuote xmlns:ns1="http://www.webserviceX.NET/"><ns1:symbol>SAP</ns1:symbol></ns1:GetQuote></soap:Body></soap:Envelope></i>

Am using the STOCK Quote for testing purposes and this is the error I am getting when testing my interface,

<i><faultstring>System.Web.Services.Protocols.SoapException: Server found request content type to be '', but expected 'text/xml'. at System.Web.Services.Protocols.SoapServerProtocol.ReadParameters() at System.Web.Services.Protocols.WebServiceHandler.Invoke() at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()</faultstring></i>

Any directions / inputs on how to resolve this issue?

Regards,

Bhavesh

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Try appending you target url with &nosoap=true in the receiver soap adapter.

This is required when the do not use soap envelope checkbox is selected.

Regards,

Smitha.

bhavesh_kantilal
Active Contributor
0 Kudos

All,

Implementing the solution suggested by Stefan in this thread did the trick.

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

Bhavesh,

I'm very pleased to see that your scenario worked! These module parameters always save the day.

I'm sorry for not have responding your message earlier. I had been absent from the forum for a couple of days and missed your message.

But if you still need the information, Soap URL is the actual Http url and Soap Action is passed as a Http header field. Check the Soap specification for more information on this matter:

Soap over HTTP: http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383526

Specifically, for Soap Action, check this:

http://www.w3.org/TR/2000/NOTE-SOAP-20000508/#_Toc478383528

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

Thanks a ton for this info. Will try this and get back for clarifications / the result

Regards,

Bhavesh

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

My SOAP Url : http://www.webservicex.net/stockquote.asmx

My SOAP action : http://www.webserviceX.NET/GetQuote

I have created the HTTP connection to an external Server with the SOAP url as the path prefix , and tested the connection and it works fine.

My question~~

How should I use the Header Field to point to the SOAP action in the HTTP receiver adapter.

What would be the Name and the value of this field?

I tried using <b>op=GetQuote</b> and the header and value , but no luck . I am getting an error back which states no Action attribute specified.

Its been a big learning curve so far, and this would be the grand finale if you can help me crack this

Thanks a ton,

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

Bhavesh,

as you can find in the specification above, the Soap Action is a HTTP header field with name <b>SOAPAction</b> and whose value is your actual Soap Action.

Try creating a HTTP header with these specifications (Header fields table, in Receiver HTTP Adapter).

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

I actually tried that too.

I used SOAPAction = http://www.webserviceX.NET/GetQuote

and also tried with SOAPAction = GetQuote . But, no luck .

Any other ideas?

Thanks,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

According to SOAP specification, it seems that SOAP Action needs to be between quote marks ("<soapaction URI>").

Did you try that?

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

Tried various permutations~~ The only new error / progress seems to be for this,

---

SOAPAction "http://www.webserviceX.NET/GetQuote"

---

This is giving me an error ,

<i>HTTP server code 400 reason Bad Request explanation <h1>Bad Request (Invalid Header Name)</h1></i>

Also, tried by adding the Colon after SOAPAction,

SOAPAction: "http://www.webserviceX.NET/GetQuote"

Same error

Final thing i guess is to make SOAPAction all small as soapaction and check if it works. Will let you know.

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

Well, Bad request maybe is because you need more one thing.

I'm not a HTTP expert myself, I just try to understand a few things. Keep trying and let us know the results.

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Been a long time since i postred this question.

But finally this issue saw the light at the end f the tunnel.

Henrique~ Dont ask me how it worked now when it didnt work earlier I tried another webservice now and was able to use the HTTP adapter to post the Webservice request and get the response back and like you had correctly mentioned the HTTP header filed to be used was SOAPACTION with the corresponding value for the Soap action.

The only difference was that the earlier system was a XI SP 14 one and this one is a PI SP 10 one. Maybe there was some bug in the HTTP header field , but now things work fine.

Anyone need info on how to use the HTTP adapter to post SOAP messages , I can be of help

Regards

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

Well done!!! 😄

Just one thing: the header name was SOAPACTION or SOAPAction?

Regards,

Henrique.

stefan_grube
Active Contributor
0 Kudos

HTTP header fields are not case sensitive. You can use both.

henrique_pinto
Active Contributor
0 Kudos

Hey Stefan,

thanks.

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Like pointed by stefan, I tried with both SOAPAction and SOAPACTION and it worked.

Regards

Bhavesh

Answers (2)

Answers (2)

Former Member
0 Kudos

look at thi sthread

udo_martens
Active Contributor
0 Kudos

Hi Bhavesh,

i assume, this is an error message from you mapping, not from the called webservice?!

If i'm right, your mapping programm expects content type "text/xml". The content type is not part of the payload, it belongs to http header.

I think, the responsibility for that error lays at sending application, where you have to configure the content type.

Regards,

Udo

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Udo,

Am using a Dummy data from a HTTP Clien to trigger the Interface and have hardcoded the output out of my request mapping. This error is not due to the mapping , but I think sent back from the Webservice as it is a FAULT message.

Correct me if i am wrong.

Regards,

Bhavesh

former_member206604
Active Contributor
0 Kudos

Hi Bhavesh,

Even I think the same, this should be the error message sent back from the webservices.

So you are trying that scenario hmmm gud unfortunately I don't have a system access now , please do it and let me know the result.

Thanks,

Prakash

udo_martens
Active Contributor
0 Kudos

Hi Bhavesh,

you should be able to analyse the error in the SXMB-Monitoring, may be increase the trace to 3. The error appears either at "Mapping of Request Message" or "Call of an Adapter". To be shure put a division to zero (int i = 1 / 0;) at the end of the program. If the error changes, your program is ok, but the receiver does not accept the content type. My suspect is the mapping.

Try to send the request by XMLSpy or, very easy, by <a href="http://www.robweb.de/wfetch.zip">wfetch</a>.

Regards,

Udo

former_member206604
Active Contributor
0 Kudos

Hi Udo & Bhavesh,

I think you need to set the logging level instead of the trace level to see the Sync messages. Then you will get to know the errors clearly.

Thanks,

Prakash

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Udo,

Will try the same and get back for sure..!!

Thanks,

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

The problem is that the content type is not part of the payload nor of the soap envelope, but it's rather part of the HTTP request header.

I'm just guessing here, but why don't you try to use Soap Adapter-Specific Attribute Header Field?

Set XHeaderName1 attribute to "Content-Type" (without the quotes) and use Dynamic Configuration to set xHeaderName1 attribute to "text/xml".

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Hi Henrique,

<i>Set XHeaderName1 attribute to "Content-Type" (without the quotes) and use Dynamic Configuration to set xHeaderName1 attribute to "text/xml".</i>

When I select the Adapter Specific Identifiers, I do not get an option / input screen where I can enter these fields.. Any idea as to where an how I should do this?

Regards,

Bhavesh

henrique_pinto
Active Contributor
0 Kudos

Bhavesh,

I guess Soap Adapter doesn't behave in real life like it should, as described in the specification. 😕

http://help.sap.com/saphelp_nw2004s/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm

As I said, I've never done this before, it was just a guess.

Anyway, since you're generating Soap Envelope in your mapping, why don't you try to use plain HTTP adapter?

I think that Header edition for HTTP adapter is working OK.

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

Actually foun the reson for the non availablityt of ADAPTER SPECIFIC IDENTIFIERS ~~ it is applicable only from sp 17 and am on Sp 16.

I am just developing this scenario as a learning experience of trying to configure a SOAP adapter in the non SOAP mode , and so am not giving up that easily

Regards,

Bhavesh

former_member206604
Active Contributor
0 Kudos

Hi Bhavesh,

That was really a gud info about ADAPTER SPECIFIC IDENTIFIERS and sp17. Let me know once you are done.

Thanks,

Prakash

henrique_pinto
Active Contributor
0 Kudos

Bhavesh,

I think there's another issue, because I'm on PI 7.0 SP8 and I can see only Variable Transport Biding option.

I've read someone complaining about Soap adapter being bugged on Adapter-specific attributes. I guess this is it.

And about assembling soap communication from scratch, I guess it's one more reason for you to use plain HTTP Adapter, since SOAP is nothing else but HTTP+XML. 🐵

Regards,

Henrique.

bhavesh_kantilal
Active Contributor
0 Kudos

Henrique,

Great info once again.. and thanks for the interest and support on this thread.

A quick question.. if i were to use a HTTP adapter instead of a SOAP adapter, how and what should I do in the following?

1. Mapping~~ What should the Target out of the request mapping be? Currenty it is the SOAP message with the SOAP envelope , header and body. Is that sufficient?

2. In the Receiver HTTP adapter, what is the details I am supposed to enter against,

TARGET HOST , SERVICE NUMBER and PATH.

How is the SOAP url and SOAP action to be used here.

Have not configured a receiver HTTP adapter and hence these elmentary questions

Regards,

Bhavesh