cancel
Showing results for 
Search instead for 
Did you mean: 

Changing the content-type of RFC adapter receiver

alejandro_gmez
Participant
0 Kudos

Hi gurus:

I'm having a problem with content-type of responses of the RFC adapter in my XI scenario.

I need to change the content-type of the response from "application/xml" to "text/xml" but I don't know how to do it.

Thanks in advance and regards,

Alejandro Gómez.

Edited by: Alejandro Gómez on Apr 15, 2009 12:48 PM

Accepted Solutions (1)

Accepted Solutions (1)

JoelTrinidade
Active Contributor
0 Kudos

Hi Alejandro,

Why would you want to do that ??? Its against protocol.

"Consistent with RFC 3023, protocol elements should be exchanged using the "application/xml" media type instead of the "text/xml" media type. "

Refer: http://www.imc.org/ietf-xml-use/mail-archive/msg00210.html

Regards

joel

PS: Xi adapters provide no such functionality.

Edited by: joel trinidade on Apr 15, 2009 5:31 PM

alejandro_gmez
Participant
0 Kudos

The application that invokes my web service obtains this error message:

Server found request content type to be 'application/xml', but expected 'text/xml'.

I think I must to change the content-type of the web service responses from "application/xml" to "text/xml".

Thanks again,

Alejandro Gómez.

JoelTrinidade
Active Contributor
0 Kudos

hi,

that was the most obvious thing to do but then i wonder about the protocol stuff ..... but if you get it working then who cares about protocol

Regards

joel

Former Member
0 Kudos

Is it possible to change the adapter type to HTTP? Is think you can set the encoding there.

Kai

alejandro_gmez
Participant
0 Kudos

Hi Kai:

My scenario is HTTP-plain -> XI -> RFC.

I think if it is possible to change the content-type, then it will be into the RFC adapter configuration.

Thanks,

Alejandro.

Former Member
0 Kudos

But as you wrote:

The application that invokes my web service obtains this error message:

Server found request content type to be 'application/xml', but expected 'text/xml'.

I assumed that the HTTP adapter needs to receive the specific content type. If you change it there then the sending application is fine - correct?!

alejandro_gmez
Participant
0 Kudos

Hi Kai:

No, it isn't. The client application needs the server responds with the correct content-type.

Thanks,

Alejandro.

alejandro_gmez
Participant
0 Kudos

Hi again:

I'm not sure where I must change (if possible) the content-type of the response message.

Thanks,

Alejandro.

Answers (2)

Answers (2)

alejandro_gmez
Participant
0 Kudos

Hi gurus:

Finally, I've solved my problem with the indications showed in SAP note #779981.

Thanks to all, and regards,

Alejandro.

Former Member
0 Kudos

Hi Alejandro, could you please tell me how you resolved your issue since i have the same problem. I get this error message: "Delivery Exception: invalid content type for SOAP:TEXT/HTML"

I need to change it to text/xml in my Soap Receiver.

thanks!

alejandro_gmez
Participant
0 Kudos

Hi Sonny:

Finally I've solved the problem in Java mapping program, changing the content-type parameter like this:


	public void setParameter(Map mParametro) 
	{
		this.mParametro=mParametro;
		if (mParametro==null) 
			this.mParametro=new HashMap();
		mParametro.put(StreamTransformationConstants.CONTENT_TYPE, "text/xml");
	}

I hope it helps you. Regards,

Alejandro.

former_member181985
Active Contributor
0 Kudos

There is no such option.

The RFC adpater process only RFC XML messages as it is designed like that.

Internally it converts the XML data to meta data as expected by the actual BAPI.

Regards,

- Gujjeti.