【问题标题】:Axis2 SOAP Response element name camel case issueAxis2 SOAP 响应元素名称驼峰式问题
【发布时间】:2012-09-05 09:54:23
【问题描述】:

请参阅我的 WSDL 和 SOAP 响应的摘录。

WSDL Definition:
----------------
<xs:complexType name="ContactInformation">
    <xs:sequence>
        <xs:element maxOccurs="unbounded" minOccurs="0" name="AddressInfo"
            nillable="true" type="AddressInfo" />
    </xs:sequence>
</xs:complexType>

SOAP Response:
--------------
<contactInformation>
    <addressInfo>
    </addressInfo>
</contactInformation>

虽然在 WSDL 中元素名称是“AddressInfo”(A 是大写字母),但生成的响应的元素名称是“addressInfo”。这是造成问题,因为现有消费者正在使用区分大小写的 getElementsByTagName("AddressInfo"),我不应该更改消费者代码。

请告诉我应该怎么做才能解决这个问题?

【问题讨论】:

  • Axis2 支持不同的数据绑定,在 Axis2 中部署服务有多种不同的方式。您没有提供有关如何生成/部署服务的任何详细信息,甚至没有提及您正在使用的 Axis2 版本。如果没有这些信息,我认为任何人都无法帮助您。

标签: xml soap wsdl axis2 axis


【解决方案1】:

冒着声明obvious 的风险,将“addressInfo”更改为“AddressInfo”。如果您需要 XSLT 样式表,请告诉我们。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2010-12-09
    • 2018-04-05
    • 2016-05-28
    • 1970-01-01
    • 1970-01-01
    • 2020-10-12
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多