1

I am looking to make a service agent in C# from scratch. If the contracts/XSD are shareable via WSDL or dll. How do I go about writing a light weight service agent that can be configured to make calls to the SOAP webservice. When you do an add reference I feel too much code is generated behind my back.

Perpetualcoder
  • 13,501
  • 9
  • 64
  • 99

2 Answers2

2

You can post data to a webservice using the following url structure:

http://mydomain.com/mywebservicedirectory/mywebservice.asmx/mywebservicemethod

Simply use an HTTP POST to pass data(typically xml/json) to the service and process the response.

Achilles
  • 11,165
  • 9
  • 62
  • 113
  • any idea about custom soap headers etc ? – Perpetualcoder Feb 11 '11 at 22:56
  • If you allow the service to be consumed from script(javascript) by uncommenting out an attribute at the top of the service's code file, then you can just post JSON without needing to use SOAP. – Achilles Feb 14 '11 at 22:19
0

I use a bassic soap template and XSLT to render it out for what I want. It isn't that fun if you need to call multiple methods. I'm simply calling the same method over and over so it's no big deal. Simple HTTP POST will do it, that's all WCF/ASMX does.

You can get the WSDL and use XSD.exe to generate the object classes for you.

Dustin Davis
  • 14,482
  • 13
  • 63
  • 119