问题描述
我是m子工作室的新手.
i'm very new to mule studio.
这是环境设置.
VM1 = Windows 7,Visual Studio 2012,IIS 7.IIS7中托管的.net 4.5 WCF Web服务具有接受字符串并返回字符串的操作.
VM1 = Windows 7, Visual Studio 2012, IIS 7.A .net 4.5 WCF webservice hosted in IIS7 that has an operation that accepts a string and returns a string.
VM2 = Ubuntu 13.4 OpenJDK 1.7.0_25 Mule Studio 3.5 Community Edition.
VM2 = Ubuntu 13.4 OpenJDK 1.7.0_25 Mule Studio 3.5 Community Edition.
我创建了一个带有出站终结点的JAXWS-Client,方法是单击WSDL中的generate,然后输入 VM1 上IIS中托管的.net WCF Web服务的URL.很好.
I created a JAXWS-Client with an outbound endpoint, I did this by clicking the generate from WSDL and entering the url of the .net WCF webservice hosted in IIS on VM1. That was fine.
然后,我在入站服务和出站客户端之间创建了一个jaxws-Service入站端点,其中有一个记录器和一个要字符串化的对象.
I then created an inbound endpoint with a jaxws-Service in-between the inbound service and the outbound client there is a logger and an object to string.
如果我设置了一个香草入站端点(没有肥皂),并使用一个简单的html表单将其发布,则一切正常,然后我将一个字符串返回给浏览器.但是,当流在出站端点之前到达Soap组件时,添加Soap Component会导致dispatcherexception.
If I setup a vanilla inbound endpoint (no soap) and use a simple html form to post it all works fine and I get a string back to the browser. But adding the Soap Component causes the dispatcherexception when the flow hits the Soap Component just prior to the outbound endpoint.
<flow name="testtwoFlow1" doc:name="testtwoFlow1">
<http:inbound-endpoint exchange-pattern="request-response" path="SimplePing" doc:name="HTTP" host="0.0.0.0" port="8081"/>
<cxf:jaxws-service serviceClass="TestTwo.IPing" doc:name="SOAP" />
<logger level="INFO" doc:name="Logger"/>
<object-to-string-transformer doc:name="Object to String"/>
<flow-ref name="testtwoFlow3" doc:name="Flow Reference"/>
</flow>
<sub-flow name="testtwoFlow3" doc:name="testtwoFlow3">
<cxf:jaxws-client operation="SimplePing" serviceClass="TestTwo.IPing" enableMuleSoapHeaders="true" doc:name="SOAP"/>
<logger level="INFO" doc:name="Logger"/>
<http:outbound-endpoint exchange-pattern="request-response" host="192.168.0.2" port="80" path="MuleExperiments/Ping.svc" method="POST" doc:name="HTTP" />
</sub-flow>
我已经在Google上进行了广泛的搜索,如果示例显示了入站服务与出站客户端进行交互,那么我会遇到很多麻烦.或对引发的异常的描述,引起异常的原因以及如何对其进行处理.我几乎猜到了它的原因,因为服务和客户端是从相同的WSDL生成的,但是我不会认为这将是一个真正的问题.或者在我的cxf:jaxws-service& cxf:jaxws-service的服务类是相同的.
I Have googled extensively and I haven been much in the way if examples that show an inbound service interacting with an outbound client. Or descriptions of the exception thrown, what causes it and how to address it. I'm guessing pretty much its because the service and the client are generated from the same WSDL, but I wouldn't have thought that would be a real issue. Or that in my cxf:jaxws-service & cxf:jaxws-service the service class is the same.
目前,我的目标是简单地输入/输出字符串
What my goal is, at this juncture, is to have a simple in/out of a string
推荐答案
我的客户端配置错误.应该是clientClass,而不是serviceClass,并且还需要设置端口.完成这些更改后,我就可以使用它.
My client was wrongly configured. It should have been clientClass, not serviceClass, and the port needed to be set as well. Once I made these changes, I got it working.
<cxf:jaxws-client
operation="SimplePing"
enableMuleSoapHeaders="true"
doc:name="SOAP"
clientClass="TestTwo.PingService"
port="BasicHttpBinding_IPing"
/>
这篇关于ule子方法不能转换为字符串的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!