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

N

Nathan

This error came back from calling a web service.

It is a web service in nusoap php, but SOAP shoudl be able to handle
interoperability, right?

The request content type doesn't appear to be in the generated code. I'm not
sure where I have control over this or why it wouldn't be text/xml by
default.

Nathan
 
A

Alex Feinman [MVP]

This means your server has thrown an error and responded with an error page
which is html and not xml
 
N

Nathan

Alex Feinman said:
This means your server has thrown an error and responded with an error
page which is html and not xml

It seems to say just the opposite; that the client is sending html instead
of xml. But I believe you. I'll try to find out more of what's happening
with the server.

Nathan
 
A

Alex Feinman [MVP]

I'm sorry, I haven't been paying attention. You are right of course and my
answer makes no sense. Could you email me the server url, so that I could
take a look at the WSDL?
 
S

Sergey Bogdanov

At first, make sure that web service works correctly. It's possible that
when you make a call, the web service generates an error which was
output as HTML text.

Also make sure that content-type header was 'text/xml'. You can verify
it by using iHTTPHeaders pluggin for IE:

http://www.blunck.info/iehttpheaders.html
 
N

Nathan

Alex Feinman said:
I'm sorry, I haven't been paying attention. You are right of course and my
answer makes no sense. Could you email me the server url, so that I could
take a look at the WSDL?

It's a private url I couldn't post. But the problem was on the server.

It did appear that a php file was producing textual output before the
headers were sent, so the headers may have defaulted to text/html.

So even though this seems backwards from the error message, it does appear
that it was the server returning html unexpectedly.

That server side code can be a real pain to debug.

Nathan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top