Hi Jay, Since you've generated stubs from a security policy annotated wsdl, you do not need to load the security policy from file in the client side.
But you need to set the rampart specific configurations in the client side. The article that I pointed in my previous mail describes how to do it programetically in the client side. The article at [1] also discusses the same. You can find a list of such rampart configurations from [2]. The above null pointer exceptions might have occurred due to not setting required rampart configurations (like keystore details, encyptionUser, userCertAlias etc..) for the relevant security scenarios, in the client side. [1] http://blog.thilinamb.com/2009/12/how-to-build-rampart-config.html [2] http://axis.apache.org/axis2/java/rampart/rampartconfig-guide.html Thanks, Hasini. On Fri, Aug 5, 2011 at 7:31 PM, Jay Sullivan <[email protected]> wrote: > > > On Thu, Aug 4, 2011 at 8:46 PM, Martin Gainty <[email protected]> wrote: > >> in policy.xml set your stsAlias element in RampartConfig parent e.g: >> >> <ramp:RampartConfig xmlns:ramp=" >> http://ws.apache.org/rampart/policy"> >> <ramp:stsAlias>sts</ramp:stsAlias> >> >> Martin >> > > I don't understand, I don't have a policy.xml. I'm pretty sure WsImport > automatically created the policy for me, and it shoves it into an inline > string. > > Now, I don't see a RampartConfig element in the policy. Also, looking at > http://axis.apache.org/axis2/java/rampart/samples.html, I don't see any > RampartConfig elements in those either. Is there a way I can set this at > runtime? Or, if I can shove this into the policy string, where would I put > it? Before <wsp:Policy .../> ? I tried this and it didn't seem to do > anything. :/ > > > -- > Jay Sullivan >
