我是Axis2
和webservices的新手。我有一個axis2 web服務。當ws-security關閉時,事情運行良好。當ws-security打開時,服務器日誌中會出現以下異常。我調試的服務類方法沒有被調用。附加的是兩個使用的service.xmls。org.apache.xml.security.c14n.CanonicalizationException:元素listFunctions有一個相對的名稱空間:xmlns =「xxx_xxx_listFunctions」
客戶端調用WebService的獲得followoing SOAP錯誤 - 意外EOF在序言
我得到Tomcat中的以下Java異常:
org.apache.xml.security.c14n.CanonicalizationException: Element listFunctions has a relative namespace: xmlns="test_vish_listFunctions"
at org.apache.xml.security.c14n.implementations.Canonicalizer20010315.handleAttributesSubtree(Unknown Source)
at org.apache.xml.security.c14n.implementations.CanonicalizerBase.canonicalizeSubTree(Unknown Source)
at org.apache.xml.security.c14n.implementations.CanonicalizerBase.engineCanonicalizeSubTree(Unknown Source)
at org.apache.xml.security.c14n.implementations.CanonicalizerBase.engineCanonicalizeSubTree(Unknown Source)
at org.apache.xml.security.c14n.Canonicalizer.canonicalizeSubtree(Unknown Source)
at org.apache.xml.security.utils.XMLUtils.outputDOM(Unknown Source)
以下是在server.xml當WS-Security是關閉,工作的事情
<service name="test_vish_listFunctions" targetNamespace="test_vish_listFunctions">
<description>
This service is to get the list functions
</description>
<schema schemaNamespace="test_listFunctions"/>
<parameter name="ServiceClass">vish.web.ws.service.ListFunctionsService</parameter>
<operation name="listFunctions">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver" />
</operation>
<module ref="soapmonitor"/>
</service>
以下中聲明。當WS-Security是開啓
<service name="test_vish_listRoutines" targetNamespace="test_vish_listRoutines">
<description>Service description for test_vish_listRoutines</description>
<schema schemaNamespace="test_vish_listRoutines"/>
<parameter name="ServiceClass">test.web.ws.service.ListRoutinesService</parameter>
<parameter name = "disasbleREST">true</parameter>
<operation name="listRoutines">
<messageReceiver class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</operation>
<module ref="soapmonitor"/>
<module ref="rampart" />
<parameter name = "InflowSecurity"><action>
<items>UsernameToken</items>
<passwordCallbackClass>test.web.ws.control.PWCBHandler</passwordCallbackClass>
</action>
</parameter>
</service>