我需要一个旧软件(我没有开发过)来测试旧设备。设备通过web服务向服务器“通话”。这些Web服务是由轴自动生成的(Axis需要一个类并使用它的方法创建Web服务)。(Axis + Jetty)前缀自动生成的前缀命名空间
的问题是:设备的开发是为了读这样一个xml:
<ns:getReferenceCurveResponse xmlns:ns="http://services.teste.org" xmlns:ax22="http://data.teste.org/xsd" xmlns:ax23="http://util.java/xsd">
<ns:return type="org.teste.ReferenceCurve">
<ax21:createdOn>2012-08-16 17:00:59.0</ax21:createdOn>
<ax21:endPoint>9.2</ax21:endPoint>
<ax21:fiberId>21</ax21:fiberId>
<ax21:id>42</ax21:id>
而现在的web服务未来是这样的:
<ns:getReferenceCurveResponse xmlns:ns="http://services.teste.org" xmlns:ax22="http://data.teste.org/xsd" xmlns:ax23="http://util.java/xsd">
<ns:return type="org.teste.ReferenceCurve">
<ax22:createdOn>2012-08-16 17:00:59.0</ax22:createdOn>
<ax22:endPoint>9.2</ax22:endPoint>
<ax22:fiberId>21</ax22:fiberId>
<ax22:id>42</ax22:id>
正如您所注意到的前缀命名空间有因为设备被编码为前缀ax21,所以从ax21更改为ax22将产生错误。
我已经找到了一个解决方案,但找不到。我已经重新编译了服务器端,也没有成功。我无法找到任何地方来改变这个名称空间前缀,因为它是自动生成的Axis2
呀。我没有找到任何东西来证明这一点。大多数地方都说Axis2自己决定这件事。 – lcguida 2012-08-20 12:46:56