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 Michael Bernagou <bl...@gmail.com> on 2007/11/20 11:47:06 UTC

Minimum Library Requirement?

Hi everybody,

I have a question about the libraries. I have a little number of services
using AXIOM but there so many libraries that my application is huge compare
with the little ko for the code.
In fact I develop a Client (GUI Swing application) that use axis2 to call
some services to a server.
My method is quite simple :

public static MainUser getAuthenticatedUser(String login, char[] password)
throws PapoException {
       EndpointReference targetEPR = new EndpointReference(baseUrl +
CoreVariables.USER_WEBSERVICE);
       OMFactory fac = OMAbstractFactory.getOMFactory();
       OMNamespace omNs = fac.createOMNamespace("
http://webservices.papo/xsd", "tns");

       OMElement method = fac.createOMElement("getAuthenticatedUser",
omNs);

       OMElement loginElement = fac.createOMElement("login", omNs);
       loginElement.addChild(fac.createOMText(loginElement, login));
       method.addChild(loginElement);

       OMElement passwordElement = fac.createOMElement("password", omNs);
       passwordElement.addChild(fac.createOMText(passwordElement, new
String(password)));
       method.addChild(passwordElement);

       Options options = new Options();
       options.setTo(targetEPR);
       options.setTransportInProtocol(Constants.TRANSPORT_HTTP);


       try {
           ServiceClient sender = new ServiceClient();
           sender.setOptions(options);
           OMElement result = sender.sendReceive(method);
           OMElement firstElement = result.getFirstElement();
           if(firstElement.getLocalName().equals("message")) {
               throw new PapoException(firstElement.getText());
           }
           else {
               loginElement = firstElement;
               login = loginElement.getText();

               OMElement firstNameElement =
(OMElement)loginElement.getNextOMSibling();
               String firstName = firstNameElement.getText();

               OMElement lastNameElement =
(OMElement)firstElement.getNextOMSibling();
               String lastName = lastNameElement.getText();

               OMElement emailElement =
(OMElement)lastNameElement.getNextOMSibling();
               String email = emailElement.getText();

               MainUser user = new MainUser(login);
               user.setFirstName(firstName);
               user.setLastName(lastName);
               user.setEmail(email);

               return user;
           }
       }
       catch (AxisFault af) {
           af.printStackTrace();
           throw new PapoException("The call to the service has failed !!",
af);
       }
   }

What are the minimal list of library to make this run. At the moment I put
all the libraries, and try to delete one by one the jar to see what is
needed, but, I still have something like 15 jars... just for this piece of
code :(

At the server side, it is less important but still huge compare with the
code...


-- 
Michael Bernagou
Java Developper

Re: Minimum Library Requirement?

Posted by Lawrence Mandel <lm...@ca.ibm.com>.
I think you're right about the optional repository. The key really is the 
good description. I got the feeling from the axis-dev conversation that 
there are very few people who understand all of Axis2's dependencies.

Lawrence 




"Michael Bernagou" <bl...@gmail.com> 
11/20/2007 01:01 PM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Re: Minimum Library Requirement?






Thanks!

So I just have to wait for the repackaging :)
Personnaly I would prefer 2 light packages (client and server) and a 
repository for optional libs with a good description. The 
axis-optional.jar will still contain many jars not needed, especially if I 
just need one of them ;) 

Anyway, let's wait and see!

M.

