我试图使用wso2 ESB作为REST API公开SOAP后端。我使用有效载荷工厂来发送肥皂主体消息,但它不起作用。SOAP消息不是使用wso2 ESB REST API发送的
这在WSO2 ESB代码我的API资源:
<?xml version="1.0" encoding="UTF-8"?>
<api context="/akademik" name="SampleAPI" xmlns="http://ws.apache.org/ns/synapse">
<resource methods="GET" uri-template="/students?symbol={symbol}">
<inSequence>
<log level="custom">
<property expression="$url:symbol" name="symbol"/>
</log>
<payloadFactory media-type="xml">
<format>
<soapenv:Envelope xmlns:sem="http://semogabisa.te.net/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<sem:sayHi>
<arg0>$1</arg0>
</sem:sayHi>
</soapenv:Body>
</soapenv:Envelope>
</format>
<args>
<arg evaluator="xml" expression="$url:symbol"/>
</args>
</payloadFactory>
<header scope="default">
<m:complexHeader xmlns:m="http://org.synapse.example">
<m:property key="Content-Type" value="application/xml"/>
</m:complexHeader>
</header>
<send>
<endpoint>
<address format="soap11" uri="http://localhost:8084/HelloWorld"/>
</endpoint>
</send>
</inSequence>
<outSequence>
<send/>
</outSequence>
<faultSequence/>
</resource>
SOAP消息不发送到后端的Web服务,它说空。
我已经测试的后端服务与SOAPUI具有相同的SOAP信封格式,它的工作
这里正好放置了这两个属性? –
@LyanDwiPangestu发送之前“inSequence” – James
我已经像你说的那样编辑它,并将synapse.transport.http.wire作为DEBUG并发现wso2向参数'arg0'添加了一些xml命名空间。它变得像这样 ' Foobar的 soapenv:身体> soapenv:信封>' –