本文介绍了WSO2 ESB 任务配置中的 Soap Action 错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我部署了一个运行良好的 WSO2 ESB 代理服务:它发送对数据集的请求,在代理服务的 outSequence 我在文件中发送响应(我设置了执行它的序列),我也可以可视化SOAP UI(或 ESB 的尝试此服务"页面中)中的响应.

I have deployed a WSO2 ESB Proxy Service that works well: it sends a request for a dataset, in the outSequence of the proxy service I send response in a file (I set a sequence for doing it) and i can also visualize response in SOAP UI (or in the "try this service" page of the ESB).

如果我设置了一个计划任务它不起作用:我设置了消息(我在 SOAP UI 中的 xml 正确工作消息)、injectTo(代理)、proxyName(我的代理名称)、格式(我的格式)和 SoapAction...

If I set a scheduled task it doesn't work: i set message (my xml right-working message in SOAP UI), injectTo (proxy), proxyName (my proxy name), format (my format) and SoapAction...

我确定 SoapAction 的名称是正确的,但是服务器的响应是服务器无法识别 HTTP 标头值 SOAPAction: xxxx",其中 xxxx 是正确的肥皂动作名称.

I'm sure that the name of SoapAction is correct, but the response of the server is "HTTP header value is not recognized by the server SOAPAction: xxxx" where xxxx is the right soap action name.

这发生在我尝试使用另一个更简单的代理服务的另一个任务中,一切都是正确的,直到我在计划任务中使用代理服务.
我无法理解.

This happens with another task i've tried using another simpler proxy service, everything is correct until I use the proxy service within a scheduled task.
I can't understand.

推荐答案

你必须像这样添加soapAction"标题:

You must be add "soapAction" header like this:

<property name="Code" value="1234"/>
                <header name="soapAction" scope="transport" value="http://tempuri.org/MyService/GetAddress"/>
                <payloadFactory media-type="xml">
                    <format>
                        <soapenv:Envelope
                            xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
                            <soapenv:Header/>
                            <soapenv:Body>
                                <tem:GetAddress>
                                    <tem:Code>$1</tem:Code>
                                </tem:GetAddress>
                            </soapenv:Body>
                        </soapenv:Envelope>
                    </format>
                    <args>
                        <arg evaluator="xml" expression="get-property('Code')"/>
                    </args>
                </payloadFactory>
                <send>
                    <endpoint>
                        <address format="soap11" uri="http://192.168.1.1/Services/ShakouriService.svc?wsdl"/>
                    </endpoint>
                </send>

这篇关于WSO2 ESB 任务配置中的 Soap Action 错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-07 16:43