httpResponse

  • Thread starter Thread starter steve
  • Start date Start date
S

steve

i'm hitting a php web service that utilizes nuSoap. if an error occurs, it
sends an error 500 (internal server error). in vb.net, that means i get an
exception when i go to get a response. i need to get the xml associated with
the error returned, i.e. soupfault, faultcode, faultstring, etc. i know what
is specifically happening in the php page since i'm helping to write it. we
could setup nuSoap to create a different http header that would throw an
exception in vb (we don't want to go that route)...but what i really want to
be able to do is try/catch/finally in vb.net and still be able to get the
details returned from the web service.

anyone have an idea?

tia,

steve
 
I don't have an answer but hopefully this gets you on the write track.
GetResponse throws a WebException error if it gets a 500 error and one of
the properties of the WebException is an HttpWebResponseObject, so you can
try/catch around it

Catch W As WebException
 
thanks. that's exactly what i needed to know.

thanks again.

steve


| I don't have an answer but hopefully this gets you on the write track.
| GetResponse throws a WebException error if it gets a 500 error and one of
| the properties of the WebException is an HttpWebResponseObject, so you can
| try/catch around it
|
| Catch W As WebException
|
|
|
 
Back
Top