Warning: file_get_contents(/data/phpspider/zhask/data//catemap/7/wcf/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wcf 此供应商WSDL中的请求模型在哪里?_Wcf - Fatal编程技术网

Wcf 此供应商WSDL中的请求模型在哪里?

Wcf 此供应商WSDL中的请求模型在哪里?,wcf,Wcf,我正在尝试批量为供应商工具创建用户帐户。我询问供应商如何为端点打开MEX以创建单个帐户,我相应地调整了配置文件 我能够创建一个服务引用,但VisualStudio中只有一个客户端和两个接口。我不知道如何创建请求。客户端有一个InvokeService方法,但它只接受一个对象 我在代码中复制了供应商类结构,但是服务不喜欢我的类型。因此,我更新了类以使用供应商的原始名称空间,但服务仍然不喜欢它 Type 'life.businessService.baseBusinessDataModel.Busi

我正在尝试批量为供应商工具创建用户帐户。我询问供应商如何为端点打开MEX以创建单个帐户,我相应地调整了配置文件

我能够创建一个服务引用,但VisualStudio中只有一个客户端和两个接口。我不知道如何创建请求。客户端有一个InvokeService方法,但它只接受一个对象

我在代码中复制了供应商类结构,但是服务不喜欢我的类型。因此,我更新了类以使用供应商的原始名称空间,但服务仍然不喜欢它

Type 'life.businessService.baseBusinessDataModel.BusinessRequest' with data contract name 'BusinessRequest:http://schemas.datacontract.org/2004/07/life.businessService.baseBusinessDataModel' is not expected. Consider using a DataContractResolver or add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.
下面是来自服务的WSDL。我在WCF方面不是很强,所以我希望得到一些指导。谢谢

<?xml version="1.0" encoding="utf-8"?>
<wsdl:definitions xmlns:wsap="http://schemas.xmlsoap.org/ws/2004/08/addressing/policy" xmlns:wsa10="http://www.w3.org/2005/08/addressing" xmlns:tns="http://tempuri.org/" xmlns:msc="http://schemas.microsoft.com/ws/2005/12/wsdl/contract" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsp="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ClientWcfBusinessFacadeService" targetNamespace="http://tempuri.org/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
  <wsp:Policy wsu:Id="NetNamedPipeBinding_IWcfBusinessFacade_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1">
        </msb:BinaryEncoding>
        <wsaw:UsingAddressing>
        </wsaw:UsingAddressing>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsp:Policy wsu:Id="NetTcpBinding_IWcfBusinessFacade_policy">
    <wsp:ExactlyOne>
      <wsp:All>
        <msb:BinaryEncoding xmlns:msb="http://schemas.microsoft.com/ws/06/2004/mspolicy/netbinary1">
        </msb:BinaryEncoding>
        <wsaw:UsingAddressing>
        </wsaw:UsingAddressing>
      </wsp:All>
    </wsp:ExactlyOne>
  </wsp:Policy>
  <wsdl:types>
    <xsd:schema targetNamespace="http://tempuri.org/Imports">
      <xsd:import namespace="http://tempuri.org/" />
      <xsd:import namespace="http://schemas.datacontract.org/2004/07/life.common.serviceCommon" />
      <xsd:import namespace="http://schemas.microsoft.com/2003/10/Serialization/" />
    </xsd:schema>
  </wsdl:types>
  <wsdl:message name="IWcfBusinessFacade_InvokeService_InputMessage">
    <wsdl:part name="parameters" element="tns:InvokeService" />
  </wsdl:message>
  <wsdl:message name="IWcfBusinessFacade_InvokeService_OutputMessage">
    <wsdl:part name="parameters" element="tns:InvokeServiceResponse" />
  </wsdl:message>
  <wsdl:message name="IWcfBusinessFacade_InvokeService_ServiceFaultFault_FaultMessage">
    <wsdl:part xmlns:q1="http://schemas.datacontract.org/2004/07/life.common.serviceCommon" name="detail" element="q1:ServiceFault" />
  </wsdl:message>
  <wsdl:portType name="IWcfBusinessFacade">
    <wsdl:operation name="InvokeService">
      <wsdl:input wsaw:Action="http://tempuri.org/IWcfBusinessFacade/InvokeService" message="tns:IWcfBusinessFacade_InvokeService_InputMessage" />
      <wsdl:output wsaw:Action="http://tempuri.org/IWcfBusinessFacade/InvokeServiceResponse" message="tns:IWcfBusinessFacade_InvokeService_OutputMessage" />
      <wsdl:fault wsaw:Action="http://tempuri.org/IWcfBusinessFacade/InvokeServiceServiceFaultFault" name="ServiceFaultFault" message="tns:IWcfBusinessFacade_InvokeService_ServiceFaultFault_FaultMessage" />
    </wsdl:operation>
  </wsdl:portType>
  <wsdl:binding name="NetNamedPipeBinding_IWcfBusinessFacade" type="tns:IWcfBusinessFacade">
    <wsp:PolicyReference URI="#NetNamedPipeBinding_IWcfBusinessFacade_policy">
    </wsp:PolicyReference>
    <soap12:binding transport="http://schemas.microsoft.com/soap/named-pipe" />
    <wsdl:operation name="InvokeService">
      <soap12:operation soapAction="http://tempuri.org/IWcfBusinessFacade/InvokeService" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="ServiceFaultFault">
        <soap12:fault use="literal" name="ServiceFaultFault" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:binding name="NetTcpBinding_IWcfBusinessFacade" type="tns:IWcfBusinessFacade">
    <wsp:PolicyReference URI="#NetTcpBinding_IWcfBusinessFacade_policy">
    </wsp:PolicyReference>
    <soap12:binding transport="http://schemas.microsoft.com/soap/tcp" />
    <wsdl:operation name="InvokeService">
      <soap12:operation soapAction="http://tempuri.org/IWcfBusinessFacade/InvokeService" style="document" />
      <wsdl:input>
        <soap12:body use="literal" />
      </wsdl:input>
      <wsdl:output>
        <soap12:body use="literal" />
      </wsdl:output>
      <wsdl:fault name="ServiceFaultFault">
        <soap12:fault use="literal" name="ServiceFaultFault" namespace="" />
        <soap12:fault use="literal" name="ServiceFaultFault" namespace="" />
      </wsdl:fault>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="ClientWcfBusinessFacadeService">
    <wsdl:port name="NetNamedPipeBinding_IWcfBusinessFacade" binding="tns:NetNamedPipeBinding_IWcfBusinessFacade">
      <soap12:address location="net.pipe://localhost/WcfBusinessFacadeService" />
      <wsa10:EndpointReference>
        <wsa10:Address>net.pipe://localhost/WcfBusinessFacadeService</wsa10:Address>
      </wsa10:EndpointReference>
    </wsdl:port>
    <wsdl:port name="NetTcpBinding_IWcfBusinessFacade" binding="tns:NetTcpBinding_IWcfBusinessFacade">
      <soap12:address location="net.tcp://localhost:8086/WcfBusinessFacadeService" />
      <wsa10:EndpointReference>
        <wsa10:Address>net.tcp://localhost:8086/WcfBusinessFacadeService</wsa10:Address>
      </wsa10:EndpointReference>
    </wsdl:port>
    <wsdl:port name="NetTcpBinding_IWcfBusinessFacade1" binding="tns:NetTcpBinding_IWcfBusinessFacade">
      <soap12:address location="net.tcp://localhost:10000/WcfBusinessFacadeService" />
      <wsa10:EndpointReference>
        <wsa10:Address>net.tcp://localhost:10000/WcfBusinessFacadeService</wsa10:Address>
      </wsa10:EndpointReference>
    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>

净。pipe://localhost/WcfBusinessFacadeService
净。tcp://localhost:8086/WcfBusinessFacadeService
净。tcp://localhost:10000/WcfBusinessFacadeService

对于InvokeService方法的输入消息,需要传递tns:InvokeService中定义的对象。它将是命名空间中的一个类型,但在此WSDL中未显式公开;它来自另一个名称空间。您可以要求供应商提供模式XSD或程序集,此WSDL希望从中导入以下类型,因为不包括绝对或甚至相对的schemaLocation属性

<xsd:import namespace="http://tempuri.org/" />
<xsd:import namespace="http://schemas.datacontract.org/2004/07/life.common.serviceCommon" />

我会查出来的。谢谢