• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Beginner Webobjects Web Service Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Beginner Webobjects Web Service Question


  • Subject: Re: Beginner Webobjects Web Service Question
  • From: Chuck Hill <email@hidden>
  • Date: Wed, 14 Sep 2005 12:44:34 -0700

Posted a short while ago, maybe this will help:

Here is a (very short) "getting started". It's probably not the best way but works surprisingly well. :)

- Create a new "Java WebObjects Application" project the way you have always done.
- Add the JavaWebServicesSupport framework.
- In a good place (Application constructor for example), add the following line:
WOWebServiceRegistrar.registerWebService(MyClass.class, true);
- Create a class: "public MyClass extends Object { }", then add methods like you normally would; you can return what you want, for example Strings, NSDictionary, NSArray as long as it is serializable.


Methods that should be visible in the WSDL have to be declared public.

To get the session in a WebServices environment, call
  WOWebServiceUtilities.currentWOContext().session();

Instruct the java compiler to generate debugging information. In makefile.preamble, add "OTHER_JAVATOOL_FLAGS=-g". If you don't do this, the WSDL will list each parameter as "in0", "in1" and so on.

To get the WSDL, call
http://localhost/cgi-bin/WebObjects/myApp.woa/ws/MyClass?wsdl

For now, we have done the clients in Flash only but writing a WOApp that consumes webservices should be easy. Have a look at all the classes that start with "WOWebService...", they are quite well
documented. Classes exist to read and decipher the WSDL from the server and call each operation a webservice provides. You can even move your client session from one service to another (Flash does this
automatically).


Basically, all you have to do is to include the framework and add a call to "WOWebServiceRegistrar", you can even use an existing class for testing.

-- Stefan Apelt



On Sep 14, 2005, at 9:41 AM, Jeffrey Pearson wrote:

I have it. Which is why I posted the question here. It only shows you how to make one using the direct 2 web services which requires the data model. Hence my posting.





-----Original Message-----
From: LD [mailto:email@hidden]
Sent: Wed 9/14/2005 12:34 AM
To: Jeffrey Pearson
Cc: email@hidden
Subject: Re: Beginner Webobjects Web Service Question

Hi there,

On 14/09/2005, at 3:49 PM, Jeffrey Pearson wrote:


Please pardon the most basic beginner question. I've been [s]
earching all day and yet to find an answer.

Coming from the .Net world to Java, I am making my foray into Web
Services. Of course being a Mac person, I would REALLY like to use
Web Objects to develop them.


1) Go to: http://developer.apple.com/webobjects/ 1) Click on: "Documentation" 2) Click on "Web Services" 3) Click on "WebObjects Web Services Programming Guide" [html | pdf]

with regards,
--

LD



_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
40global-village.net


This email sent to email@hidden



--
Practical WebObjects - a book for intermediate WebObjects developers who want to increase their overall knowledge of WebObjects, or those who are trying to solve specific application development problems.
http://www.global-village.net/products/practical_webobjects





_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
References: 
 >RE: Beginner Webobjects Web Service Question (From: "Jeffrey Pearson" <email@hidden>)

  • Prev by Date: Two level of abstract entity and deep fetch ?
  • Next by Date: RE: Beginner Webobjects Web Service Question
  • Previous by thread: RE: Beginner Webobjects Web Service Question
  • Next by thread: Re: Beginner Webobjects Web Service Question
  • Index(es):
    • Date
    • Thread