You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Paul Fremantle <pz...@gmail.com> on 2007/11/01 08:53:32 UTC

Re:

Feng

You should just need to call

stub._getServiceClient().getOptions().setUsername("foo");
stub._getServiceClient().getOptions().setPassword("bar");

Paul

On 10/31/07, Feng Lu <lu...@yahoo.com> wrote:
>
>
>
> I have sent you an email yesterday asking whether AXIS2 support WS-policy
> or not, because I saw some of the thread in the user group with the similar
> topics. If you could send me any suggestion or information, that would
> really appreciated!
>
> Here is our situation: we have a WS service WSDL (attched bellow) with
> WS-policy, hosted by Weblogic server. I used Axis2 on client side (with
> Rapart extension) to generate the stub and I am able to see the setPolicy is
> called in the stub source code. However, I am not sure what I should do to
> write some client code with Axis2 to support the policy. Our WSDL policy is
> very simple, just with user name and password:
>
> <wsp:Policy s0:Id="Auth.xml">
> - <wssp:Identity xmlns:wssp="http://www.bea.com/wls90/security/policy">
> - <wssp:SupportedTokens>
> - <wssp:SecurityToken TokenType="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#UsernameToken
> ">
>   <wssp:UsePassword Type="
> http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText"
> />
>   </wssp:SecurityToken>
>   </wssp:SupportedTokens>
>   </wssp:Identity>
>   </wsp:Policy>
>
> Any help would be greatly appreciated.
>
> Thanks
>
> Frank.
>
> __________________________________________________
> Do You Yahoo!?
> Tired of spam? Yahoo! Mail has the best spam protection around
> http://mail.yahoo.com
>



-- 
Paul Fremantle
Co-Founder and VP of Technical Sales, WSO2
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
paul@wso2.com

"Oxygenating the Web Service Platform", www.wso2.com