On Thu, Aug 4, 2011 at 11:41 AM, Martin Gainty <mgai...@hotmail.com> wrote:
> here is a dirt simple ServiceClient that works with rampart engaged > ... > > ServiceClient client = new ServiceClient(ctx, null); > Options options = new Options(); > options.setAction("urn:echo"); > options.setTo(new EndpointReference(args[0])); > options.setProperty(RampartMessageData.KEY_RAMPART_POLICY, > loadPolicy(args[2])); > client.setOptions(options); > > client.engageModule("addressing"); > client.engageModule("rampart"); > I have a few questions: I'm using wsImport to generate stub classes. Is creating a ServiceClient necessary, or does the stub do this for me? What does setAction("urn:echo") do? And what does options.setTo(new EndpointReference(args[0])) do? What does setProperty(KEY_RAMPART_POLICY, ...policy...) do? Must I set this? My policy is pulled from the WSDL by WsImport, so how would I use this instead of loadpolicy(args[2])? if you think your rampart mar is META-INF only (generally 2k size or less) > best to download rampart from sourceforge > http://axis.apache.org/axis2/java/rampart/ > Well, rampart-1.6.0 has rampart-1.6.0.mar which is 9343 bytes, and rampart-1.5.5 has rampart-1.5.5.mar which is 2704 bytes. I notice rampart-1.5.1.mar is 9327 bytes, so I'm guessing rampart-1.6.0 is the full thing. and build the rampart.mar for policy,trust and rampart-VERSION > > you're going to need to place > rampart-policy-<VERSION>.mar > rampart-trust-<VERSION>.mar > rampart-<VERSION>.mar > in WEB-INF\modules folder > :( ... I don't know anything about META-INF and WEB-INF, and don't know what you mean "build the rampart.mar for policy, trust and rampart". Where is this WEB-INF folder? Should I be able to ignore it if I use the "non META-INF only" module? generally 1.5.1 was the last blessed Rampart version..i havent tried 1.6 > And what version of Axis2 are you using? -- Jay Sullivan