axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From footh <fo...@yahoo.com>
Subject Re: [Axis2] Simple stand-alone client to invoke web services
Date Thu, 18 Jan 2007 01:38:42 GMT
Paul, thanks for the reply.

You are correct.  I was actually missing libraries and
I mistakenly assummed it had to do with the axis
configuration files.

I was able to just instantiate a ServiceClient and
invoke a service without a problem.

Best regards,

JF

--- Paul Fremantle <pzfreo@gmail.com> wrote:

> Footh
> 
> Can you please give more details when you say the
> default constructor
> doesn't work?
> 
> ServiceClient sc = new ServiceClient();
> 
> should work fine without an external repository or
> axis2.xml. Also if
> you need modules like addressing in a simple client
> like this you can
> just put the .mar file in the classpath.
> 
> Paul
> 
> On 1/16/07, footh <footh@yahoo.com> wrote:
> > Thanks for the reply.
> >
> > I already have something very similar to that.  I
> was
> > hoping, however, to avoid having to use external
> files
> > to create the configuration.
> >
> > But, I can concede on that if it is absolutely
> > necessary.  However, do I need to use the
> axis2.xml
> > file that comes with Axis2?  It seems to have a
> bunch
> > of parameters that I am not interested in.  In
> fact,
> > I'm not even sure what parameters I need if I want
> to
> > simply invoke and request-response service over
> HTTP.
> >
> > Additionally, do I need to have the repository
> > directory?  I notice that the addressing module is
> in
> > there, but can I just stick that with the rest of
> the
> > .jar files?
> > --- "Yadav, Yogendra (IT)"
> > <Yogendra.Yadav@morganstanley.com> wrote:
> >
> > > Try this....
> > >
> > >       ConfigurationContext ctx =
> > >
> >
>
ConfigurationContextFactory.createConfigurationContextFromFileSystem("C:
> > >
> /work/AXIS2-Examples/for-client-testing/repository",
> > >
> >
>
"C:/work/AXIS2-Examples/for-client-testing/axis2.xml");
> > >       ServiceClient sc = new ServiceClient(ctx,
> > > null);
> > >       Options opt = new Options();
> > >       opt.setTo(new
> > >
> >
>
EndpointReference("http://localhost:8080/axis2/services/XSDJAXBService")
> > > );
> > >       opt.setTransportInProtocol(
> > > Constants.TRANSPORT_HTTP );
> > >       opt.setAction("ServiceMethod");
> > >       sc.engageModule( new QName(
> > > Constants.MODULE_ADDRESSING ) );
> > >       sc.setOptions(opt);
> > >
> > >       OMElement payload = getPayload();
> > >       OMElement ol = sc.sendReceive( payloadRoot
> );
> > >
> > >
> > > -----Original Message-----
> > > From: footh [mailto:footh@yahoo.com]
> > > Sent: Tuesday, January 16, 2007 3:07 PM
> > > To: axis-user@ws.apache.org
> > > Subject: [Axis2] Simple stand-alone client to
> invoke
> > > web services
> > >
> > > I have a separate java web application running
> under
> > > Tomcat 5.5 in which
> > > I want to dynamically invoke web services using
> > > Axis2.
> > >
> > > I was able to easily do this using Axis1, but I
> am
> > > running into a
> > > problem with Axis2.  I've followed the simple
> > > examples in the
> > > documentation with creating a ServiceClient
> object
> > > and then sending a
> > > payload.
> > >
> > > However, I am having trouble with the
> ServiceClient
> > > object.  I was
> > > creating it with the default constructor, but
> that
> > > doesn't work without
> > > the default axis2.xml file and repository.
> > >
> > > So, I looked into creating my own
> > > ContextConfiguration, but I can't seem to find
> any
> > > way of doing it
> > > dynamically.  Do I have to point to a separate
> file
> > > every time
> > > (axis2.xml) or can I create the configuration in
> > > code alone?  Can anyone
> > > point me to examples of how this might be done?
> > >
> > >
> > >
> > >
> >
>
________________________________________________________________________
> > > ____________
> > > Food fight? Enjoy some healthy debate
> > > in the Yahoo! Answers Food & Drink Q&A.
> > >
> >
>
http://answers.yahoo.com/dir/?link=list&sid=396545367
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > > axis-user-help@ws.apache.org
> > >
> >
>
--------------------------------------------------------
> > >
> > > NOTICE: If received in error, please destroy and
> > > notify sender. Sender does not intend to waive
> > > confidentiality or privilege. Use of this email
> is
> > > prohibited when received in error.
> > >
> > >
> >
>
---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > > axis-user-help@ws.apache.org
> > >
> > >
> >
> >
> >
> >
> >
>
____________________________________________________________________________________
> > Sucker-punch spam with award-winning protection.
> > Try the free Yahoo! Mail Beta.
> >
>
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
> >
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> axis-user-help@ws.apache.org
> >
> >
> 
> 
> -- 
> Paul Fremantle
> VP/Technology, WSO2 and OASIS WS-RX TC Co-chair
> 
> http://bloglines.com/blog/paulfremantle
> paul@wso2.com
> 
> "Oxygenating the Web Service Platform", www.wso2.com
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail:
> axis-user-help@ws.apache.org
> 
> 



 
____________________________________________________________________________________
Be a PS3 game guru.
Get your game face on with the latest PS3 news and previews at Yahoo! Games.
http://videogames.yahoo.com/platform?platform=120121

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


Mime
View raw message