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 <[EMAIL PROTECTED]> To: [email protected] 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 <[EMAIL PROTECTED]> 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: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > > -- Sanka Samaranayake WSO2 Inc. http://www.bloglines.com/blog/sanka http://www.wso2.org/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com
