Hi, Monks,

Please don't get confused with two headers. first header you see is typed by me in the perl webservice to see what web service is returning.
Line from Http is what web service seems returning, but c# client getting null value.

Exception: System.InvalidOperationException: Client found response con +tent type of '', but expected 'text/xml'. The request failed with the error message: -- Content-Type : text/xml #I have added this line in the perl web servic +e like print "\nContent-type : text/xml\n\n" to check what exactly it + returns. #################################################################### HTTP/1.1 200 OK Content-Length: 1468 Content-Type: text/xml; charset=utf-8 SOAPServer: SOAP::Lite/Perl/1.17 <?xml version="1.0" encoding="UTF-8"?><soap:Envelope soap:encodingStyl +e="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://sche +mas.xmlsoap .org/soap/envelope/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/en +coding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http +://www.w3.o rg/2001/XMLSchema-instance"><soap:Body><MRWebServices__searchResponse +xmlns="MRWebServices"><return xsi:type="xsd:string"><data> <array> <item key="0"> <map> <item key="mrid">1</item> <item key="mrtitle">Test ticket for edit issue.</item> </map> </item> <item key="1"> <map> <item key="mrid">2</item> <item key="mrtitle">Test ticket for edit issue2.</item> </map> </item> <item key="2"> <map> <item key="mrid">3</item> <item key="mrtitle">Test ticket for edit issue3.</item> </map> </item> <item key="3"> <map> <item key="mrid">4</item> <item key="mrtitle">Test ticket for edit issue4.</item> </map> </item> <item key="4"> <map> <item key="mrid">5</item> <item key="mrtitle">Test ticket for edit issue5.</item> </map> </item> </array> </data> </return></MRWebServices__searchResponse></soap:Body></soap:Envelope> --. at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadRespons +e(SoapClientMessage message, WebResponse response, Stream responseStr +eam, Boolea n asyncCall) at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(Stri +ng methodName, Object[] parameters) at Search.MRWebServices__search(String usr, String pw, String extra +Info, String query) at main.Main()

Thank you.


In reply to Re: Perl web service consumed by c# client returns null. by Anonymous Monk
in thread Perl web service consumed by c# client returns null. by Anonymous Monk

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.