我有一个如下的 WSDL。我正在尝试确定如何从此文档中获取 SOAP 方法的前缀,有人可以帮忙吗?
下面是通过 SOAP-UI 生成的 Prefix Method,请注意方法前缀中的粗体部分Foo,有没有什么方法可以从 WSDL 或 XSD 中识别要使用的前缀?
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:cad="http://Foobarlog.com/">
<soapenv:Header/>
<soapenv:Body>
<**Foo**:getCADPullLogs>
<request>
</request>
</**Foo**:getCADPullLogs>
WSDL 文件如下
<definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://Foobarlog.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://Foobarlog.com/" name="FoobarLogReadWebService">
<script />
<types>
<xsd:schema>
<xsd:import namespace="http://Foobarlog.com/" schemaLocation="http://10.X.X.X:9099/FoobarLogWebService/FoobarLogReadWebService?xsd=1" />
</xsd:schema>
</types>
<message name="getFoobarPullLogs">
<part name="parameters" element="tns:getFoobarPullLogs" />
</message>
<message name="getFoobarPullLogsResponse">
<part name="parameters" element="tns:getFoobarPullLogsResponse" />
</message>
<message name="getFoobarPushLogs">
<part name="parameters" element="tns:getFoobarPushLogs" />
</message>
<message name="getFoobarPushLogsResponse">
<part name="parameters" element="tns:getFoobarPushLogsResponse" />
</message>
<message name="getFoobarTxnDetails">
<part name="parameters" element="tns:getFoobarTxnDetails" />
</message>
<message name="getFoobarTxnDetailsResponse">
<part name="parameters" element="tns:getFoobarTxnDetailsResponse" />
</message>
<portType name="FoobarLogReadWebService">
<operation name="getFoobarPullLogs">
<input wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarPullLogsRequest" message="tns:getFoobarPullLogs" />
<output wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarPullLogsResponse" message="tns:getFoobarPullLogsResponse" />
</operation>
<operation name="getFoobarPushLogs">
<input wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarPushLogsRequest" message="tns:getFoobarPushLogs" />
<output wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarPushLogsResponse" message="tns:getFoobarPushLogsResponse" />
</operation>
<operation name="getFoobarTxnDetails">
<input wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarTxnDetailsRequest" message="tns:getFoobarTxnDetails" />
<output wsam:Action="http://Foobarlog.com/FoobarLogReadWebService/getFoobarTxnDetailsResponse" message="tns:getFoobarTxnDetailsResponse" />
</operation>
</portType>
<binding name="FoobarLogReadWebServicePortBinding" type="tns:FoobarLogReadWebService">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="getFoobarPullLogs">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
<operation name="getFoobarPushLogs">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
<operation name="getFoobarTxnDetails">
<soap:operation soapAction="" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="FoobarLogReadWebService">
<port name="FoobarLogReadWebServicePort" binding="tns:FoobarLogReadWebServicePortBinding">
<soap:address location="http://10.X.X.X:9099/FoobarLogWebService/FoobarLogReadWebService" />
</port>
</service>
XSD 如下
<xs:schema xmlns:tns="http://Fooabrlog.com/" xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://Fooabrlog.com/">
<script />
<xs:element name="getFoobarPullLogs" type="tns:getFoobarPullLogs" />
<xs:element name="getFoobarPullLogsResponse" type="tns:getFoobarPullLogsResponse" />
<xs:element name="getFoobarPushLogs" type="tns:getFoobarPushLogs" />
<xs:element name="getFoobarPushLogsResponse" type="tns:getFoobarPushLogsResponse" />
<xs:element name="getFoobarTxnDetails" type="tns:getFoobarTxnDetails" />
<xs:element name="getFoobarTxnDetailsResponse" type="tns:getFoobarTxnDetailsResponse" />
<xs:complexType name="getFoobarPushLogs">
<xs:sequence>
<xs:element name="request" type="tns:FoobarPushRequestObject" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPushRequestObject">
<xs:sequence>
<xs:element name="ID" type="xs:string" minOccurs="0" />
<xs:element name="endDt" type="xs:string" minOccurs="0" />
<xs:element name="userName" type="xs:string" minOccurs="0" />
<xs:element name="requestType" type="xs:string" minOccurs="0" />
<xs:element name="startDt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getFoobarPushLogsResponse">
<xs:sequence>
<xs:element name="return" type="tns:FoobarPushResponseBean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPushResponseBean">
<xs:sequence>
<xs:element name="FoobarLogsResponse" type="tns:FoobarPushRequestBean" nillable="true" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="responseCode" type="xs:int" />
<xs:element name="responseText" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPushRequestBean">
<xs:sequence>
<xs:element name="data" type="xs:string" minOccurs="0" />
<xs:element name="destination" type="xs:string" minOccurs="0" />
<xs:element name="header" type="xs:string" minOccurs="0" />
<xs:element name="messageStatus" type="xs:string" minOccurs="0" />
<xs:element name="originator" type="xs:string" minOccurs="0" />
<xs:element name="requestID" type="xs:string" minOccurs="0" />
<xs:element name="submitDT" type="xs:string" minOccurs="0" />
<xs:element name="treatDT" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getFoobarTxnDetails">
<xs:sequence>
<xs:element name="request" type="tns:FoobarTxnRequestObject" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarTxnRequestObject">
<xs:sequence>
<xs:element name="FoobarRequestID" type="xs:string" minOccurs="0" />
<xs:element name="ID" type="xs:string" minOccurs="0" />
<xs:element name="endDt" type="xs:string" minOccurs="0" />
<xs:element name="userName" type="xs:string" minOccurs="0" />
<xs:element name="requestType" type="xs:string" minOccurs="0" />
<xs:element name="startDt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getFoobarTxnDetailsResponse">
<xs:sequence>
<xs:element name="return" type="tns:FoobarTxnResponseBean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarTxnResponseBean">
<xs:sequence>
<xs:element name="FoobarTxnResponse" type="tns:FoobarTxnRequestBean" nillable="true" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="responseCode" type="xs:int" />
<xs:element name="responseText" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarTxnRequestBean">
<xs:sequence>
<xs:element name="data" type="xs:string" minOccurs="0" />
<xs:element name="header" type="xs:string" minOccurs="0" />
<xs:element name="requestID" type="xs:string" minOccurs="0" />
<xs:element name="status" type="xs:string" minOccurs="0" />
<xs:element name="submitDT" type="xs:string" minOccurs="0" />
<xs:element name="treatDT" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getFoobarPullLogs">
<xs:sequence>
<xs:element name="request" type="tns:FoobarPullRequestObject" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPullRequestObject">
<xs:sequence>
<xs:element name="ID" type="xs:string" minOccurs="0" />
<xs:element name="endDt" type="xs:string" minOccurs="0" />
<xs:element name="userName" type="xs:string" minOccurs="0" />
<xs:element name="requestType" type="xs:string" minOccurs="0" />
<xs:element name="startDt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="getFoobarPullLogsResponse">
<xs:sequence>
<xs:element name="return" type="tns:FoobarPullResponseBean" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPullResponseBean">
<xs:sequence>
<xs:element name="FoobarLogsResponse" type="tns:FoobarPullRequestBean" nillable="true" minOccurs="0" maxOccurs="unbounded" />
<xs:element name="responseCode" type="xs:int" />
<xs:element name="responseText" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>
<xs:complexType name="FoobarPullRequestBean">
<xs:sequence>
<xs:element name="data" type="xs:string" minOccurs="0" />
<xs:element name="destination" type="xs:string" minOccurs="0" />
<xs:element name="originator" type="xs:string" minOccurs="0" />
<xs:element name="requestID" type="xs:string" minOccurs="0" />
<xs:element name="serviceProfileID" type="xs:string" minOccurs="0" />
<xs:element name="submitDt" type="xs:string" minOccurs="0" />
</xs:sequence>
</xs:complexType>