Re: Web Services (Ideas Needed)
Re: Web Services (Ideas Needed)
- Subject: Re: Web Services (Ideas Needed)
- From: Goodbye Bill <email@hidden>
- Date: Fri, 11 Jul 2003 01:19:52 -0400
Chuck,
Thanks again. Now, being an official newbie, I have another question. ;-)
Mike and I have been using WebServices with .NET for years. While we do not
recommend them for common use, they are necessary from time to time. If you
wouldn't mind, I have a more rudimentary question. Maybe you, or someone
else in the forum, can let us know how we should be doing this.
The question: How would you use a WebService to select a specific object?
SCENARIO:
We have a web-based front end that must NOT use direct-to-web. The user on
the front end must be able to use a drop-down list to select a specific
object from the server.
FRONT END:
The front end consists of a single Page/WOComponent (Main.wo) and that page
has three objects on it: a WOPopupButton, a WOString, and a WOSubmitButton.
BACK END:
The back end consists of a basic OpenBase database with one table in it,
"tblMembers" and a Web Application with one EOObject, "Member".
GOAL:
Upon load, the front end must display a list of "Members," from the database
on the back end, within the WOPopupButton. When the user clicks the
WOSubmitButton, the ID number of the Member is displayed in the WOString
that is on the page.
As basic as it sounds, this crude example is all we are trying to
accomplish. In .NET, we would have created a multi-dimensional array and
bound the "DropDownList" object to the array. However, trying to use EO and
the "true object-oriented" methods that everyone is recommending is making
this simple task seem impossible.
Could you, or someone else, just give us a quick 1-2-3 as to how THEY would
accomplish such a thing?
Many Thanks,
"Bill"
On 7/10/03 12:44 PM, "Chuck Hill" <email@hidden> wrote:
> I expect your problem is one of perception. WebServices are not a WO only,
> or even Java only, technology. As such they do not return technology
> specific data types. If your service actually did return instances of
> EOEnterpriseObject, what would someone using J2EE, or .NET, or whatever do
> with them? Where is the J2EE or .NET, or PHP definition of the
> EOEnterpriseObject class? I don't know either.
>
> While far from a WebServices guru, I'm pretty sure that what gets returned
> is a dictionary, hashmap, or somesuch. You can NOT cast this to an eo
> object, nor otherwise coerce it to an eo object in any other reasonable
> way. You can probably use this directly with KVC to get at values. As
> WOBuilder will not know the key values in advance you will have to type
> them in manually. You might need to provide a wrapper method to translate
> between Object[] and NSArray for a WORepetition.
>
>
> Chuck
>
> P.S. WORepetition not WORepeater
>
>
>
> At 05:14 AM 10/07/2003 -0400, Michael Singh wrote:
>> Considering that I've been working on trying to get Web Services to
>> work for over 3 weeks now, and haven't gotten very far at all, I've
>> come to the conclusion I am doing this all wrong.
>>
>> I'm trying to stay away from Direct to Web stuff.
>>
>> I can create a simple Web Service that returns any simple data type
>> (String, int, boolean, etc. etc.) However the second I try to make a
>> Web Service return an array of Enterprise Objects I get errors.
>>
>> I've been successful in getting the Server to send back an array of
>> Enterprise Objects, and on the Client side, having the application
>> convert it back into an NSArray. However I've been unable to do
>> anything with it then.
>>
>> I am more then confident I am going down the wrong path here, so let me
>> explain what I am trying to do:
>>
>> I would like the Client to request a list of all Authors in the system.
>> The Server accepts the request, sends back the Authors, and the Client
>> then uses these Authors to populate a popup box, or a WORepeater.
>>
>> How would I go about creating this?
>>
>> Thanks in advance.
>> _______________________________________________
>> webobjects-dev mailing list | email@hidden
>> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
>> Do not post admin requests to the list. They will be ignored.
>>
>
> --
>
> Chuck Hill email@hidden
> Global Village Consulting Inc. http://www.global-village.net
> _______________________________________________
> webobjects-dev mailing list | email@hidden
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/webobjects-dev
> Do not post admin requests to the list. They will be ignored.
_______________________________________________
webobjects-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/webobjects-dev
Do not post admin requests to the list. They will be ignored.