synapse-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Upul Godage (JIRA)" <j...@apache.org>
Subject [jira] Commented: (SYNAPSE-144) Can only add WS-Security to a message if it came in as SOAP, not POX - a workaround is a wrapper filter that adds SOAPAction
Date Thu, 18 Oct 2007 04:23:50 GMT

    [ https://issues.apache.org/jira/browse/SYNAPSE-144?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12535827
] 

Upul Godage commented on SYNAPSE-144:
-------------------------------------

sample usage:
<definitions xmlns="http://ws.apache.org/ns/synapse">
    <in>
	    <switch source="get-property('MESSAGE_FORMAT')">
		<case regex="pox">
			<header name="Action" expression="'urn:getQuote'" />
			<send>
				<endpoint>
					    <address format="soap11" uri="http://localhost:9001/soap/SimpleStockQuoteService"/>
				    </endpoint>
			</send>
		</case>
		<case regex="soap11">
			<send>
				<endpoint>
					<address uri="http://localhost:9001/soap/SimpleStockQuoteService"/>
				</endpoint>
			</send>
		</case>		
		<case regex="soap12">
			<drop />
		</case>			
		<default>
			<drop />
		</default>
 	</switch>	    
    </in>
    <out>
        <send/>
    </out>
</definitions>

> Can only add WS-Security to a message if it came in as SOAP, not POX - a workaround is
a wrapper filter that adds SOAPAction
> ----------------------------------------------------------------------------------------------------------------------------
>
>                 Key: SYNAPSE-144
>                 URL: https://issues.apache.org/jira/browse/SYNAPSE-144
>             Project: Synapse
>          Issue Type: Bug
>    Affects Versions: 1.0
>         Environment: JDK6 on RHEL3
>            Reporter: Paul Anderson
>            Priority: Minor
>         Attachments: SYNAPSE-144-get_property_message_format.patch
>
>
> I define a filter that sends incoming messages out to an endpoint with WS-Security headers
added.
> If I send SOAP into it, it passes messages on OK.
> But if I send POX input, it logs the stacktrace below.
> So as a workaround, I make my client code post POX to a first filter, which adds:
> <property name="SOAPAction" action="set" expression="'doIt'" scope="transport"/>
> and sends the message to the main filter.
> It would be simpler and more performant to define only one filter.
> Is there a better workaround, or better, can this be fixed?
>   6907 [HttpServerWorker-1] ERROR Axis2Sender (Axis2Sender.java:104) - Unexpected error
during Sending message onwards
> java.util.MissingResourceException: Can't find resource for bundle org.apache.axis2.i18n.ProjectResourceBundle,
key outboundNoAction
>         at java.util.ResourceBundle.getObject(ResourceBundle.java:386)
>         at java.util.ResourceBundle.getString(ResourceBundle.java:346)
>         at org.apache.axis2.i18n.MessageBundle.getMessage(MessageBundle.java:191)
>         at org.apache.axis2.i18n.MessageBundle.getMessage(MessageBundle.java:80)
>         at org.apache.axis2.addressing.i18n.AddressingMessages.getMessage(AddressingMessages.java:61)
>         at org.apache.axis2.handlers.addressing.AddressingOutHandler$WSAHeaderWriter.processWSAAction(AddressingOutHandler.java:257)
>         at org.apache.axis2.handlers.addressing.AddressingOutHandler$WSAHeaderWriter.writeHeaders(AddressingOutHandler.java:184)
>         at org.apache.axis2.handlers.addressing.AddressingOutHandler.invoke(AddressingOutHandler.java:109)
>         at org.apache.axis2.engine.Phase.invoke(Phase.java:383)
>         at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:203)
>         at org.apache.axis2.engine.AxisEngine.send(AxisEngine.java:433)
>         at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.send(DynamicAxisOperation.java:193)
>         at org.apache.synapse.core.axis2.DynamicAxisOperation$DynamicOperationClient.execute(DynamicAxisOperation.java:177)
>         at org.apache.synapse.core.axis2.Axis2FlexibleMEPClient.send(Axis2FlexibleMEPClient.java:233)
>         at org.apache.synapse.core.axis2.Axis2Sender.sendOn(Axis2Sender.java:50)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.send(Axis2SynapseEnvironment.java:112)
>         at org.apache.synapse.endpoints.AddressEndpoint.send(AddressEndpoint.java:193)
>         at org.apache.synapse.mediators.builtin.SendMediator.mediate(SendMediator.java:92)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:49)
>         at org.apache.synapse.mediators.filters.FilterMediator.mediate(FilterMediator.java:62)
>         at org.apache.synapse.mediators.AbstractListMediator.mediate(AbstractListMediator.java:49)
>         at org.apache.synapse.mediators.base.SequenceMediator.mediate(SequenceMediator.java:104)
>         at org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:104)
>         at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:73)
>         at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:144)
>         at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:279)
>         at org.apache.axis2.transport.nhttp.ServerWorker.processPost(ServerWorker.java:207)
>         at org.apache.axis2.transport.nhttp.ServerWorker.run(ServerWorker.java:171)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
>         at java.lang.Thread.run(Thread.java:619)

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: synapse-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: synapse-dev-help@ws.apache.org


Mime
View raw message