Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 55993 invoked from network); 13 Mar 2011 04:02:21 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Mar 2011 04:02:21 -0000 Received: (qmail 18401 invoked by uid 500); 13 Mar 2011 04:02:18 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 18290 invoked by uid 500); 13 Mar 2011 04:02:17 -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 18280 invoked by uid 99); 13 Mar 2011 04:02:15 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Mar 2011 04:02:15 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=FREEMAIL_FROM,HTML_FONT_FACE_BAD,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 lasanthasridinesh@gmail.com designates 74.125.82.51 as permitted sender) Received: from [74.125.82.51] (HELO mail-ww0-f51.google.com) (74.125.82.51) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 13 Mar 2011 04:02:09 +0000 Received: by wwj40 with SMTP id 40so3455858wwj.32 for ; Sat, 12 Mar 2011 20:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:reply-to:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=76OvRrlRxMAiTLePM8lHlF3/Jdp88nLxvynU8QpuRpM=; b=csKuZ8kxDgSH0ewxG3RqTxGplVWVBkmsAdFJXDeYyL4UQMiMIZdLHPhmNEevHqB5Qe l6eDyNiOkUlfr6JD/zfCa7619fT2E8Uz+m9x9nxr/qPMmMPqYCLLjQP1tdMCTOfeea3E oQut/AxmJeL+k4A+iIRmTkk9zIno1QYGyE454= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:reply-to:in-reply-to:references:date:message-id :subject:from:to:cc:content-type; b=Y/PAOfeo34PiAiqIgCA5EbU03cVM/kFSW0sUQCa3x3Y3Ahl/Zexj7FPrkafq/z4SBn GMr+miwFf5i8ECXpwCyOuqewTIxk+k7sBfuyNaMHNGIdp2/ORl19NBTgv4ILk1R+CoMq L7BWj9LyVQ3KUiX4v+VCwGo12Ud01QimivPeI= MIME-Version: 1.0 Received: by 10.216.22.79 with SMTP id s57mr1011802wes.94.1299988906729; Sat, 12 Mar 2011 20:01:46 -0800 (PST) Received: by 10.216.181.148 with HTTP; Sat, 12 Mar 2011 20:01:46 -0800 (PST) Reply-To: lasanthasridinesh@gmail.com In-Reply-To: References: Date: Sat, 12 Mar 2011 20:01:46 -0800 Message-ID: Subject: Re: Call web services without making stub files. From: Lasantha Bandara To: java-dev@axis.apache.org Cc: Martin Gainty Content-Type: multipart/alternative; boundary=0016364c7653ff600e049e5540bb --0016364c7653ff600e049e5540bb Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Gainty; Thank you very much for your guidance. going through that I found a code sample from here. http://axis.apache.org/axis2/java/core/docs/rest-ws.html But still I have this exception. Exception in thread "main" org.apache.axis2.AxisFault: Unable to engage module : addressing at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:357) at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:342) at gsoc.Main.main(Main.java:37) *could you please tell me the purpose of this "engageModule" method?* Thank you. On Sat, Mar 12, 2011 at 5:58 PM, Martin Gainty wrote: > a REST client will invoke the client EPR directly... take a look at this > example: > > private static String toEpr =3D " > http://localhost:8080/axis2/services/MyService"; > public static void main(String[] args) throws AxisFault > { > Options options =3D new Options(); > > options.setTo(new EndpointReference(toEpr)); > > options.setTransportInProtocol(Constants.TRANSPORT_HTTP); > options.setProperty(Constants.Configuration.ENABLE_REST, > Constants.VALUE_TRUE); > > ServiceClient sender =3D new ServiceClient(); > sender.engageModule(Constants.MODULE_ADDRESSING); > sender.setOptions(options); > OMElement result =3D sender.sendReceive(getPayload()); > } > > is this what you're looking for? > Martin Gainty > ______________________________________________ > Jogi =E9s Bizalmass=E1gi kinyilatkoztat=E1s/Verzicht und > Vertraulichkeitanmerkung/Note de d=E9ni et de confidentialit=E9 > > Ez az =FCzenet bizalmas. Ha nem =F6n az akinek sz=E1nva volt, akkor k=E9= rj=FCk, hogy > jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m=E1sola= t=E1nak k=E9sz=EDt=E9se > nem megengedett. Ez az =FCzenet csak ismeret cser=E9t szolg=E1l =E9s sem= mif=E9le jogi > alkalmazhat=F3s=E1ga sincs. Mivel az electronikus =FCzenetek k=F6nnyen > megv=E1ltoztathat=F3ak, ez=E9rt minket semmi felel=F6s=E9g nem terhelhet = ezen =FCzenet > tartalma miatt. > > Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene > Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugt= e > Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht > dient lediglich dem Austausch von Informationen und entfaltet keine > rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von > E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen. > > Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vous n'=EAt= es pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour sat= isfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9e= ou la copie de ceci est interdite. Ce message sert =E0 l'information seule= ment et n'aura pas n'importe quel effet l=E9galement obligatoire. =C9tant d= onn=E9 que les email peuvent facilement =EAtre sujets =E0 la manipulation, = nous ne pouvons accepter aucune responsabilit=E9 pour le contenu fourni. > > > > > > > ------------------------------ > Date: Sat, 12 Mar 2011 18:43:38 -0800 > Subject: Call web services without making stub files. > From: lasanthasridinesh@gmail.com > To: java-dev@axis.apache.org > > > Dear all; > > I'm using axis2 for one of my academic projects. We are making some java > libraries to improve client side operation. We saw that making stubs and > import them into the client side program always is somewhat tedious. So w= e > are trying to add a feature so that web service can be invoked just using > it's URL. > > In that case, heard that we can do it using wsdl2java file in axis2. But > I'm not familiar about the operations provided by that file. Can someone > help me to find a description about that file. > > Thank you. > -- > * > Lasantha Bandara, > Computer Science and Engineering, > University of Moratuwa, > Sri Lanka. > * > blog: http://lasanthasri.blogspot.com/ > gtalk: lasanthasridinesh > skype: lasanthasridinesh > > --=20 * Lasantha Bandara, Computer Science and Engineering, University of Moratuwa, Sri Lanka. * blog: http://lasanthasri.blogspot.com/ gtalk: lasanthasridinesh skype: lasanthasridinesh --0016364c7653ff600e049e5540bb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Gainty;

