axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Feng Lu <luf1...@yahoo.com>
Subject Re: [Axis2] WS-policy client support
Date Thu, 01 Nov 2007 19:28:21 GMT
Hi Sanka,

That works by adding the security header!!! Many thanks for your suggestion! Plus, I still
can use the stub.

Here is what I did. I get the ServiceClient from the Stub and just add the security policy.

StAXOMBuilder builder = new StAXOMBuilder(POLICY_XML);
OMElement aEle = builder.getDocumentElement();
SupportServiceStub aService = new SupportServiceStub(URL);
ServiceClient aClient = aService._getServiceClient();
aClient.addHeader(aEle);
GetSystemInformationResponse aResp = aService.getSystemInformation(new SupportServiceStub.GetSystemInformation());

Cheers!

Frank


----- Original Message ----
From: Sanka Samaranayke <ssanka@gmail.com>
To: axis-dev@ws.apache.org
Sent: Wednesday, October 31, 2007 10:25:11 PM
Subject: Re: [Axis2] WS-policy client support

Hi,

One work around would be to use the ServiceClient instead of using a generated stub and attach
the equivalent standard policy of that proprietary policy expreesion. 

You may also have to set username and password in options.

e.g.

Options options = serviceClient.getOptions();
options.setUsername(..);
optoins.setPassword(..);

HTH,
Sanka



Anne Thomas Manes wrote:
> That's a proprietary policy assertion language. It's supported only by
> BEA products. Talk to BEA and convince them to add support for the
> standard OASIS WS-SecurityPolicy.
>
> Anne
>
> On 10/31/07, Feng Lu <luf1999@yahoo.com> wrote:
>  
>> Hello friends,
>>
>> I am wondering whether Axis2 support WS-policy client? My WSDL server is
>> Weblogic and the WSDL has following WS-policy. I am not sure whether Axis2
>> will be able to handle WS-policy in such case. If it does, could anybody let
>> me know how to implement the client side support for this? Any special
>> handling in the stub genration?
>>
>>
>>
>> - <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>
>>
>> Thanks a lot for your help!
>>
>> Frank
>> __________________________________________________
>> Do You Yahoo!?
>> Tired of spam? Yahoo! Mail has the best spam protection around
>> http://mail.yahoo.com
>>    
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-dev-help@ws.apache.org
>
>
>  


-- 
Sanka Samaranayake
WSO2 Inc.

http://www.bloglines.com/blog/sanka
http://www.wso2.org/


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

__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 
Mime
View raw message