On Thu, May 2, 2013 at 8:07 PM, Roman Manz <rm...@amadeus.com> wrote:

> Hello Kishanthan,
>
> I also play with this and I wonder if there is a document that describes
> restful service implementations, preferably both wsdl1.1 and wsdl2.0. I am
> happy for everything you have!
>


This [1] article explains about restful services with axis2 using wsdl 2.0.
I was looking into some of the jiras[2], [3] related to rest issues with
axis2. I have added some some sample, wsdls (1.1) to them. You could take a
look at that also.

Thanks,
Kishanthan.
[1] http://wso2.org/library/3726
[2] https://issues.apache.org/jira/browse/AXIS2-5379
[3] https://issues.apache.org/jira/browse/AXIS2-5516

>
> Many thanks
> Roman
>
>
>
> From:        Kishanthan Thangarajah <kshanth2...@gmail.com>
> To:        "java-...@axis.apache.org" <java-...@axis.apache.org>, Jack
> Sprat <rexclaim...@yahoo.com>
> Cc:        "axis-u...@ws.apache.org" <axis-u...@ws.apache.org>
> Date:        26-04-13 23:05
> Subject:        Re: ReST with Axis2
> ------------------------------
>
>
>
>
>
>
> On Fri, Apr 26, 2013 at 9:09 PM, Jack Sprat 
> <*rexclaim...@yahoo.com*<rexclaim...@yahoo.com>>
> wrote:
> The ReST request looks like this:*
> **https://www.example.com/test2/services/TestService/echo?echoRequest=ping
> *<https://www.example.com/test2/services/TestService/echo?echoRequest=ping>
>
> If this is the URL format that you are going to use with REST requests,
> then you don't need wsdl 2.0. These kind of REST URL are supported by
> default in axis2, with wsdl 1.1.
>
> For example, if one of the method (say : add) takes two parameter as input
> then the URL would be like, *
> https://www.example.com/services/CalculaterService/add?val1=23&val2=54*<https://www.example.com/services/CalculaterService/add?val1=23&val2=54>
>
> With wsdl 2.0 you can use URL format like, *
> https://www.example.com/test2/services/TestService/echo/ping*<https://www.example.com/test2/services/TestService/echo?echoRequest=ping>,
>  which
> is equivalent to what you have mentioned, which is the true RESTful way IMO.
>
> So can you first try with normal approach and see?
>
>
>
> The response returned is blank:
> <test:echoResponse 
> xmlns:test="*http://ws.example.com/test*<http://ws.example.com/test>"
> />
>
> Can anyone tell me what may be wrong?
>
> Not sure on why this is not working, but I can have look at this. Can you
> create a jira and attach your service archive, which causes this behavior?
>
> Thanks,
> Kishanthan.
>
> Is ReST with Axis2 and WSDL 2.0 possible?  I am trying to justify using
> Axis2 here but will lose the fight if it will not work for ReST requests.
>
> Please feel free to contact me off-list.
>
> Thank you.
>
>
>
> ----- Original Message -----
> From: Jack Sprat <*rexclaim...@yahoo.com* <rexclaim...@yahoo.com>>
> To: "*axis-u...@ws.apache.org* <axis-u...@ws.apache.org>" <*
> axis-u...@ws.apache.org* <axis-u...@ws.apache.org>>
> Cc:
> Sent: Wednesday, April 24, 2013 5:11 PM
> Subject: ReST with Axis2
>
> I've been struggling with Axis2 and ReST for a few days and hope someone
> can help.
>
> I have created a version 2.0 WSDL for a very simple service and can
> generate the code stubs using the wsdl2java command.  In the WSDL I have 2
> bindings - 1 for HTTP and 1 for SOAP.  SOAP requests work fine.  All ReST
> requests come back with a blank response.  The AxisServlet class gets the
> ReST request correctly as I see the query string captured in debug mode.
> When the service class is called the request is blank.  I can see this
> while debugging.
>
> Do I need to do anything different in my service class for ReST requests?
> What am I missing?  Any help is GREATLY appreciated.
>
> I've included the WSDL below.
>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:description 
> xmlns:wsdl="*http://www.w3.org/ns/wsdl*<http://www.w3.org/ns/wsdl>
> "
>     
> xmlns:wsoap="*http://www.w3.org/ns/wsdl/soap*<http://www.w3.org/ns/wsdl/soap>
> "
>     
> xmlns:soap="*http://www.w3.org/2003/05/soap-envelope*<http://www.w3.org/2003/05/soap-envelope>
> "
>     
> xmlns:wsdlx="*http://www.w3.org/ns/wsdl-extensions*<http://www.w3.org/ns/wsdl-extensions>
> "
>     xmlns:tns="*http://ws.example.com/test* <http://ws.example.com/test>"
>     targetNamespace="*http://ws.example.com/test*<http://ws.example.com/test>
> ">
>
>     <wsdl:documentation>Test WSDL 2.0 web service.</wsdl:documentation>
>
>     <!-- Define all types used in SOAP request/response here. -->
>     <wsdl:types>
>         <xsd:schema attributeFormDefault="qualified"
> elementFormDefault="qualified" xmlns:xsd="*
> http://www.w3.org/2001/XMLSchema* <http://www.w3.org/2001/XMLSchema>"
> xmlns="*http://ws.example.com/test* <http://ws.example.com/test>"
> targetNamespace="*http://ws.example.com/test* <http://ws.example.com/test>
> ">
>
>             <!-- General Fault -->
>             <xsd:element name="generalError" type="xsd:string"/>
>
>             <!-- Schema Validation Fault -->
>             <xsd:element name="schemaError" type="xsd:string"/>
>
>             <!-- Echo Request Type -->
>             <xsd:element name="echoRequest" type="xsd:string"/>
>             <!-- Echo Response Type -->
>             <xsd:element name="echoResponse" type="xsd:string"/>
>         </xsd:schema>
>     </wsdl:types>
>
>     <!-- Interfaces -->
>     <wsdl:interface name="testInterface">
>         <!-- Faults -->
>         <wsdl:fault name="generalError" element="tns:generalError" />
>         <wsdl:fault name="schemaError" element="tns:schemaError" />
>         <!-- Echo operation -->
>         <wsdl:operation name="echo" pattern="*
> http://www.w3.org/ns/wsdl/in-out* <http://www.w3.org/ns/wsdl/in-out>"
> wsdlx:safe="true">
>             <wsdl:input messageLabel="In" element="tns:echoRequest" />
>             <wsdl:output messageLabel="Out" element="tns:echoResponse" />
>         </wsdl:operation>
>     </wsdl:interface>
>
>     <!-- Concrete Bindings -->
>     <wsdl:binding name="httpBinding" interface="tns:testInterface" type="*
> http://www.w3.org/ns/wsdl/http* <http://www.w3.org/ns/wsdl/http>">
>         <wsdl:fault ref="tns:generalError" />
>         <wsdl:fault ref="tns:schemaError" />
>         <wsdl:operation ref="tns:echo" />
>     </wsdl:binding>
>     <wsdl:binding name="soapBinding" interface="tns:testInterface" type="*
> http://www.w3.org/ns/wsdl/soap* <http://www.w3.org/ns/wsdl/soap>"
> wsoap:protocol="*http://www.w3.org/2003/05/soap/bindings/HTTP/*<http://www.w3.org/2003/05/soap/bindings/HTTP/>
> ">
>         <wsdl:fault ref="tns:generalError" />
>         <wsdl:fault ref="tns:schemaError" />
>         <wsdl:operation ref="tns:echo" wsoap:soapAction="*
> http://ws.example.com/test/echo* <http://ws.example.com/test/echo>" />
>     </wsdl:binding>
>
>     <!-- Define service and endpoints -->
>     <wsdl:service name="TestService" interface="tns:testInterface">
>         <wsdl:documentation>Test WSDL 2.0 web service</wsdl:documentation>
>         <!-- HTTP binding -->
>         <wsdl:endpoint name="test2" binding="tns:httpBinding"
>                   address="*
> https://www.example.com/test2/services/TestService*<https://www.example.com/test2/services/TestService>
> "/>
>         <!-- SOAP binding -->
>         <wsdl:endpoint name="test2" binding="tns:soapBinding"
>                   address="*
> https://www.example.com/test2/services/TestService*<https://www.example.com/test2/services/TestService>
> "/>
>     </wsdl:service>
> </wsdl:description>
>
>
> Thanks.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> *java-dev-unsubscr...@axis.apache.org*<java-dev-unsubscr...@axis.apache.org>
> For additional commands, e-mail: 
> *java-dev-h...@axis.apache.org*<java-dev-h...@axis.apache.org>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: 
> *java-dev-unsubscr...@axis.apache.org*<java-dev-unsubscr...@axis.apache.org>
> For additional commands, e-mail: 
> *java-dev-h...@axis.apache.org*<java-dev-h...@axis.apache.org>
>
>
>
>
>
>
> IMPORTANT  -  CONFIDENTIALITY  NOTICE  - This e-mail is intended only for
> the use of the individual or entity shown above as addressees. It may
> contain information which is privileged, confidential or otherwise
> protected from disclosure under applicable laws.  If the reader of this
> transmission is not the intended recipient, you are hereby notified that
> any dissemination, printing, distribution, copying, disclosure or the
> taking of any action in reliance on the contents of this information is
> strictly prohibited.  If you have received this transmission in error,
> please immediately notify us by reply e-mail or using the address below and
> delete the message and any attachments from your system.
>
> Amadeus Data Processing GmbH
> Geschäftsführer: Eberhard Haag
> Sitz der Gesellschaft: Erding
> HR München 48 199
> Berghamer Strasse 6
> 85435 Erding
> Germany

Reply via email to