1

我创建了一个代理服务,该代理服务映射到在 Tomcat 内的本地主机上运行的外部服务上。当我通过 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 操作为空?其他 ?

4

2 回答 2

0

您从 SOAPUI 指向的服务端点是什么?有点像;

http://localhost:8280/services/yourproxy

您用来调用 API 的请求是什么?如果您的代理与服务 wsdl( using <publishwsdl> option) 相关联,则您的请求应与该服务进行映射。否则,您可以使用实际请求来调用实际的后端服务。

于 2013-04-15T16:48:54.423 回答
0

你用的是什么端口?你的 URL 应该是这样的。

http://localhost:8280/services/TestWebService
于 2013-04-10T06:16:58.897 回答