• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Devaka Cooray
  • Tim Cooke
Sheriffs:
  • Rob Spoor
  • Liutauras Vilda
  • paul wheaton
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
  • Piet Souris
Bartenders:
  • Stephan van Hulst

Automate WS Client Program

 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi All,

How do we automate the process of writing a web service axis client program that uses stub based approach where a web service method accepts and returns custom types. Are there any plugin for eclipse or frameworks that does that. I am using doc/lit style web service but not rpc/enc

Say below is method signature and corresponding class structures of inputs and output parameters :





Thanks & Regards,
 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
SOAP generally only supports primitive data types, string and base65 encoded binary data. I'm not sure SOAP is the best thing for transmitting custom data types (ie classes), because while you could serialize a class into a byte[] and then encode that as base64, and send that, how would a non-Java client understand the data ? I think for transmitting custom classes, you are much better off with using RMI, which will handle the serialization of a class for you ...
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am using doc/lit style web services and the custom types schemas are included int the wsdl and hence client web service soap toolkit can use such wsdl to communicate with the web service. Under these scenarios, I want to automate the web service client program that uses the stubs generated by the client soap toolkit. Hope I am clear.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
If you make the classes implement the Serializable interface, then the rest should take care of itself. There's an example of this in the Redbook Weather Service, where the user-defined datatype Weather is passed in and passed out, both in unit form and in array form. The only thing I can see enabling this is the Serializable implementation.

I know that the Redbook examples are for WebSphere, but the download does contain fully blown-out versions of their resulting services, and they're JAX-RPC (JSR 109) compliant, so they should work with the other frameworks as well.

Doug Hoople
MCSD.NET, MCDBA, MCSE, MCT, SCJP1.4
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am not looking for examples but are there any tools other than WSAD that automates the process of using custom types in WS Client Programs much like WSAD does when you run its wizards on WSDL ...
 
Doug Hoople
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kumar,

What WSAD is doing under the wizard's covers is basically running Java2WSDL. So again, define your class, have it implement Serializable (as is done in the Weather example), and then run it through Java2WSDL. You should then have a usable input to all the rest of the cycle.

Doug Hoople
MCSD.NET, MCDBA, MCSE, MCT, SCJP1.4
 
Quick! Before anybody notices! Cover it up with this tiny ad:
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic