微信公众号搜"智元新知"关注
微信扫一扫可直接关注哦!

WSO2 Api Manager 3.2.0 如何将 SOAP 服务公开为 REST API

如何解决WSO2 Api Manager 3.2.0 如何将 SOAP 服务公开为 REST API

我使用此文档,但这是行不通的:

https://apim.docs.wso2.com/en/3.2.0/learn/tutorials/expose-a-soap-service-as-a-rest-api/

例如自动为输入创建这个中介,但它不起作用:

 <header description="SOAPAction" name="SOAPAction" scope="transport" value="http://tempuri.org/ILivePublisher/Candles"/>
<property name="REST_URL_POSTFIX" scope="axis2" action="remove"/>
<property expression="json-eval($.Candles.instrumentIsin)" name="req.var.Candles.instrumentIsin"/>
<property expression="json-eval($.Candles.interval.Interval)" name="req.var.Candles.interval.Interval"/>
<property expression="json-eval($.Candles.since)" name="req.var.Candles.since"/>
<property expression="json-eval($.Candles.to)" name="req.var.Candles.to"/>


<payloadFactory description="transform" media-type="xml">
  <format>
  <soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope" xmlns:web="http://tempuri.org/">
  <soapenv:Header/>
  <soapenv:Body>
    <web:Candles xmlns:web="http://tempuri.org/">
  <web:instrumentIsin>$1</web:instrumentIsin>
  <web:interval>
    <web:Interval>$2</web:Interval>
  </web:interval>
  <web:since>$3</web:since>
  <web:to>$4</web:to>
</web:Candles>

  </soapenv:Body>
  </soapenv:Envelope>
  </format>
  <args>
    <arg evaluator="xml" expression="get-property('req.var.Candles.instrumentIsin')"/>
<arg evaluator="xml" expression="get-property('req.var.Candles.interval.Interval')"/>
<arg evaluator="xml" expression="get-property('req.var.Candles.since')"/>
<arg evaluator="xml" expression="get-property('req.var.Candles.to')"/>

  </args>
</payloadFactory>
<property description="messageProperty" name="messageType" scope="axis2" type="STRING" value="application/soap+xml"/>

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。