简体   繁体   English

二进制中继不会在wso2 EI和wso2 API管理器中扩展SOAP消息

[英]Binary-Relay don't expand SOAP message in wso2 EI and wso2 API Manager

We are using wso2 api manager (2.1.0) to manage our SOAP apis. 我们正在使用wso2 api管理器(2.1.0)来管理SOAP api。 The reponse message of a our web service has content type "application/dime". 我们的Web服务的响应消息具有内容类型“ application / dime”。 We change axis2.xml to use binary-relay (builder and formatter) with that content type. 我们将axis2.xml更改为对该内容类型使用二进制中继(生成器和格式化程序)。

<messageFormatter contentType="application/dime"                          
   class="org.wso2.carbon.relay.ExpandingMessageFormatter"/>

<messageBuilder contentType="application/dime"
   class="org.wso2.carbon.relay.BinaryRelayBuilder"/>

The response SOAP message is not expanded, so we have a return envelope like this 响应SOAP消息未扩展,因此我们有一个这样的返回信封

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
    <ns:binary xmlns:ns="http://ws.apache.org/commons/ns/payload">DCAAAAApACkAAAJxdXVpZDo3MTRDNk...U9GCgA=</ns:binary>
</soapenv:Body>
</soapenv:Envelope> 

We saw the same behaviour with wso2 enterprise integrator (6.1.1). 我们看到了与wso2企业集成商(6.1.1)相同的行为。

Is there any configuration that we have to do to enable expanding of response SOAP message in api manager or enterprise integrator? 要在api管理器或企业集成器中启用响应SOAP消息的扩展,是否需要做任何配置? Would we do something else? 我们还能做点别的吗?

也许未保留API Manager中的Content-Type,请看以下内容: WSO2 api Manager不传播多部分表单数据的内容类型头,您可以将属性http.headers.preserve设置为保留Content-Type

The APIM is working as expected in this scenario. 在这种情况下,APIM可以按预期工作。 You have set the binary formatters for your content type. 您已经为内容类型设置了二进制格式化程序。 So APIM,ESB treat your payload as a binary content and pass the same binary content inside a soap envelop. 因此,APIM,ESB将您的有效负载视为二进制内容,并将相同的二进制内容传递到soap信封中。

You need to define the correct formatter and builder for your content type "application/dime". 您需要为内容类型“ application / dime”定义正确的格式化程序和构建器。 Refer [1] on how Message Builders and Formatters work. 有关消息生成器和格式化程序的工作方式,请参见[1]。 Identify the correct formatter and builder for your type. 为您的类型标识正确的格式化程序和生成器。

[1] - https://docs.wso2.com/display/ESB500/Working+with+Message+Builders+and+Formatters [1] -https://docs.wso2.com/display/ESB500/Working+with+Message+Builders+and+Formatters

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM