• 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: Subclassing EOEditingContext
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Subclassing EOEditingContext


  • Subject: Re: Subclassing EOEditingContext
  • From: Lachlan Deck <email@hidden>
  • Date: Tue, 3 Jul 2007 10:36:10 +1000

On 03/07/2007, at 7:50 AM, Ricardo Strausz wrote:

public class BAEditingContext extends EOEditingContext {

	public BAEditingContext(){
		super();
	}

	public int test(int n){
		return n;
	}
}

Nothing wrong there. But...

and I am publishing it trough
    public Application() {
        super();
        System.out.println("Welcome to " + this.name() + "!");

/* ** Put your application initialization code here ** */

// Register Web service classes.
WOWebServiceRegistrar.registerWebService (BAEditingContext.class, true);
}

EO*/NS*, in general (except for those that have serializers/ deserializers already), are not webservice friendly. Not sure why you'd want them to be either. (As the stack trace tells you... beans need get/set methods, they need to be of a known type etc). Why do you want to expose the editing context as a webservice?


but when I try to generate stubs with

/Developer/Tools/WSMakeStubs -x ObjC -name BAEditingContext -url http://192.168.1.8:51123/cgi-bin/WebObjects/ EditingContextService.woa/ws/BAEditingContext?wsdl

I get the following error in the service-run-log:

...

what did I missed?

Seems that the stack trace told you everything. You can't do that. It's not a webservice-able class. You'll need to create some other class (that doesn't subclass a non-bean-friendly class) and expose that. For that matter, you'll only want to expose beans that can be safely reconstructed on the client end.


Methods that return Number are incompatible, for example (soap needs BigInteger for ints etc), getter's should start with 'get' etc

I create little stubs for my entities and expose these. e.g.,

public class SOAPEntityName <..> {
	public BigInteger someNumber;
	public String someName;
	public NSTimestamp created;
	<...>
	// don't bother creating methods.
	// wsdl does that for you ;-)
	// just use keyvaluecoding and you'll be right
}

with regards,
--

Lachlan Deck

_______________________________________________
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: 
 >Subclassing EOEditingContext (From: Ricardo Strausz <email@hidden>)
 >Re: Subclassing EOEditingContext (From: Simon McLean <email@hidden>)
 >Re: Subclassing EOEditingContext (From: Ricardo Strausz <email@hidden>)
 >Re: Subclassing EOEditingContext (From: Kieran Kelleher <email@hidden>)
 >Re: Subclassing EOEditingContext (From: Ricardo Strausz <email@hidden>)

  • Prev by Date: Re: WebObjects documentation site
  • Next by Date: Re: [OT] Entity Modeler: SQL Generation issue
  • Previous by thread: Re: Subclassing EOEditingContext
  • Next by thread: Re: Subclassing EOEditingContext
  • Index(es):
    • Date
    • Thread