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 Soap服务反序列化失败(遇到无法识别的元素)_Wcf_Web Services_Soap - Fatal编程技术网

WCF Soap服务反序列化失败(遇到无法识别的元素)

WCF Soap服务反序列化失败(遇到无法识别的元素),wcf,web-services,soap,Wcf,Web Services,Soap,我用2种方法构建了一个WCF自托管WS(basichttp绑定)。然后创建WSDL并将其交付给客户。现在他们正在向服务发送SOAP请求,但我的一个方法(PostSendeplatz)每次都会失败,参数为null。在跟踪中,我看到以下内容: <TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Verbose"> <TraceIdentifie

我用2种方法构建了一个WCF自托管WS(basichttp绑定)。然后创建WSDL并将其交付给客户。现在他们正在向服务发送SOAP请求,但我的一个方法(PostSendeplatz)每次都会失败,参数为null。在跟踪中,我看到以下内容:

<TraceRecord xmlns="http://schemas.microsoft.com/2004/10/E2ETraceEvent/TraceRecord" Severity="Verbose">
  <TraceIdentifier>http://msdn.microsoft.com/de-DE/library/System.Runtime.Serialization..aspx</TraceIdentifier>
  <Description>An unrecognized element was encountered in the XML during deserialization which was ignored.</Description>
  <AppDomain>RabbitServerTopSelf.vshost.exe</AppDomain>
  <ExtendedData xmlns="http://schemas.microsoft.com/2006/08/ServiceModel/StringTraceRecord">
    <Element>http://plantri.de:sendeplatz</Element>
  </ExtendedData>
</TraceRecord>
下面是soap信封的一部分,它没有反序列化(从跟踪中):


http://192.168.40.64:8800/RabbitImportService
http://plantri.de/IRabbitImportService/PostSendeplatz
1258878
...

但工作信封看起来完全一样:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://192.168.40.64:8800/RabbitImportService</To>
        <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://plantri.de/IRabbitImportService/PostSendung</Action>
    </s:Header>
    <soapenv:Body>
        <PostSendung xmlns="http://plantri.de">
            <sendung>
                <Id>564589</Id>
...

http://192.168.40.64:8800/RabbitImportService
http://plantri.de/IRabbitImportService/PostSendung
564589
...
我没有机会更改由客户(JAVA)编写的客户端代理。
有人有办法解决这个问题吗

但工作信封看起来完全一样:如何

      <PostSendeplatz xmlns="http://plantri.de">
        <sendeplatz>

      <PostSendung xmlns="http://plantri.de">
        <sendung>

我看到这些标签名称不同

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <s:Header xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">
        <To s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://192.168.40.64:8800/RabbitImportService</To>
        <Action s:mustUnderstand="1" xmlns="http://schemas.microsoft.com/ws/2005/05/addressing/none">http://plantri.de/IRabbitImportService/PostSendung</Action>
    </s:Header>
    <soapenv:Body>
        <PostSendung xmlns="http://plantri.de">
            <sendung>
                <Id>564589</Id>
...
      <PostSendeplatz xmlns="http://plantri.de">
        <sendeplatz>

      <PostSendung xmlns="http://plantri.de">
        <sendung>