Thanks Ruchith.  You guys probably already know this, but there are quite a large number of errors in the User Guide.  E.g., the Factory mechanism seems to be eliminated in favor of simple constructors in the classes generated by WSDL2Java (at least I hope so -- the  Factory subclasses are not there and the constructors are public).  The classes also have different names.

This may or may not be considered a bug, but the Samples project does not have a dependency on adb, which is required to use the classes generated by WSDL2Java.  I added that dependency and maven builds things fine, but there do not appear to be any targets to create the user guide example aar.  I'm using Netbeans 5, and so found the simplest solution was to create my own project completely outside of axis2, give it the right dependencies, generate the classes and resources (services.xml) with WSDL2Java there, and then build there.  This all worked fine and it is now successfully deployed.  Next we'll see if the it works when I create the client.

FYI, my filled-in business logic for the generated skeleton, with the corrections above, is attached (if this list accepts attachments).

Chuck


Ruchith Fernando <[EMAIL PROTECTED]> wrote on 01/11/2006 06:59:10 PM:

Hi Chuck,

Thanks for pointing out the issues. They are fixed in the latest SVN now.

Thanks,
Ruchith


On 1/12/06, Chuck Williams <[EMAIL PROTECTED]> wrote:
  
HI Chinthaka,

Eran Chinthaka <[EMAIL PROTECTED]> wrote on 01/11/2006 04:23:23 PM:

    
Chuck Williams wrote:

      
I've noticed these anomalies so far:
        
1. The war does not contain two required libraries, both part of
Apache Commons: FileUpload and IO. These are needed for uploading
services -- after adding version 1.1 of each, upload seems to work
fine.
        
I just downloaded the war and it contains commons-fileupload-1.0.jar.
And I checked the version I uploaded to the mirrors and it also
contains that jar :(.
About commons-io, do we need that ?
      
The binary war has commons-fileupload, but the build from the source
distribution produced a war that does not have it.  I built from the
source distribution with "maven war".  How do you create the binary
distribution (which is also the essence of my earlier question, since
WSDL2Java requires a complete top-level lib which no maven target
appears to create)?

Re. commons-io, the Upload Service action in the admin application blew
up for me (ClassNotFoundException) when following the intro steps in the
User Guide until I added it.  Then it worked fine.

On another topic, moving to the next section of the User Guide about
WSDL2Java, I hit a doc bug.  The -o ../samples/src should actually be -o
../samples as the output generated a src (i.e., I ended up with src/src,
which messed up the classpath).  That of course was easy to fix.

Thanks for your help,

Chuck


    

/**
 * Axis2SampleDocLitPortTypeSkeleton.java
 *
 * This file was auto-generated from WSDL
 * by the Apache Axis2 version: 0.94 Jan 11, 2006 (08:58:28 HST)
 */
package org.apache.axis2.userguide;

import org.apache.axis2.userguide.xsd.*;

/**
 *  Axis2SampleDocLitPortTypeSkeleton java skeleton for the axisService
 */
public class Axis2SampleDocLitPortTypeSkeleton {
    
    
    /**
     * Echo a string array parameter
     * @param param the incoming document
     * @return a new document contain the same payload
     */
    public EchoStringArrayReturn echoStringArray (EchoStringArrayParam param) {
        EchoStringArrayReturn retdoc = new EchoStringArrayReturn();
        ArrayOfstring_literal in = param.getEchoStringArrayParam();
        ArrayOfstring_literal ret = new ArrayOfstring_literal();
        ret.setString(in.getString());
        retdoc.setEchoStringArrayReturn(ret);
        return retdoc;
    }
    
    
    /**
     * Echo a struct parameter
     * @param param the incoming document
     * @return a new document containing the same payload
     */
    public EchoStructReturn echoStruct (EchoStructParam param) {
        EchoStructReturn retdoc = new EchoStructReturn();
        SOAPStruct in = param.getEchoStructParam();
        SOAPStruct ret = new SOAPStruct();
        ret.setVarFloat(in.getVarFloat());
        ret.setVarInt(in.getVarInt());
        ret.setVarString(in.getVarString());
        retdoc.setEchoStructReturn(ret);
        return retdoc;
    }
    
    
    /**
     * Echo a string parameter
     * @param param the incoming document
     * @return a new document containing the same payload
     */
    public EchoStringReturn echoString (EchoStringParam param) {
        EchoStringReturn retdoc = new EchoStringReturn();
        retdoc.setEchoStringReturn(param.getEchoStringParam());
        return retdoc;
    }
    
}

Reply via email to