locked
Using the classes generated from wsdls as arguments in a Web Method. RRS feed

  • Question

  • User1671572222 posted

    I'm somewhat familiar with web services, but all of them I've developed thus far have been for my own consumption with web methods that accept simple data types as arguments. I've been asked to develop a web service for a systems integration with another vendor. The vendor will provide me with a wsdl.........eventually, but as of now all I've seen are examples of requests/responses. All my webservice needs to do is listen for requests when the other vendor's program sends them. My question is, when I import the vendor's wsdl in .net as a reference and vs 2010 generates all those classes for me, would my web method be able to use the classes generated by vs as an argument or is it more complicated than that? For example in c# pseudocode

    [WebMethod]

    public void DoSomethingForVendor(VendorDefinedRequestFromWSDL arg)

    {

    LOGIC!

    }

    Would that work? I've explained the situation as best as I can right now, considering what I've gotten from the vendor thus far. Thanks in advance for any input.

    Monday, March 25, 2013 3:04 PM

Answers

  • User220959680 posted

    All my webservice needs to do is listen for requests when the other vendor's program sends them.

    vendor's service POSTs data to your service it is required to implement your service to read the Posted data and impement the functionality.

    http://www.codeproject.com/Tips/150313/Simple-WCF-web-service-to-receive-parameter-from-H

    It is required to know the data being POSTed to your service from vendor's. You may make GET request to Vendors service to see what data is coming in.

    Let me know further queries.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, March 25, 2013 7:10 PM