c# - Client to send SOAP request -


trying create c# client (will developed windows service) sends soap requests web service (and gets results). enter image description here

it breaks

httpwebresponse wr = (httpwebresponse)httprequest.getresponse();  

error:

an unhandled exception of type 'system.net.webexception' occurred in system.dll

additional information: remote server returned error: (500) internal server error.

most probably, backend has found kind of problem in soap request body, indicated 500 server error return code.

usually, when working soap end points, take wsdl , generate client in c# (using visual studio). soap endpoint react adding ?wsdl after request url? so: https://soap.server.com/myendpoint?wsdl.

after getting such wsdl file, can use generate c# client endpoint, e.g. using service references, or wsdl.exe tool. unfortunately, things changed between .net 4.0 , 4.5, knowing targeted runtime needed full answer.


Comments

Popular posts from this blog

ruby - Trying to change last to "x"s to 23 -

jquery - Clone last and append item to closest class -

c - Unrecognised emulation mode: elf_i386 on MinGW32 -