SAP中的C#Web服务使用错误

SAP中的C#Web服务使用错误,c#,web-services,sap,C#,Web Services,Sap,我们开发了一个web服务,该服务在C#.net应用程序中可以正常使用,但SAP应用程序无法使用该web服务,因此出现以下错误:如果没有有效的操作参数,则无法处理请求 有什么问题吗 WSDL文件: <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://sc

我们开发了一个web服务,该服务在C#.net应用程序中可以正常使用,但SAP应用程序无法使用该web服务,因此出现以下错误:如果没有有效的操作参数,则无法处理请求

有什么问题吗

WSDL文件:

<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://sabretch.com/psr" xmlns:s="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://sabretch.com/psr">
<wsdl:types>
<s:schema elementFormDefault="qualified" targetNamespace="http://sabretch.com/psr">
<s:element name="SendChangeLog">
<s:complexType>
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="toDetails" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="subject" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="arr_psrAlertLogItems" type="tns:ArrayOfObj"/>
</s:sequence>
</s:complexType>
</s:element>
<s:complexType name="ArrayOfObj">
<s:sequence>
<s:element minOccurs="0" maxOccurs="unbounded" name="Obj" nillable="true" type="tns:Obj"/>
</s:sequence>
</s:complexType>
<s:complexType name="Obj">
<s:sequence>
<s:element minOccurs="0" maxOccurs="1" name="ChangeDateTime" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="SalesOrderKey" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Line" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="FieldTecnicalName" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="Value" type="s:string"/>
<s:element minOccurs="0" maxOccurs="1" name="ChangedUser" type="s:string"/>
</s:sequence>
</s:complexType>
<s:element name="SendChangeLogResponse">
<s:complexType>
<s:sequence>
<s:element minOccurs="1" maxOccurs="1" name="SendChangeLogResult" type="s:boolean"/>
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</wsdl:types>
<wsdl:message name="SendChangeLogSoapIn">
<wsdl:part name="parameters" element="tns:SendChangeLog"/>
</wsdl:message>
<wsdl:message name="SendChangeLogSoapOut">
<wsdl:part name="parameters" element="tns:SendChangeLogResponse"/>
</wsdl:message>
<wsdl:portType name="PSREmailServiceSoap">
<wsdl:operation name="SendChangeLog">
<wsdl:input message="tns:SendChangeLogSoapIn"/>
<wsdl:output message="tns:SendChangeLogSoapOut"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="PSREmailServiceSoap" type="tns:PSREmailServiceSoap">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SendChangeLog">
<soap:operation soapAction="http://sabretch.com/psr/SendChangeLog" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="PSREmailServiceSoap12" type="tns:PSREmailServiceSoap">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="SendChangeLog">
<soap12:operation soapAction="http://sabretch.com/psr/SendChangeLog" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="PSREmailService">
<wsdl:port name="PSREmailServiceSoap" binding="tns:PSREmailServiceSoap">
<soap:address location="http://122.255.30.75:8090/WebServices/PSREmailService.asmx"/>
</wsdl:port>
<wsdl:port name="PSREmailServiceSoap12" binding="tns:PSREmailServiceSoap12">
<soap12:address location="http://122.255.30.75:8090/WebServices/PSREmailService.asmx"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

发送SOAP请求时,HTTP头数据的一部分必须包含SOAP操作字段,以便正确识别(使用WDSL)要执行的方法。在C#中,这是根据发送消息时提供的操作自动处理的,这解释了为什么您现在会遇到问题


由于我对SAP不太熟悉,所以我无法提供一个示例,但是这些知识应该会让您走上正确的道路。

感谢James,这是WSDL名称空间的一个问题,我们保留了默认名称空间,它工作正常!谢谢你的帮助