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)"
<[EMAIL PROTECTED]> 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:[EMAIL PROTECTED] 
> Sent: Tuesday, January 16, 2007 3:07 PM
> To: [email protected]
> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
>
--------------------------------------------------------
> 
> 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:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 



 
____________________________________________________________________________________
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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to