Web Services ABAP中的C# Web服务消费错误,请提供有效的soap操作

kuhbmx9i  于 2023-08-06  发布在  C#
关注(0)|答案(1)|浏览(219)

我们已经开发了一个Web服务,C# .NET应用程序可以很好地使用该服务,但基于ABAP得应用程序却无法使用该服务,因此出现以下错误:

无法处理没有有效操作参数的请求。请提供有效的soap操作。


的数据
会有什么问题呢?
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>

字符串

umuewwlo

umuewwlo1#

当发送SOAP请求时,HTTP头数据的一部分必须包括SOAP Action字段,以便正确地标识(使用WDSL)要执行的方法。在C#中,这是根据发送消息时提供的操作自动处理的,这解释了为什么你现在会遇到问题。
由于我不是很精通SAP,我不能提供一个例子,但这些知识应该开始你在正确的轨道上。

相关问题