chemistry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Florian Müller <f...@apache.org>
Subject Re: Fwd: how to send any element in wsse usernametoken
Date Wed, 31 Oct 2012 16:40:05 GMT
 Hi Srinivas,

 You need your own authentication provider for that.

 Have a look at this class:
 org.apache.chemistry.opencmis.client.bindings.spi.StandardAuthenticationProvider

 The getSOAPHeaders() method generates the SOAP header. It should be 
 easy to add an additional tag there.

 You activate your custom authentication provider like this:

 parameter.put(SessionParameter.AUTHENTICATION_PROVIDER_CLASS, 
 "com.example.custom.authentication.provider");

 You can also add your custom session parameters (-> AppID) and access 
 them in the authentication provider.


 - Florian


> Hello I am new to this forum, If I have posted to the wrong address, 
> please
> direct me to the correct forum, I am writing a client using apache
> chemistry and I am having hard time in sending a custom element in 
> the
> username token
>  <oas:UsernameToken>
>  <oas:Username>myuser</oas:Username>
>                  <oas:Password>mypassword</oas:Password>
>                  <edm:AppID>testappid</edm:AppID>
> </oas:UsernameToken>
>
> How do I send in the AppID in the UsernameToken element, below only 
> has
> USER and PASSWORD. the AppID is of a different namespace
>
> parameter.put(SessionParameter.USER, "myuser");
> parameter.put(SessionParameter.PASSWORD, "mypassword");
>
> your input is greatly appreciated.
> thanks
> --
> Srinivas


Mime
View raw message