Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Web Service returning wrong content type of text/plain

Reply
Thread Tools

Web Service returning wrong content type of text/plain

 
 
robert112
Guest
Posts: n/a
 
      05-26-2008
Hi All,
I have a .net WSE 3.0 Web Service acting as a client calling a j2EE
web Service. The service works when I call it using a client program
called soapUI (which is free to download) but when using the .net
client it bombs out with:

System.InvalidOperationException: Client found response content type
of 'text/plain', but expected 'text/xml'.
The request failed with the error message:
--
HTTP/1.1 100 Continue

<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/
soap/envelope/"><soapenv:Body><mem:GetMemberRes ponse
REST OF SOAP MESSAGE HERE--.
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessage
message, WebResponse response, Stream responseStream, Boolean
asyncCall)
at
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(String
methodName, Object[] parameters)
at MemberServiceWse.getMember(GetMemberRequestMember[]
GetMemberRequest) in \Reference.cs:line 80
at
I have had to strip out a lot from the error message to retain
confidentiality but basically the whole and correct soap message
returns in this exception but it just complains that the encoding is
wrong. SoapUI claims the encoding is of type text/xml but .net says
its text/plain
I have created a soap Extension and put a break point on the
ProcessMessage method and when the ProcessMessage's "Stage" is in
Before DeSerialize I can see that the content type is infact text/
plain.

I have googled this for 3 days now with no luck. Any ideas?

 
Reply With Quote
 
 
 
 
Sowmya J
Guest
Posts: n/a
 
      01-21-2010
Hi,

I m also getting the same error when trying to get the response from a Webservice. Did you find any solution for this. Please reply if you have found out any solution



robert112 wrote:

Web Service returning wrong content type of text/plain
27-May-08

Hi All
I have a .net WSE 3.0 Web Service acting as a client calling a j2E
web Service. The service works when I call it using a client progra
called soapUI (which is free to download) but when using the .ne
client it bombs out with

System.InvalidOperationException: Client found response content typ
of 'text/plain', but expected 'text/xml'
The request failed with the error message
-
HTTP/1.1 100 Continu

<?xml version="1.0" encoding="utf-8"?&gt
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org
soap/envelope/"><soapenv:Body><mem:GetMemberRes pons
REST OF SOAP MESSAGE HERE--
a
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessag
message, WebResponse response, Stream responseStream, Boolea
asyncCall
a
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(Strin
methodName, Object[] parameters
at MemberServiceWse.getMember(GetMemberRequestMember[
GetMemberRequest) in \Reference.cs:line 8
a
I have had to strip out a lot from the error message to retai
confidentiality but basically the whole and correct soap messag
returns in this exception but it just complains that the encoding i
wrong. SoapUI claims the encoding is of type text/xml but .net say
its text/plai
I have created a soap Extension and put a break point on th
ProcessMessage method and when the ProcessMessage's "Stage" is i
Before DeSerialize I can see that the content type is infact text
plain

I have googled this for 3 days now with no luck. Any ideas?

Previous Posts In This Thread:

On Tuesday, May 27, 2008 9:55 PM
robert112 wrote:

Web Service returning wrong content type of text/plain
Hi All
I have a .net WSE 3.0 Web Service acting as a client calling a j2E
web Service. The service works when I call it using a client progra
called soapUI (which is free to download) but when using the .ne
client it bombs out with

System.InvalidOperationException: Client found response content typ
of 'text/plain', but expected 'text/xml'
The request failed with the error message
-
HTTP/1.1 100 Continu

<?xml version="1.0" encoding="utf-8"?&gt
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org
soap/envelope/"><soapenv:Body><mem:GetMemberRes pons
REST OF SOAP MESSAGE HERE--
a
System.Web.Services.Protocols.SoapHttpClientProtoc ol.ReadResponse(SoapClientMessag
message, WebResponse response, Stream responseStream, Boolea
asyncCall
a
System.Web.Services.Protocols.SoapHttpClientProtoc ol.Invoke(Strin
methodName, Object[] parameters
at MemberServiceWse.getMember(GetMemberRequestMember[
GetMemberRequest) in \Reference.cs:line 8
a
I have had to strip out a lot from the error message to retai
confidentiality but basically the whole and correct soap messag
returns in this exception but it just complains that the encoding i
wrong. SoapUI claims the encoding is of type text/xml but .net say
its text/plai
I have created a soap Extension and put a break point on th
ProcessMessage method and when the ProcessMessage's "Stage" is i
Before DeSerialize I can see that the content type is infact text
plain

I have googled this for 3 days now with no luck. Any ideas?


Submitted via EggHeadCafe - Software Developer Portal of Choice
Database Normalization For Developers
http://www.eggheadcafe.com/tutorials...zation-fo.aspx
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
error: Only Content controls are allowed directly in a content page that contains Content controls. hazz ASP .Net 6 06-09-2010 01:54 PM
InvocationTargetException when calling "new Service()" in Axis web service to call another web service Michael Averstegge Java 0 01-10-2006 11:05 PM
Modifying Web Service Proxy Content-Type irwin.williams@gmail.com ASP .Net Web Services 0 10-31-2005 11:47 PM
[XML Schema] Content type of complex type definition with complex content Stanimir Stamenkov XML 2 10-25-2005 10:16 AM
Referencing web service complex data type within a second web service (like a delegate) Mike Dearman ASP .Net Web Services 1 06-23-2004 03:11 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57