我正在尝试访问webservice,但在我的服务结束时收到以下错误。出现以下错误:
<?xml version="1.0" encoding="UTF-8"?>
<S:Envelope xmlns:S="http://schemas.xmlsoap.org/soap/envelope/">
<S:Body>
<S:Fault xmlns:ns4="http://www.w3.org/2003/05/soap-envelope">
<faultcode>S:Client</faultcode>
<faultstring>Cannot find dispatch method for {http://customer.services.ws.m2m.airtel.com}getCustomerOnboardingDetailsRequest</faultstring>
</S:Fault>
</S:Body>
</S:Envelope>
Spring Web service tempelate用于填充操作请求但它失败并产生上述错误。当我在soap UI中导入相同的WSDl并生成请求时,请求是正确的但是当请求被spring web service tempelate封闭时,生成的请求缺少请求包装类,这导致上述异常。
here is WSDL and XSD
**WSDL**
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.11-b150616.1732 svn-revision#a247ba216861f2c0baac9a3657c5690bce0c744d.--><!--Generated by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.11-b150616.1732 svn-revision#a247ba216861f2c0baac9a3657c5690bce0c744d.--><definitions targetNamespace="http://impl.customer.services.ws.m2m.airtel.com/" name="CustomerMgmtWebService" 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://impl.customer.services.ws.m2m.airtel.com/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/">
<import namespace="http://customer.services.ws.m2m.airtel.com" location="customermgmt.wsdl"/>
<binding name="CustomerMgmtWebServiceImplPortBinding" type="ns1:CustomerMgmtWebService" xmlns:ns1="http://customer.services.ws.m2m.airtel.com">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="rpc"/>
<operation name="getCustomerOnboardingDetails">
<soap:operation soapAction=""/>
<input>
<soap:body use="literal" namespace="http://customer.services.ws.m2m.airtel.com"/>
</input>
<output>
<soap:body use="literal" namespace="http://customer.services.ws.m2m.airtel.com"/>
</output>
<fault name="CustomerServiceRuntimeFault">
<soap:fault name="CustomerServiceRuntimeFault" use="literal"/>
</fault>
<fault name="InValidRequestFault">
<soap:fault name="InValidRequestFault" use="literal"/>
</fault>
</operation>
</binding>
<service name="CustomerMgmtWebService">
<port name="CustomerMgmtWebServiceImplPort" binding="tns:CustomerMgmtWebServiceImplPortBinding">
<soap:address location="http://10.5.194.63:7002/m2mws/services/customermgmt"/>
</port>
</service>
</definitions>
**XSD**
<?xml version="1.0" encoding="UTF-8"?>
<!--Published by JAX-WS RI (http://jax-ws.java.net). RI's version is JAX-WS RI 2.2.11-b150616.1732 svn-revision#a247ba216861f2c0baac9a3657c5690bce0c744d.--><xs:schema version="1.0" targetNamespace="http://customer.services.ws.m2m.airtel.com" xmlns:tns="http://customer.services.ws.m2m.airtel.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="getCustomerOnboardingDetailsRequest" type="tns:getCustomerOnboardingDetailsRequest"/>
<xs:element name="getCustomerOnboardingDetailsResponse" type="tns:getCustomerOnboardingDetailsResponse"/>
<xs:complexType name="getCustomerOnboardingDetailsRequest">
<xs:sequence>
<xs:element name="pageNo" type="xs:int"/>
<xs:element name="pageRecordsCount" type="xs:int"/>
<xs:element name="requestedBy" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="getCustomerOnboardingDetailsResponse">
<xs:sequence>
<xs:element name="customer_onboarding_details_array" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element name="customerOnboarding" type="tns:customerOnboarding" nillable="true" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:complexType name="customerOnboarding">
<xs:sequence>
<xs:element name="customerOnboardingId" type="xs:int" minOccurs="0"/>
<xs:element name="customerName" type="xs:string" minOccurs="0"/>
<xs:element name="customerAccountNumber" type="xs:string" minOccurs="0"/>
<xs:element name="customerType" type="xs:string" minOccurs="0"/>
<xs:element name="totalReceivedSIMs" type="xs:int"/>
<xs:element name="actualInsertedSIMs" type="xs:int"/>
<xs:element name="errorSIMs" type="xs:int"/>
<xs:element name="emailAddress" type="xs:string" minOccurs="0"/>
<xs:element name="jobOrderId" type="xs:long"/>
<xs:element name="createdBy" type="xs:string" minOccurs="0"/>
<xs:element name="validatedBy" type="xs:string" minOccurs="0"/>
<xs:element name="createdOn" type="xs:dateTime" minOccurs="0"/>
<xs:element name="validatedOn" type="xs:dateTime" minOccurs="0"/>
<xs:element name="remarks" type="xs:string" minOccurs="0"/>
<xs:element name="attribute1" type="xs:string" minOccurs="0"/>
<xs:element name="attribute2" type="xs:string" minOccurs="0"/>
<xs:element name="status" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:schema>