我正在接收來自使用Axis 1.4庫的客戶端的SOAP請求。這些請求具有以下形式:如何讓Axis 1.4不爲相同的XML名稱空間生成多個前綴?
<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。一些長請求爲相同的名稱空間定義了幾百個前綴。
這導致了我用來轉換請求的XSLT處理器的Saxon問題。撒克遜將相同名稱空間的不同前綴數量限制爲255,並在定義更多前綴時引發異常。
Can Axis 1.4可以配置爲定義更智能的前綴,以便每個名稱空間只有一個前綴?
我有完全相同的問題。我會密切關注這個話題。 – 2008-10-07 17:19:14