Hi Monks,

Perl web service which is consumed by c# client is returning null, what could be the possible reason.
Perl web service seems returning data though, below is the response perl web service is generating with some exception

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 HTTP/1.1 200 OK Content-Length: 1449 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:base64Binary">PGRhdGE+CiA +8YXJyYXk+Ci AgPGl0ZW0ga2V5PSIwIj4KICAgPG1hcD4KICAgIDxpdGVtIGtleT0ibXJpZCI+MTwvaXRl +bT4KICAgIDxpdGVtIGtleT0ibXJ0aXRsZSI+VGVzdCB0aWNrZXQgZm9yIGVkaXQgaXNzd +WUuPC9pdGVt PgogICA8L21hcD4KICA8L2l0ZW0+CiAgPGl0ZW0ga2V5PSIxIj4KICAgPG1hcD4KICAgID +xpdGVtIGtleT0ibXJpZCI+MjwvaXRlbT4KICAgIDxpdGVtIGtleT0ibXJ0aXRsZSI+VGV +zdCB0aWNrZX QgZm9yIGVkaXQgaXNzdWUyLjwvaXRlbT4KICAgPC9tYXA+CiAgPC9pdGVtPgogIDxpdGVt +IGtleT0iMiI+CiAgIDxtYXA+CiAgICA8aXRlbSBrZXk9Im1yaWQiPjM8L2l0ZW0+CiAgI +CA8aXRlbSBr ZXk9Im1ydGl0bGUiPlRlc3QgdGlja2V0IGZvciBlZGl0IGlzc3VlMy48L2l0ZW0+CiAgID +wvbWFwPgogIDwvaXRlbT4KICA8aXRlbSBrZXk9IjMiPgogICA8bWFwPgogICAgPGl0ZW0 +ga2V5PSJtcm lkIj40PC9pdGVtPgogICAgPGl0ZW0ga2V5PSJtcnRpdGxlIj5UZXN0IHRpY2tldCBmb3Ig +ZWRpdCBpc3N1ZTQuPC9pdGVtPgogICA8L21hcD4KICA8L2l0ZW0+CiAgPGl0ZW0ga2V5P +SI0Ij4KICAg PG1hcD4KICAgIDxpdGVtIGtleT0ibXJpZCI+NTwvaXRlbT4KICAgIDxpdGVtIGtleT0ibX +J0aXRsZSI+VGVzdCB0aWNrZXQgZm9yIGVkaXQgaXNzdWU1LjwvaXRlbT4KICAgPC9tYXA ++CiAgPC9pdG VtPgogPC9hcnJheT4KPC9kYXRhPgo=</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, Int32 api) at main.Main()

Please advice, Thank you


In reply to 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.