Please read the user-guide. It contains the way to overcome the
mentioned error by making the addressing module available in the client
side.

-- Chinthaka

Harbarth, Juliane wrote:
> 
> Hi,
> 
> In the meantime I have downloaded the Axis2 samples and found 
> RESTClient.java in samples\userguide\src\userguide\clients.
>  
> This one did compile but throws an error when run:
> E:\local\axis2>java userguide/clients/RESTClient
> Exception in thread "main" org.apache.axis2.AxisFault: Module not found
>         at
> org.apache.axis2.description.AxisService.engageModule(AxisService.java:3
> 95)
>         at
> org.apache.axis2.client.ServiceClient.engageModule(ServiceClient.java:27
> 9)
>         at userguide.clients.RESTClient.main(RESTClient.java:51)
> 
> Why is this ?
> 
> My Axis2 installation has a subfolder axis2\WEB-INF\modules and
> this contains addressing-1.0. Isn't this what is needed here ?
> 
> Regards,
> Juliane.
>  
> 
> -----Original Message-----
> From: Harbarth, Juliane [mailto:[EMAIL PROTECTED] 
> Sent: Dienstag, 1. August 2006 15:01
> To: [email protected]
> Subject: RE: Problems with the REST POST Example
> 
> 
> 
> Hi Chinthaka,
> 
> thanks for answering, yes I am using Axis2 1.0.
> 
> If you say there seems to be a problem in the document, are you saying
> that the sample I tried to run (i.e. the REST POST sample contained in
> the Axis2 docu page 'RESTful Web services Support' at
> http://ws.apache.org/axis2/0_94/rest-ws.html)
> is wrong ?
> 
> If so, is there another sample anywhere in the Axis2 download that I can
> try instead ?
> 
> I did not understand your description to 'first invoke the web service
> using SOAP call, then add the line:
> options.setProperty(org.apache.axis2.transport.http.Constants.Configurat
> ion.ENABLE_REST,
> "true") to get REST invocation over POST'.
> Can you explain this in more detail.
> 
> If a source issuing a REST call is just a source issuing a SOAP call
> plus an additional line, what is the added value in using REST ?
> 
> Thanks & regards,
> Juliane.
>  
> 
> -----Original Message-----
> From: Eran Chinthaka [mailto:[EMAIL PROTECTED]
> Sent: Freitag, 28. Juli 2006 11:15
> To: [email protected]
> Subject: Re: Problems with the REST POST Example
> 
> Hi Harbath,
> 
> Which version of Axis2 are you using?
> 
> If(AXIS2_VERSION < 1.0){
>  // please switch to Axis2 1.0 or later
> } else {
> 
> Seems there is a problem in the document. For the time being, you first
> invoke the web service using SOAP call, then add the following line. You
> will get REST invocation over POST.
> 
> options.setProperty(org.apache.axis2.transport.http.Constants.Configurat
> ion.ENABLE_REST,
> "true")
> 
> }
> 
> -- Chinthaka
> 
> Harbarth, Juliane wrote:
>>  
>>
>> Hi,
>>
>> I am still struggeling to compile the REST POST sample contained in 
>> the Axis2 docu page 'RESTful Web services Support', see 
>> http://ws.apache.org/axis2/0_94/rest-ws.html.
>>
>> I tried my best to add appropriate import statements, but failed.
>>
>> My current imports are:
>>
>> import org.apache.axis2.*;
>> import org.apache.axis2.client.*;
>> import org.apache.axis2.transport.http.*;
>> import org.apache.axis2.addressing.EndpointReference;
>> import org.apache.axiom.om.*;
>> import javax.xml.stream.*;
>> import org.apache.axis.client.*;
>>
>> I have also replaced the line:
>>  options.setListenerTransportProtocol(Constants.TRANSPORT_HTTP);
>> with:
>>  options.setListener(new SimpleHTTPServer());
>> and:
>>  Call call = new Call();
>> with        
>>  Service service = new Service();
>>  Call    call    = (Call)service.createCall();
>>
>> The result is as follows:
>>
>> E:\local\axis2>javac RESTClient.java
>> RESTClient.java:24: cannot resolve symbol symbol  : method 
>> setClientOptions (org.apache.axis2.client.Options)
>> location: class org.apache.axis.client.Call
>>         call.setClientOptions(options);
>>             ^
>> RESTClient.java:26: cannot resolve symbol symbol  : method 
>> invokeBlocking
>> (java.lang.String,org.apache.axiom.om.OMElement)
>> location: class org.apache.axis.client.Call
>>         OMElement result = call.invokeBlocking("echo", getPayload());
>>                                ^
>> RESTClient.java:46: cannot resolve symbol symbol  : method createText
>> (org.apache.axiom.om.OMElement,java.lang.String)
>> location: interface org.apache.axiom.om.OMFactory
>>         value.addChild(fac.createText(value, "Axis2 Echo String "));
>>                           ^
>> 3 errors
>>
>> I am especially bewildered by the Call class. Taking the one from axis
> 
>> seems odd, since importing stuff from both axis and axis2 is rather 
>> unusual. I tried jaxrpc.jar but this did not work neither.
>>
>> What am I doing wrong ?
>>
>> Regards,
>> Juliane.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to