Mule 为什么使用CXF代理后出站地址为';你不能在骡子里改道吗?
我使用cxf代理服务在mule 3.3.0 CE中发布了一个web服务Mule 为什么使用CXF代理后出站地址为';你不能在骡子里改道吗?,mule,Mule,我使用cxf代理服务在mule 3.3.0 CE中发布了一个web服务 <mule xmlns:http="http://www.mulesoft.org/schema/mule/http" xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.mulesoft.org/schema/
<mule xmlns:http="http://www.mulesoft.org/schema/mule/http"
xmlns:spring="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://www.mulesoft.org/schema/mule/core" xmlns:cxf="http://www.mulesoft.org/schema/mule/cxf"
xmlns:cxf-core="http://cxf.apache.org/core" xmlns:mule-xml="http://www.mulesoft.org/schema/mule/xml"
xmlns:vm="http://www.mulesoft.org/schema/mule/vm" xmlns:doc="http://www.mulesoft.org/schema/mule/documentation"
xmlns:mule-ss="http://www.mulesoft.org/schema/mule/spring-security"
xmlns:ss="http://www.springframework.org/schema/security" xmlns:test="http://www.mulesoft.org/schema/mule/test"
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-current.xsd
http://www.mulesoft.org/schema/mule/core http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd
http://www.mulesoft.org/schema/mule/xml http://www.mulesoft.org/schema/mule/xml/current/mule-xml.xsd
http://www.mulesoft.org/schema/mule/vm http://www.mulesoft.org/schema/mule/vm/current/mule-vm.xsd
http://www.mulesoft.org/schema/mule/spring-security http://www.mulesoft.org/schema/mule/spring-security/3.3/mule-spring-security.xsd
http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.1.xsd
http://www.mulesoft.org/schema/mule/test http://www.mulesoft.org/schema/mule/test/current/mule-test.xsd "
version="CE-3.3.0">
<flow name="wbs" doc:name="wbs">
<http:inbound-endpoint host="localhost" port="9094"
path="myPath/app" exchange-pattern="request-response" doc:name="HTTP">
</http:inbound-endpoint>
<cxf:proxy-service doc:name="wbsrv" service="AppWSService"
wsdlLocation="schema/wsdl/App/WSService.wsdl" namespace="http://wbservice.com/"
payload="body"></cxf:proxy-service>
<copy-properties propertyName="SOAPAction" doc:name="Property" />
<cxf:proxy-client doc:name="wbsrv" />
<http:outbound-endpoint address="http://websrv.mydns.com:8080/App/WSService"
doc:name="HTTP" encoding="UTF-8" responseTimeout="1000000"
exchange-pattern="request-response">
</http:outbound-endpoint>
</flow>
我的mule服务器的Ip是:192.168.0.59。我可以通过该Ip(192.168.0.59)看到出站地址()。
运行web服务后,我可以看到我的wsdl,我使用cxf代理发布它,但当我使用SoapUI检查它时,我无法收到响应。SoapUI xml中存在以下错误:
<soap:Fault>
<faultcode>soap:Server</faultcode>
<faultstring>Failed to route event via endpoint: DefaultOutboundEndpoint{endpointUri=http://websrv.mydns.com:8080/App/WSService, connector=HttpConnector
{ name=httpConnector lifecycle=start this=16a2c7b
numberOfConcurrentTransactedReceivers=4
createMultipleTransactedReceivers=true connected=true
supportedProtocols=[http] serviceOverrides=
session.handler=org.mule.session.NullSessionHandler } , name='endpoint.http.websrv.mydns.com.8080.App.WSService',
mep=REQUEST_RESPONSE, properties={},
transactionConfig=Transaction{factory=null, action=INDIFFERENT,
timeout=0}, deleteUnacceptedMessages=false, initialState=started,
responseTimeout=1000000, endpointEncoding=UTF-8,
disableTransportTransformer=false}. Message payload is of type:
websrvMethod
</faultstring>
</soap:Fault>
soap:服务器
未能通过端点路由事件:DefaultOutboundEndpoint{endpointUri=http://websrv.mydns.com:8080/App/WSService,connector=HttpConnector
{name=httpConnector lifecycle=start this=16a2c7b
ConcurrentTransacticedReceiver的数量=4
CreateMultipleTransactedReceiver=true已连接=true
supportedProtocols=[http]服务覆盖=
session.handler=org.mule.session.NullSessionHandler},name='endpoint.http.websrv.mydns.com.8080.App.WSService',
mep=请求\响应,属性={},
transactionConfig=事务{factory=null,action=interference,
timeout=0},deleteUnceptedMessages=false,initialState=started,
responseTimeout=1000000,endpointEncoding=UTF-8,
disableTransportTransformer=false}。消息有效负载的类型为:
韦氏法
如何重定向出站地址,以便在每个服务器和IP上使用它?尝试以下配置:
<flow name="wbs">
<http:inbound-endpoint host="localhost" port="9094"
path="myPath/app" exchange-pattern="request-response">
<cxf:proxy-service service="AppWSService"
wsdlLocation="schema/wsdl/App/WSService.wsdl"
namespace="http://wbservice.com/"
payload="body" />
</http:inbound-endpoint>
<copy-properties propertyName="SOAPAction" />
<http:outbound-endpoint address="http://websrv.mydns.com:8080/App/WSService"
encoding="UTF-8" responseTimeout="1000000"
exchange-pattern="request-response">
<cxf:proxy-client payload="body" />
</http:outbound-endpoint>
</flow>
顺便说一句,在使用cxf之前,我使用模式web服务代理。在模式中,此出站地址重定向到(),我在每个服务器和IP上使用它。“运行web服务后,我可以看到我的wsdl,我使用cxf代理发布它”Hi@DavidSost,运行后,我可以看到我的wsdl在浏览器中,端口地址位置被重写为
,当我打开此地址时(192.168.0.59:9094/myPath/app),我看到下面的代码:soap:server没有这样的操作:(HTTP GET PATH\u INFO:/myPath/app)
我认为(192.168.0.59:9094/myPath/app)不会分派到()。大卫,对吗?我该怎么办?当您浏览192.168.0.59:9094/myPath/app
时,您的浏览器发送一个HTTP GET请求,该请求对SOAP请求无效(仅POST)。使用浏览器唯一能做的事情就是获取WSDL。@DavidDossot,当我用soapUI检查我的web服务时,我有很多错误。当我在Ip地址可以看到出站地址的服务器上检查时,我没有错误。感谢@David Dossot,此配置有一个问题“元素:代理服务不允许是元素HTTP的子元素”,我认为此问题与我的schemaLocation有关。这是正确的吗?你在Studio中得到了这个错误,对吗?如果是,不管,这是假的。配置在Mule上工作,这才是最重要的。