You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Richard Reyes <ri...@gmail.com> on 2005/07/15 05:33:10 UTC

[OT] Can a simple java app access web services

Hi Guys,

Can a simple java app access a web service? Or do I need to install axis?

Thanks
Richard

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


Re: [OT] Can a simple java app access web services

Posted by Martin Gainty <mg...@hotmail.com>.
Good Morning Richard
you can create the wsdl from the attributes/methods of your java class using 
java2wsdl utility from Apache Axis Project
http://ws.apache.org/axis/java/architecture-guide.html
But I must caution the team that is implementing the SOAP mechanism to agree 
upon known providers e.g XML-RPC/CORBA for this discussion take a look at
http://docs.pushtotest.com/axisdocs/apiDocs/org/apache/axis/deployment/wsdd/providers/package-summary.html
HTH,
Martin-
----- Original Message ----- 
From: "Richard Reyes" <ri...@gmail.com>
To: "Struts Users Mailing List" <us...@struts.apache.org>
Cc: "Ed Griebel" <ed...@gmail.com>
Sent: Saturday, July 16, 2005 9:02 AM
Subject: Re: [OT] Can a simple java app access web services


Thanks to all.

On 7/16/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> On Fri, July 15, 2005 12:41 pm, Ed Griebel said:
> > Frank-
> >
> > It's an interesting idea, I don't know, I've been "lucky" enough that
> > I've had WSDL to work with. It might be possible to use the same
> > methods that wsdl2java uses, but there's probably a lot of complexity
> > in there because SOAP can be quite complex.
>
> Ironically, my experience has been just the opposite... most of the
> services I've dealt with have been for internal use only, and I guess
> we're a bit behind in getting WSDL for it all.  Not so bad when it's
> internal-only stuff, a much bigger problem when dealing with external
> services.
>
> > Apologies for making this even more OT, but it's Friday :-)
>
> Nah, I referenced my StrutsWS project once (twice now!), so it's not
> especially off-topic :)  Certainly less so than some of the more recent
> threads around here!
>
> > -ed
>
> Frank
>
> >
> > On 7/15/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> >> 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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
> >> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > .
> >> >> >
> >> >>
> >> >> --
> >> >> Frank W. Zammetti
> >> >> Founder and Chief Software Architect
> >> >> Omnytex Technologies
> >> >> http://www.omnytex.com
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: user-help@struts.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >
> >> >
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>

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


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


Re: [OT] Can a simple java app access web services

Posted by Richard Reyes <ri...@gmail.com>.
Thanks to all.

On 7/16/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> On Fri, July 15, 2005 12:41 pm, Ed Griebel said:
> > Frank-
> >
> > It's an interesting idea, I don't know, I've been "lucky" enough that
> > I've had WSDL to work with. It might be possible to use the same
> > methods that wsdl2java uses, but there's probably a lot of complexity
> > in there because SOAP can be quite complex.
> 
> Ironically, my experience has been just the opposite... most of the
> services I've dealt with have been for internal use only, and I guess
> we're a bit behind in getting WSDL for it all.  Not so bad when it's
> internal-only stuff, a much bigger problem when dealing with external
> services.
> 
> > Apologies for making this even more OT, but it's Friday :-)
> 
> Nah, I referenced my StrutsWS project once (twice now!), so it's not
> especially off-topic :)  Certainly less so than some of the more recent
> threads around here!
> 
> > -ed
> 
> Frank
> 
> >
> > On 7/15/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> >> 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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
> >> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >> >
> >> >> >
> >> >> >
> >> >> >
> >> >> > .
> >> >> >
> >> >>
> >> >> --
> >> >> Frank W. Zammetti
> >> >> Founder and Chief Software Architect
> >> >> Omnytex Technologies
> >> >> http://www.omnytex.com
> >> >>
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> >> For additional commands, e-mail: user-help@struts.apache.org
> >> >>
> >> >>
> >> >
> >> > ---------------------------------------------------------------------
> >> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >
> >> >
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: [OT] Can a simple java app access web services

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
On Fri, July 15, 2005 12:41 pm, Ed Griebel said:
> Frank-
>
> It's an interesting idea, I don't know, I've been "lucky" enough that
> I've had WSDL to work with. It might be possible to use the same
> methods that wsdl2java uses, but there's probably a lot of complexity
> in there because SOAP can be quite complex.

