【发布时间】:2008-09-15 12:48:18
【问题描述】:
我正在接收来自使用 Axis 1.4 库的客户端的 SOAP 请求。请求具有以下形式:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<PlaceOrderRequest xmlns="http://example.com/schema/order/request">
<order>
<ns1:requestParameter xmlns:ns1="http://example.com/schema/common/request">
<ns1:orderingSystemWithDomain>
<ns1:orderingSystem>Internet</ns1:orderingSystem>
<ns1:domainSign>2</ns1:domainSign>
</ns1:orderingSystemWithDomain>
</ns1:requestParameter>
<ns2:directDeliveryAddress ns2:addressType="0" ns2:index="1"
xmlns:ns2="http://example.com/schema/order/request">
<ns3:address xmlns:ns3="http://example.com/schema/common/request">
<ns4:zipcode xmlns:ns4="http://example.com/schema/common">12345</ns4:zipcode>
<ns5:city xmlns:ns5="http://example.com/schema/common">City</ns5:city>
<ns6:street xmlns:ns6="http://example.com/schema/common">Street</ns6:street>
<ns7:houseNum xmlns:ns7="http://example.com/schema/common">1</ns7:houseNum>
<ns8:country xmlns:ns8="http://example.com/schema/common">XX</ns8:country>
</ns3:address>
[...]
如您所见,为同一个命名空间定义了多个前缀,例如命名空间 http://example.com/schema/common 具有前缀 ns4、ns5、ns6、ns7 和 ns8。一些长请求为同一个命名空间定义了数百个前缀。
这导致Saxon XSLT 处理器出现问题,我用它来转换请求。 Saxon 将同一命名空间的不同前缀数量限制为 255 个,并在定义更多前缀时引发异常。
Axis 1.4 能否配置为定义更智能的前缀,以便每个命名空间只有一个前缀?
【问题讨论】:
-
我也有同样的问题。我会密切关注这个话题。
标签: java xml soap namespaces axis