Return-Path: Delivered-To: apmail-axis-java-dev-archive@www.apache.org Received: (qmail 67295 invoked from network); 13 Mar 2011 04:33:38 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 13 Mar 2011 04:33:38 -0000 Received: (qmail 28221 invoked by uid 500); 13 Mar 2011 04:33:37 -0000 Delivered-To: apmail-axis-java-dev-archive@axis.apache.org Received: (qmail 28083 invoked by uid 500); 13 Mar 2011 04:33:36 -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 28071 invoked by uid 99); 13 Mar 2011 04:33:35 -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:33:35 +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:33:30 +0000 Received: by wwj40 with SMTP id 40so3463919wwj.32 for ; Sat, 12 Mar 2011 20:33:08 -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=r9BaTC6PcWwX+fzb18hxTUlWCtm4UJ41s0dOGY9+nXc=; b=SyELRlzcC/sHyHgJxQPDPkTL+VdyUlWWvOTZmQM2l2T1FSorWjSVIUtJE0Wwn4geyF glUU6TJIFkoRzA5i/eNav8cyJNWPveC25il7KgC5fy6/s/kkieeDLWTsuCHOuGlnaLcW jhKxtAWIMe2ahkLn2DXj/mPGF8Vf+/1aq5/DM= 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=MFfOpgIc/kNby9JftEkFkYH4HhL/F9DLRDEh8ELjbnutKjiqkXj0toq/JfdIgYoK9Z pSxMtZgewCs4ISUEzdCYIeNgbx9P0pUdlJ0Gjbbm23xtQufjir3MUcqxqvTHSq7V0yXM ip2PlGpRAVVey53apQnDYtpUTXVShm+0funvs= MIME-Version: 1.0 Received: by 10.216.255.201 with SMTP id j51mr2412516wes.94.1299990787927; Sat, 12 Mar 2011 20:33:07 -0800 (PST) Received: by 10.216.181.148 with HTTP; Sat, 12 Mar 2011 20:33:07 -0800 (PST) Reply-To: lasanthasridinesh@gmail.com In-Reply-To: <4D7C431D.8010208@gmail.com> References: <4D7C431D.8010208@gmail.com> Date: Sat, 12 Mar 2011 20:33:07 -0800 Message-ID: Subject: Re: Call web services without making stub files. From: Lasantha Bandara To: java-dev@axis.apache.org Cc: Deepal jayasinghe Content-Type: multipart/alternative; boundary=20cf301fb733202e57049e55b19c --20cf301fb733202e57049e55b19c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ah........ it's great. thank you Deepal. For the moment I can proceed with REST clients. But we are making a client side layer for axis2, so that it can invoke any sophisticated web service. In REST architecture style, all resources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, DELETE), as I have read. This might be problematic to some extend I think. Thank you guys. On Sat, Mar 12, 2011 at 8:07 PM, Deepal jayasinghe wrote= : > if you are using REST, you do not need addressing module. So remove > engageModule statement. > > Deepal > > 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 thi= s >> 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= =E9rj=FCk, >> hogy jelentse azt nek=FCnk vissza. Semmif=E9le tov=E1bb=EDt=E1sa vagy m= =E1solat=E1nak >> k=E9sz=EDt=E9se nem megengedett. Ez az =FCzenet csak ismeret cser=E9t s= zolg=E1l =E9s >> semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. Mivel az electronikus =FCz= enetek >> 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 unbefug= te >> Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachrich= t >> 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'=EA= tes pas le destinataire pr=E9vu, nous te demandons avec bont=E9 que pour sa= tisfaire informez l'exp=E9diteur. N'importe quelle diffusion non autoris=E9= e ou la copie de ceci est interdite. Ce message sert =E0 l'information seul= ement 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 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 jav= a >> libraries to improve client side operation. We saw that making 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 invoked just usin= g >> it's URL. >> >> In that case, heard that we can do it using wsdl2java file in axis2. Bu= t >> 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 >> >> > > > -- > * > 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 --20cf301fb733202e57049e55b19c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable ah........ it's great. thank you Deepal.

For the mom= ent I can proceed with REST clients. But we are making a client side layer = for axis2, so that it can invoke any sophisticated web service. In REST arc= hitecture style,=A0all re= sources are accessed with a generic interface (e.g., HTTP GET, POST, PUT, D= ELETE), as I have read. This might be=A0problematic=A0to some extend I thin= k.

Thank you guys.

On Sat, Mar 12, 2011 at 8:07 PM, Deepal j= ayasinghe <deepal= k@gmail.com> wrote:
=20 =20 =20
if you are using REST, you do not need addressing module. So remove engageModule statement.

Deepal

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.AxisFa= ult: Unable to engage module : addressing
=A0=A0 =A0 =A0 =A0at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:357)<= /div>
=A0=A0 =A0 =A0 =A0at org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:342)<= /div>
=A0=A0 =A0 =A0 =A0at 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 <mgainty@hotmail.com> wrote:
a REST client will invoke the client EPR directly... take a look at this example:

=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.TRANSPORT_HTTP);
=A0=A0=A0=A0=A0=A0=A0 options.setProperty(Constants.Configuration.ENABLE_REST, Constants.VALUE_TRUE);

=A0=A0=A0=A0=A0=A0=A0 ServiceClient sender =3D new ServiceCli= ent();
=A0=A0=A0=A0=A0=A0=A0 sender.engageModule(Constants.MODULE_AD= DRESSING);
=A0=A0=A0=A0=A0=A0=A0 sender.setOptions(options);
=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=E1gi kinyilatkoztat=E1s/Verzicht und Vertraulichkeitanmerkung/Note de d=E9ni et 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 ism= eret cser=E9t szolg=E1l =E9s semmif=E9le jogi alkalmazhat=F3s=E1ga sincs. =A0Mivel az electronikus =FCzenetek k=F6nnyen megv=E1ltoztathat=F3ak, ez=E9rt minket semmi fele= l=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 unbefugte 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'=EAtes pas le destinataire pr=E9vu, nous te demandons av=
ec bont=E9 que pour satisfaire informez l'exp=E9diteur. N'importe q=
uelle diffusion non autoris=E9e ou la copie de ceci est interdite. Ce messa=
ge sert =E0 l'information seulement et n'aura pas n'importe que=
l effet l=E9galement obligatoire. =C9tant donn=E9 que les email peuvent fac=
ilement =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 we 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=A0description=A0about that file.

Thank you.
--
Lasantha Bandara,
Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.

gtalk: lasanthasridinesh
skype: lasanthasridinesh




--
Lasantha Bandara,
Computer Science and Engineering,
University of Moratuwa,
Sri Lanka.

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

--20cf301fb733202e57049e55b19c--