locked
How to consume webservice using asp.net? RRS feed

  • Question

  • User-1070902567 posted

    How can i consume Webservice using asp.net website?

    I have one WSDL url is their,I want to use that WSDL Url Consume that service using ASP.NET,

    I am developing one small example using webservice after that i can run that service getting service url like this(EX:http://localhost:46868/Service.asmx)

    using this URL I can consume that service,

    What is WSDL?How can i convert This url(http://localhost:46868/Service.asmx) to WSDL Url 

                               AND

    How can I consume that WSDL url;

    Monday, February 17, 2014 9:54 AM

Answers

  • User-492460945 posted

    You can do the above process if you have wsdl url..

    -Rajesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 18, 2014 10:04 AM
  • User-417640953 posted

    For suppose I have only WSDL url is their,

    What can i do?

    Hi ANILBABU,

    Thanks for your post.

    Other member has given you practice solution.

    As adding reference service feature in the visual studio, its' original idea that creates service proxy classes based on the metadata exposed by the wsdl.

    So service url or wsdl url both work with adding reference service feature in visual studio.

    If you do not want use the adding reference service feature, just the C# code behind, you can also create the proxy like below thread.

    http://forums.asp.net/t/1061559.aspx

    Hope this helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 18, 2014 9:55 PM

All replies

  • User-492460945 posted

    Hi ANILBABU,

    On your project in VS, right click and select Add Service Reference, Type in the url and click Go, give a name for service and click Ok. It will be added to your solution in App_WebReferences folder. In your web page code behind, call it as below

    using <WebServiceName>

    then create an object for the service client and use it.

    -Rajesh

    Monday, February 17, 2014 10:08 AM
  • User-1070902567 posted

    For suppose I have only WSDL url is their,

    What can i do?

    Tuesday, February 18, 2014 7:21 AM
  • User-492460945 posted

    You can do the above process if you have wsdl url..

    -Rajesh

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 18, 2014 10:04 AM
  • User-417640953 posted

    For suppose I have only WSDL url is their,

    What can i do?

    Hi ANILBABU,

    Thanks for your post.

    Other member has given you practice solution.

    As adding reference service feature in the visual studio, its' original idea that creates service proxy classes based on the metadata exposed by the wsdl.

    So service url or wsdl url both work with adding reference service feature in visual studio.

    If you do not want use the adding reference service feature, just the C# code behind, you can also create the proxy like below thread.

    http://forums.asp.net/t/1061559.aspx

    Hope this helps, thanks.

    Best Regards!

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 18, 2014 9:55 PM