in reply to Re^3: Perl web service consumed by c# client returns null.
in thread Perl web service consumed by c# client returns null.

Please read carefully what I wrote in my previous response.

If you print an extra header, then the rest - which contains another HTTP header - is no longer valid XML.

Now, what happens if you just don't print your own Content-Type header?

  • Comment on Re^4: Perl web service consumed by c# client returns null.

Replies are listed 'Best First'.
Re^5: Perl web service consumed by c# client returns null.
by Anonymous Monk on Dec 13, 2019 at 11:03 UTC

    If I don't print my own Content-type, I get below client side exception

    Exception: System.ArgumentNullException: Array cannot be null. Parameter name: bytes at System.Text.Encoding.GetString(Byte[] bytes) at main.Main()

      This is hard to believe. I wrote that you should not print your own content type, but of course you still should print the HTTP response.

      I feel there is a lot of guesswork going on. I haven't seen your code, so I can't help any more. Perhaps you should familiarize yourself with the GET and HEAD tools of LWP (I wrote that already) and examine the output instead of trying to interpret exceptions from some web client.