Hello,

I have a problem with a return message in case there is an error in the mediation. I define a onErrorhandler in the sequence and the messages comes back to the client, but the client gets an error. It seems to me that Synapse creates a new message-ID which cannot be understand by the client. There is no relatesTo-property in the response (look at conversation.txt)...
Synapse config file is attached...

Exception in thread "main" org.apache.axis2.AxisFault: Must Understand check failed for header http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd : Security at org.apache.axis2.engine.AxisEngine.checkMustUnderstand(AxisEngine.java:86)
   at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:135)
at org.apache.axis2.description.OutInAxisOperationClient.handleResponse(OutInAxisOperation.java:336) at org.apache.axis2.description.OutInAxisOperationClient.send(OutInAxisOperation.java:389) at org.apache.axis2.description.OutInAxisOperationClient.executeImpl(OutInAxisOperation.java:211) at org.apache.axis2.client.OperationClient.execute(OperationClient.java:163) at de.ibm.com.queue.client.QueueServiceStub.queueOperation1(QueueServiceStub.java:143) at de.ibm.com.queue.client.QueueServiceHTTPClient.main(QueueServiceHTTPClient.java:88)

Any idea?
Thanks,
Jens

==============
Listen Port: 8001
Target Host: 127.0.0.1
Target Port: 8280
==== Request ====
POST http://localhost:8280/soap/ESBQueueServiceProxy HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: "urn:queueOperation1"
User-Agent: Axis2
Host: 127.0.0.1:8001
Proxy-Connection: Keep-Alive
Transfer-Encoding: chunked

597
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
      <soapenv:Header>
         <wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 soapenv:mustUnderstand="1">
            <wsu:Timestamp 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="Timestamp-26255574">
               <wsu:Created>2008-02-12T19:49:00.631Z</wsu:Created>
               <wsu:Expires>2008-02-12T19:54:00.631Z</wsu:Expires>
            </wsu:Timestamp>
            <wsse:UsernameToken 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="UsernameToken-2159683">
               <wsse:Username>alice</wsse:Username>
               <wsse:Password 
Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest";>8FGdfsSuf39u3SXy0iWSYwUKXts=</wsse:Password>
               <wsse:Nonce>VaTxH0vd4Vmu3P2sHDZ9Wg==</wsse:Nonce>
               <wsu:Created>2008-02-12T19:49:00.621Z</wsu:Created>
            </wsse:UsernameToken>
         </wsse:Security>
         <wsa:To>http://localhost:8280/soap/ESBQueueServiceProxy</wsa:To>
         <wsa:MessageID>urn:uuid:6D40FDCF29AA1B09921202845740433</wsa:MessageID>
         <wsa:Action>urn:queueOperation1</wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
         <ns1:fromClientRequest xmlns:ns1="http://de/ibm/com/xsd/queue";>
            <ns1:reqEl> World, hello to you!</ns1:reqEl>
         </ns1:fromClientRequest>
      </soapenv:Body>
   </soapenv:Envelope>0
==== Response ====
HTTP/1.1 500 Internal Server Error
Content-Type: text/xml; charset=UTF-8
Proxy-Connection: Keep-Alive
Host: 127.0.0.1:8001
SOAPAction: "urn:queueOperation1"
Date: Tue, 12 Feb 2008 19:49:01 GMT
Server: Synapse-HttpComponents-NIO
Transfer-Encoding: chunked

3b1
<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
      <soapenv:Header>
         <wsse:Security 
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
 soapenv:mustUnderstand="1">
            <wsu:Timestamp 
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd";
 wsu:Id="Timestamp-31534387">
               <wsu:Created>2008-02-12T19:49:01.572Z</wsu:Created>
               <wsu:Expires>2008-02-12T19:54:01.572Z</wsu:Expires>
            </wsu:Timestamp>
         </wsse:Security>
         
<wsa:MessageID>urn:uuid:571F5FFB967288856E45888030216690-69317661</wsa:MessageID>
         <wsa:Action>urn:queueOperation1</wsa:Action>
      </soapenv:Header>
      <soapenv:Body>
         <soapenv:Fault>
            <faultcode 
xmlns:tns="http://www.w3.org/2003/05/soap-envelope";>tns:Receiver</faultcode>
            <faultstring>sql exception occured</faultstring>
         </soapenv:Fault>
      </soapenv:Body>
   </soapenv:Envelope>
0


==============
<?xml version="1.0" encoding="UTF-8"?>
<syn:definitions xmlns:syn="http://ws.apache.org/ns/synapse";>
	<syn:registry provider="org.wso2.esb.registry.ESBRegistry">
		<syn:parameter name="root">file:registry/</syn:parameter>
	</syn:registry>
	<syn:localEntry key="sec_policy"
		src="file:repository/conf/sample/resources/policy/policy_1.xml" />
	<syn:proxy name="ESBQueueServiceProxy" transports="http"
		startOnLoad="true" statistics="enable" trace="enable">
		<syn:target>
			<syn:endpoint>
				<syn:address
					uri="http://localhost:8002/esbQueueService/services/QueueService";>
					<syn:enableAddressing />
				</syn:address>
			</syn:endpoint>
			<syn:inSequence onError="myFaultHandler">
				<!-- <syn:header name="wsse:Security" action="remove"
					xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; />-->
				<syn:roleBasedRouting>
					<!-- possible values are: http-header, ws-security -->
					<syn:authentificationType>
						ws-security
					</syn:authentificationType>
					<!-- possible values are: jdbc, ldap, acegi-security-->
					<syn:realm type="jdbc">
						<syn:driverurl>
							jdbc:derby:UserDatabase;create=true
						</syn:driverurl>
						<syn:drivername>
							org.apache.derby.jdbc.EmbeddedDriver
						</syn:drivername>
						<syn:username>wso2esb</syn:username>
						<syn:password>wso2esb</syn:password>
					</syn:realm>
				</syn:roleBasedRouting>
			</syn:inSequence>
			<syn:outSequence onError="myFaultHandler">
				<syn:send />
			</syn:outSequence>
		</syn:target>
		<syn:publishWSDL
			uri="file:repository/conf/sample/resources/proxy/QueueService.wsdl" />
		<syn:policy key="sec_policy" />
		<syn:enableSec />
	</syn:proxy>
	<syn:sequence name="myFaultHandler">
		<syn:log />
		<syn:header name="wsse:Security" action="remove"
					xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"; />
		<syn:makefault>
			 <syn:code value="tns:Receiver" xmlns:tns="http://www.w3.org/2003/05/soap-envelope"/>
			<syn:reason expression="get-property('ERROR_MESSAGE')" />
		</syn:makefault>
		<syn:property name="RESPONSE" value="true" />
		<syn:header name="To" expression="get-property('ReplyTo')" />
		<syn:send />
	</syn:sequence>
</syn:definitions>

Reply via email to