我应该在我的 wsdl 文件中进行哪些更改才能直接在 SAP ABAP 代理中使用?
What changes should i make in my wsdl file to directly consume in SAP ABAP Proxy?
我在 java.I 中使用 jax-ws 创建了一个 soap 服务,想直接使用 ABAP 代理在 SAP 中使用我的 WSDL。如何使我的 WSDL 与 SAP 兼容?
我尝试在我的 WSDL 文件中包含最大和最小出现次数。当我用 soap ui 测试时,它正在工作。但在 SAP 中仍然出现错误
SOAP Fault Code:3 One or More Soap header block not understood.
我已经搜索过这个错误,但找不到任何有用的东西。
这是从 XSD
生成的 WSDL 文件
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://example.com/soap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/soap" targetNamespace="http://example.com/soap">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://example.com/soap">
<xs:element name="getOrderRequest">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="purchaseOrderNumber" type="xs:long"/>
<xs:element maxOccurs="1" minOccurs="1" name="Type" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="vCode" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="vName" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="Location" type="xs:string"/>
<xs:element name="lineItem" type="tns:lineItem"
maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="lineItem">
<xs:sequence>
<xs:element name="Order_No" type="xs:long"/>
<xs:element name="Material" type="xs:string"/>
<xs:element name="Description" type="xs:string"/>
<xs:element name="UOM" type="xs:string"/>
<xs:element name="Value" type="xs:decimal"/>
<xs:element name="Tax" type="xs:string"/>
<xs:element name="Item" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getOrderRequest">
<wsdl:part element="tns:getOrderRequest" name="getOrderRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getOrderResponse">
<wsdl:part element="tns:getOrderResponse" name="getOrderResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="OrderService">
<wsdl:operation name="getOrder">
<wsdl:input message="tns:getOrderRequest" name="getOrderRequest">
</wsdl:input>
<wsdl:output message="tns:getOrderResponse" name="getOrderResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="OrderServiceSoap11" type="tns:OrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getOrder">
<soap:operation soapAction=""/>
<wsdl:input name="getOrderRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getOrderResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="OrderServiceService">
<wsdl:port binding="tns:OrderServiceSoap11" name="OrderServiceSoap11">
<soap:address location="http://localhost:8089/Soap/app/OrderService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
我想知道我的 WSDL 文件是否正确?
您的 wsdl 策略和服务元素丢失。您说您收到 SOAP header understanded 错误。 SOAP header 一般用于认证,一般旧的SAP 版本不支持header 段中的认证。更改您的 java 代码并尝试使用基本身份验证。
我在 java.I 中使用 jax-ws 创建了一个 soap 服务,想直接使用 ABAP 代理在 SAP 中使用我的 WSDL。如何使我的 WSDL 与 SAP 兼容?
我尝试在我的 WSDL 文件中包含最大和最小出现次数。当我用 soap ui 测试时,它正在工作。但在 SAP 中仍然出现错误
SOAP Fault Code:3 One or More Soap header block not understood.
我已经搜索过这个错误,但找不到任何有用的东西。
这是从 XSD
生成的 WSDL 文件<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:sch="http://example.com/soap" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://example.com/soap" targetNamespace="http://example.com/soap">
<wsdl:types>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" targetNamespace="http://example.com/soap">
<xs:element name="getOrderRequest">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="purchaseOrderNumber" type="xs:long"/>
<xs:element maxOccurs="1" minOccurs="1" name="Type" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="vCode" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="vName" type="xs:string"/>
<xs:element maxOccurs="1" minOccurs="1" name="Location" type="xs:string"/>
<xs:element name="lineItem" type="tns:lineItem"
maxOccurs="unbounded" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="lineItem">
<xs:sequence>
<xs:element name="Order_No" type="xs:long"/>
<xs:element name="Material" type="xs:string"/>
<xs:element name="Description" type="xs:string"/>
<xs:element name="UOM" type="xs:string"/>
<xs:element name="Value" type="xs:decimal"/>
<xs:element name="Tax" type="xs:string"/>
<xs:element name="Item" type="xs:decimal"/>
</xs:sequence>
</xs:complexType>
<xs:element name="getOrderResponse">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="1" minOccurs="1" name="message" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
</wsdl:types>
<wsdl:message name="getOrderRequest">
<wsdl:part element="tns:getOrderRequest" name="getOrderRequest">
</wsdl:part>
</wsdl:message>
<wsdl:message name="getOrderResponse">
<wsdl:part element="tns:getOrderResponse" name="getOrderResponse">
</wsdl:part>
</wsdl:message>
<wsdl:portType name="OrderService">
<wsdl:operation name="getOrder">
<wsdl:input message="tns:getOrderRequest" name="getOrderRequest">
</wsdl:input>
<wsdl:output message="tns:getOrderResponse" name="getOrderResponse">
</wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="OrderServiceSoap11" type="tns:OrderService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="getOrder">
<soap:operation soapAction=""/>
<wsdl:input name="getOrderRequest">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="getOrderResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="OrderServiceService">
<wsdl:port binding="tns:OrderServiceSoap11" name="OrderServiceSoap11">
<soap:address location="http://localhost:8089/Soap/app/OrderService"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
我想知道我的 WSDL 文件是否正确?
您的 wsdl 策略和服务元素丢失。您说您收到 SOAP header understanded 错误。 SOAP header 一般用于认证,一般旧的SAP 版本不支持header 段中的认证。更改您的 java 代码并尝试使用基本身份验证。