2012-03-21 1 views
0

enter code here C# 클라이언트에서 웹 서비스를 호출하려고합니다. SoapSender 클래스와 SoapReceiver 클래스를 사용할 수 있다는 것을 알게되었습니다. 웹 서비스의 WSDL에 대해서는 아래를 참조하십시오.SoapSender 및 SoapEnvelope

<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://test/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="WelcomeService" targetNamespace="http://test/"> 
<types> 
<xs:schema xmlns:tns="http://test/" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://test/" version="1.0"> 
<xs:element name="WelcomeMessage" type="tns:WelcomeMessage"/> 
<xs:element name="WelcomeMessageResponse" type="tns:WelcomeMessageResponse"/> 
<xs:complexType name="WelcomeMessage"> 
<xs:sequence> 
<xs:element minOccurs="0" name="message" type="xs:string"/> 
</xs:sequence> 
</xs:complexType> 
<xs:complexType name="WelcomeMessageResponse"> 
<xs:sequence/> 
</xs:complexType> 
</xs:schema> 
</types> 
<message name="Welcome_WelcomeMessageResponse"> 
<part element="tns:WelcomeMessageResponse" name="WelcomeMessageResponse"/> 
</message> 
<message name="Welcome_WelcomeMessage"> 
<part element="tns:WelcomeMessage" name="WelcomeMessage"/> 
</message> 
<portType name="Welcome"> 
<operation name="WelcomeMessage" parameterOrder="WelcomeMessage"> 
<input message="tns:Welcome_WelcomeMessage"/> 
<output message="tns:Welcome_WelcomeMessageResponse"/> 
</operation> 
</portType> 
<binding name="WelcomeBinding" type="tns:Welcome"> 
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> 
<operation name="WelcomeMessage"> 
<soap:operation soapAction=""/> 
<input> 
<soap:body use="literal"/> 
</input> 
<output> 
<soap:body use="literal"/> 
</output> 
</operation> 
</binding> 
<service name="WelcomeService"> 
<port binding="tns:WelcomeBinding" name="WelcomePort"> 
<soap:address location="http://127.0.0.1:8080/SoapSeam/Welcome"/> 
</port> 
</service> 
</definitions> 

비누 봉투 객체를 채우는 방법을 파악하는 데 어려움을 겪고 있습니다.

+0

서비스 참조 번호를 서비스에 직접 사용하거나 프록시를 사용하여 서비스와 통신하는 이유는 무엇입니까? – Jontatas

답변

1

웹에서 오래된 정보 나 나쁜 정보를 발견 했어야합니다. 최신 정보는 How to Consume a Web Service을 참조하십시오.

또한 을 참조하십시오. WCF는 SOAP 웹 서비스 작업에 사용해야하는 기술입니다.

+0

감사합니다. 나는 아주 오래된 정보를 사용하고 있었다. – user1000258