2017-08-10 43 views
0

我有一個代理服務包含一個序列。 我使用標籤進行身份驗證代理服務 <policy key="gov:/testPolicy"/> <enableSec/>沒有用戶的回調處理程序提供的密碼[wso2]

在此序列中包含迭代介體。 當調用代理服務與soapUI的認證則沒有REPONSE客戶端,有一個錯誤Unexpected error sending message back {org.apache.synapse.core.axis2.Axis2Sender} org.apache.axis2.AxisFault: No password supplied by the callback handler for the user : "wso2carbon"

如果沒有迭代中介則沒有錯誤

這個序列 <?xml version="1.0" encoding="UTF-8"?> <sequence name="SendReceiveQueue" trace="disable" xmlns="http://ws.apache.org/ns/synapse"> <property expression="get-property('Edxml_Organ_Id')" name="senderUnitId" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/> <property expression="get-property('Edxml_Type')" name="applicationType" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/> <property expression="get-property('Edxml_Record_Code')" name="recordCode" scope="default" type="STRING" xmlns:ns="http://org.apache.synapse/xsd"/> <property expression="$ctx:data_original" name="messagePl" scope="default" type="STRING" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd"/> <property expression="$body" name="messagePlBody" scope="default" type="STRING" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd"/> <property name="QUEUE_ACTION_TYPE" scope="default" type="STRING" value="SENDER"/> <log level="custom"> <property expression="get-property('messagePl')" name="messagePllogging" xmlns:ns="http://org.apache.synapse/xsd"/> <property expression="get-property('messagePlBody')" name="messagePlloggingBody" xmlns:ns="http://org.apache.synapse/xsd"/> </log> <iterate expression="$ctx:abc//edXML:To" id="abc" sequential="true" xmlns:edXML="http://www.mic.gov.vn/TBT/QCVN_102_2016" xmlns:ns="http://org.apache.synapse/xsd" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"> <target> <sequence> <log level="custom"> <property name="goi DSS" value="-------------------------------------------"/> <property expression="//edXML:To/edXML:OrganId/text()" name="queue name"/> </log> <payloadFactory media-type="xml"> <format> <p:getQueueId xmlns:p="http://ws.wso2.org/dataservice"> <xs:in_unitId xmlns:xs="http://ws.wso2.org/dataservice">$1</xs:in_unitId> <xs:in_b2bType xmlns:xs="http://ws.wso2.org/dataservice">$2</xs:in_b2bType> </p:getQueueId> </format> <args> <arg evaluator="xml" expression="//edXML:To/edXML:OrganId/text()"/> <arg evaluator="xml" expression="syn:get-property('Edxml_Type')"/> </args> </payloadFactory> <call blocking="true"> <endpoint> <address uri="http://cqdt-app3:8280/services/validateData"/> </endpoint> </call> <property expression="//x:returnCode/x:MessageQueueId/text()" name="queue_name" scope="default" type="STRING" xmlns:x="http://ws.wso2.org/dataservice"/> <log level="custom"> <property name="lay xong tu dss" value="-------------------------------------------"/> <property expression="$ctx:queue_name" name="ten queue lay ra"/> </log> <class name="com.vsc.ReceiveQueue"> <property name="password" value="admin"/> <property name="queueName" value="testQueue1"/> <property name="CF_NAME_PREFIX" value="connectionfactory."/> <property name="CF_NAME" value="QueueConnectionFactory"/> <property name="QPID_ICF" value="org.wso2.andes.jndi.PropertiesFileInitialContextFactory"/> <property name="CARBON_DEFAULT_HOSTNAME" value="cqdt-app3"/> <property name="QUEUE_NAME_PREFIX" value="queue."/> <property name="userName" value="admin"/> <property name="CARBON_CLIENT_ID" value="carbon"/> <property name="CARBON_DEFAULT_PORT" value="5675"/> <property name="CARBON_VIRTUAL_HOST_NAME" value="carbon"/> </class> <log level="custom"> <property name="put xong vao queue" value="-------------------------------------------"/> <property expression="$ctx:queue_name" name="ten queue ban xong"/> </log> <payloadFactory media-type="xml"> <format> <response> <result>SUCCESS</result> </response> </format> <args/> </payloadFactory> <property name="RESPONSE" scope="default" type="STRING" value="true"/> <property name="messageType" scope="axis2" type="STRING" value="application/xml"/> <property action="remove" name="NO_ENTITY_BODY" scope="axis2"/> <header action="remove" name="To" scope="default"/> <send/> </sequence> </target> </iterate> <property name="RESPONSE" scope="default" type="STRING" value="true"/> <header action="remove" name="To" scope="default"/> <log level="custom"> <property expression="get-property('messagePl')" name="1111555555555555555555555555551111111111111111111111111111111-------------------------------" xmlns:ns="http://org.apache.synapse/xsd"/> </log> </sequence>

請幫幫我!

回答

0

您是否嘗試過直接在端點上應用策略?

<endpoint xmlns="http://ws.apache.org/ns/synapse" name="TQBsEndpoint"> 
    <address uri="http://cqdt-app3:8280/services/validateData" format="soap11"> 
     <enableSec policy="gov:testPolicy"/> 
    </address> 
</endpoint> 
+0

我解決了這個問題。 –

+0

我刪除了下面的代碼:

相關問題