Nice, thanks Ed!  I'd absolutely agree, assuming you have WSDL, this is
the way to go.

Can it generate anything if it doesn't have WSDL though?  I have
experiences where the services I needed to consume didn't supply any, for
various reasons, but maybe it can still generate some generic stub code??

-- 
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Fri, July 15, 2005 11:41 am, Ed Griebel said:
> FYI, I've used Axis to generate client java stubs by parsing the
> service's WSDL file. It will generate the stub classes to call the WS
> and the POJOs to communicate with the WS.
>
> You don't actually need to "install" the Axis package and there's no
> daemon to run to do this, you'll just need to extract the distribution
> and then run wsdl2java, which is well-documented on the Axis homepage.
> It's a good idea to generate the "unit test" class too as it's a good
> example of how to call the stubs.
>
> I'm pretty sure that this will be a lot quicker than rolling your own
> XML serialization and HTTP code.
>
> -ed
>
> On 7/15/05, Frank W. Zammetti <[EMAIL PROTECTED]> wrote:
>> Hi Richard,
>>
>> Axis is the server-side of the WS equation (although maybe it can
>> perform some client duties, I'm not certain), so more than likely it
>> wouldn't come into play anyway.
>>
>> The simple answer is yes, a simple Java app can access a web service.
>>
>> There are classes that will specifically help you do so, but you can
>> also "fake it", at least if it is a SOAP-based service (I'm not as
>> familiar with RCP-type services).  For SOAP-based services, all you
>> really need to do is construct an XML message and use the usual HTTP
>> methods in the standard JDK to send it.
>>
>> You might be interested to look at my StrutsWS project because there is
>> exactly what your asking for included: a simple Java app that accesses
>> the services the example project provides (in short, StrutsWS is an
>> extension to Struts that allows Actions to be exposed as services).  You
>> can find it at http://sourceforge.net/projects/strutsws/
>>
>> Frank
>>
>> Richard Reyes wrote:
>> > Hi Guys,
>> >
>> > Can a simple java app access a web service? Or do I need to install
>> axis?
>> >
>> > Thanks
>> > Richard
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: [EMAIL PROTECTED]
>> > For additional commands, e-mail: [EMAIL PROTECTED]
>> >
>> >
>> >
>> >
>> > .
>> >
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>>
>> ---------------------------------------------------------------------
>> 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]
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to