Hi Lon,

On Nov 16, 2010, at 4:50 PM, Lon Varscsak wrote:

> I've never worked with SOAP before, definitely with XML and REST apis.  Is 
> there a good example of how to generate a SOAP request and process the 
> results.  


If you're doing SOAP and WO, you might be tempted to use Axis since that is 
what WOWebServices is based on. If you are using Java 6, I would recommend the 
built in JAX-WS stuff.  Even if you are still on Java 5, the jars are available 
separately.  If you haven't used SOAP before, the process is fairly 
straightforward.  You start with the wsdl and the 'wsimport' command on the 
command line.  wsimport is a code generator.  It will parse the WSDL and the 
XSD schema files and produce java code you use to interact with the web service.

Once you've generated your code, you find your service class(es) and use them 
to produce your portType interface(s).  (the service class will subclass 
javax.xml.ws.Service).  The port type will provide the methods you use to 
execute the service.  The input/output classes are also generated for you, so 
the whole time, you're just working with POJOs. A very brief example:

http://www.javadb.com/create-a-web-service-client-with-jax-ws

Some of the nicer features of JAX-WS: It uses all the nice Java 5 stuff like 
generics and typesafe enums when it generates, which is something you don't get 
with old Axis web service code generation. If you don't want to handle 
threading, you can have it generate callbacks. You can also specify bindings 
and provide data converters so your service code uses the classes you want (ex. 
use NSTimestamps instead of java.util.Date).  You may find you *have* to use 
the bindings if you have badly named enums though, since the wsimport tool 
seems to just pretend they don't exist if it can't name them (^_^)


> Do WO and/or WOnder have any magic for this?


I don't think Wonder does any SOAP, just REST.  For WOWebServices stuff, you 
can find documentation on it here:

http://developer.apple.com/legacy/mac/library/#documentation/WebObjects/Web_Services/Index.html

It is next to useless for consuming web services though, so it's probably not 
what you need.

Ramsey

> Any help in pointing me in the right direction would be of great help.
> 
> Thanks,
> 
> Lon


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      (Webobjects-dev@lists.apple.com)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to