locked
Consume a WCF. RRS feed

  • Question

  • User-1907931422 posted

    I ahve a wcf which is hosted in a remote server. Now I want to consume it from my code. Th equestion is wsdl does,'t have endpoint, it only has http address.

    <wsdl:binding name="BasicHttpBinding_iMath" type="tns:iMath">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> 
     - <wsdl:operation name="Add">
     <soap:operation soapAction="http://tempuri.org/iMath/add" style="document" /> 
     - <wsdl:input>
    <soap:body use="literal" /> 
     </wsdl:input>
    - <wsdl:output>
     <soap:body use="literal" /> 
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="LoadUnbillsFromOrion">
      <soap:operation soapAction="http://tempuri.org/iMath/LoadUnbillsFromOrion" style="document" /> 
    - <wsdl:input>
      <soap:body use="literal" /> 
      </wsdl:input>
    - <wsdl:output>
       <soap:body use="literal" /> 
       </wsdl:output>
       </wsdl:operation>
      </wsdl:binding>
     - <wsdl:service name="Math">
     - <wsdl:port name="BasicHttpBinding_iMath" binding="tns:BasicHttpBinding_iMath">
       <soap:address location="http://wsvc01/Imath.svc" /> 
      </wsdl:port>
     </wsdl:service>

    I am not sure how to consume it. I heard that Proxy, ChannelFactory etc. But I really don't know. I need code assistance. Urgent, many thanks.

    Tuesday, February 19, 2013 10:30 AM

Answers

  • User-905528745 posted

    An HTTP endpoint would have an HTTP address.  Use Visual Studio and that address.  Visual Studio should pick up the WSDL and create all the necessary classes for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 19, 2013 11:18 PM

All replies

  • User-905528745 posted

    An HTTP endpoint would have an HTTP address.  Use Visual Studio and that address.  Visual Studio should pick up the WSDL and create all the necessary classes for you.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, February 19, 2013 11:18 PM
  • User220175380 posted

    Hi,

    Please follow the below post, This will fulfill your requirement

    http://forums.asp.net/t/1866807.aspx/1?Deploy+WCF+webservice+Windows+service+and+Website

    Tuesday, February 19, 2013 11:19 PM