2007/11/20, Lawrence Mandel <lm...@ca.ibm.com>:
There have been many such discussions on the user and dev lists. (I
started one as well [1].) There was a good discussion a few weeks ago on
the Axis dev list (for the record I'm not an Axis committer) and the
agreed outcome was that Axis2 should be repackaged into server, client,
and optional packages to help users better understand what they need. The
conversation also helped trim the fat identifying some packages that can 
be removed. See [2] for a post somewhere in the middle of the
conversation.

[1] http://marc.info/?l=axis-user&m=119213917321134&w=2 
[2] http://marc.info/?l=axis-dev&m=119237705617226&w=2

Lawrence




"Michael Bernagou" < blackwings.ml@gmail.com>
11/20/2007 05:47 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org 
cc

Subject
Minimum Library Requirement?






Hi everybody,

I have a question about the libraries. I have a little number of services
using AXIOM but there so many libraries that my application is huge 
compare with the little ko for the code.
In fact I develop a Client (GUI Swing application) that use axis2 to call
some services to a server.
My method is quite simple :

public static MainUser getAuthenticatedUser(String login, char[] password) 

throws PapoException {
       EndpointReference targetEPR = new EndpointReference(baseUrl +
CoreVariables.USER_WEBSERVICE);
       OMFactory fac = OMAbstractFactory.getOMFactory();
       OMNamespace omNs = fac.createOMNamespace("
http://webservices.papo/xsd", "tns");

       OMElement method = fac.createOMElement("getAuthenticatedUser",
omNs); 

       OMElement loginElement = fac.createOMElement("login", omNs);
       loginElement.addChild(fac.createOMText(loginElement, login));
       method.addChild(loginElement);

       OMElement passwordElement = fac.createOMElement("password", omNs);
       passwordElement.addChild (fac.createOMText(passwordElement, new
String(password)));
       method.addChild(passwordElement);

       Options options = new Options(); 
       options.setTo(targetEPR);
       options.setTransportInProtocol (Constants.TRANSPORT_HTTP);


       try {
           ServiceClient sender = new ServiceClient();
           sender.setOptions(options); 
           OMElement result = sender.sendReceive(method);
           OMElement firstElement = result.getFirstElement();
           if(firstElement.getLocalName().equals("message")) {
               throw new PapoException( firstElement.getText());
           }
           else {
               loginElement = firstElement;
               login = loginElement.getText();

               OMElement firstNameElement =
(OMElement)loginElement 
.getNextOMSibling();
               String firstName = firstNameElement.getText ();

               OMElement lastNameElement =
(OMElement)firstElement.getNextOMSibling();
               String lastName = lastNameElement.getText();

               OMElement emailElement =
(OMElement)lastNameElement.getNextOMSibling();
               String email = emailElement.getText();

               MainUser user = new MainUser(login); 
               user.setFirstName(firstName);
               user.setLastName(lastName);
                user.setEmail(email);

               return user;
           }
       }
       catch (AxisFault af) { 
           af.printStackTrace();
           throw new PapoException("The call to the service has failed
!!",
af);
       }
   }

What are the minimal list of library to make this run. At the moment I put 

all the libraries, and try to delete one by one the jar to see what is
needed, but, I still have something like 15 jars... just for this piece of

code :(

At the server side, it is less important but still huge compare with the 
code...


--
Michael Bernagou
Java Developper


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




-- 
Michael Bernagou 
Java Developper 


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


Re: Minimum Library Requirement?

Posted by Michael Bernagou <bl...@gmail.com>.
Thanks!

So I just have to wait for the repackaging :)
Personnaly I would prefer 2 light packages (client and server) and a
repository for optional libs with a good description. The
axis-optional.jarwill still contain many jars not needed, especially
if I just need one of
them ;)

Anyway, let's wait and see!

M.

2007/11/20, Lawrence Mandel <lm...@ca.ibm.com>:
>
> There have been many such discussions on the user and dev lists. (I
> started one as well [1].) There was a good discussion a few weeks ago on
> the Axis dev list (for the record I'm not an Axis committer) and the
> agreed outcome was that Axis2 should be repackaged into server, client,
> and optional packages to help users better understand what they need. The
> conversation also helped trim the fat identifying some packages that can
> be removed. See [2] for a post somewhere in the middle of the
> conversation.
>
> [1] http://marc.info/?l=axis-user&m=119213917321134&w=2
> [2] http://marc.info/?l=axis-dev&m=119237705617226&w=2
>
> Lawrence
>
>
>
>
> "Michael Bernagou" <bl...@gmail.com>
> 11/20/2007 05:47 AM
> Please respond to
> axis-user@ws.apache.org
>
>
> To
> axis-user@ws.apache.org
> cc
>
> Subject
> Minimum Library Requirement?
>
>
>
>
>
>
> Hi everybody,
>
> I have a question about the libraries. I have a little number of services
> using AXIOM but there so many libraries that my application is huge
> compare with the little ko for the code.
> In fact I develop a Client (GUI Swing application) that use axis2 to call
> some services to a server.
> My method is quite simple :
>
> public static MainUser getAuthenticatedUser(String login, char[] password)
> throws PapoException {
>        EndpointReference targetEPR = new EndpointReference(baseUrl +
> CoreVariables.USER_WEBSERVICE);
>        OMFactory fac = OMAbstractFactory.getOMFactory();
>        OMNamespace omNs = fac.createOMNamespace("
> http://webservices.papo/xsd", "tns");
>
>        OMElement method = fac.createOMElement("getAuthenticatedUser",
> omNs);
>
>        OMElement loginElement = fac.createOMElement("login", omNs);
>        loginElement.addChild(fac.createOMText(loginElement, login));
>        method.addChild(loginElement);
>
>        OMElement passwordElement = fac.createOMElement("password", omNs);
>        passwordElement.addChild (fac.createOMText(passwordElement, new
> String(password)));
>        method.addChild(passwordElement);
>
>        Options options = new Options();
>        options.setTo(targetEPR);
>        options.setTransportInProtocol (Constants.TRANSPORT_HTTP);
>
>
>        try {
>            ServiceClient sender = new ServiceClient();
>            sender.setOptions(options);
>            OMElement result = sender.sendReceive(method);
>            OMElement firstElement = result.getFirstElement();
>            if(firstElement.getLocalName().equals("message")) {
>                throw new PapoException(firstElement.getText());
>            }
>            else {
>                loginElement = firstElement;
>                login = loginElement.getText();
>
>                OMElement firstNameElement =
> (OMElement)loginElement
> .getNextOMSibling();
>                String firstName = firstNameElement.getText ();
>
>                OMElement lastNameElement =
> (OMElement)firstElement.getNextOMSibling();
>                String lastName = lastNameElement.getText();
>
>                OMElement emailElement =
> (OMElement)lastNameElement.getNextOMSibling();
>                String email = emailElement.getText();
>
>                MainUser user = new MainUser(login);
>                user.setFirstName(firstName);
>                user.setLastName(lastName);
>                 user.setEmail(email);
>
>                return user;
>            }
>        }
>        catch (AxisFault af) {
>            af.printStackTrace();
>            throw new PapoException("The call to the service has failed
> !!",
> af);
>        }
>    }
>
> What are the minimal list of library to make this run. At the moment I put
> all the libraries, and try to delete one by one the jar to see what is
> needed, but, I still have something like 15 jars... just for this piece of
>
> code :(
>
> At the server side, it is less important but still huge compare with the
> code...
>
>
> --
> Michael Bernagou
> Java Developper
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Michael Bernagou
Java Developper

Re: Minimum Library Requirement?

Posted by Lawrence Mandel <lm...@ca.ibm.com>.
There have been many such discussions on the user and dev lists. (I 
started one as well [1].) There was a good discussion a few weeks ago on 
the Axis dev list (for the record I'm not an Axis committer) and the 
agreed outcome was that Axis2 should be repackaged into server, client, 
and optional packages to help users better understand what they need. The 
conversation also helped trim the fat identifying some packages that can 
be removed. See [2] for a post somewhere in the middle of the 
conversation.

[1] http://marc.info/?l=axis-user&m=119213917321134&w=2
[2] http://marc.info/?l=axis-dev&m=119237705617226&w=2

Lawrence 




"Michael Bernagou" <bl...@gmail.com> 
11/20/2007 05:47 AM
Please respond to
axis-user@ws.apache.org


To
axis-user@ws.apache.org
cc

Subject
Minimum Library Requirement?






Hi everybody,

I have a question about the libraries. I have a little number of services
using AXIOM but there so many libraries that my application is huge 
compare with the little ko for the code.
In fact I develop a Client (GUI Swing application) that use axis2 to call 
some services to a server.
My method is quite simple :

public static MainUser getAuthenticatedUser(String login, char[] password)
throws PapoException {
       EndpointReference targetEPR = new EndpointReference(baseUrl + 
CoreVariables.USER_WEBSERVICE);
       OMFactory fac = OMAbstractFactory.getOMFactory();
       OMNamespace omNs = fac.createOMNamespace("
http://webservices.papo/xsd", "tns");

       OMElement method = fac.createOMElement("getAuthenticatedUser",
omNs);

       OMElement loginElement = fac.createOMElement("login", omNs); 
       loginElement.addChild(fac.createOMText(loginElement, login));
       method.addChild(loginElement);

       OMElement passwordElement = fac.createOMElement("password", omNs);
       passwordElement.addChild (fac.createOMText(passwordElement, new
String(password)));
       method.addChild(passwordElement);

       Options options = new Options();
       options.setTo(targetEPR);
       options.setTransportInProtocol (Constants.TRANSPORT_HTTP);


       try {
           ServiceClient sender = new ServiceClient();
           sender.setOptions(options);
           OMElement result = sender.sendReceive(method);
           OMElement firstElement = result.getFirstElement();
           if(firstElement.getLocalName().equals("message")) {
               throw new PapoException(firstElement.getText());
           }
           else {
               loginElement = firstElement; 
               login = loginElement.getText();

               OMElement firstNameElement =
(OMElement)loginElement
.getNextOMSibling();
               String firstName = firstNameElement.getText ();

               OMElement lastNameElement =
(OMElement)firstElement.getNextOMSibling();
               String lastName = lastNameElement.getText();

               OMElement emailElement =
(OMElement)lastNameElement.getNextOMSibling(); 
               String email = emailElement.getText();

               MainUser user = new MainUser(login);
               user.setFirstName(firstName);
               user.setLastName(lastName);
                user.setEmail(email);

               return user;
           }
       }
       catch (AxisFault af) {
           af.printStackTrace();
           throw new PapoException("The call to the service has failed 
!!", 
af);
       }
   }

What are the minimal list of library to make this run. At the moment I put
all the libraries, and try to delete one by one the jar to see what is
needed, but, I still have something like 15 jars... just for this piece of 

code :(

At the server side, it is less important but still huge compare with the
code...


-- 
Michael Bernagou
Java Developper 


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