axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Afkham Azeez <afk...@gmail.com>
Subject Re: Call web services without making stub files.
Date Sun, 13 Mar 2011 11:52:44 GMT
I think what your are looking for is dynamic proxy


On Sun, Mar 13, 2011 at 10:03 AM, Lasantha Bandara <
lasanthasridinesh@gmail.com> wrote:

> 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 <deepalk@gmail.com>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 <mgainty@hotmail.com>wrote:
>>
>>>  a REST client will invoke the client EPR directly... take a look at this
>>> example:
>>>
>>>     private static String toEpr = "
>>> http://localhost:8080/axis2/services/MyService";
>>>     public static void main(String[] args) throws AxisFault
>>>     {
>>>         Options options = new Options();
>>>
>>>         options.setTo(new EndpointReference(toEpr));
>>>
>>>        options.setTransportInProtocol(Constants.TRANSPORT_HTTP);
>>>         options.setProperty(Constants.Configuration.ENABLE_REST,
>>> Constants.VALUE_TRUE);
>>>
>>>         ServiceClient sender = new ServiceClient();
>>>         sender.engageModule(Constants.MODULE_ADDRESSING);
>>>         sender.setOptions(options);
>>>         OMElement result = sender.sendReceive(getPayload());
>>>   }
>>>
>>> is this what you're looking for?
>>> Martin Gainty
>>> ______________________________________________
>>> Jogi és Bizalmassági kinyilatkoztatás/Verzicht und
>>> Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>>
>>> Ez az üzenet bizalmas.  Ha nem ön az akinek szánva volt, akkor kérjük,
>>> hogy jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
>>> készítése nem megengedett.  Ez az üzenet csak ismeret cserét szolgál és
>>> semmiféle jogi alkalmazhatósága sincs.  Mivel az electronikus üzenetek
>>> könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen
>>> üzenet 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 être privilégié. Si vous n'êtes pas le
destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur.
N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert
à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant
donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter
aucune responsabilité 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 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
>>
>>
>>
>
>
> --
> *
> Lasantha Bandara,
> Computer Science and Engineering,
> University of Moratuwa,
> Sri Lanka.
> *
> blog: http://lasanthasri.blogspot.com/
> gtalk: lasanthasridinesh
> skype: lasanthasridinesh
>
>


-- 
*Afkham Azeez*
Senior Software Architect & Senior Manager; WSO2, Inc.; http://wso2.com,
*
*
*Member; Apache Software Foundation;
**http://www.apache.org/*<http://www.apache.org/>
*
email: **azeez@wso2.com* <azeez@wso2.com>* cell: +94 77 3320919
blog: **http://blog.afkham.org* <http://blog.afkham.org>*
twitter: **http://twitter.com/afkham_azeez*<http://twitter.com/afkham_azeez>
*
linked-in: **http://lk.linkedin.com/in/afkhamazeez*
*
*
*Lean . Enterprise . Middleware*
*
*

Mime
View raw message