调用web service报参数不存在解决方案
调用web service报参数不存在
小弟在做调用web service的时候,总是报Parameter {http://com.primeton.sample/BookService}buyBookin does not exist!
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://com.primeton.sample/BookService"
xmlns:ns2="http://call.webservice.base.samples.primeton.com"
xmlns:ns1="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:nns="http://com.primeton.sample/BookService"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://call.webservice.base.samples.primeton.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Book">
<xsd:sequence>
<xsd:element minOccurs="0" name="author" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="isbn" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="name" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="price" type="ns1:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfBook">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Book" nillable="true" type="ns2:Book"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://com.primeton.sample/BookService" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="buyBookin" type="ns2:ArrayOfBook"/>
<xsd:element name="buyBookout" type="ns1:int"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="buyBookRequest">
<wsdl:part name="buyBookin" element="nns:buyBookin"></wsdl:part>
</wsdl:message>
<wsdl:message name="buyBookResponse">
<wsdl:part name="buyBookout" element="nns:buyBookout"></wsdl:part>
</wsdl:message>
<wsdl:portType name="BookServicePortType">
<wsdl:operation name="buyBook">
<wsdl:input message="nns:buyBookRequest" name="buyBookRequest"></wsdl:input>
<wsdl:output message="nns:buyBookResponse" name="buyBookResponse"></wsdl:output>
小弟在做调用web service的时候,总是报Parameter {http://com.primeton.sample/BookService}buyBookin does not exist!
<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions
targetNamespace="http://com.primeton.sample/BookService"
xmlns:ns2="http://call.webservice.base.samples.primeton.com"
xmlns:ns1="http://www.w3.org/2001/XMLSchema"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:nns="http://com.primeton.sample/BookService"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soap12="http://www.w3.org/2003/05/soap-envelope"
xmlns:soapenc11="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:soap11="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:soapenc12="http://www.w3.org/2003/05/soap-encoding">
<wsdl:types>
<xsd:schema elementFormDefault="qualified" targetNamespace="http://call.webservice.base.samples.primeton.com" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="Book">
<xsd:sequence>
<xsd:element minOccurs="0" name="author" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="isbn" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="name" nillable="true" type="ns1:string"/>
<xsd:element minOccurs="0" name="price" type="ns1:int"/>
</xsd:sequence>
</xsd:complexType>
<xsd:complexType name="ArrayOfBook">
<xsd:sequence>
<xsd:element maxOccurs="unbounded" minOccurs="0" name="Book" nillable="true" type="ns2:Book"/>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
<xsd:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://com.primeton.sample/BookService" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:element name="buyBookin" type="ns2:ArrayOfBook"/>
<xsd:element name="buyBookout" type="ns1:int"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="buyBookRequest">
<wsdl:part name="buyBookin" element="nns:buyBookin"></wsdl:part>
</wsdl:message>
<wsdl:message name="buyBookResponse">
<wsdl:part name="buyBookout" element="nns:buyBookout"></wsdl:part>
</wsdl:message>
<wsdl:portType name="BookServicePortType">
<wsdl:operation name="buyBook">
<wsdl:input message="nns:buyBookRequest" name="buyBookRequest"></wsdl:input>
<wsdl:output message="nns:buyBookResponse" name="buyBookResponse"></wsdl:output>