Thank you for replay Dan, 

This seems to not work, i get Null after this line:
> ((WrappedMessageContext)ctx.getMessageContext()).getWrappedMessage().getCon
> textualProperty("userId");

After debugging, there are no Map on class WrappedMessageContext that 
contains the key userId

any other sugestions will be aprissiated.. 

- Karan


----- Opprinnelig melding -----
Fra: Daniel Kulp <[email protected]>
Til: [email protected]
Dato: Fri, 19 Jun 2009 10:54:47 -0400
Emne: Re: howto read properties on server side

> 
> 
> Hmm........   That's a very good question.  :-)     
> 
> I think the easiest might be to do:
> @Resource WebServiceContext ctx;
> 
> ((WrappedMessageContext)ctx.getMessageContext()).getWrappedMessage().getCon
> textualProperty("userId");
> 
> 
> I THINK that would do it, but I'm not 100% sure.  
> 
> 
> Dan
> 
> 
> On Thu June 18 2009 5:51:57 am [email protected] wrote:
> > Hello,
> >
> > On each request i want some properties to be sent by client, (I dont want
> > to include thease on operations as parameter)
> > How do i handle this on server side?
> >
> > I have following on beans.xml:
> >
> > <jaxws:endpoint id="userService"
> >             implementor="UserServiceImpl"
> >             address="/userService">
> >
> >             <jaxws:properties >
> >                     <entry key="userId" value="1234" />
> >                     <entry key="ownerId" value="1234"/>
> >             </jaxws:properties>
> >
> > </jaxws:endpoint>
> >
> > <!-- not sure if i need this -->
> > <jaxws:client id="userClient" createdFromAPI="true"
> >
> > serviceClass="no.dossier.ws.integration.service.user.UserService">
> >             <jaxws:properties  >
> >                     <entry key="userId" value="1234" />
> >                     <entry key="ownerId" value="1234"/>
> >             </jaxws:properties>
> >
> >     </jaxws:client>
> >
> >
> > client.java:
> >
> >     service = new userService();
> >     port = service.userServicePort();
> >     Map<String, Object> requestContext =
> > ((BindingProvider)service.getOrganisationServicePort()).getRequestContext()
> > ;
> >     requestContext.put("userId","2325");
> >     requestContext.put("ownerId","2325");
> >
> > How do i read thease properties on server side`? do i have to implement
> > some interceptors ?
> >
> > Thanx,
> >
> > Regards,
> > Karan
> 
> -- 
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog

Reply via email to