【问题标题】:WSO2 ESB Web Services Proxy for Axis1Axis1 的 WSO2 ESB Web 服务代理
【发布时间】:2014-07-31 16:44:51
【问题描述】:

对于一些使用 AXIS1(例如 AXIS 1.4)作为端点的旧版 Web 服务,是否有任何教程或示例让 WSO2 ESB 与 AXIS1 WSDL 进行通信,并使用 REST 或 AXIS2 作为客户端的服务代理? 我目前正在使用 WSO2 ESB 4.8.1,但找不到任何参考来帮助解决此问题。谢谢!

【问题讨论】:

  • AFAIK 没有任何指南,但是如果您指向托管在 Axis1 中的 Web 服务,您在发送/接收请求/响应时是否在 ESB 端看到任何问题?
  • 这里的问题是Axis1是基于rpc/encoded的,结构和Axis2完全不同(doc/literal,WSO2 ESB框架采用的)。因此,对于使用 Axis1 SOAP 的 Web 服务站点,WSO2 ESB 无法与该站点通信。这是一个示例:primavera-unifier.oracleindustry.com/ws/services/…。本站使用Axis1.4。当 WSO2 ESB 尝试为该站点创建代理服务时,它将显示“尝试将代理服务添加到 ESB 配置时出错: :: 未知 WSDL 格式.. 不是 WSDL 1.1 或 WSDL 2.0”错误。

标签: wso2 axis esb


【解决方案1】:

我能够在 WSO ESB2 4.8.1 中毫无问题地为指定服务创建服务,至少我没有收到任何有关 WSDL 格式的错误。

但是,您是完全正确的 - 存在一些问题,然后您尝试在基于 Axis2 的 WSO2 ESB 中使用基于 Axis1 的服务:

  1. 正如您正确提到的,Axis1 使用 rpc/encoded 样式,而 Axis2 基于文档样式。为了让它一起工作,然后你为服务发布 wsdl,你应该使用跟随属性,在 WSO2 中也以 rpc 格式发布服务: <parameter name="useOriginalwsdl">true</parameter>

  2. 即使您会尝试使用具有以下定义的服务:

    <?xml version="1.0" encoding="UTF-8"?> <proxy xmlns="http://ws.apache.org/ns/synapse" name="PrimaveraProxy" transports="https,http" statistics="disable" trace="disable" startOnLoad="true"> <target> <outSequence> <send/> </outSequence> <endpoint> <wsdl service="MainService2Service" port="mainservice" uri="https://primavera-unifier.oracleindustry.com/ws/services/mainservice?wsdl"/> </endpoint> </target> <publishWSDL uri="https://primavera-unifier.oracleindustry.com/ws/services/mainservice?wsdl"/> <parameter name="useOriginalwsdl">true</parameter> <description/> </proxy>

你会得到类似的错误(然后你会尝试调用一些方法):

找不到操作的端点参考 (EPR) 是 /services/PrimaveraProxy.PrimaveraProxyHttpSoap12Endpoint 和 WSA 行动=空。如果以前可以访问此 EPR,请联系 服务器管理员。

因为原来的WSDL有空的soapAction参数,例如:

<wsdl:operation name="getRoleList">
<wsdlsoap:operation soapAction=""/>

要修复它,您应该在本地编辑原始 WSDL,方法是插入 soapAction 的名称,然后将其放入服务定义中(例如内联或通过注册表)。

希望这些建议对你有所帮助

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-06-15
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多