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 Oliver Hirschi <o....@bluewin.ch> on 2007/08/21 16:04:54 UTC

[Axis2] Wich library for axis2-client-deployment

Hi

I developed a Axis2-Webservice and a java-client-application, using 
this service.
Now my question is about the deployment - I dont like to have all 51(!) 
single jars of the axis distributon on each of my client.
- Do I have to pack all 51 axis-2 libraries to the deployment of the 
client, or which jars are needed?
- Or another way: Is there one packing containing all axis2-client 
libraries, or is there a way to pack the 51 jars to one axis2.jar, so 
there would be only one file for the clients? I tried to pack al the 
jars to one jar with "jar cvf axis2.jar *.jar", but the classes are not 
found.

Great Thanks,
-- 
Oliver Hirschi
http://www.FamilyHirschi.ch 



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


Re: [Axis2] Wich library for axis2-client-deployment

Posted by keith chapman <ke...@gmail.com>.
You will need,

axis2-kernel
axis2-adb
axiom-dom
axiom-impl
axiom-api
stax-api
wstx-asl
XmlSchema
wsdl4j
commons-logging

These should do it.

Thanks,
Keith.

On 8/22/07, Oliver Hirschi <o....@bluewin.ch> wrote:
>
> Hi Keith,
>
> My client-code looks like:
> --------------------------
> ...
> import org.apache.axis2.AxisFault;
> import org.apache.axis2.addressing.EndpointReference;
> import org.apache.axis2.client.Options;
> import org.apache.axis2.rpc.client.RPCServiceClient;
> ...
> try {
>     RPCServiceClient sender = new RPCServiceClient();
>     Options options = sender.getOptions();
>     // Set the Server-Reference
>     EndpointReference targetEPR = new EndpointReference(sCPSServerURL +
> "/CPSServer");
>     options.setTo(targetEPR);
>     // The operation "test" should be called
>     QName op_test = new QName("http://cpsserver.pmm.ch/xsd", "test");
>     // Set the parameters
>     Object[] opArgs = new Object[] { "This is CBPlanner!" };
>     Class[] returnTypes = new Class[] { String.class };
>     // Call WebService
>     Object[] response = sender.invokeBlocking(op_test, opArgs,
> returnTypes);
>     // Read Return data
>     if(response[0] != null) {
>      String sReturn = response[0].toString();
>      if(!sReturn.startsWith("CPS-Error:")) {
>       JOptionPane.showMessageDialog(oParentDialog, "Successfully
> connected to CPSServer!\n\n" + sReturn, "Success",
> JOptionPane.INFORMATION_MESSAGE);
>      } else {
>        JOptionPane.showMessageDialog(oParentDialog, "Error connecting
> to CPSServer!\n\n" + sReturn, "Error", JOptionPane.ERROR_MESSAGE);
>      }
>     }
> } catch(AxisFault e) {
>     JOptionPane.showMessageDialog(oParentDialog, "Error connecting to
> CPSServer!\n\n" +e.toString(), "Error", JOptionPane.ERROR_MESSAGE);
>     System.err.println(e.getMessage());
>     e.printStackTrace();
> }
> ...
> --------------------------
>
> Thanks in advanced,
> Oliver Hirschi
>
>
> "keith chapman" <ke...@gmail.com> schrieb im Newsbeitrag >
> news:b72c94b30708211958s3ff93a7ar710df464fb54a28e@mail.gmail.com...
> > Hi Oliver,
> >
> > No you don't need all 51 jars. It depends on how you wrote the client
> > (codegeratared with wsdl2java?
> > databainging (ADB, xmlBeans, ... ) used if any). Also do you use
> > things such as security, RM on the client
> > side?
> >
> > Thanks,
> > Keith.
> >
> >
> > On 8/21/07, Oliver Hirschi <o....@bluewin.ch> wrote:
> > > Hi
> > >
> > > I developed a Axis2-Webservice and a java-client-application, using
> > > this service.
> > > Now my question is about the deployment - I dont like to have all
> > > 51(!)
> > > single jars of the axis distributon on each of my client.
> > > - Do I have to pack all 51 axis-2 libraries to the deployment of
> > > the
> > > client, or which jars are needed?
> > > - Or another way: Is there one packing containing all axis2-client
> > > libraries, or is there a way to pack the 51 jars to one axis2.jar,
> > > so
> > > there would be only one file for the clients? I tried to pack al
> > > the
> > > jars to one jar with "jar cvf axis2.jar *.jar", but the classes are
> > > not
> > > found.
> > >
> > > Great Thanks,
> > > --
> > > Oliver Hirschi
> > > http://www.FamilyHirschi.ch
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail: axis-user-help@ws.apache.org
> >
> >
> >
> >
> >
> > --
> > Keith Chapman
> > WSO2 Inc.
> > Oxygen for Web Services Developers.
> > http://wso2.org/
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/

Re: [Axis2] Wich library for axis2-client-deployment

Posted by Oliver Hirschi <o....@bluewin.ch>.
Hi Keith,

My client-code looks like:
--------------------------
...
import org.apache.axis2.AxisFault;
import org.apache.axis2.addressing.EndpointReference;
import org.apache.axis2.client.Options;
import org.apache.axis2.rpc.client.RPCServiceClient;
...
try {
    RPCServiceClient sender = new RPCServiceClient();
    Options options = sender.getOptions();
    // Set the Server-Reference
    EndpointReference targetEPR = new EndpointReference(sCPSServerURL + 
"/CPSServer");
    options.setTo(targetEPR);
    // The operation "test" should be called
    QName op_test = new QName("http://cpsserver.pmm.ch/xsd", "test");
    // Set the parameters
    Object[] opArgs = new Object[] { "This is CBPlanner!" };
    Class[] returnTypes = new Class[] { String.class };
    // Call WebService
    Object[] response = sender.invokeBlocking(op_test, opArgs, 
returnTypes);
    // Read Return data
    if(response[0] != null) {
     String sReturn = response[0].toString();
     if(!sReturn.startsWith("CPS-Error:")) {
      JOptionPane.showMessageDialog(oParentDialog, "Successfully 
connected to CPSServer!\n\n" + sReturn, "Success", 
JOptionPane.INFORMATION_MESSAGE);
     } else {
       JOptionPane.showMessageDialog(oParentDialog, "Error connecting 
to CPSServer!\n\n" + sReturn, "Error", JOptionPane.ERROR_MESSAGE);
     }
    }
} catch(AxisFault e) {
    JOptionPane.showMessageDialog(oParentDialog, "Error connecting to 
CPSServer!\n\n" +e.toString(), "Error", JOptionPane.ERROR_MESSAGE);
    System.err.println(e.getMessage());
    e.printStackTrace();
}
...
--------------------------

Thanks in advanced,
Oliver Hirschi


"keith chapman" <ke...@gmail.com> schrieb im Newsbeitrag > 
news:b72c94b30708211958s3ff93a7ar710df464fb54a28e@mail.gmail.com...
> Hi Oliver,
>
> No you don't need all 51 jars. It depends on how you wrote the client 
> (codegeratared with wsdl2java?
> databainging (ADB, xmlBeans, ... ) used if any). Also do you use 
> things such as security, RM on the client
> side?
>
> Thanks,
> Keith.
>
>
> On 8/21/07, Oliver Hirschi <o....@bluewin.ch> wrote:
> > Hi
> >
> > I developed a Axis2-Webservice and a java-client-application, using
> > this service.
> > Now my question is about the deployment - I dont like to have all 
> > 51(!)
> > single jars of the axis distributon on each of my client.
> > - Do I have to pack all 51 axis-2 libraries to the deployment of 
> > the
> > client, or which jars are needed?
> > - Or another way: Is there one packing containing all axis2-client
> > libraries, or is there a way to pack the 51 jars to one axis2.jar, 
> > so
> > there would be only one file for the clients? I tried to pack al 
> > the
> > jars to one jar with "jar cvf axis2.jar *.jar", but the classes are 
> > not
> > found.
> >
> > Great Thanks,
> > --
> > Oliver Hirschi
> > http://www.FamilyHirschi.ch
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
> -- 
> Keith Chapman
> WSO2 Inc.
> Oxygen for Web Services Developers.
> http://wso2.org/ 



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


Re: [Axis2] Wich library for axis2-client-deployment

Posted by keith chapman <ke...@gmail.com>.
Hi Oliver,

No you don't need all 51 jars. It depends on how you wrote the client
(codegeratared with wsdl2java? databainging (ADB, xmlBeans, ... ) used if
any). Also do you use things such as security, RM on the client side?

Thanks,
Keith.

On 8/21/07, Oliver Hirschi <o....@bluewin.ch> wrote:
>
> Hi
>
> I developed a Axis2-Webservice and a java-client-application, using
> this service.
> Now my question is about the deployment - I dont like to have all 51(!)
> single jars of the axis distributon on each of my client.
> - Do I have to pack all 51 axis-2 libraries to the deployment of the
> client, or which jars are needed?
> - Or another way: Is there one packing containing all axis2-client
> libraries, or is there a way to pack the 51 jars to one axis2.jar, so
> there would be only one file for the clients? I tried to pack al the
> jars to one jar with "jar cvf axis2.jar *.jar", but the classes are not
> found.
>
> Great Thanks,
> --
> Oliver Hirschi
> http://www.FamilyHirschi.ch
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


-- 
Keith Chapman
WSO2 Inc.
Oxygen for Web Services Developers.
http://wso2.org/