Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by haj (Vicar)
on Dec 13, 2019 at 10:36 UTC ( [id://11110063]=note: print w/replies, xml ) Need Help??


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.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://11110063]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2024-04-19 23:30 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found