Kishanthan,

Thank you very much for the reply.  I thought WSDL 2.0 was required to use ReST 
with Axis2 but never got an answer before now.

Do I need a different WSDL to process ReST and SOAP requests for the same 
service?  Is that where I would use the 'servicePath' and 'restPath' 
configuration variables in the axis2.xml configuration file?

Thanks,
J




________________________________
 From: Kishanthan Thangarajah <kshanth2...@gmail.com>
To: "java-...@axis.apache.org" <java-...@axis.apache.org>; Jack Sprat 
<rexclaim...@yahoo.com> 
Cc: "java-user@axis.apache.org" <java-user@axis.apache.org> 
Sent: Friday, April 19, 2013 3:00 AM
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
 







On Thu, Apr 18, 2013 at 2:32 AM, Jack Sprat <rexclaim...@yahoo.com> wrote:

Thank you for the reply.
>
>This [1] is one of the articles I read and noted in a previous reply.  See my 
>message from April 2 below.  This article notes that WSDL 2.0 must be used for 
>ReST services with Axis2.  Is this true?  I have not gotten an answer yet.
>

Yes, you have to use WSDL 2.0 to get your service to work in a RESTful way with 
axis2. It works with the HttpBinding extension [2] introduced in WSDL 2.0.

Kishanthan
[2] http://www.w3.org/TR/wsdl20-primer/#more-bindings-http



>One pervious reply said to use WADL and then another referred to some Axis2 
>configuration parameters but none of the parameters are valid.
>
>Can someone please clear this up for me?  I am having a very hard time getting 
>a clear answer.
>
>Thanks in advance to anyone and everyone who can provide some direction.  I 
>appreciate any help.
>
>[1] http://wso2.org/library/3726
>
>
>
>________________________________
> From: Kishanthan Thangarajah <kshanth2...@gmail.com>
>
>To: java-user@axis.apache.org; Jack Sprat <rexclaim...@yahoo.com> 
>Cc: "java-...@axis.apache.org" <java-...@axis.apache.org> 
>Sent: Saturday, April 13, 2013 1:58 AM
>
>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> 
>
>
>Check this [1]. It will be helpful on creating RESTful services with Axis2. 
>
>
>Also you have to give WSDL version as 2 when running wsdl2java for WSDL 2.0. 
>For example : ./wsdl2java.sh -uri /tmp/sample.wsdl -o /tmp/output -wv 2
>
>
>Thanks,
>Kishanthan.
>[1] http://wso2.org/library/3726
>
>
>
>On Wed, Apr 10, 2013 at 6:04 PM, Jack Sprat <rexclaim...@yahoo.com> wrote:
>
>Can anyone point me to an example or instructions of an Axis2 web service that 
>works for both SOAP and ReST?  I'd really appreciate it.
>>
>>
>>Thanks,
>>J
>>
>>
>>
>>
>>
>>________________________________
>> From: Jack Sprat <rexclaim...@yahoo.com>
>>To: "java-user@axis.apache.org" <java-user@axis.apache.org> 
>>Sent: Monday, April 8, 2013 9:08 AM
>>
>>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>> 
>>
>>
>>Martin and all,
>>
>>Can you please specify exactly what instructions to follow to make the Axis2 
>>web service work for both SOAP and ReST requests?
>>
>>The last reply noted 3
 different parameters, 1 of which (enableRESTInAxis2MainServlet) has been 
