Return-Path: X-Original-To: apmail-axis-java-user-archive@www.apache.org Delivered-To: apmail-axis-java-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4A4734A5A for ; Sun, 3 Jul 2011 06:02:49 +0000 (UTC) Received: (qmail 99089 invoked by uid 500); 3 Jul 2011 06:02:46 -0000 Delivered-To: apmail-axis-java-user-archive@axis.apache.org Received: (qmail 98665 invoked by uid 500); 3 Jul 2011 06:02:24 -0000 Mailing-List: contact java-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@axis.apache.org Delivered-To: mailing list java-user@axis.apache.org Received: (qmail 98657 invoked by uid 99); 3 Jul 2011 06:02:16 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 06:02:16 +0000 X-ASF-Spam-Status: No, hits=4.1 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of louis34@gmail.com designates 209.85.216.45 as permitted sender) Received: from [209.85.216.45] (HELO mail-qw0-f45.google.com) (209.85.216.45) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Jul 2011 06:02:08 +0000 Received: by qwj8 with SMTP id 8so2822323qwj.32 for ; Sat, 02 Jul 2011 23:01:48 -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=4sEcqkmXkt09nKE7ssljqrz2+83gvK2xoZ/5ERSta+c=; b=Fz4yDJVTIDn1V9m+5EDUICHtt0JxIa0+VBxcty6ubbwkBqWPj5hVwLwdMXtTeIZLW5 OOSaFF4ioVOVpHA1GXekAO7QmxFguvRrYWSWdfoc0mI1IVNaqnzy5pRQXMEqwoM+SkLy HKeBLLh87ISfBqxGiW8x1DZQ8oJkkxKasqbe0= MIME-Version: 1.0 Received: by 10.229.61.102 with SMTP id s38mr3680608qch.198.1309672907855; Sat, 02 Jul 2011 23:01:47 -0700 (PDT) Received: by 10.229.214.19 with HTTP; Sat, 2 Jul 2011 23:01:47 -0700 (PDT) In-Reply-To: References: Date: Sun, 3 Jul 2011 02:01:47 -0400 Message-ID: Subject: Re: Problem creating Axis2 Rampart Client From: Louis Amstutz To: java-user@axis.apache.org Content-Type: multipart/alternative; boundary=0016e6511d0871d62504a723fcf3 X-Virus-Checked: Checked by ClamAV on apache.org --0016e6511d0871d62504a723fcf3 Content-Type: text/plain; charset=ISO-8859-1 Thanks, that worked. On Sat, Jul 2, 2011 at 9:58 PM, Thilina Mahesh Buddhika wrote: > It will work if the rampart.mar is available in the class path. > > Thanks, > Thilina > > > On Sat, Jul 2, 2011 at 8:35 AM, Louis Amstutz wrote: > >> I'm creating a web service using Axis2 which uses Rampart for >> authentication. In all the samples for Rampart, the client needs to have a >> client side repository for Axis2. Rampart is started on the client as >> follows: >> >> ConfigurationContext ctx = ConfigurationContextFactory.createConfigurationContextFromFileSystem("path/to/client/repo", null); >> SecureServiceStub stub = new SecureServiceStub(ctx,"https://localhost:8443/axis2/services/SecureService"); >> ServiceClient sc = stub._getServiceClient(); >> sc.engageModule("rampart"); >> >> The method createConfigurationContextFromFileSystem needs a path to an >> Axis2 repo on the client which has the rampart.mar file. It apparently needs >> a full absolute path, not a relative path. However, I'm deploying my client >> with Java Web Start and I can't put a Axis2 repo on every machine that may >> need to run the client. It needs to work from any machine from a web browser >> so everything the client needs to be in the jar. Is there any way I can load >> the rampart.mar file from the jar of my client app. Another possibility >> would be using the >> ConfigurationContextFactory.createConfigurationContextFromURIs method, but >> this would require me to create an online repo of axis2+rampart on the >> server. Anyone know of a good guide for this? I still would prefer to just >> package everything in the jar. >> > > > > -- > Thilina Mahesh Buddhika > http://blog.thilinamb.com > --0016e6511d0871d62504a723fcf3 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Thanks, that worked.

On Sat, Jul 2, 2011 = at 9:58 PM, Thilina Mahesh Buddhika <thilinamb@gmail.com> wrote:
It will work if the rampart.mar is available in the class path.=A0

=
Thanks,
Thilina

<= br>
On Sat, Jul 2, 2011 at 8:35 AM, Louis Amstutz= <louis34@gmail.com> wrote:
I'm creating a web service using Axis2 w= hich uses Rampart for=20 authentication. In all the samples for Rampart, the client needs to=20 have a client side repository for Axis2. Rampart is started on the=20 client as follows:
ConfigurationContext ctx =3D ConfigurationContextFactory.createC=
onfigurationContextFromFileSystem("path/to/client/repo", null);
SecureServiceStub stub =3D new SecureServiceStub(ctx,"https://l=
ocalhost:8443/axis2/services/SecureService");
ServiceClient sc =3D stub._getServiceClient();
sc.engageModule("rampart");

The method createConfigurationContextFromFileSystem needs a path to=20 an Axis2 repo on the client which has the rampart.mar file. It=20 apparently needs a full absolute path, not a relative path.=A0 However, I&#= 39;m deploying my client with Java Web Start and I can't put a Axis2 repo on every machine that may need to run the client. It needs=20 to work from any machine from a web browser so everything the client=20 needs to be in the jar. Is there any way I can load the rampart.mar=20 file from the jar of my client app.=A0 Another possibility would be using t= he=20 ConfigurationContextFactory.createConfigurationContextFromURIs method,=20 but this would require me to create an online repo of axis2+rampart on=20 the server. Anyone know of a good guide for this? I still would prefer to just package everything in the jar.




--
Thilina Mah= esh Buddhika
htt= p://blog.thilinamb.com

--0016e6511d0871d62504a723fcf3--