Thank you very much for your guidance.
=

going through that I found a code sample from here.


But still I have this exception.

Exception in thread "main" org.apache.axis2.AxisFaul= t: Unable to engage module : addressing
=A0=A0 =A0 =A0 =A0at org.= apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:357)
=A0=A0 =A0 =A0 =A0at org.apache.axis2.client.ServiceClient.engageModul= e(ServiceClient.java:342)
=A0=A0 =A0 =A0 =A0at gsoc.Main.main(Mai= n.java:37)


could you pleas= e tell me the purpose of this "engageModule" method?

Thank you.

On Sat, Mar 12= , 2011 at 5:58 PM, Martin Gainty <mgainty@hotmail.com> wrote:
a REST client will invoke the client EPR directly... take a look at this ex= ample:

=A0=A0=A0 private static String toEpr =3D "http://loca= lhost:8080/axis2/services/MyService";
=A0=A0=A0 public static void main(String[] args) throws AxisFault
=A0= =A0=A0 {
=A0=A0=A0=A0=A0=A0=A0 Options options =3D new Options();
=A0= =A0=A0
=A0=A0 =A0 =A0=A0 options.setTo(new EndpointReference(toEpr));=A0=A0
=A0 =A0 =A0=A0 options.setTransportInProtocol(Constants.TRANSP= ORT_HTTP);
=A0=A0=A0=A0=A0=A0=A0 options.setProperty(Constants.Configuration.ENABLE_RE= ST, Constants.VALUE_TRUE);

=A0=A0=A0=A0=A0=A0=A0 ServiceClient sende= r =3D new ServiceClient();
=A0=A0=A0=A0=A0=A0=A0 sender.engageModule(Con= stants.MODULE_ADDRESSING);
=A0=A0=A0=A0=A0=A0=A0 sender.setOptions(optio= ns);
=A0=A0=A0=A0=A0=A0=A0 OMElement result =3D sender.sendReceive(getPayload())= ;
=A0 }

is this what you're looking for?
Martin Gainty ______________________________________________
Jogi =E9s Bizalmass=E1g= i kinyilatkoztat=E1s/Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni e= t de confidentialit=E9
=A0
Ez az =FCzenet bizalmas. =A0Ha nem =F6n az akinek sz=E1nva volt, akkor k=E9rj=FCk= , hogy jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m=E1solat= =E1nak k=E9sz=EDt=E9se nem megengedett. =A0Ez az =FCzenet csak ismeret cser=E9t sz= olg=E1l =E9s semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. =A0Mivel az electronikus =FCze= netek k=F6nnyen megv=E1ltoztathat=F3ak, ez=E9rt minket semmi felel=F6s=E9g nem te= rhelhet ezen =FCzenet tartalma miatt.

Diese Nachricht ist vertraulich. Sollt= en Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um ein= e Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist u= nzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen= und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Mani= pulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt ueberne= hmen.
Ce message est confidentiel et peut =EAtre privil=E9gi=E9. Si vo=
us n'=EAtes pas le destinataire pr=E9vu, nous te demandons avec bont=E9=
 que pour satisfaire informez l'exp=E9diteur. N'importe quelle diff=
usion non autoris=E9e ou la copie de ceci est interdite. Ce message sert =
=E0 l'information seulement et n'aura pas n'importe quel effet =
l=E9galement obligatoire. =C9tant donn=E9 que les email peuvent facilement =
=EAtre sujets =E0 la manipulation, nous ne pouvons accepter aucune responsa=
bilit=E9 pour le contenu fourni.






Date: Sat, 12 Mar 2011 18:43:38 -0800
Subject: C= all web services without making stub files.
From: lasanthasridinesh@gmail.com<= br> To: java-dev@= axis.apache.org


Dear all;
=
I'm using axis2 for one of my academic projects. We are = making some java libraries to improve client side operation. We saw that ma= king stubs and import them into the client side program always is somewhat = tedious. So we are trying to add a feature so that web service can be invok= ed just using it's URL.

In that case, heard that we can do it using wsdl2java f= ile in axis2. But I'm not familiar about the operations provided by tha= t file. Can someone help me to find a=A0description=A0about that file.

Thank you.
--
=
Lasantha Bandara,
Computer Sc= ience and Engineering,
University of Mora= tuwa,
= Sri Lanka.

blog:=A0http://lasanthasri.blogspot.com/
gtalk: lasanthasridinesh
skype: lasanthasridinesh




--
Lasantha Bandara,
Compu= ter Science and Engineering,
University of M= oratuwa,
Sri Lanka.

blog:=A0http://lasanthasri.blogspot.com/
gtalk: lasanthasridinesh
skype: lasanthasridinesh

--0016364c7653ff600e049e5540bb--