Java SoapUI找不到我的web服务

Java SoapUI找不到我的web服务,java,tomcat,soap,soapui,Java,Tomcat,Soap,Soapui,因此,我已经在web服务上挣扎了几天,似乎我终于有了突破 我严格遵守了教程,我已经启动并运行了我的web服务。唯一的问题是,我似乎无法通过soapUI测试它 如果我转到http://localhost:8084/soapwebservices它显示有关我的web服务的数据,例如wsdl的位置等。由此判断,这种联系是正确的 但当我试图向其发送此请求时: <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envel

因此,我已经在web服务上挣扎了几天,似乎我终于有了突破

我严格遵守了教程,我已经启动并运行了我的web服务。唯一的问题是,我似乎无法通过soapUI测试它

如果我转到
http://localhost:8084/soapwebservices
它显示有关我的web服务的数据,例如wsdl的位置等。由此判断,这种联系是正确的

但当我试图向其发送此请求时:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:soap="soapwebservices.jdevelop.eu">
   <soapenv:Header/>
   <soapenv:Body>
      <soap:calculateValues>
         <value1>10</value1>
         <value2>3.21</value2>
      </soap:calculateValues>
   </soapenv:Body>
</soapenv:Envelope>

10
3.21
我得到一个404错误:

<head><title>Not Found (404)</title></head>
<body><h1>Not Found (404)</h1>
<b>Original request:</b> http://localhost:8084/soapwebservices<br><br>
<b>Not found request:</b> http://localhost:8084/soapwebservices</body>
未找到(404)
未找到(404)
原始请求:http://localhost:8084/soapwebservices

找不到请求:http://localhost:8084/soapwebservices
以下是我的WSDL:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<definitions xmlns:ns1="soapwebservices.jdevelop.eu" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns="http://schemas.xmlsoap.org/soap/encoding/" name="SOAPWebServices" targetNamespace="soapwebservices.jdevelop.eu">
    <types>
        <xsd:schema>
            <xsd:import namespace="soapwebservices.jdevelop.eu" schemaLocation="webservices.xsd"/>
        </xsd:schema>
    </types>
    <message name="calculateValues">
        <part name="calculateValues" element="ns1:calculateValues"/>
    </message>
    <message name="calculateValuesResponse">
        <part name="calculateValuesResponse" element="ns1:calculateValuesResponse"/>
    </message>
    <portType name="SOAPWebServices">
        <operation name="getCalculateValues">
            <input message="ns1:calculateValues"/>
            <output message="ns1:calculateValuesResponse"/>
        </operation>
    </portType>
    <binding name="SOAPWebServicesPortBinding" type="ns1:SOAPWebServices">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="getCalculateValues">
            <soap:operation soapAction="urn:http://blog.jdevelop.eu/services/getCalculateValues"/>
            <input>
                <soap:body use="literal"/>
            </input>
            <output>
                <soap:body use="literal"/>
            </output>
        </operation>
    </binding>
    <service name="SOAPService">
        <port name="WebServices" binding="ns1:SOAPWebServicesPortBinding">
            <soap:address location="http://blog.jdevelop.eu:80/services"/>
        </port>
    </service>
</definitions>

这里有什么问题

我使用的是Netbeans 6.0.1、Apache Tomcat 6.0和Java SDK 1.7
谢谢

两个观察结果:

  • 在SOAP消息中,您发送的操作名是calculateValues(
    ),而WSDL中提到的操作名是getCalculateValues(
    )。这可能是404错误背后的原因,因为calculateValues操作未定义

  • 我假设您没有在WSDL中提到的服务URL处发布SOAP消息(


  • 两个观察结果:

  • 在SOAP消息中,您发送的操作名是calculateValues(
    ),而WSDL中提到的操作名是getCalculateValues(
    )。这可能是404错误背后的原因,因为calculateValues操作未定义

  • 我假设您没有在WSDL中提到的服务URL处发布SOAP消息(


  • 检查端点类和模式中的namespce,两者应该相同

    检查端点类和模式中的namespce,两者应该相同

    我认为您必须提供完整的链接,包括wsdl---_http://localhost:8084/soapwebservices/?wsdlIn 某个特定的地方,,或者一般来说?当您在SoapUI中创建一个新项目时,您需要提供一个名称(第一个文本框)和服务的地址(应该以/?wsdl结尾),我认为您必须提供完整的链接,包括wsdl---_http://localhost:8084/soapwebservices/?wsdlIn 某个特定的地方,,或者一般来说?当您在SoapUI中创建一个新项目时,您提供了一个名称(第一个文本框)和服务的地址(这是一个应该以/?wsdl结尾的地址),我确实是。嗯,这是个新手犯的错误。我确实是。嗯,这是个新手犯的错误。