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 protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to