Content-Type for POST request
Hi all again,
I am setting content-type in the header to "text/xml" yet when I do a POST sap sends as content-type
"application/x-www-form-urlencoded". Is there something else I need to set to make it post with text/xml ?
cl_http_client=>create_by_url( EXPORTING url = url
ssl_id = 'ANONYM'
IMPORTING client = http_client ).
* create HTTP client object
* cl_http_client=>create_by_destination( EXPORTING DESTINATION = 'ZTOLLREQUEST'
* IMPORTING client = http_client ).
* Set HTTP headers
http_client->request->set_header_field( name = '~request_method'
value = 'POST' ).
http_client->request->set_header_field( name = 'Content-Type'
value = 'text/xml' ).
* http_client->request->set_header_field( name = 'Authorization'
* value = auth_string ).
* http_client->request->set_header_field( name = 'sap-password'
* value = 'ymous' ).
* Set payload
http_client->request->set_cdata( xml_string ).
* send and receive
CALL METHOD http_client->send
EXCEPTIONS
http_communication_failure = 1
http_invalid_state = 2.
regards
Allan
i havent tried this (setting content type) when using create by url . may be try just the create method and then set the remaining part of the url as headers ~request_uri parameter. something like below.
call method cl_http_client=>create
exporting
host = 'www.webservicex.net'
service = '80'
scheme = '1'
proxy_host = wf_proxy
proxy_service = wf_port
importing
client = http_client.
http_client->propertytype_logon_popup = http_client->co_disabled.
wf_user = user .
wf_password = password .
call method http_client->authenticate
exporting
proxy_authentication = 'X'
username = wf_user
password = wf_password.
call method http_client->request->set_header_field
exporting
name = '~request_method'
value = 'POST'.
call method http_client->request->set_header_field
exporting
name = '~server_protocol'
value = 'HTTP/1.1'.
call method http_client->request->set_header_field
exporting
name = '~request_uri'
value = '/airport.asmx'.
Regards
Raja
Similar Messages
-
Cfhttp and setting the content-type for a request
Hi,
I am trying to set the content-type for a cfhttp request like this (on coldfusion 9):
<cfhttp redirect="no" method="get" timeout="120" url="http://10.0.0.1/test2.cfm">
<cfhttpparam type="HEADER" name="Content-Type" value="application/json; charset=utf-8">
</cfhttp>
// coding on test2.cfm:
<cfset x = GetHttpRequestData()>
<cfdump var=#x#>
// Output on test2.cfm
content
[empty string]
headers
struct
Accept-Encoding
deflate, gzip, x-gzip, compress, x-compress
Connection
TE
Host
10.0.0.1:80
Proxy-Connection
close
TE
trailers, deflate, gzip, compress
User-Agent
ColdFusion
X-REWRITE-URL
http://10.0.0.1:80/test2.cfm
method
GET
protocol
HTTP/1.1
As you can see no content-type is send through. I also tried the sniffer.exe:
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Here you can also see that no content-type was passed through. The sniffer should report back
GET http://10.0.0.1:80/test2.cfm HTTP/1.1
Host: 127.0.0.1
Proxy-Connection: close
Connection: TE
TE: trailers, deflate, gzip, compress
User-Agent: ColdFusion
Accept-Encoding: deflate, gzip, x-gzip, compress, x-compress
Content-Type: application/json; charset=utf-8
But is does not, what do i need todo to set the content-type in a cfhttp request.
Kind regards,
Nebu12Robots - are you sure about your statement that GET method requests cannot have Content-Type headers? I don't think that that is correct. I've always thought that it was valid (maybe unusual, but ...) and this W3C link weems to agree, especially in the context of its comment about what Content-Type means in a HEAD method request: http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html
The big problem with trying to get around the CFHTTP limitation by using the CGI scope is that the dash is illegal in a CF varname.
There is a custom tag called CFHTTP5 that getsaround a lot of the CFHTTP limitations, including cookie preservation across multiple requests. I haven't used it for a long time (CF5), but it is still actively developed. Costs $50 - http://www.cftagstore.com/tags/cfxhttp5.cfm
-reed -
Error: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
Hi Gurus,
i am hardly fighting with this error in Communication Channel Monitoring:
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
This is my scenario.
I do a File to SOAP Scenario. in SXI_MONITOR everything is fine.
My CommChan is a SOAP Receiver
HTTP
SOAP 1.1
Central Adapter Engine
Target URL is https --> i check url for correctness
Configure User Authentication is checked and username and pw are given and are correct.
Configure Certificate Authentication is checked are working
Configure Proxy is checked and Host and port are povided.
SOAP Action is provided
In Tab Module
if have this Processing Sequence
1 localejbs/AF_Modules/MessageTransformBean Local Enterprise Bean transform
2 sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean Local Enterprise Bean 1
and this Module configuration (and only this)
transform Transform.ContentType text/xml;charset=utf-8
(according to /people/sobhithalaxmi.kata/blog/2009/07/21/cost-free-edi-integration-using-message-transformation-bean)
As far as i understand that my http header should have Content-Type: text/xml;charset=utf-8 now. I don't understand why Communication Channel Monitoring shows an error according to content TEXT/HTML.
Can anyone help me with that?
Is it possible that Transform.ContentType does not work for SOAP Receiver Adapter?
is there any chance to view the HTTP-Header of the outgoing SOAP Request (with PI Transaction / Java Enironment) to convince myself that the HTTP Header is text/xml?
Thank you in advance and Best Regards
UdoHi Thanks for your fast replies.
The Provider of the Endpoint tells me that he needs text/xml as content-type. When I sent a message to the given Endpoint via SOAP UI I can see in the HTTP LOG of SOAP UI that the Endpoint is also sending text/xml back.
Below you find the Details log out of the CommChan Monitoring.
2011-04-29 11:37:45 Information The message status was set to TBDL.
2011-04-29 11:37:45 Information Retrying to deliver message to the application. Retry: 3
2011-04-29 11:37:45 Information The message was successfully retrieved from the receive queue.
2011-04-29 11:37:45 Information The message status was set to DLNG.
2011-04-29 11:37:45 Information Delivering to channel: getxxxxx_In <---- name of my SOAP Receiver CommChan
2011-04-29 11:37:45 Information Transform: using Transform.Class: $identity
2011-04-29 11:37:45 Information Transform: transforming the payload ...
2011-04-29 11:37:45 Information Transform: successfully transformed
2011-04-29 11:37:45 Information SOAP: request message entering the adapter with user J2EE_GUEST
2011-04-29 11:37:46 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
2011-04-29 11:37:46 Information SOAP: sending a delivery error ack ...
2011-04-29 11:37:46 Information SOAP: sent a delivery error ack
2011-04-29 11:37:46 Error SOAP: error occured: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
2011-04-29 11:37:46 Error Adapter Framework caught exception: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request
2011-04-29 11:37:46 Error Delivering the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 400 Bad Request.
2011-04-29 11:37:46 Error The message status was set to NDLV.
What i am missing is a hint on the Message Transform Bean and a on a successfull sending process.
What i also tried already:
i also activated the checkbox "Do not use SOAP Envelop" in CommChan Configuration. The Result you see below (the last log entry is on first line - so read from bottom to top)
Message processing failed. Cause: com.sap.engine.interfaces.messaging.api.exception.MessagingException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 400 Bad Request
error in response
call completed
request entering
Message processing started
As you can see there is a "call completed" and "error in response" log entry. This is missing in in the first Log. So i guess the error is still in the sending process.
Installing additional Software on the PI and use them to find out what the HTTP Request is is not possible as system access is very strict and limited :/ -
Invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
Hi,
I have this error on a SOAP Receiver Channel: invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
I've found several threads on SDN Forums about similar errors, but I did not find a solution for my problem yet.
I checked this blog: /people/shabarish.vijayakumar/blog/2008/01/08/troubleshooting--rfc-and-soap-scenarios-updated-on-20042009 Pt.6 applies to my situation, but the proposed solution doesn't solve the problem.
TRACE Messaging System
u2026
2011-06-06 10:59:41.822 Success Delivering to channel: CC_SOAP_RCV_XXX
2011-06-06 10:59:41.823 Success MP: entering1
2011-06-06 10:59:41.825 Success MP: processing local module localejbs/sap.com/com.sap.aii.af.soapadapter/XISOAPAdapterBean
2011-06-06 10:59:41.828 Success SOAP: request message entering the adapter with user J2EE_GUEST
2011-06-06 10:59:42.012 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML; HTTP 500 Internal Server Error
2011-06-06 10:59:42.014 Success SOAP: sending a delivery error ack ...
2011-06-06 10:59:42.014 Success SOAP: sent a delivery error ack
u2026
Message Details
Address http://aaa.bbb.be:54000/MessagingSystem/receive/AFW/XI
Credential PasswordCredential(PIISUSER):password=********
Transport Headers accept-encoding=gzip sap-xi-messageid=4DEA11FE90003094E10000000AE908B4 content-length=7520 http=POST host= aaa.bbb.be:54000 user-agent=SAP NetWeaver Application Server (1.0;711) content-type=multipart/related;boundary=SAP_4DEA47CEAD3A5138E10000000AE908B4_END;type="text/xml";start="" soapaction="http://sap.com/xi/XI/Message/30"
Configuration Details SOAP Communication Channel
SOAP Receiver Channel
No modules configured
Do not use SOAP Envelope -> NOT checked
If I type the target URL in browser it opens (no login required) and I see the available web services.
Anyone any idea what's the reason for this error?
Thanks in advance
Kind Regards
Edmond PaulussenHi Edmond,
We faced similar problem & found alternative.
Try out, if it works for u as well.
1) Use HTTP Adapter instead of SOAP.
Transport Protocol : HTTP 1.0
Message Protocol : XI Payload in HTTP Body
Adapter Engine : Integration Server
Addressing type : URL Address.
Target Host:
Service Number :
Path Prefix:
Authentication type : we hv used Ananymus login, as our login details in payload header.
Content Type : application/soap+xml;charset=UTF-8( this is IMP).
Header Fields.
Name value
Host target host
XI Payload Manipulation
XML Code : UTF-8
Hope, this helps...
-santosh. -
Invalid content type for SOAP: TEXT/HTML
Hi guys,
Im trying to sending a message via sender soap adapter and Im receiving this error:
Exception caught by adapter framework: invalid content type for SOAP: TEXT/HTML
I already have read most off all posts about this error in this forum. So, if I understand, this error means that my receiver soap adapter cant reach the web service provider and an HTTP error notification is sent to calling application. Although, the SOAP adapter doesnt understand this kind of errors (ex. 404 not found -> SOAP call has no error codes and use the HTTP codes for effect) and this happening because the error is in text/html format and SOAP adapter is waiting a response in text/xml.
This is a simple calculator web service that receives two arguments and returns the sum as a result. (Like Siva Maranani weblog /people/siva.maranani/blog/2005/09/03/invoke-webservices-using-sapxi )
The web service is published on SAP Enterprise Portal and it works fine.
- The login works fine
User: ex30268
Pwd: 12345678
- We dont have certificates and proxy server.
This is the address in my receiver soap adapter: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
I already checked the settings of my receiver soap adapter and did a little test, enabling the parameter Do Not Use SOAP Envelop only in receiver adapter. And the result is an exception during mapping!!! What is means this error?
Does anybody know how to solve this issue?
Thanks in advance.
Cheers,
Ricardo.Hi all,
Please forgive me for boring you again with this subject, but I havent yet solved this issue, I still receive the following message and Im getting quite worried
>>> Invalid content type for SOAP: TEXT/HTML
Im following Siva Maranani web log (Invoke Webservices using SAPXI) and I will describe the steps that I did:
<b>Integration Repository:</b>
An Inbound synchronous Message Interface (CalculatorWS_IN_MI) using the message types in external definition (WSDL from web service hat I want to invoke).
The other necessary data types (Calc_input_DT has 2 parameters>arg1 and arg2. and Calc_out_DT has 1 param> result) and corresponding Message types.
An Outbound synchronous Message Interface (Calc_OUT_MI) using the message types defined in Integration Directory.
2 Message mappings (request and response) and 1 Interface mapping.
<b>Integration Directory:</b>
A scenario calls WebServices.
2 business services (webservice and webservice_calc).
A Receiver determination with webservice as a sender service (note: this sender is simulated from the WSNavigator from an Enterprise Portal that I have installed locally in my laptop) the interface is (Calc_OUT_MI).
An Interface determination with webservice_calc as a receiver service and the corresponding mapping interface and SOAP receiver channel.
Configurations of SOAP receiver channel:
Target URL: http://intranetcorpdev.edp.pt:54700/CalculatorWebService/Config1?style=document
User: ex30268
Pwd: 12345678
I have picked only the parameters Use Encoded Headers and Use Query String activated. Im not using any kind of certificates or proxy servers.
A call tentative:
Request
POST /XISOAPAdapter/MessageServlet?channel=:WebService:SOAPSenderChannel&version=3.0&Sender.Service=WebService&Interface=http%3A%2F%2Fswitching%2Fxi%5ECalc_OUT_MI HTTP/1.1
Host: ed19dci1f.appl.edinfor.pt:54900
Content-Type: text/xml; charset="UTF-8"
Connection: close
Cookie: <value is hidden>
Cookie: <value is hidden>
Authorization: <value is hidden>
SOAPAction: "http://sap.com/xi/WebService/soap1.1"
Content-Length: 407
Response
HTTP/1.1 500 Internal Server Error
Connection: close
Server: SAP J2EE Engine/6.40
Content-Type: text/xml; charset=utf-8
Date: Fri, 12 May 2006 08:24:18 GMT
<?xml version='1.0'?>
<!-- see the documentation -->
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s='http://sap.com/xi/WebService/xi2.0'>
<context>XIAdapter</context>
<code>DeliveryException</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.DeliveryException: XIAdapterFramework:GENERAL:com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML
at com.sap.aii.adapter.xi.ms.XIEventHandler.onTransmit(XIEventHandler.java:451)
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:125)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
at com.sap.engine.frame.core.thread.Task.run(Task.java(Compiled Code))
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java(Compiled Code))
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java(Compiled Code))
]]></text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
I think that I have tried everything and read almost of posts, web logs, SDN community contribution and the info in help.sap.com, but Im feeling unable to solve this kind of issue. Im afraid that I was missed something. So thats the reason to describe here all the steps that I have done.
I hope somebody knows how to solve this issue or give me something that can help me find the end of this road
Thanks for all.
Cheers,
Ricardo. -
Dear SharePoint Developers,
Please help.
I need to know How to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx?
I think this is a "sealed column", whatever that is, which is shown in SPD 2013 as a column of content type "document, folder, MyCustomContentType".
I know when I set the column order in my custom Content Type settings page, it is correct.
But, when I load the NewDocSet.aspx page, the column order that I set in the settings page is NOT used for this "sealed column" which is bad.
Can you help?
Please advise.
Thanks.
Mark Kamoski
-- Mark KamoskiHi,
According to your post, my understanding is that you want to set the column order of a sealed column in a custom Content Type for the new item form NewDocSet.aspx.
Per my knowledge, if you have Content Type management enabled for the list or library (if you see a list of content type with the option to add more), the display order of columns is set for each content type.
Drill down into one of them and you'll see the option under the list of columns for that content type.
To apply the column order in the NewDocSet.aspx page, you need to:
Select Site Settings, under Site Collection Administration, click Content type publishing. In the Refresh All Published
Content Types section, choose Refresh all published content types on next
update.
Run two timer jobs(Content Type Hub, Content Type Subscriber) in central admin(Central Administration--> Monitoring--> Review timer jobs).
More information:
http://sharepoint.stackexchange.com/questions/95028/content-types-not-refreshing-on-sp-online
Best Regards,
Linda Li
Linda Li
TechNet Community Support -
DeliveryException: invalid content type for SOAP: TEXT/HTML
My scenario is RFC -> XI -> SOAP (synchronous), but when I test this scenario, I got the error message "DeliveryException: invalid content type for SOAP: TEXT/HTML", I search the document and change it following this blog: /people/varadharajan.krishnasamy/blog/2007/01/09/troubleshooting-soap-message--xi
1. I add a MessageTransformBean module before the original one
2. I add a transform key, the value is text/html;charset=utf-8
But when I active this channel and test again, I got another message:
XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION-HTTP 400 Bad Request.
I only find one discussion about it but I still have no idea how to solve the problem. Do I need to change my mapping ? And when field should I generated in the mapping?
Problem with SOAP receiver adapterAnd of course you have also applied the correct SOAPAction.
Sorry for bothering you, but is difficult to guess the error, but in my experience, must issues are due to wrong configuration.
Could you check with TCPGateway, what error is sent back?
/people/stefan.grube/blog/2007/03/29/troubleshooting-soap-http-and-mail-adapter-scenarios-with-tcpgateway
Regards
Stefan -
DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Move
Hi everyone,
Hello all,
I have an RFC->XI->Web Service (SOAP) synchronous scenario.
I'm trying to send a message from the the RFC, and in the message monitoring (SXMB_MONI) I'm getting this error message:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!-- Inbound Message
-->
<SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
<SAP:Category>XIAdapterFramework</SAP:Category>
<SAP:Code area="MESSAGE">GENERAL</SAP:Code>
<SAP:P1 />
<SAP:P2 />
<SAP:P3 />
<SAP:P4 />
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/PLAIN; HTTP 302 Moved Temporarily</SAP:AdditionalText>
<SAP:ApplicationFaultMessage namespace="" />
<SAP:Stack />
<SAP:Retry>M</SAP:Retry>
</SAP:Error>
I have as the TARGET URL: http://webservices.iter.dk/calculator.asmx?WSDL
SOAP ACTION: http://www.iter.dk/webservices/calculator.asmx/Add
As the content type in the WSDL file: application/text
What could be wrong? thanks...
FelipeHi Felipe
This i think is due to incorrect address or redirection failure which is one of the major reason for 302 as per my knowledge.
You try to post the content and test it without using XI. Download SOAP UI and test it once and let me know
http://www.soapui.org/
helpful blog
Troubleshooting - RFC and SOAP scenarios *** Updated on 20/04/2009 ***
Thanks
Gaurav -
Invalid content type for SOAP: TEXT/HTML on Reciever SOAP
HI All,
I have a reciever SOAP channel setup to send a message and its attachments to a supplier. The recieving application is as follows:
"It just receives the stream or contentStream and print out the content. It's just a test to see what you sent to us. It processes all http/https messages."
If I leave the SOAP Envelope on I get the content type error in the header. If I turn the Enveloper off, I get a successful post. They are try to trap what I send to build a SOAP processor, so they want the SOAP envelope. What could be causing this?
Kind Regards,
ChrisHi Richard,
The web service address that we must type in target URL of receiver soap adapter is the address to the WSDL. To be sure types this address in your browser and you must see a WSDL code of the webservice that you want invoke.
The reason that you are getting Delivery Exception: invalid content type for SOAP:TEXT/HTML. is because you are trying to invoke a web service with wrong address.
So, when SOAP receiver adapter try to put the message on the target side, it cant and automatically receives an HTTP acknowledge in HTML format. As SOAP adapter doesnt understand HTML code only XML code, it cant recognize what kind of error is and generates an exception indicating that the content type is invalid.
Delivery Exception: invalid content type for SOAP:TEXT/HTML is equal to any HTTP code, I have almost sure that HTTP code is a 404 Not Found, but you cant see it...
Post the URL here for I can check
Cheers,
Ricardo. -
Error message: invalid content type for SOAP: TEXT/HTML; HTTP 403 Forbidd
Hi All,
My scenario is Proxy to File
So in-order to test the scenario i am sending the Data from RWB using TestMessage
i have given the sender and receiver details.
and the payload i am passing is
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_QAStatusReport xmlns:ns0="http://XXXX.com/xi/SARERP/IF0100_QAStatusReport/100">
<RECORD_STRCUTURE>
<RECORD>
<INSP_LOT>New for EU</INSP_LOT>
<MATNR>00000500418</MATNR>
<SHORT_TEXT> caps SE</SHORT_TEXT>
<PLANT>0082</PLANT>
<BATCH>59756</BATCH>
<VENDOR_BATCH>59756</VENDOR_BATCH>
<INQUAL_INSP>1940</INQUAL_INSP>
<SSQUAL_INSP>0</SSQUAL_INSP>
<VENDOR/>
<DATELOT_CREA>7/20/2011</DATELOT_CREA>
<DAYS_QA>26</DAYS_QA>
<COMMENTS>Pending Import Testing</COMMENTS>
</RECORD>
</RECORD_STRCUTURE>
</ns0:MT_QAStatusReport>
the error i am facing is
Error while sending message: invalid content type for SOAP: TEXT/HTML; HTTP 403 Forbidden
can any one suggest me how to solve the isssue
Thanks&Regards
SaiI had received similar error , request you to also check following,
1. while sending the message from IE placed in RWB, just check the URL in the Test Message tab, its possible that this PI is installed just now and its settings are not done correctly. In this ask the owner or the BASIS to change it to correct URL.
for example it should look something like - http://sdndevdpi001:50100/sap/xi/engine?type=entry -
Could not parse XMBMessage due to invalid content type for SOAP: TEXT/HTML
Hi all,
I am working on a SOAP scenario,
the soap body is as follows
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SOAP-ENV:Body>
<m:MT_test xmlns:m="http://titan.co.in/test">
<name>String</name>
<age>String</age>
</m:MT_test>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
when i tried to request it using XML spy, following error i am getting ,
<?xml version="1.0"?>
<!-- see the documentation -->
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>ADAPTER.JAVA_EXCEPTION</code>
<text><![CDATA[
com.sap.aii.af.ra.ms.api.DeliveryException: com.sap.aii.af.ra.ms.api.MessagingException: Could not parse XMBMessage due to invalid content type for SOAP: TEXT/HTML
at com.sap.aii.af.ra.ms.impl.core.queue.consumer.CallConsumer.onMessage(CallConsumer.java:158)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:916)
at com.sap.aii.af.ra.ms.runtime.MSWorkWrapper.run(MSWorkWrapper.java:56)
at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
at java.security.AccessController.doPrivileged(Native Method)
at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:102)
at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:172)
]]></text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope>
the request is coming to xi, when i am monitoring the communication channel in RWB,
i am getting message, "request received, error occured"
this is anew xi server, is ther any configuration need to do.
Please help me.
Regards
Pradeep P NI'm getting the same error. Please tell me how do i resolve this?
request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="http://soap2soap">
<soapenv:Header/>
<soapenv:Body>
<soap:mt_soapreqsender>
<years>?</years>
<interest>?</interest>
<loan>?</loan>
<tax>?</tax>
<insurance>?</insurance>
</soap:mt_soapreqsender>
</soapenv:Body>
</soapenv:Envelope>
response:
<!see the documentation>
<SOAP:Envelope xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP:Body>
<SOAP:Fault>
<faultcode>SOAP:Server</faultcode>
<faultstring>Server Error</faultstring>
<detail>
<s:SystemError xmlns:s="http://sap.com/xi/WebService/xi2.0">
<context>XIAdapter</context>
<code>DeliveryException</code>
<text>com.sap.aii.af.ra.ms.api.DeliveryException: com.sap.aii.af.ra.ms.api.MessagingException: Could not parse XMBMessage due to invalid content type for SOAP: APPLICATION/OCTET-STREAM
at com.sap.aii.af.ra.ms.impl.core.queue.CallConsumer.onMessage(CallConsumer.java:144)
at com.sap.aii.af.ra.ms.impl.core.queue.Queue.run(Queue.java:831)
at com.sap.engine.frame.core.thread.Task.run(Task.java:64)
at com.sap.engine.core.thread.impl5.SingleThread.execute(SingleThread.java:79)
at com.sap.engine.core.thread.impl5.SingleThread.run(SingleThread.java:150)</text>
</s:SystemError>
</detail>
</SOAP:Fault>
</SOAP:Body>
</SOAP:Envelope> -
hi group,
my problem is related to scenario HTML to WebService in which im trying to send a request to a free webservice on internet and retrieving the response back and showing it in my html page.
scenario in detail:
i have a html page deployed on my tomcat server at my local m/c. in which im taking a email string and sending it to webservice which checks whether the email string has a valid email format or not and in response, webservice returns a boolean true/false depending on the email string. i want to show this boolean result n my html page.i have configured HTTP adaptor and SOAP adaptor for this and interfaces are scynchronus.
im able to send my request to webservice and getting the response also...i checked in trace..it shows message request sent and response recieved...here is the trace..
http://hcl3sap:50000/MessagingSystem/receive/AFW/XI</Trace>
<Trace level="3" type="T">User = PIISUSER</Trace>
<Trace level="3" type="T">Cached =</Trace>
<Trace level="3" type="T">Creating HTTP-client</Trace>
<Trace level="3" type="T">HTTP-client: creation finished</Trace>
<Trace level="3" type="T">Security: Basic authentication</Trace>
<Trace level="3" type="T">Serializing message object...</Trace>
<Trace level="3" type="T">HTTP-client: sending http-request...</Trace>
<Trace level="3" type="T">HTTP-client: request sent</Trace>
<Trace level="3" type="T">HTTP-client: Receiving http-response...</Trace>
<Trace level="3" type="T">HTTP-client: response received</Trace>
<Trace level="3" type="T">HTTP-client: checking status code...</Trace>
<Trace level="3" type="T">HTTP-client: status code = 200</Trace>
<Trace level="3" type="T">Deserializing message object...</Trace>
<Trace level="3" type="T">HTTP-client: closing...</Trace>
</Trace>
but i get an error java.io.IOException: invalid content type for SOAP: TEXT/HTML after that,
Does anyone know where im going wrong....
regrdsyou are very correct..i used SOAP reciever as http://www.webservicex.net/ValidateEmail.asmx?wsdl and SOAP Action as http://www.webservicex.net/IsValidEmail but getting the same error.
and if you look in the trace above it says that my request actually went to webservice and got a response also (response code 200) but i think after recieving the message from webservice something is wrong. either mapping is not correct...(but i tested that ..it works fine) or could be my company firewall is prohibiting the message sent by webservice to XI server (i have given proxy settings with password also)...im NOT sure on this ....
second thing i noticed in moni while examining the trace was....message payload under "Message Branch According to Receiver List " shows this value
<?xml version="1.0" encoding="UTF-8" ?>
- <ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net">
<ns1:Email>samWhgf.com</ns1:Email>
</ns1:IsValidEmail>
and then in just next step "Request Message Mapping" payload is
<?xml version="1.0" encoding="UTF-8" ?>
<ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net" />
i dont know really why payload is getting appended and if it is correct or not? but after this step further payload goes in this appended format only till call adaptor...if this is so i assume my message is going to webservice as
<?xml version="1.0" encoding="UTF-8" ?>
<ns1:IsValidEmail xmlns:ns1="http://www.webservicex.net" />
which is not the proper format to be recieved by the webservice without any input value i.e "samWhgf.com"
im confused on this ..whether this is the route cause or any other...i have been trying to figure out the root cause from some days but still unsuccessful.
please provide ur valuable inputs.
regrds
Sameer -
Webservice hell - invalid content type for SOAP: TEXT/HTML
Hi All
I'm trying to call a webservice in XI and getting the dreaded "invalid content type for SOAP: TEXT/HTML" error.
Running it in XMLSpy it works perfectly well, but not in XI.
Here are some screenshots:
1) The Request sent from XMLSpy
[XMLSpy Request - Successful|http://www.host-images.com/u/files/3spjf72drc9ncjhtiovo.jpg]
2) The successful response to XMLSpy
[XMLSpy response|http://www.host-images.com/u/files/c3u8k9bplpzu8z6il61a.jpg]
3) Here is the error in XI in RWB, together with the XML payload
[XML and RWB error|http://www.host-images.com/u/files/9ex5dhqua9y07lhpja09.jpg]
4) Here is the SOAP Comms Channel
[Comms channel|http://www.host-images.com/u/files/w6pa90yy0nkly628535i.jpg]
Note:
1. The 'Target URL' and the 'SOAP Action' are taken directly from the parameters used successfully in XMLSpy
2. I have already added 'localejbs/AF_Modules/MessageTransformBean' / 'Transform.ContentType' / text/xml;charset=utf-8
I woul really appreciate some help with this, as I'm getting kind of desparate.
Thanks in advance.Hi Mark / All
Thanks for the info. I have some additional questions please:
1. Regarding SOAP 1.2
It apears that the WSDL provided allows for both 1.1 and 1.2. Infact, when I sent the SOAP request in XMLSpy, the first thing I see if a pop-up window asking me to select 1) OrderServiceSoap or OrderServiceSoap12 ...
[XMLSpy|http://www.host-images.com/u/files/g50y9xohakbhb7j5v3w4.jpg]
However I don't see this option when I use the WSDL in XI, only a list:
[XI|http://www.host-images.com/u/files/230urvn7okvb4jbad1o8.jpg]
How can I emulate selecting the the non-1.2 version in XI?
2. Probably irrelevant but, If I tick 'Do not use SOAP envelope' option on the CC I get:
MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: SOAP: response message contains an error XIAdapter/HTTP/ADAPTER.HTTP_EXCEPTION - HTTP 407 Proxy Authentication Required ( The ISA Server requires authorization to fulfill the request. Access to the Web Proxy filter is denied. )
Can anyone confirm if this is a consequence of ticking ''Do not use SOAP envelope', or if it indicates a underlying problem with the Proxy credentials I have entered.
Thanks again. -
Getting invalid content type for SOAP: TEXT/HTML exception for Soap Adapter
I am trying to invoke Webservice using SOAP Receiver Adapter
but I am getting error
<SAP:AdditionalText>com.sap.aii.af.ra.ms.api.DeliveryException: invalid content type for SOAP: TEXT/HTML</SAP:AdditionalText>
Pls let me know
RegardsHI,
see
Q: What character encoding is supported by the SOAP sender adapter?
A: The SOAP sender adapter can accept any character encoding supported by the local JDK. When you are using a particular character encoding with content type text/xml, you must make sure that the encoding name given in the content type and in the XML declaration must be consistent. What makes this more complex is that the default values. The default encoding for "text/xml" is US-ASCII, whereas the default encoding for the XML declaration is UTF-8 or UTF-16. The following examples show several valid combinations of content-type and XML declartion:
text/xml
<?xml version='1.0' encoding='us-ascii'?>
text/xml; charset='utf-8'
<?xml version='1.0' encoding='utf-8'?>
text/xml; charset='utf-8'
no declaration
text/xml; charset='iso-8859-1'
<?xml version='1.0' encoding='iso-8859-1'?>
application/xml
<?xml version='1.0' encoding='iso-8859-1'?>
The response message from the SOAP sender is normally encoded in UTF-8. If you want to change this encoding, for instance to iso-8859-1, you can supply the encoding information with the xmlenc variable in the request URL as in:
http://host:port /XISOAPAdapter/MessageServlet?channel=p:s:c&xmlenc=iso-8859-1
Related Questions "What character encoding is supported by the SOAP receiver adapter?"
Regards
Chilla -
IOException: invalid content type for SOAP: TEXT/HTML
Hi all,
After the IS received a SOAP request successfully and sent it to the Adapter Engine I get an IOException in my SOAP Adapter (I configured a SOAP communication channel). From my RWB I can see:
2005-08-12 10:53:17 Success SOAP: request message entering the adapter
2005-08-12 10:53:17 Success SOAP: completed the processing
2005-08-12 10:53:18 Success The message was successfully received by the messaging system. Profile: XI URL: http://ecsap:50000/MessagingSystem/receive/AFW/XI
2005-08-12 10:53:18 Success Using connection AFW. Trying to put the message into the receive queue.
2005-08-12 10:53:18 Success Message successfully put into the queue.
2005-08-12 10:53:18 Success The message was successfully retrieved from the receive queue.
2005-08-12 10:53:18 Success The message status set to DLNG.
2005-08-12 10:53:18 Success Delivering to channel: J2E_ReceiverChannel_SOAP
2005-08-12 10:53:18 Success SOAP: request message entering the adapter
2005-08-12 10:53:18 Error SOAP: error occured: java.io.IOException: invalid content type for SOAP: TEXT/HTML
2005-08-12 10:53:18 Error Exception caught by adapter framework: invalid content type for SOAP: TEXT/HTML
2005-08-12 10:53:18 Error Delivery of the message to the application using connection AFW failed, due to: invalid content type for SOAP: TEXT/HTML.
2005-08-12 10:53:18 Success The asynchronous message was successfully scheduled to be delivered at Fri Aug 12 10:58:18 CEST 2005.
2005-08-12 10:53:18 Success The message status set to WAIT.
Please help if possible! Thanks!
Denishi guys
this is my soap Reciever CC is showing the Error .
please suggest me the solution.
2007-12-21 10:09:27 Error SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT/HTML
2007-12-21 10:09:27 Error SOAP: error occured: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML: java.io.IOException: invalid content type for SOAP: TEXT/HTML
2007-12-21 10:09:27 Error MP: exception caught with cause com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML: java.io.IOException: invalid content type for SOAP: TEXT/HTML
2007-12-21 10:09:27 Error Exception caught by adapter framework: invalid content type for SOAP: TEXT/HTML
2007-12-21 10:09:27 Error Delivery of the message to the application using connection SOAP_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML: java.io.IOException: invalid content type for SOAP: TEXT/HTML. Setting message to status failed.
2007-12-21 10:09:27 Error The message status set to FAIL.
2007-12-21 10:09:27 Error Returning synchronous error message to calling application: com.sap.aii.af.ra.ms.api.RecoverableException: invalid content type for SOAP: TEXT/HTML: java.io.IOException: invalid content type for SOAP: TEXT/HTML.
thanks & Regards
Ravi
Maybe you are looking for
-
First of all, Hi this is my first post here. I own an Audigy ZS Platinum Pro, an SB Li've, and have been a loyal Creative customer since the Soundblaster 2.0 6bit I fitted to my 386SX. I've been working in I. T. for 3 years in various roles, from C++
-
Implementing SPC/Control charts in Reporting Services/BI Solution
Hello All I'm one of the BI specialists in our company - currently looking after our BI solution which incorporates SQL Server 2005, SSRS, SSIS, SSAS, Performance Point, Pro Clarity and various other bits and bobs etc. What I'm aiming to do, is estab
-
Still havent problems with my ipod nano
i am still recieving the message USB Device Cant Be Regonzied when i connect my ipod so has anyone got any more ideas to help me fix this problem
-
FM for changing the condition type values in Purchase order
Hi All, Is there any FM which will update the condition types in Purchase Order other than BAPI_PO_CHANGE. Please suggest. Thanks in Advance Regards Hari
-
when in music player and i skip a track the stereo widening turns off, but when i skip another track it comes back on. this also happens when pausing a song and unpausing. can anybody help?