Hi Ana,

AFAIK on POJO scnenario to work correctly on all areas, axis2 supports
simple types, simple type arrays and java beans in the method signatures of
the service methods that needed to be exposed as web service. In your exact
case, given that Class21 is a bean and recursively all the internal of that
Class21 is also goes ideal to the bean conventions, it can be worked out
replacing the list with the same type array and later convert it to a list
if needed on wither server or client side.

HTH,

thanks
Lahiru.

On 10/3/07, Ana Belén Antón Gironés <[EMAIL PROTECTED]> wrote:
>
>
> Hello Suran,
>
> My service makes use of several packages and classes and interfaces. It
> has
> a complex structure. So, I have created the following folder structure:
>
> C:\Program Files\Apache Software Foundation\Tomcat
> 5.5\webapps\axis2\WEB-INF\services\
>         - MyService
>                 -eu
>                         - myproject
>                                 - serviceone
>                                         -myservice
>                                                 -MyService.class
>                                                 -MyService.java
>                                                 -Otherclass.class [other
> object which MyService needs]
>                                                 -Otherclass.java
>                                         -folder1[other folders with the
> code
> of the rest of classes and interfaces ]
>                                                 -Class11.class
>                                                 -Class11.java
>                                                 -Class12.class
>                                                 -Class12.java
>                                         -folder2
>                                                 -Class21.class
>                                                 -Class21.java
>                                                 - ...
>                                         - ...
>                 -lib [libs used by my application]
>                         -commons-codec-1.3.jar
>                         -commons-httpclient-3.0.1.jar
>                         -commons-logging-api-1.1.jar
>                         -dom4j-1.6.1.jar
>                         -jaxen-1.1-beta-5.jar
>                         - ...
>                 -META-INF
>                         -services.xml
>                 -[several .xml files needed by my service]
>
> Note that the "eu" folder is a full copy of the "src" folder created in my
> workspace.
>
> My "MyService.java" is:
>
> package eu.myproject.serviceone.myservice;
>
> import java.io.IOException;
> import java.net.MalformedURLException;
> import java.util.ArrayList;
> import java.util.Iterator;
> import java.util.List;
>
> import org.dom4j.Document;
> import org.dom4j.DocumentException;
> import org.dom4j.DocumentHelper;
> import org.dom4j.Node;
>
> import eu.myproject.serviceone.exceptions.AGSCException;
> import eu.myproject.serviceone.exceptions.AGSException;
> import eu.myproject.serviceone.exceptions.AGSNFException;
> import eu.myproject.serviceone.folder1.Class11;
> import eu.myproject.serviceone.folder2.Class21;
> import eu.myproject.serviceone.folder3.Class31;
> import eu.myproject.serviceone.folder3.Class32;
>
> public class MyService implements Class32{
>
>         public List<Class21> getAllClassObj(List<Class31> constraintsList)
> throws AGSNFException {
>                 List<Class21> ClassObjList = new ArrayList<Class21>();
>                 //code..
>         return ClassObjList ;
>         }
>
>
>         //
> ----------------------------------------------------------------------
>
>         public Class21 getClassObj(String id) throws AGSNFException{
>                 //Class21 is an interface and Class21 is the object which
> implements the interface
>                 Class21Object classobj = null;
>                 //code...
>                 return classobj;
>         }
>
>         //
> ----------------------------------------------------------------------
>
>         private boolean method1(List<Class31> constraints){
>                 // code...
>                 return true;
>         }
>         //
> ----------------------------------------------------------------------
>         private String method2(List<Class31> constraints){
>                 String Xpath = "";
>                 //code...
>                 return Xpath;
>         }
>
>         //
> ----------------------------------------------------------------------
>
>         private String method3(Integer id){
>                 String path = "";
>                 //code...
>                 return path;
>         }
>
> }
>
> Please, note that this class implements an interface (called Class32..)
> and
> my service offers only two available operations.
>
> I hope you understand the aforementioned complex structure and code. I
> haven't copy the full class code because it is very long!
>
>
> Finally, my "services.xml" file is:
>
> <service name="MyService" scope="application">
>     <description>
>        MyService
>     </description>
>     <messageReceivers>
>         <messageReceiver
>             mep="http://www.w3.org/2004/08/wsdl/in-only";
>     class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
>         <messageReceiver
>             mep="http://www.w3.org/2004/08/wsdl/in-out";
>     class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
>     </messageReceivers>
>     <parameter name="ServiceClass">
>         eu.myproject.serviceone.myservice.MyService
>     </parameter>
> </service>
>
>
> Regarding the .aar file...I work with Eclipse and I have installed a
> plugin
> to generate .aar files ("Axis Service Archiver 1.0.0"). I have added the
> plugin "Axis2 Coden Wizard 1.2.0" too. Using the first tool Eclipse
> generates an .aar file, but it doesn't work when I upload the service. I
> could explain step to step what I do for that.
>
> Thank you very much for your interest in it and I hope you can help me
> because I am very lost. Kind regards,
>
> Ana Belén.
>
>
> >Suran Jayathilaka wrote:
> >Hullo Ana,
> >
> >Can you attach your service class code, and describe any other resources
> you are using? That may help in figuring out what's wrong.
> >
> >And did you mean that you don't know how to make an .aar file or that you
> don't know how to include your dependancy jars with your service?
> >
> >Cheers.
> >Suran
>
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


-- 
Thanks
Lahiru Sandakith

http://sandakith.wordpress.com/
GPG Key Fingerprint : 8CD8 68E0 4CBC 75CB 25BC  1AB1 FE5E 7464 1F01 9A0F

Reply via email to