axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nandana Mihindukulasooriya <nandana....@gmail.com>
Subject Setting client properties in JAX-WS
Date Tue, 05 May 2009 14:29:43 GMT
Hi Devs,
     I need to need to set some implementation specific properties which
should be available in both outbound message and inbound message. These
properties should be should be available for Axis2 handlers in both out path
and in path. I tried setting the property in the RequestContext and it works
for the outbound message. ApplicationContextMigrator [1] copies them to
Axis2 Message Context as properties so out path works fine.  but I couldn't
find a way to make them available to inbound message.

Map<String, Object> rc = ((BindingProvider) port).getRequestContext();
rc.put("key",value);

I can get the ResponseContext in the same way and set the property, but it
doesn't help as it won't be available for Axis2 handlers (I want the
property in Axis2 handlers not JAX-WS handlers). Is there anyway to make the
scope of the properties to operation or service with JAX-WS ? As I
understood [2] , if I set scope of a property to APPLICATION, it will make
sure that they will be available to JAX-WS Handler implementations, consumer
implementation code, and service provider implementation code. But it seems
it doesn't help me to set the property in higher level in heirachy like
operation context or service context

What is the correct way to achive this ?

thanks,
Nandana


[1] -
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigrator.java
    -
http://svn.apache.org/repos/asf/webservices/axis2/trunk/java/modules/jaxws/src/org/apache/axis2/jaxws/spi/migrator/ApplicationContextMigratorUtil.java
[2] -
http://fusesource.com/docs/framework/2.0/jaxws/JAXWSContextsUnderstanding.html

Mime
View raw message