我们正在尝试在 WSO2 ESB 上实现基本的 SOAP-to-REST 代理服务。我们的第 3 方 REST 服务接受以下格式的请求:
http://<MYURL>/simpleQuery/16783484?oslc.select=value1
问题是操作名称只有数字格式——在我们的例子中是“16783484”。payloadFactory 调解器不允许将 <16783484> 作为 XML 元素,因为 XML 规范限制只有数字的元素名称。
<proxy xmlns="http://ws.apache.org/ns/synapse" name="CQProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true">
<target>
<inSequence>
<payloadFactory>
<format>
<16783484>
<oslc.select>$1</oslc.select>
</16783484>
</format>
<args>
<arg value="myvalue1"/>
</args>
</payloadFactory>
<send>
<endpoint>
<address uri="http://<MYURL>/simpleQuery" format="get"/>
</endpoint>
</send>
<drop/>
</inSequence>
<outSequence>
<log level="full"/>
<send/>
</outSequence>
</target>
</proxy>
如何克服?
感谢你的帮助!