You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Jack Sprat <re...@yahoo.com> on 2013/03/25 21:48:15 UTC

[Axis2] wsdl2java with WSDL 2.0

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

Thanks,
J

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


RE: Error : Code too large for try statement

Posted by Martin Gainty <mg...@hotmail.com>.
XSL does blind substitution ..the solution is to extend fromOM to output a Collection ( as seen here )
Original:   
   java.lang.Object object = fromOM(
                                             _returnEnv.getBody().getFirstElement() ,
                                             <xsl:value-of select="$outputtype"/>.class,
                                              getEnvelopeNamespaces(_returnEnv));

New:
   Collection collection_of_object=fromOM_Collection             _returnEnv.getBody().getFirstElement() ,
                                                        <xsl:value-of select="$outputtype"/>.class,
                                                       getEnvelopeNamespaces(_returnEnv));
<!-- Class.getMethod would need the new Class so we must change messageClass from java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
                                   new java.lang.Class[]{messageClass});-->
while (collection_of_object.iterator().hasNext()){  Object object=collection_of_object.iterator().next().
  Class messageClass =object.getClass();
  java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
                                      new java.lang.Class[]{messageClass});

<!-- assume fromOM outputs <objects>                                                      <object>
                                                     </object>
                                                   </objects>-->
<xsl:for-each select="objects/object">   <!-- IF output/param[@location='body']/param) drives each record to be unique
          then we can retain outputparamcount as our counter
          otherwise we could need another counter to make sure each xsl:when test is unique for each              object      -->             <xsl:when test="$outputparamcount=1" return get                   <xsl:value-of select="$outputparamshorttype"/>                  <xsl:value-of select="$outputparampartname"/>((<xsl:value-of select="$outputtype"/>)object);
                                               </xsl:when>                    <xsl:when test="$outputparamcount=2" return get                                  <xsl:value-of select="$outputparamshorttype"/>                                 <xsl:value-of select="$outputparampartname"/>((<xsl:value-of select="$outputtype"/>)object);
                                                         </xsl:when>
</xsl:for-each> }  <!-- end when -->
Personally I would prefer to twiddle Class.getMethod but thats part of the JDK so the only solution
is to have fromOM create multiple classes (with identical method names) e.g.

class Object1Class { public void method1, public void method2... };
class Object2Class { public void method1, public void method2...};
Everyone uses toOM and fromOM to generate their XML and then to transform XML to code
so these methods need to be left as is
ToOM_Collection and fromOM_Collection is the only solution that would work

Let me know if this is of interest to you and I'll pitch it to the devs..

FYI: This feature would not be backported to previous versions of Axis
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: Fri, 5 Apr 2013 14:56:30 -0700
From: harish_k_s007@yahoo.com
Subject: Re: Error : Code too large for try statement
To: java-user@axis.apache.org

