cancel
Showing results for 
Search instead for 
Did you mean: 

EROR: java.io.IOException: invalid content type for SOAP: TEXT/HTML

Former Member
0 Kudos

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....

regrds

Accepted Solutions (1)

Accepted Solutions (1)

prateek
Active Contributor
0 Kudos

What is returned from receiver SOAP? It must be in xml format and not html. Are you getting this error in RWB at the receiver channel? If yes, then your receiver is not sending proper response.

Regards,

Prateek

Answers (1)

Answers (1)

Former Member
0 Kudos

hi prateek

....thanks for your reply

webservice response is coming xml file itself and this error im getting in MONI.

in RWB it shows "error in response"

here is the url for webservice im using in my scenario

http://www.webservicex.net/ValidateEmail.asmx?op=IsValidEmail

regrds

sameer

prateek
Active Contributor
0 Kudos

Have you used SoapAction as IsValidEmail?

Regards,

Prateek

Former Member
0 Kudos

yes,

i have used SOAP Action as

"http://www.webservicex.net/IsValidEmail"

prateek
Active Contributor
0 Kudos
Former Member
0 Kudos

you 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