问题描述
我正在与Mule Studio合作,我只想知道如何使用Web Service Consumer组件传递参数并从SOAP调用特定的操作.
Hi I am working with Mule Studio and i just want to know how can i pass the parameters and call the particular Operation from SOAP using the Web Service Consumer component.
有效载荷我正在将GetWeather
我正在使用的示例SOAP服务是 LINK
The sample SOAP service i am using is LINK
推荐答案
此处您进行视频演示.
如果您不想使用DataMapper,我建议您使用 CXF客户端,或编写指定的连接器.
If you don't want to use DataMapper, I would recommend to use a CXF client or to write a specilized connector.
如果无论如何您仍然想使用Web服务使用者,则只需要为操作的主体(这只是主体,而不是整个信封)设置有效负载.您正在传递JSON,这很可能行不通.您需要将其转换为适当的XML SOAP请求正文.
If you still want to use the web service consumer no matter what, you just need to set a payload with the body (this is just the body, not the whole envelope) of the operation. You are passing a JSON, this more than probably won't work. You need to convert it to a proper XML SOAP request body.
这篇关于如何使用Mule中的Web服务使用者传递参数并加载wsdl的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!