Ironically, my experience has been just the opposite... most of the
services I've dealt with have been for internal use only, and I guess
we're a bit behind in getting WSDL for it all.  Not so bad when it's
internal-only stuff, a much bigger problem when dealing with external
services.

> Apologies for making this even more OT, but it's Friday :-)

Nah, I referenced my StrutsWS project once (twice now!), so it's not
especially off-topic :)  Certainly less so than some of the more recent
threads around here!

> -ed

Frank

>
> On 7/15/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
>> 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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
>> >> > For additional commands, e-mail: user-help@struts.apache.org
>> >> >
>> >> >
>> >> >
>> >> >
>> >> > .
>> >> >
>> >>
>> >> --
>> >> Frank W. Zammetti
>> >> Founder and Chief Software Architect
>> >> Omnytex Technologies
>> >> http://www.omnytex.com
>> >>
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> >> For additional commands, e-mail: user-help@struts.apache.org
>> >>
>> >>
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: [OT] Can a simple java app access web services

Posted by Ed Griebel <ed...@gmail.com>.
Frank-

It's an interesting idea, I don't know, I've been "lucky" enough that
I've had WSDL to work with. It might be possible to use the same
methods that wsdl2java uses, but there's probably a lot of complexity
in there because SOAP can be quite complex.

I've found that one disadvantage of the code it generates is that it
doesn't degrade gracefully when the WSDL doesn't match the actual API
or the server returns malformed XML or there's a bad type conversion.
(Actually, it throws an exception with little explanation of why it
failed, just that there was a "parse error in XML for 123.45_67" or
somesuch.) Luckily Axis includes a tool that will intercept calls to
and responses from the server to inspect what the XML looks like.

Also, it doesn't tolerate WSDL that isn't formatted properly, e.g., if
a call refers to a missing object or if an object is incompletely
specified, it stops and refuses to process any more nor generate any
code. On some (badly!) hand-generated WSDL I had to edit the source so
errors weren't fatal so I could get something generated and running.

Apologies for making this even more OT, but it's Friday :-)

-ed


On 7/15/05, Frank W. Zammetti <fz...@omnytex.com> wrote:
> 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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
> >> > For additional commands, e-mail: user-help@struts.apache.org
> >> >
> >> >
> >> >
> >> >
> >> > .
> >> >
> >>
> >> --
> >> Frank W. Zammetti
> >> Founder and Chief Software Architect
> >> Omnytex Technologies
> >> http://www.omnytex.com
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> >> For additional commands, e-mail: user-help@struts.apache.org
> >>
> >>
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> 
>

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


Re: [OT] Can a simple java app access web services

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
>> > For additional commands, e-mail: user-help@struts.apache.org
>> >
>> >
>> >
>> >
>> > .
>> >
>>
>> --
>> Frank W. Zammetti
>> Founder and Chief Software Architect
>> Omnytex Technologies
>> http://www.omnytex.com
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
>> For additional commands, e-mail: user-help@struts.apache.org
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


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


Re: [OT] Can a simple java app access web services

Posted by Ed Griebel <ed...@gmail.com>.
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 <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> > .
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: [OT] Can a simple java app access web services

Posted by Richard Reyes <ri...@gmail.com>.
Hi Frank,

Thanks for the info. I hope you wouldn't mind.. can you point me to a
tutorial of those classes that can make a simple class access a web
service?

Thanks
Richard


On 7/15/05, Frank W. Zammetti <fz...@omnytex.com> 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: user-unsubscribe@struts.apache.org
> > For additional commands, e-mail: user-help@struts.apache.org
> >
> >
> >
> >
> > .
> >
> 
> --
> Frank W. Zammetti
> Founder and Chief Software Architect
> Omnytex Technologies
> http://www.omnytex.com
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
>

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


Re: [OT] Can a simple java app access web services

Posted by "Frank W. Zammetti" <fz...@omnytex.com>.
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: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
> 
> 
> 
> 
> .
> 

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


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