来自命名空间的无效SOAP Fault Start元素错误代码

时间:2015-07-06 11:04:08

标签: c# web-services wcf soap

我正在访问第三方基于Web的API Travelport。在我们决定投入生产之前,它在预生产凭证和URL上运行良好。首先我有charset=ISO-8859-1这个问题,这个问题是在Connecting to a PHP Web service with WCF in C#的帮助下解决的。但现在我得到了这个例外  Server returned an invalid SOAP Fault. Please see InnerException for more details. - Start element 'faultcode' from namespace '' expected. Found element 'SOAP-ENV:faultcode' from namespace 'http://schemas.xmlsoap.org/soap/envelope/'. Line 1, position 135.

这是XML

中的web_messages.svclog
<E2ETraceEvent xmlns="http://schemas.microsoft.com/2004/06/E2ETraceEvent">
<System xmlns="http://schemas.microsoft.com/2004/06/windows/eventlog/system">
    <EventID>0</EventID>
    <Type>3</Type>
    <SubType Name="Information">0</SubType>
    <Level>8</Level>
    <TimeCreated SystemTime="2015-07-06T07:43:46.8130015Z" />
    <Source Name="System.ServiceModel.MessageLogging" />
    <Correlation ActivityID="{992e2e7a-6cd7-475c-8b1f-684b90329a80}" />
    <Execution ProcessName="iisexpress" ProcessID="5368" ThreadID="24" />
    <Channel />
    <Computer>PRODUCTION-2</Computer>
</System>
<ApplicationData>
    <TraceData>
        <DataItem>
            <MessageLogTraceRecord Time="2015-07-06T11:43:46.7920015+04:00" Source="TransportReceive" Type="System.ServiceModel.Channels.StreamedMessage" xmlns="http://schemas.microsoft.com/2004/06/ServiceModel/Management/MessageTrace">
                <HttpResponse>
                    <StatusCode>InternalServerError</StatusCode>
                    <StatusDescription>Internal Server Error</StatusDescription>
                    <WebHeaders>
                        <Connection>close</Connection>
                        <Content-Length>554</Content-Length>
                        <Content-Type>text/xml;charset=ISO-8859-1</Content-Type>
                        <Date>Mon, 06 Jul 2015 07:46:08 GMT</Date>
                        <Server>Apache-Coyote/1.1</Server>
                    </WebHeaders>
                </HttpResponse>
                <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
                    <SOAP-ENV:Header></SOAP-ENV:Header>
                    <SOAP-ENV:Body>... stream ...</SOAP-ENV:Body>
                </SOAP-ENV:Envelope>
            </MessageLogTraceRecord>
        </DataItem>
    </TraceData>
</ApplicationData>

我有this家伙有同样的问题,但我无法应用此解决方案,我是WCF的新手请帮我解决此问题

更新

在使用IClientMessageInspector并在自定义类中实现后,我可以获得此SOAP详细信息

<SOAP-ENV:Fault xmlns:SOAP-ENV=\"http://schemas.xmlsoap.org/soap/envelope/\">
    <SOAP-ENV:faultcode>500</SOAP-ENV:faultcode>
    <SOAP-ENV:faultstring>EntGWConnectServlet:29d64cb14e628c682c7b50 - Internal Error: nullnull</SOAP-ENV:faultstring>
    <SOAP-ENV:faultactor></SOAP-ENV:faultactor>
    <SOAP-ENV:detail>EntGWConnectServlet:29d64cb14e628c682c7b50 - Internal Error: nullnull</SOAP-ENV:detail>
</SOAP-ENV:Fault>

仍然无法获得确切的错误

正如我上面提到的,在应用解决方案后,我仍然没有得到正确的错误,以便我可以纠正它。

0 个答案:

没有答案