deprecated.  The other 2 don't apply.  See my last reply below on those 3 
parameters.
>>
>>Has anyone created an Axis2 web service that works for both SOAP and ReST 
>>requests?  Does the WSDL need to be version 2.0 for this to work?  If so, 
>>does the wsdl2java command support WSDL 2.0?  All attempts to run wsdl2java 
>>with a version 2.0 WSDL have failed.
>>
>>Please help.
>>
>>Thanks,
>>J
>>
>>
>>
>>
>>________________________________
>> From: Martin Gainty <mgai...@hotmail.com>
>>To: "java-user@axis.apache.org" <java-user@axis.apache.org> 
>>Sent: Wednesday, April 3, 2013 6:15 PM
>>Subject: RE: [Axis2] wsdl2java with WSDL 2.0
>> 
>>
>>yes ...if you follow the instructions in the previous email
>>
>>Viel Gluck,
>>Martin 
>>______________________________________________ 
>>Verzicht und Vertraulichkeitanmerkung
>> 
>>  
>>
>>
>>________________________________
>> Date: Wed, 3 Apr 2013 14:34:25 -0700
>>From: rexclaim...@yahoo.com
>>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>To: java-user@axis.apache.org
>>CC: java-...@axis.apache.org
>>
>>
>>Martin,
>>
>>
>>Thanks for the reply.
>>
>>
>>The restPath servlet is used only if you want a different path to the web 
>>service endpoint for ReST requests.
>>The enableRESTInAxis2MainServlet is no longer included in the Axis2 
>>configuration.
>>The disableREST parameter is set to false by default so that should not be a 
>>concern.
>>
>>
>>My original question remains unanswered - Is it possible to implement a ReST 
>>and SOAP web service with Axis2?  I am sure someone has done this before??
>>
>>
>>
>>Thanks,
>>J
>>
>>
>>
>>
>>________________________________
>> From: Martin Gainty <mgai...@hotmail.com>
>>To: "java-user@axis.apache.org" <java-user@axis.apache.org> 
>>Sent: Tuesday, April 2, 2013 7:56 PM
>>Subject: RE: [Axis2] wsdl2java with WSDL 2.0
>>
>>
>>AxisRESTServlet has been deprecated in recent versions
>> 
>>you'll need to dial back to Axis2-1.1
>>http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.axis2/axis2-kernel/1.1/
>>
>>Otherwise you'll be playing with the REST axis2.xml parameters
>>restPath
>>enableRESTInAxis2MainServlet
>>disableREST
>>
>>Martin Gainty 
>>______________________________________________ 
>>Jogi és Bizalmassági kinyilatkoztatás/Verzicht und 
>>Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>
>> 
>>
>>> Date: Tue, 2 Apr 2013 13:08:07 -0700
>>> From: rexclaim...@yahoo.com
>>> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> To: java-user@axis.apache.org
>>> 
>>> Hello.
>>> 
>>> 
>>> WADL was mentioned in a prior response but that is the first I have heard 
>>> of it.  I spent much time searching for ReST and Axis2 and never came 
>>> across anything about WADL.
>>> My requirement is that the web service must support both SOAP and ReST.
>>> 
>>> 
>>> See links to the articles below on using Axis2 web services and ReST.  From 
>>> everything I have read it should work with WSDL 2.0 but nobody has given me 
>>> an answer here.
>>> 
>>> 
>>> http://axis.apache.org/axis2/java/core/
>>> "Apache Axis2 not only supports SOAP 1.1 and SOAP 1.2, but it
>>> also has integrated support for the widely popular REST style of Web
>>>
 services."
