我的设备有一个带有单个输出 (wsdl:output) 的 DPWS Web 服务,我需要使用 Wcf 客户端订阅该服务
客户端是常规的 .Net 4.0 应用程序,而不是 .net-micro-framework。
我需要一个示例或教程或其他与为此类服务构建此类客户端相关的资源。
“添加服务引用”产生非工作代码,“添加 Web 引用”挂起。
Wsdl 如下。
如果有任何进一步的信息需要回答这个问题,请告诉我。
非常感谢
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:p="http://schemas.xmlsoap.org/ws/2006/02/devprof"
xmlns:po="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:tns="http://www.test.fi/wsdl/THLGateway"
xmlns:wse="http://schemas.xmlsoap.org/ws/2004/08/eventing"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/"
name="THLGateway"
targetNamespace="http://www.test.fi/wsdl/THLGateway">
<po:Policy Id="EventingServicePolicy">
<p:profile />
<p:PushDelivery />
<p:DurationExpiration />
<p:ActionFilter />
</po:Policy>
<types>
<xsd:schema targetNamespace="http://www.test.fi/wsdl/THLGateway"
elementFormDefault="qualified">
<xsd:element name="thlChangeEvent">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="gatewayID"
type="xsd:string"
nillable ="true"
minOccurs="0"/>
<xsd:element name="nodeID"
type="xsd:string"
minOccurs="0"
nillable ="true"/>
<xsd:element name="temperature"
nillable ="true"
minOccurs="0"
type="xsd:double"/>
<xsd:element name="humidity"
nillable ="true"
minOccurs="0"
type="xsd:double"/>
<xsd:element name="light"
nillable ="true"
minOccurs="0"
type="xsd:double"/>
<xsd:element name="battery"
nillable ="true"
minOccurs="0"
type="xsd:double"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
</xsd:schema>
</types>
<wsdl:message name="thlChangeResponse">
<wsdl:part name="parameters"
element="tns:thlChangeEvent"/>
</wsdl:message>
<wsdl:portType name="THLGatewayPortType"
wse:EventSource="true">
<wsdl:operation name="thlChange">
<wsdl:output message="tns:thlChangeResponse"/>
</wsdl:operation>
</wsdl:portType>
<binding name="THLGatewayPortType"
type="tns:THLGatewayPortType">
<soap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<po:PolicyReference URI="#EventingServicePolicy"
wsdl:required="true" />
<wsdl:operation name="thlChange">
<soap:operation style="document"/>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</binding>
<service name="THLGateway">
<port name="THLGatewayPortType"
binding="tns:THLGatewayPortType">
<soap:address location="http://192.168.0.93:80/dpws/ws01"/>
</port>
</service>
</definitions>