我在Tomcat内部的localhost上运行的外部服务上创建了一个代理服务。 当我通过SOAPUI调用代理服务时,我收到错误:
未找到操作的端点引用(EPR)是 / services / TestWebService和WSA Action =。如果这个EPR是 以前可以访问,请联系服务器管理员。
这里是从我原始的WSDL生成的代理的WSDL:
<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://apache.org/hello_world_soap_http" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:x1="http://apache.org/hello_world_soap_http/types" name="HelloWorld" targetNamespace="http://apache.org/hello_world_soap_http">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://apache.org/hello_world_soap_http/types" elementFormDefault="qualified" targetNamespace="http://apache.org/hello_world_soap_http/types">
<simpleType name="MyStringType">
<restriction base="string">
<maxLength value="30"/>
</restriction>
</simpleType>
<element name="sayHi">
<complexType/>
</element>
<element name="sayHiResponse">
<complexType>
<sequence>
<element name="responseType" type="string"/>
</sequence>
</complexType>
</element>
<element name="greetMe">
<complexType>
<sequence>
<element name="requestType" type="tns:MyStringType"/>
</sequence>
</complexType>
</element>
<element name="greetMeResponse">
<complexType>
<sequence>
<element name="responseType" type="string"/>
</sequence>
</complexType>
</element>
<element name="greetMeOneWay">
<complexType>
<sequence>
<element name="requestType" type="string"/>
</sequence>
</complexType>
</element>
<element name="pingMe">
<complexType/>
</element>
<element name="pingMeResponse">
<complexType/>
</element>
<element name="faultDetail">
<complexType>
<sequence>
<element name="minor" type="short"/>
<element name="major" type="short"/>
</sequence>
</complexType>
</element>
</schema>
</types>
<message name="sayHiRequest">
<part name="in" element="x1:sayHi"/>
</message>
<message name="pingMeResponse">
<part name="out" element="x1:pingMeResponse"/>
</message>
<message name="greetMeRequest">
<part name="in" element="x1:greetMe"/>
</message>
<message name="sayHiResponse">
<part name="out" element="x1:sayHiResponse"/>
</message>
<message name="greetMeResponse">
<part name="out" element="x1:greetMeResponse"/>
</message>
<message name="pingMeRequest">
<part name="in" element="x1:pingMe"/>
</message>
<message name="greetMeOneWayRequest">
<part name="in" element="x1:greetMeOneWay"/>
</message>
<message name="pingMeFault">
<part name="faultDetail" element="x1:faultDetail"/>
</message>
<portType name="Greeter">
<operation name="sayHi">
<input name="sayHiRequest" message="tns:sayHiRequest"/>
<output name="sayHiResponse" message="tns:sayHiResponse"/>
</operation>
<operation name="greetMe">
<input name="greetMeRequest" message="tns:greetMeRequest"/>
<output name="greetMeResponse" message="tns:greetMeResponse"/>
</operation>
<operation name="greetMeOneWay">
<input name="greetMeOneWayRequest" message="tns:greetMeOneWayRequest"/>
</operation>
<operation name="pingMe">
<input name="pingMeRequest" message="tns:pingMeRequest"/>
<output name="pingMeResponse" message="tns:pingMeResponse"/>
<fault name="pingMeFault" message="tns:pingMeFault"/>
</operation>
</portType>
<binding name="Greeter_SOAPBinding" type="tns:Greeter">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="sayHi">
<soap:operation soapAction="" style="document"/>
<input name="sayHiRequest">
<soap:body use="literal"/>
</input>
<output name="sayHiResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="greetMe">
<soap:operation soapAction="" style="document"/>
<input name="greetMeRequest">
<soap:body use="literal"/>
</input>
<output name="greetMeResponse">
<soap:body use="literal"/>
</output>
</operation>
<operation name="greetMeOneWay">
<soap:operation soapAction="" style="document"/>
<input name="greetMeOneWayRequest">
<soap:body use="literal"/>
</input>
</operation>
<operation name="pingMe">
<soap:operation style="document"/>
<input>
<soap:body use="literal"/>
</input>
<output>
<soap:body use="literal"/>
</output>
<fault name="pingMeFault">
<soap:fault name="pingMeFault" use="literal"/>
</fault>
</operation>
</binding>
<service name="SOAPService">
<port name="SoapPort" binding="tns:Greeter_SOAPBinding">
<soap:address location="http://WIN-PC:8280/services/TestWebService"/>
</port>
</service>
</definitions>
有什么问题? SOAPAction操作为空?其他?
答案 0 :(得分:0)
您使用的端口是什么?您的网址应该是这样的。
http://localhost:8280/services/TestWebService
答案 1 :(得分:0)
Waht是您从SOAPUI指出的服务端点?它就像是;
http://localhost:8280/services/yourproxy
你用来调用API的请求是什么?如果您的代理与服务wsdl(using <publishwsdl> option
)相关联,那么您的请求应该映射到。您可以使用您用来调用实际后端服务的实际请求。