Web服务SOAPUI

时间:2018-06-24 10:55:00

标签: wsdl

我开始了有关Web服务的在线课程,而在进行第一次练习时,我遇到了一个问题。我附上了wsdl文件。在请求中添加员工时,我没有收到与指导员相同的回复(附有屏幕截图)。您有什么想法会导致我的问题吗?

<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://sample.com/reservation/guest/types" xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:tns="http://sample.com/reservation/guest" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ax21="http://exception.reservation.sample.com/xsd" xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" xmlns:ns1="http://org.apache.axis2/xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" targetNamespace="http://sample.com/reservation/guest">
<wsdl:documentation>EmployeeManagementService</wsdl:documentation>
<wsdl:types>
<xs:schema attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://exception.reservation.sample.com/xsd">
<xs:complexType name="EmployeeManagementException">
<xs:sequence>
<xs:element minOccurs="0" name="message" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
<xs:schema xmlns:ax22="http://exception.reservation.sample.com/xsd" attributeFormDefault="qualified" elementFormDefault="qualified" targetNamespace="http://sample.com/reservation/guest/types">
<xs:import namespace="http://exception.reservation.sample.com/xsd"/>
<xs:element name="EmployeeManagementServiceEmployeeManagementException">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="EmployeeManagementException" nillable="true" type="ax22:EmployeeManagementException"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addEmployee">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="Department" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="age" type="xs:int"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="addEmployeeResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" type="xs:boolean"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="deleteEmployee">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="employeeName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getEmployeeDetails">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="employeeName" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="getEmployeeDetailsResponse">
<xs:complexType>
<xs:sequence>
<xs:element minOccurs="0" name="return" nillable="true" type="ns:Employee"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Employee">
<xs:sequence>
<xs:element minOccurs="0" name="age" type="xs:int"/>
<xs:element minOccurs="0" name="department" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="id" nillable="true" type="xs:string"/>
<xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
</wsdl:types>
<wsdl:message name="getEmployeeDetailsRequest">
<wsdl:part name="parameters" element="ns:getEmployeeDetails"/>
</wsdl:message>
<wsdl:message name="getEmployeeDetailsResponse">
<wsdl:part name="parameters" element="ns:getEmployeeDetailsResponse"/>
</wsdl:message>
<wsdl:message name="EmployeeManagementServiceEmployeeManagementException">
<wsdl:part name="parameters" element="ns:EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:message>
<wsdl:message name="deleteEmployeeRequest">
<wsdl:part name="parameters" element="ns:deleteEmployee"/>
</wsdl:message>
<wsdl:message name="addEmployeeRequest">
<wsdl:part name="parameters" element="ns:addEmployee"/>
</wsdl:message>
<wsdl:message name="addEmployeeResponse">
<wsdl:part name="parameters" element="ns:addEmployeeResponse"/>
</wsdl:message>
<wsdl:portType name="EmployeeManagementServicePortType">
<wsdl:operation name="getEmployeeDetails">
<wsdl:input message="tns:getEmployeeDetailsRequest" wsaw:Action="urn:getEmployeeDetails"/>
<wsdl:output message="tns:getEmployeeDetailsResponse" wsaw:Action="urn:getEmployeeDetailsResponse"/>
<wsdl:fault message="tns:EmployeeManagementServiceEmployeeManagementException" name="EmployeeManagementServiceEmployeeManagementException" wsaw:Action="urn:getEmployeeDetailsEmployeeManagementServiceEmployeeManagementException"/>
</wsdl:operation>
<wsdl:operation name="deleteEmployee">
<wsdl:input message="tns:deleteEmployeeRequest" wsaw:Action="urn:deleteEmployee"/>
<wsdl:fault message="tns:EmployeeManagementServiceEmployeeManagementException" name="EmployeeManagementServiceEmployeeManagementException" wsaw:Action="urn:deleteEmployeeEmployeeManagementServiceEmployeeManagementException"/>
</wsdl:operation>
<wsdl:operation name="addEmployee">
<wsdl:input message="tns:addEmployeeRequest" wsaw:Action="urn:addEmployee"/>
<wsdl:output message="tns:addEmployeeResponse" wsaw:Action="urn:addEmployeeResponse"/>
<wsdl:fault message="tns:EmployeeManagementServiceEmployeeManagementException" name="EmployeeManagementServiceEmployeeManagementException" wsaw:Action="urn:addEmployeeEmployeeManagementServiceEmployeeManagementException"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="EmployeeManagementServiceSoap11Binding" type="tns:EmployeeManagementServicePortType">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getEmployeeDetails">
<soap:operation soapAction="urn:getEmployeeDetails" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="deleteEmployee">
<soap:operation soapAction="urn:deleteEmployee" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="addEmployee">
<soap:operation soapAction="urn:addEmployee" style="document"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="EmployeeManagementServiceSoap12Binding" type="tns:EmployeeManagementServicePortType">
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<wsdl:operation name="getEmployeeDetails">
<soap12:operation soapAction="urn:getEmployeeDetails" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap12:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="deleteEmployee">
<soap12:operation soapAction="urn:deleteEmployee" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap12:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
<wsdl:operation name="addEmployee">
<soap12:operation soapAction="urn:addEmployee" style="document"/>
<wsdl:input>
<soap12:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap12:body use="literal"/>
</wsdl:output>
<wsdl:fault name="EmployeeManagementServiceEmployeeManagementException">
<soap12:fault use="literal" name="EmployeeManagementServiceEmployeeManagementException"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
<wsdl:binding name="EmployeeManagementServiceHttpBinding" type="tns:EmployeeManagementServicePortType">
<http:binding verb="POST"/>
<wsdl:operation name="getEmployeeDetails">
<http:operation location="getEmployeeDetails"/>
<wsdl:input>
<mime:content type="application/xml" part="parameters"/>
</wsdl:input>
<wsdl:output>
<mime:content type="application/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="deleteEmployee">
<http:operation location="deleteEmployee"/>
<wsdl:input>
<mime:content type="application/xml" part="parameters"/>
</wsdl:input>
</wsdl:operation>
<wsdl:operation name="addEmployee">
<http:operation location="addEmployee"/>
<wsdl:input>
<mime:content type="application/xml" part="parameters"/>
</wsdl:input>
<wsdl:output>
<mime:content type="application/xml" part="parameters"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="EmployeeManagementService">
<wsdl:port name="EmployeeManagementServiceHttpSoap11Endpoint" binding="tns:EmployeeManagementServiceSoap11Binding">
<soap:address location="http://localhost:8080/axis2/services/EmployeeManagementService.EmployeeManagementServiceHttpSoap11Endpoint/"/>
</wsdl:port>
<wsdl:port name="EmployeeManagementServiceHttpSoap12Endpoint" binding="tns:EmployeeManagementServiceSoap12Binding">
<soap12:address location="http://localhost:8080/axis2/services/EmployeeManagementService.EmployeeManagementServiceHttpSoap12Endpoint/"/>
</wsdl:port>
<wsdl:port name="EmployeeManagementServiceHttpEndpoint" binding="tns:EmployeeManagementServiceHttpBinding">
<http:address location="http://localhost:8080/axis2/services/EmployeeManagementService.EmployeeManagementServiceHttpEndpoint/"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>

My Response

instructor Response

0 个答案:

没有答案