Hi Juliane,

Seems like you had tried different options but no luck. but I got all
the things working without a problem.
Can you get Axis2 nightly build and try with it.

This is all you need to do.

- Get a sample wsdl. Codegen both the skeletons and stubs, use ADB for now.
- Fill the skeleton and create an aar.
- deploy axis2 war in tomcat and start tomcat and deploy the above service.
- using stubs invoke the service, with SOAP
- then add options.setProperty(Constants.Configuration.ENABLE_REST,
Constants.VALUE_TRUE) and try REST invocation.
- if you find problem even with that, create a JIRA attaching your
client, stubs and skeletons.

-- Chinthaka

Harbarth, Juliane wrote:
>  
> Hi,
> 
> I have still not found out how to use REST/POST for service access.
> 
> None of the following ideas worked for me:
> 
> 1. Use the code provided in the documentation (RESTful Web services
> Support)
>    Though I managed to make this compile by only slight changes (added
>    imports, replaced Call by ServiceClient, createText by createOMText,
> etc.)
>    it produced org.apache.axis2.AxisFault: Incoming message input stream
> is null.
>    Since replacing Call by ServiceClient afforded to use sendReceive
> instead of
>    invoke I dropped the first input parm namely the "echo". I tried the
> class
>    with the original Epr plus appended /echo then but to no avail.
>    I tried both Epr's the one with /services/ and the other one with
> /rest/.
> 
> 2. Use a client that works with SOAP and just add the line:
>    options.setProperty(Constants.Configuration.ENABLE_REST,
> Constants.VALUE_TRUE);
>    same result. I also tried appending /echo to the Epr and/or replacing
>    /services/ with /rest/.
> 
> 3. My next idea was to just run the RESTClient provided in the sample
> download's
>    sample.jar. I created a TestRestClient.bat as a copy of
> TestEchoBlockingClient.bat 
>    which seems closest. This yielded 'Module not found'. I added one
> line to the bat:
>    set AXIS2_CLASS_PATH=%AXIS2_CLASS_PATH%;..\..\..\..\..\..\modules
>    which I hoped would enable the class to find addressing-1.0 but it
> didn't.
> 
> 4. The last thing I tried was to take RESTClient.java from the sample
> download
>    but this also told me Incoming message input stream is null.
> 
> So there might be something wrong with my service. I moved MyService.aar
> to 
> axis2/WEB-INF/services and MyService now shows up on
> http://localhost:8080/axis2/services/listServices. Clicking on MyService
> though does not show a WSDL as does the version link below, but tells
> me:
> Unable to generate WSDL for this service: Either user has not dropped
> the 
> wsdl into META-INF or operations use message receivers other than RPC.
> 
> If anybody can enlighten me whether I am doing something fundamentally
> wrong,
> or whether one of the methods described above should do it, or (most
> appreciated)
> send me a working example, that would be nice.
> 
> Unless, I just stop trying for now and retry later when the REST/POST
> support is
> easier for dummies or I understand thinks better or both.
> 
> Regards,
> Juliane.
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 


Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to