Return-Path: X-Original-To: apmail-axis-java-dev-archive@www.apache.org Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 057396166 for ; Thu, 4 Aug 2011 18:26:59 +0000 (UTC) Received: (qmail 59500 invoked by uid 500); 4 Aug 2011 18:26:57 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 59394 invoked by uid 500); 4 Aug 2011 18:26:57 -0000 Mailing-List: contact java-dev-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-dev@axis.apache.org Delivered-To: mailing list java-dev@axis.apache.org Received: (qmail 59386 invoked by uid 99); 4 Aug 2011 18:26:56 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 18:26:56 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of notfed@gmail.com designates 209.85.213.173 as permitted sender) Received: from [209.85.213.173] (HELO mail-yx0-f173.google.com) (209.85.213.173) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 04 Aug 2011 18:26:50 +0000 Received: by yxt3 with SMTP id 3so1469654yxt.32 for ; Thu, 04 Aug 2011 11:26:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=0xp/s9/CoWiLAUux5p3x0ZTnUCPKZ+Qv6OTucPkgKEI=; b=CFK2kEWGo9yapoQLvSJAS0pYRpJN14ptaDntAYRm5PVV56lQ1qsUfYVWHdcfoi6cPq gPXI/rhNVJT+4c1c8g/8vCle06xssJ+mrwNzeh+pHth5kHr4jfJBbzEJyuZ7hUtYZPpT c/Uz+gIEnnDtQXjY77hTDssWHXn+D8l0n3UDI= MIME-Version: 1.0 Received: by 10.236.182.67 with SMTP id n43mr1576982yhm.18.1312482389512; Thu, 04 Aug 2011 11:26:29 -0700 (PDT) Received: by 10.236.103.47 with HTTP; Thu, 4 Aug 2011 11:26:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 4 Aug 2011 14:26:29 -0400 Message-ID: Subject: Re: Having trouble interfacing with WCF From: Jay Sullivan To: java-dev@axis.apache.org Content-Type: multipart/alternative; boundary=20cf3056396f99d32004a9b21e84 --20cf3056396f99d32004a9b21e84 Content-Type: text/plain; charset=UTF-8 On Thu, Aug 4, 2011 at 11:41 AM, Martin Gainty 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-.mar > rampart-trust-.mar > rampart-.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 --20cf3056396f99d32004a9b21e84 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable

On Thu, Aug 4, 2011 at 11:41 AM, Martin = Gainty <mgainty= @hotmail.com> wrote:
here is a dirt simple ServiceClient that works with rampart engaged
...<= br>=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0 ServiceClient client =3D new ServiceClient(ctx, null);=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 Options options =3D new Option= s();
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 options.setAction("= urn:echo");
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 options.setTo(new EndpointRefere= nce(args[0]));
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 options.setPro= perty(RampartMessageData.KEY_RAMPART_POLICY,=C2=A0 loadPolicy(args[2]));=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 client.setOptions(options);
= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0
=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 client.engageModule("addressing");
=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 client.engageModule("rampar= t");

I have a few questions:
=
I'm using wsImport to generate stub classes.=C2=A0 Is creating a Se= rviceClient necessary, or does the stub do this for me?=C2=A0
What does setAction("urn:echo") do? And what does options.setTo(n= ew EndpointReference(args[0])) do?
What does setProperty(KEY_RAMPART_POL= ICY, ...policy...) do? Must I set this? My policy is pulled from the WSDL b= y 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 do= wnload rampart from sourceforge
ht= tp://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=C2=A0 2704 bytes.=C2=A0 I notice rampart-1.= 5.1.mar is 9327 bytes, so I'm guessing rampart-1.6.0 is the full thing.=

and bui= ld the rampart.mar for policy,trust and rampart-VERSION

you're g= oing to need to place
rampart-policy-<VERSION>.mar
rampart-trust-<VERSION>.mar
= rampart-<VERSION>.mar
in WEB-INF\modules folder
<= div>
:( ... I don't know anything about META-INF and WEB-INF, and do= n't know what you mean "build the rampart.mar for policy, trust an= d rampart".=C2=A0 Where is this WEB-INF folder? Should I be able to ig= nore it if I use the "non META-INF only" module?

general= ly 1.5.1 was the last blessed Rampart version..i havent tried 1.6

And what version of Axis2 are you using?

--
Jay Sullivan
--20cf3056396f99d32004a9b21e84--