Web Service returning wrong content type of text/plain

Discussion in 'ASP .Net' started by robert112, May 26, 2008.

  1. robert112

    robert112 Guest

    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:GetMemberResponse
    REST OF SOAP MESSAGE HERE--.
    at
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage
    message, WebResponse response, Stream responseStream, Boolean
    asyncCall)
    at
    System.Web.Services.Protocols.SoapHttpClientProtocol.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?
    robert112, May 26, 2008
    #1
    1. Advertising

  2. robert112

    Sowmya J Guest

    Client found response content type of 'text/plain', but expected'text/xml'

    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:GetMemberRespons
    REST OF SOAP MESSAGE HERE--
    a
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessag
    message, WebResponse response, Stream responseStream, Boolea
    asyncCall
    a
    System.Web.Services.Protocols.SoapHttpClientProtocol.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:GetMemberRespons
    REST OF SOAP MESSAGE HERE--
    a
    System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessag
    message, WebResponse response, Stream responseStream, Boolea
    asyncCall
    a
    System.Web.Services.Protocols.SoapHttpClientProtocol.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/tutorial...5-1283294e3e1c/database-normalization-fo.aspx
    Sowmya J, Jan 21, 2010
    #2
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. greg

    web form returning text/plain ?

    greg, Aug 27, 2004, in forum: ASP .Net
    Replies:
    2
    Views:
    403
    Raghavendra T V
    Aug 27, 2004
  2. Guan
    Replies:
    5
    Views:
    810
  3. Felix Wafytech
    Replies:
    2
    Views:
    377
    Felix Wafytech
    Nov 24, 2006
  4. Alfredo Agosti
    Replies:
    3
    Views:
    336
    Aaron Bertrand - MVP
    Sep 19, 2003
  5. ich_bin_Ingenieur

    Perl CGI returning plain text HTML code

    ich_bin_Ingenieur, Mar 23, 2007, in forum: Perl Misc
    Replies:
    4
    Views:
    511
Loading...

Share This Page