>>> 
>>> http://www.slideshare.net/sagara10/wsdl-20-and-apache-woden
>>> (slide# 25)
>>> 
>>> http://wso2.org/library/3726
>>> 
>>> http://wso2.org/library/3726#WSDL%202.0%20and%20REST
>>> 
>>> So, how do I implement a ReST and SOAP web service with Axis2?  Is it 
>>> possible?
>>> 
>>> Thanks,
>>> J
>>> 
>>> ________________________________
>>> From: Martin Gainty <mgai...@hotmail.com>
>>> To: "java-user@axis.apache.org" <java-user@axis.apache.org> 
>>> Sent: Monday, April 1, 2013 5:24 PM
>>> Subject: RE: [Axis2] wsdl2java with WSDL 2.0
>>> 
>>> 
>>> 
>>> Jack
>>> 
>>> I dont know if I mentioned but you're going to need to convert your WSDL to 
>>> WADL to implement REST..I have no idea if there are automatic converters so 
>>> my best suggestion is to handcraft a WADL from a working WADL example
>>> 
>>> On the other hand if you
 get the impression that there is "NO REST for anyone that implements REST"
>>> and you're ready to implement a normal AXIS implementation then lets 
>>> proceed further
>>> 
>>> Let us know,
>>> 
>>> Martin 
>>> ______________________________________________ 
>>> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>>> 
>>> 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: Mon, 1 Apr 2013 06:22:23 -0700
>>> > From: rexclaim...@yahoo.com
>>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > To: java-user@axis.apache.org
>>> > CC: axis-u...@ws.apache.org
>>> > 
>>> > I don't think I can attach files here so I have pasted the WSDL below.  
>>> > There are 3 included schemas.  I have not included those here to keep 
>>> > this message from getting too long.  Can I send those to you off-list?
>>> > 
>>> > 
>>> > 
>>> > <?xml version="1.0"
 encoding="UTF-8"?>
>>> > <wsdl:description xmlns:wsdl="http://www.w3.org/ns/wsdl";;
>>> >     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";;
>>> >     xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";;
>>> >     xmlns:tns="http://ws.estesexpress.com/shipmenttracking";;
>>> >     targetNamespace="http://ws.estesexpress.com/shipmenttracking";;>
>>> > 
>>> > <!--
>>> > WSDL 2.0 version
>>> > -->
>>> > 
>>> >     <wsdl:documentation>Shipment tracking web service. Copyright 2012 
>>> > Estes Express Lines, Inc.</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";; 
xmlns="http://ws.estesexpress.com/shipmenttracking";; 
targetNamespace="http://ws.estesexpress.com/shipmenttracking";;>
>>> >             <xsd:complexType name="AuthenticationType">
>>> >                 <xsd:sequence>
>>> >                     <xsd:element name="user" type="tns:UserType"/>
>>> >                     <xsd:element name="password" type="tns:PasswordType"/>
>>> >                 </xsd:sequence>
>>> >        
     </xsd:complexType>
>>> > 
>>> >             <xsd:simpleType name="EchoRequestType">
>>> >                 <xsd:restriction base="xsd:string">
>>> >                     <xsd:maxLength value="100"/>
>>> >                 </xsd:restriction>
>>> >             </xsd:simpleType>
>>> > 
>>> >             <xsd:simpleType name="PasswordType">
>>> >                 <xsd:restriction base="xsd:string">
>>> >        
             <xsd:minLength value="5"/>
>>> >                     <xsd:maxLength value="10"/>
>>> >                 </xsd:restriction>
>>> >             </xsd:simpleType>
>>> > 
>>> >             <xsd:simpleType name="UserType">
>>> >                 <xsd:restriction base="xsd:string">
>>> >                     <xsd:minLength value="5"/>
>>> >                     <xsd:maxLength
 value="10"/>
>>> >                 </xsd:restriction>
>>> >             </xsd:simpleType>
>>> > 
>>> >             <!-- Define SOAP message names here. -->
>>> > 
>>> >             <!-- Authentication SOAP Header  -->
>>> >             <xsd:element name="auth" type="tns:AuthenticationType"/>
>>> > 
>>> >             <!-- 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="tns:EchoRequestType"/>
>>> >             <!-- Echo Response Type -->
>>> >             <xsd:element name="echoResponse" type="xsd:string"/>
>>> >         </xsd:schema>
>>> > 
>>> >         <xsd:schema attributeFormDefault="unqualified" 
>>> > elementFormDefault="qualified" 
>>> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";; 
>>> > xmlns="http://ws.estesexpress.com/schema/shipmenttracking";; 
>>> > targetNamespace="http://ws.estesexpress.com/schema/shipmenttracking";; 
>>> > xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";;>
>>> >             <!--  Reference all the schemas -->
>>> >             <xsd:include schemaLocation="search.xsd"/>
>>> >             <xsd:include schemaLocation="results.xsd"/>
>>> >         </xsd:schema>
>>> >     </wsdl:types>
>>> > 
>>> >     <!-- Interfaces -->
>>> >     <wsdl:interface name="trackingInterface">
>>> >         <!-- 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";;>
>>> >             <wsdl:input element="tns:echoRequest"/>
>>> >             <wsdl:output element="tns:echoResponse"/>
>>> >         </wsdl:operation>
>>> >         <!-- Shipment tracking search operation -->
>>> >         <wsdl:operation name="trackShipments" 
>>> > pattern="http://www.w3.org/ns/wsdl/in-out";;>
>>> >            
 <wsdl:input element="ship:search" 
xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";; />
>>> >             <wsdl:output element="ship:trackingInfo" 
>>> > xmlns:ship="http://ws.estesexpress.com/schema/shipmenttracking";; />
>>> >         </wsdl:operation>
>>> >     </wsdl:interface>
>>> > 
>>> >     <!-- Concrete Binding with SOAP-->
>>> >     <wsdl:binding name="shipmentTrackingBinding" 
>>> > type="http://www.w3.org/ns/wsdl/http";; interface="tns:trackingInterface" 
>>> > xmlns:wsoap="http://www.w3.org/ns/wsdl/soap";;>
>>> >         <wsdl:fault ref="tns:generalErrorMessage"/>
>>> >         <wsdl:fault ref="tns:schemaErrorMessage"/>
>>> >        
 <wsdl:operation ref="tns:echo" 
wsoap:soapAction="http://ws.estesexpress.com/shipmenttracking/echo"/>
>>> >         <wsdl:operation ref="tns:trackShipments" 
>>> > wsoap:soapAction="http://ws.estesexpress.com/shipmenttracking/trackShipments";;>
>>> >             <wsdl:input>
>>> >                 <wsoap:header required="true" element="tns:auth"/>
>>> >             </wsdl:input>
>>> >             <wsdl:output/>
>>> >             <wsdl:outfault ref="tns:schemaErrorMessage"/>
>>> >             <wsdl:outfault ref="tns:generalErrorMessage"/>
>>> >
         </wsdl:operation>
>>> >     </wsdl:binding>
>>> > 
>>> >     <!-- Define service and endpoint -->
>>> >     <wsdl:service name="ShipmentTrackingService" 
>>> > interface="tns:trackingInterface">
>>> >         <wsdl:documentation>Estes shipment tracking web 
>>> > service</wsdl:documentation>
>>> >         <wsdl:endpoint name="shipmentTracking" 
>>> > binding="tns:shipmentTrackingBinding"
>>> >                   
>>> > address="https://www.estes-express.com/shipmenttracking/services/ShipmentTracking"/>
>>> >     </wsdl:service>
>>> > </wsdl:description>
>>> > 
>>> > Thanks,
>>> > J
>>> > 
>>> > 
>>>
 > ________________________________
>>> > From: Shameera Rathnayaka <shameerai...@gmail.com>
>>> > To: java-user@axis.apache.org; Jack Sprat <rexclaim...@yahoo.com> 
>>> > Cc: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org> 
>>> > Sent: Friday, March 29, 2013 9:28 AM
>>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > 
>>> > 
>>> > could you please attached a sample WSDL which reproduce this error.
>>> > 
>>> > Regards,
>>> > Shameera.
>>> > 
>>> > 
>>> > 
>>> > On Fri, Mar 29, 2013 at 6:44 PM, Jack Sprat <rexclaim...@yahoo.com> wrote:
>>> > 
>>> > Yes, I used ADB binding (-d adb) and got the exact same error that was 
>>> > thrown using XMLBeans binding.
>>> > >
>>> > >
>>> > >The WSDL appears to be valid.  I tested with the Woden parser and also 
>>> > >with XMLSpy.  The
 wsdl2java command throws an error with ADB or XMLBeans binding.
>>> > >
>>> > >How can I get past this problem?
>>> > >
>>> > >
>>> > >Thanks,
>>> > >J
>>> > >
>>> > >
>>> > >________________________________
>>> > >From: Shameera Rathnayaka <shameerai...@gmail.com>
>>> > >To: java-user@axis.apache.org; Jack Sprat <rexclaim...@yahoo.com>
>>> > >Cc: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org>
>>> > >Sent: Thursday, March 28, 2013 11:44 PM
>>> > >
>>> > >Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > >
>>> > >
>>> > >Hi Jack,
>>> > >
>>> > >
>>> > >
>>> > >On Thu, Mar 28, 2013 at 9:15 PM, Jack Sprat <rexclaim...@yahoo.com> 
>>> > >wrote:
>>> > >
>>> > >Same exact error using ADB
 binding.
>>> > >>
>>> > >>Please advise how to get past this problem.  I am really stuck!
>>> > >>
>>> > >>
>>> > >If you need to generated ADB binding, then use -d adb instead -d 
>>> > >xmlbeans , BTW ADB is default binding, if you didn't specifically 
>>> > >mentioned the -d option then binding would be ADB,  You can find more 
>>> > >about this from here[1][2]
>>> > >
>>> > >Cheers,
>>> > >Shameera.
>>> > >
>>> > >[1]http://axis.apache.org/axis2/java/core/tools/CodegenToolReference.html
>>> > >[2]http://axis.apache.org/axis2/java/core/tools/
>>> > >
>>> > >
>>> > >Thanks,
>>> > >>J
>>> > >>
>>> > >>
>>> > >>
>>> > >>
>>> > >>----- Original Message -----
>>> > >>From: Sagara Gunathunga
 <sagara.gunathu...@gmail.com>
>>> > >>To: "axis-u...@ws.apache.org" <axis-u...@ws.apache.org>
>>> > >>Cc:
>>> > >>Sent: Tuesday, March 26, 2013 1:32 AM
>>> > >>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > >>
>>> > >>On Tue, Mar 26, 2013 at 2:18 AM, Jack Sprat <rexclaim...@yahoo.com> 
>>> > >>wrote:
>>> > >>> Does the wsdl2java command work with a version 2.0 WSDL?  I have 
>>> > >>> created a version 2.0 WSDL and validated it with Woden (included with 
>>> > >>> Axis2 1.6.1).  The WSDL also passed validation using Altova XML Spy.  
>>> > >>> However, an error is thrown when I try to create the code stubs using 
>>> > >>> wsdl2java.  Below is the command:
>>> > >>>
>>> > >>> call %AXIS2_HOME%/bin/WSDL2Java -uri 
>>> > >>> C:\Data\MyWebService\docs\myServiceV2.0.wsdl -p 
>>> > >>> com.mycompany.ws.myservice.producer.gensrc -d xmlbeans -s -ss -sd 
>>> > >>> -ssi -wv 2.0 -o
 C:\Data\build\myservice
>>> > >>
>>> > >>I'm not quite sure it is well supported for xmlbeans try to use
>>> > >>default ADB it should work.
>>> > >>
>>> > >>Thanks !
>>> > >>>
>>> > >>> Thanks,
>>> > >>> J
>>> > >>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@axis.apache.org
For additional commands, e-mail: java-user-h...@axis.apache.org

Reply via email to