Thanks Martin for response. Refactoring helped in fixing code. 
I found there was link for Axis2 patch which fixed it without refactoring (https://issues.apache.org/jira/browse/AXIS2-3618) 
Is that issue fixed in any of Axis2 releases?
Thanks,Harish
        From: Martin Gainty <mg...@hotmail.com>
 To: "java-user@axis.apache.org" <ja...@axis.apache.org> 
 Sent: Wednesday, April 3, 2013 4:36 PM
 Subject: RE: Error : Code too large for try statement
   




you exceeded the JVM max try/catch block size of 64k imposed by the JVM

break  up the try/catch block is the only solution I know of

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: Tue, 2 Apr 2013 13:09:08 -0700
From: harish_k_s007@yahoo.com
Subject: Error : Code too large for try statement
To: java-user@axis.apache.org

Hi Guys,
             When i try to generate client stub, i am getting following error. Can any onesuggest how to fix it ? 
This is due to large code size generated by Axis2 which is
 exceeding limit as per java. 

    [javac] C:\project\src\org\multispeak\www\version_4_1_release\MDM_ServerStub.java:126405: code too large for try statement
    [javac]        
 }catch(java.lang.Exception e){    [javac]          ^    [javac] C:\project\src\org\multispeak\www\version_4_1_release\MDM_ServerStub.java:107159: code too large    [javac]         public org.apache.xmlbeans.XmlObject fromOM(    [javac]          
                                    ^    [javac] Note: Some input files use or override a deprecated API.    [javac] Note: Recompile with -Xlint:deprecation for details.    [javac] Note: Some input files use unchecked or unsafe operations.    [javac] Note: Recompile with -Xlint:unchecked for details.    [javac] 2 errors    [javac] 2 warnings

   		 	   		  


    d 		 	   		  

Re: Error : Code too large for try statement

Posted by Harish Kumar <ha...@yahoo.com>.
Thanks Martin for response. Refactoring helped in fixing code. 

I found there was link for Axis2 patch which fixed it without refactoring (https://issues.apache.org/jira/browse/AXIS2-3618) 

Is that issue fixed in any of Axis2 releases?

Thanks,
Harish


________________________________
 From: Martin Gainty <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@axis.apache.org> 
Sent: Wednesday, April 3, 2013 4:36 PM
Subject: RE: Error : Code too large for try statement
 

 
you exceeded the JVM max try/catch block size of 64k imposed by the JVM

break  up the try/catch block is the only solution I know of

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: Tue, 2 Apr 2013 13:09:08 -0700
From: harish_k_s007@yahoo.com
Subject: Error : Code too large for try statement
To: java-user@axis.apache.org


Hi Guys,

             When i try to generate client stub, i am getting following error. Can any one
suggest how to fix it ? 

This is due to large code size generated by Axis2 which is exceeding limit as per java. 


    [javac] C:\project\src\org\multispeak\www\
version_4_1_release\MDM_ServerStub.java:126405: code too large for try statement

    [javac]         }catch(java.lang.Exception e){
    [javac]          ^
    [javac] C:\project\src\org\multispeak\www\
version_4_1_release\MDM_ServerStub.java:107159: code too large
    [javac]         public org.apache.xmlbeans.XmlObject fromOM(
    [javac]                                              ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 2 warnings

RE: Error : Code too large for try statement

Posted by Martin Gainty <mg...@hotmail.com>.
you exceeded the JVM max try/catch block size of 64k imposed by the JVM

break  up the try/catch block is the only solution I know of

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: Tue, 2 Apr 2013 13:09:08 -0700
From: harish_k_s007@yahoo.com
Subject: Error : Code too large for try statement
To: java-user@axis.apache.org

Hi Guys,
             When i try to generate client stub, i am getting following error. Can any onesuggest how to fix it ? 
This is due to large code size generated by Axis2 which is exceeding limit as per java. 

    [javac] C:\project\src\org\multispeak\www\version_4_1_release\MDM_ServerStub.java:126405: code too large for try statement
    [javac]         }catch(java.lang.Exception e){    [javac]          ^    [javac] C:\project\src\org\multispeak\www\version_4_1_release\MDM_ServerStub.java:107159: code too large    [javac]         public org.apache.xmlbeans.XmlObject fromOM(    [javac]          
                                    ^    [javac] Note: Some input files use or override a deprecated API.    [javac] Note: Recompile with -Xlint:deprecation for details.    [javac] Note: Some input files use unchecked or unsafe operations.    [javac] Note: Recompile with -Xlint:unchecked for details.    [javac] 2 errors    [javac] 2 warnings

   		 	   		  

Error : Code too large for try statement

Posted by Harish Kumar <ha...@yahoo.com>.
Hi Guys,

             When i try to generate client stub, i am getting following error. Can any one
suggest how to fix it ? 

This is due to large code size generated by Axis2 which is exceeding limit as per java. 


    [javac] C:\project\src\org\multispeak\www\
version_4_1_release\MDM_ServerStub.java:126405: code too large for try statement

    [javac]         }catch(java.lang.Exception e){
    [javac]          ^
    [javac] C:\project\src\org\multispeak\www\
version_4_1_release\MDM_ServerStub.java:107159: code too large
    [javac]         public org.apache.xmlbeans.XmlObject fromOM(
    [javac]                                              ^
    [javac] Note: Some input files use or override a deprecated API.
    [javac] Note: Recompile with -Xlint:deprecation for details.
    [javac] Note: Some input files use unchecked or unsafe operations.
    [javac] Note: Recompile with -Xlint:unchecked for details.
    [javac] 2 errors
    [javac] 2 warnings

RE: [Axis2] wsdl2java with WSDL 2.0

Posted by Martin Gainty <mg...@hotmail.com>.
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) from WSDL contents..

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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: axis-user@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 <sh...@gmail.com>
> To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
 		 	   		  

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
Can you be more specific on what instructions to follow?  There have been a few suggestions but none have worked.


Thanks,
J




________________________________
 From: Martin Gainty <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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 

  


________________________________
 Date: Wed, 3 Apr 2013 14:34:25 -0700
From: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <ks...@gmail.com>
To: "java-dev@axis.apache.org" <ja...@axis.apache.org>; Jack Sprat <re...@yahoo.com> 
Cc: "java-user@axis.apache.org" <ja...@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 <re...@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 <ks...@gmail.com>
>
>To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>Cc: "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
>>To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
>>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>To: java-user@axis.apache.org
>>CC: java-dev@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 <mg...@hotmail.com>
>>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
>>> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > To: java-user@axis.apache.org
>>> > CC: axis-user@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 <sh...@gmail.com>
>>> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>>> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
>>> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
>>> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
>>> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <ks...@gmail.com>
To: "java-dev@axis.apache.org" <ja...@axis.apache.org>; Jack Sprat <re...@yahoo.com> 
Cc: "java-user@axis.apache.org" <ja...@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 <re...@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 <ks...@gmail.com>
>
>To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>Cc: "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
>>To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
>>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>To: java-user@axis.apache.org
>>CC: java-dev@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 <mg...@hotmail.com>
>>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
>>> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>>> > To: java-user@axis.apache.org
>>> > CC: axis-user@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 <sh...@gmail.com>
>>> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>>> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
>>> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
>>> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
>>> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Kishanthan Thangarajah <ks...@gmail.com>.
On Thu, Apr 18, 2013 at 2:32 AM, Jack Sprat <re...@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 <ks...@gmail.com>
>
> *To:* java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> *Cc:* "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
> *To:* "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: java-dev@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> > To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > > To: java-user@axis.apache.org
> > > CC: axis-user@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 <sh...@gmail.com>
> > > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > > >>>
>
>
>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Kishanthan Thangarajah <ks...@gmail.com>.
On Thu, Apr 18, 2013 at 2:32 AM, Jack Sprat <re...@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 <ks...@gmail.com>
>
> *To:* java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> *Cc:* "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
> *To:* "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: java-dev@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> > To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > > To: java-user@axis.apache.org
> > > CC: axis-user@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 <sh...@gmail.com>
> > > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > > >>>
>
>
>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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.

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 <ks...@gmail.com>
To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
Cc: "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
>To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>To: java-user@axis.apache.org
>CC: java-dev@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 <mg...@hotmail.com>
>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
>> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>> > To: java-user@axis.apache.org
>> > CC: axis-user@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 <sh...@gmail.com>
>> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
>> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
>> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
>> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
>> > >>>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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.

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 <ks...@gmail.com>
To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
Cc: "java-dev@axis.apache.org" <ja...@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 <re...@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 <re...@yahoo.com>
>To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>To: java-user@axis.apache.org
>CC: java-dev@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 <mg...@hotmail.com>
>To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
>> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
>> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
>> > To: java-user@axis.apache.org
>> > CC: axis-user@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 <sh...@gmail.com>
>> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
>> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
>> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
>> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
>> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
>> > >>>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Kishanthan Thangarajah <ks...@gmail.com>.
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 <re...@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 <re...@yahoo.com>
> *To:* "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: java-dev@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> > To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > > To: java-user@axis.apache.org
> > > CC: axis-user@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 <sh...@gmail.com>
> > > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > > >>>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Kishanthan Thangarajah <ks...@gmail.com>.
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 <re...@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 <re...@yahoo.com>
> *To:* "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: java-dev@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 <mg...@hotmail.com>
> *To:* "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> > To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > > To: java-user@axis.apache.org
> > > CC: axis-user@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 <sh...@gmail.com>
> > > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > > >>>
>
>
>
>
>
>
>
>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <re...@yahoo.com>
To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <re...@yahoo.com>
To: "java-user@axis.apache.org" <ja...@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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
 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
Can you be more specific on what instructions to follow?  There have been a few suggestions but none have worked.


Thanks,
J




________________________________
 From: Martin Gainty <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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 

  


________________________________
 Date: Wed, 3 Apr 2013 14:34:25 -0700
From: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

RE: [Axis2] wsdl2java with WSDL 2.0

Posted by Martin Gainty <mg...@hotmail.com>.
yes ...if you follow the instructions in the previous email

Viel Gluck,
Martin 
______________________________________________ 
Verzicht und Vertraulichkeitanmerkung
 
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.
  




Date: Wed, 3 Apr 2013 14:34:25 -0700
From: rexclaimer2@yahoo.com
Subject: Re: [Axis2] wsdl2java with WSDL 2.0
To: java-user@axis.apache.org
CC: java-dev@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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>



 		 	   		  

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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
> > >>>

RE: [Axis2] wsdl2java with WSDL 2.0

Posted by Martin Gainty <mg...@hotmail.com>.
AxisRESTServlet has been deprecated in recent versions you'll need to dial back to Axis2-1.1http://grepcode.com/snapshot/repo1.maven.org/maven2/org.apache.axis2/axis2-kernel/1.1/
Otherwise you'll be playing with the REST axis2.xml parametersrestPathenableRESTInAxis2MainServletdisableREST
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: Tue, 2 Apr 2013 13:08:07 -0700
> From: rexclaimer2@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 <mg...@hotmail.com>
> To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> > Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> > To: java-user@axis.apache.org
> > CC: axis-user@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 <sh...@gmail.com>
> > To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> > Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> > >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> > >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> > >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >   
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
 		 	   		  

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <mg...@hotmail.com>
To: "java-user@axis.apache.org" <ja...@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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: axis-user@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 <sh...@gmail.com>
> To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>   

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


RE: [Axis2] wsdl2java with WSDL 2.0

Posted by Martin Gainty <mg...@hotmail.com>.
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: rexclaimer2@yahoo.com
> Subject: Re: [Axis2] wsdl2java with WSDL 2.0
> To: java-user@axis.apache.org
> CC: axis-user@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 <sh...@gmail.com>
> To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
> Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
> >To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> >Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> >>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
> 
 		 	   		  

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <sh...@gmail.com>
To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sh...@gmail.com>
>To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
>Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
>>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org


Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Shameera Rathnayaka <sh...@gmail.com>.
could you please attached a sample WSDL which reproduce this error.

Regards,
Shameera.


On Fri, Mar 29, 2013 at 6:44 PM, Jack Sprat <re...@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 <sh...@gmail.com>
> To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com>
> Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
> >To: "axis-user@ws.apache.org" <ax...@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 <re...@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-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> >--
> >Sagara Gunathunga
> >
> >Blog      - http://ssagara.blogspot.com
> >Web      - http://people.apache.org/~sagara/
> >LinkedIn - http://www.linkedin.com/in/ssagara
> >
> >---------------------------------------------------------------------
> >To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> >For additional commands, e-mail: java-user-help@axis.apache.org
> >
> >
>
>
> --
>
> Best Regards,Shameera Rathnayaka.
>
> Blog : http://shameerarathnayaka.blogspot.com/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Best Regards,
Shameera Rathnayaka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
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 <sh...@gmail.com>
To: java-user@axis.apache.org; Jack Sprat <re...@yahoo.com> 
Cc: "axis-user@ws.apache.org" <ax...@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 <re...@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 <sa...@gmail.com>
>To: "axis-user@ws.apache.org" <ax...@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 <re...@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-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
>--
>Sagara Gunathunga
>
>Blog      - http://ssagara.blogspot.com
>Web      - http://people.apache.org/~sagara/
>LinkedIn - http://www.linkedin.com/in/ssagara
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
>For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 

Best Regards,Shameera Rathnayaka.

Blog : http://shameerarathnayaka.blogspot.com/ 

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


Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Shameera Rathnayaka <sh...@gmail.com>.
Hi Jack,


On Thu, Mar 28, 2013 at 9:15 PM, Jack Sprat <re...@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 <sa...@gmail.com>
> To: "axis-user@ws.apache.org" <ax...@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 <re...@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-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
>
>
> --
> Sagara Gunathunga
>
> Blog      - http://ssagara.blogspot.com
> Web      - http://people.apache.org/~sagara/
> LinkedIn - http://www.linkedin.com/in/ssagara
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>
>


-- 
Best Regards,
Shameera Rathnayaka.

Blog : http://shameerarathnayaka.blogspot.com/

Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Jack Sprat <re...@yahoo.com>.
Same exact error using ADB binding.

Please advise how to get past this problem.  I am really stuck!

Thanks,
J



----- Original Message -----
From: Sagara Gunathunga <sa...@gmail.com>
To: "axis-user@ws.apache.org" <ax...@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 <re...@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-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

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


Re: [Axis2] wsdl2java with WSDL 2.0

Posted by Sagara Gunathunga <sa...@gmail.com>.
On Tue, Mar 26, 2013 at 2:18 AM, Jack Sprat <re...@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-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>



-- 
Sagara Gunathunga

Blog      - http://ssagara.blogspot.com
Web      - http://people.apache.org/~sagara/
LinkedIn - http://www.linkedin.com/in/ssagara

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