在Mule流中使用SOAP配置HTTP端点

在Mule流中使用SOAP配置HTTP端点,soap,cxf,mule,Soap,Cxf,Mule,我正在尝试使用Mule流在Mule中配置现有的soapweb服务。我有一个带有请求/响应的HTTP端点和一个SOAP组件,比如服务a 我想将此设置配置为一个简单的流程。我已经设置了HTTP端点和SOAP服务。流程文件如下所示 <?xml version="1.0" encoding="UTF-8"?> <mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mules

我正在尝试使用Mule流在Mule中配置现有的soapweb服务。我有一个带有请求/响应的HTTP端点和一个SOAP组件,比如服务a

我想将此设置配置为一个简单的流程。我已经设置了HTTP端点和SOAP服务。流程文件如下所示

    <?xml version="1.0" encoding="UTF-8"?>

<mule xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="CE-3.2.1" xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/http http://www.mulesoft.org/schema/mule/http/current/mule-http.xsd 
http://www.mulesoft.org/schema/mule/cxf http://www.mulesoft.org/schema/mule/cxf/current/mule-cxf.xsd 
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd 
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd ">
    <flow name="demoflowFlow1" doc:name="demoflowFlow1">
        <http:inbound-endpoint exchange-pattern="request-response" host="localhost" port="8081" doc:name="HTTP"/>
        <cxf:jaxws-service port="8082" serviceClass="com.myapp.serviceA.ServiceAImplService" doc:name="SOAP"/>
    </flow>
</mule>
我正在使用HTTP入站URL调用我的流{我不确定这里发生了什么!}并获得:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>No such operation: (HTTP GET PATH_INFO: /)</faultstring>
</soap:Fault>
</soap:Body>
</soap:Envelope>

soap:服务器
没有这样的操作:(HTTP获取路径\u信息:/)
Mule流在Mule Studio中作为应用程序运行,该服务作为Springsource toolsuite中的SOAP web服务运行

我做错了什么

原始WSDL位于


仅供参考,我可以从SpringSource工具套件运行web服务,不会出现问题。现在,如何通过GET请求从HTTP入站URL调用web服务?
[我假设像这样的简单web服务接受GET请求。]

这很容易。。。我猜com.myapp.serviceA.serviceimplservice是您的服务实现类,而IServiceA.java是您的服务类。。。你为什么不试试这个:-


您的wsdl中有错误。。。。为什么serviceimplservice。。。相反,它应该是IServiceAServiceAImplService是我猜的web服务实现类,应该保存在mule flow中

我想您在方法中忘记了@WebMethod注释。这基本上就是您的错误所说的:无操作

这是一个很好的例子

@WebService(targetNamespace = "http://service.demo.myapp.com/", endpointInterface = "com.myapp.demo.service.IServiceA", portName = "ServiceAImplPort", serviceName = "ServiceAImplService")
public class ServiceAImpl implements IServiceA {
    @WebMethod
    @WebResult(name="result")
    public String hello(@WebParam(name="user")String user) {
        return "at service A: " + user;
    }
}

通过POST not GET访问SOAP web服务。在您的案例中,您是否考虑过使用简单的服务模式而不是流?实际上,我不太清楚如何在流中使用soapweb服务。一旦我得到了这个pat,我将转向一个更复杂的流程,其中有对多个服务的并行调用,并且在调用某些服务时,我将不得不使用choice路由器。所以,无论如何,我必须使用流模式。你是对的:流模式就是你所需要的。你成功地使它工作了吗?我现在也陷入了类似的困境。是的,我设法让它工作起来了。AMA和我可以帮你。你的链接现在已断开:(
<wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.demo.myapp.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ServiceAImplService" targetNamespace="http://service.demo.myapp.com/">
<wsdl:types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://service.demo.myapp.com/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<import namespace="http://service.demo.myapp.com/" schemaLocation="http://localhost:8080/ServiceA/services/ServiceAImplPort?xsd=serviceaimpl_schema1.xsd"/>
</schema>
</wsdl:types>
<wsdl:message name="helloResponse">
<wsdl:part element="tns:helloResponse" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:message name="hello">
<wsdl:part element="tns:hello" name="parameters"></wsdl:part>
</wsdl:message>
<wsdl:portType name="IServiceA">
<wsdl:operation name="hello">
<wsdl:input message="tns:hello" name="hello"></wsdl:input>
<wsdl:output message="tns:helloResponse" name="helloResponse"></wsdl:output>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="ServiceAImplServiceSoapBinding" type="tns:IServiceA">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="hello">
<soap:operation soapAction="urn:Hello" style="document"/>
<wsdl:input name="hello">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="helloResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="ServiceAImplService">
<wsdl:port binding="tns:ServiceAImplServiceSoapBinding" name="ServiceAImplPort">
<soap:address location="http://localhost:8080/ServiceA/services/ServiceAImplPort"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
@WebService(targetNamespace = "http://service.demo.myapp.com/", endpointInterface = "com.myapp.demo.service.IServiceA", portName = "ServiceAImplPort", serviceName = "ServiceAImplService")
public class ServiceAImpl implements IServiceA {
    @WebMethod
    @WebResult(name="result")
    public String hello(@WebParam(name="user")String user) {
        return "at service A: " + user;
    }
}