Something is wrong...
my class looks like:
public class BAEditingContext extends EOEditingContext {

        public BAEditingContext(){
                super();
        }
        
        public int test(int n){
                return n;
        }
}
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);

    }
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:

- The class java.lang.Class is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. - The class com.webobjects.eocontrol.EOKeyValueUnarchiver does not contain a default constructor, which is a requirement for a bean class. The class cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. - The class java.lang.Number is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. - The class com.webobjects.foundation.NSNotification does not contain a default constructor, which is a requirement for a bean class. The class cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file. - The class java.lang.Throwable is defined in a java or javax package and cannot be converted into an xml schema type. An xml schema anyType will be used to define this class in the wsdl file.
[2007-07-02 16:39:35 CDT] <WorkerThread4> AxisFault
faultCode: {http://xml.apache.org/axis/}Server.userException
faultString: WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'http://www.w3.org/1999/XMLSchema'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.:
faultActor: null
faultDetail:
stackTrace: WSDLException: faultCode=OTHER_ERROR: Can't find prefix for 'http://www.w3.org/1999/XMLSchema'. Namespace prefixes must be set on the Definition object using the addNamespace(...) method.:
        at com.ibm.wsdl.util.xml.DOMUtils.getPrefix(Unknown Source)
        at com.ibm.wsdl.util.xml.DOMUtils.getQualifiedValue(Unknown Source)
at com.ibm.wsdl.util.xml.DOMUtils.printQualifiedAttribute(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printParts(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printMessages(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.printDefinition(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.writeWSDL(Unknown Source)
        at com.ibm.wsdl.xml.WSDLWriterImpl.getDocument(Unknown Source)
        at org.apache.axis.wsdl.fromJava.Emitter.emit(Emitter.java:236)
at org.apache.axis.providers.java.JavaProvider.generateWSDL (JavaProvider.java:418) at org.apache.axis.strategies.WSDLGenStrategy.visit (WSDLGenStrategy.java:72)
        at org.apache.axis.SimpleChain.doVisiting(SimpleChain.java:156)
        at org.apache.axis.SimpleChain.generateWSDL(SimpleChain.java:143)
at org.apache.axis.handlers.soap.SOAPService.generateWSDL (SOAPService.java:355)
        at org.apache.axis.server.AxisServer.generateWSDL(AxisServer.java:490)
at com.webobjects.appserver._private.WOWebService.performActionNamed (WOWebService.java:341) at com.webobjects.appserver._private.WOActionRequestHandler._handleRequest( WOActionRequestHandler.java:240) at com.webobjects.appserver._private.WOActionRequestHandler.handleRequest (WOActionRequestHandler.java:142) at com.webobjects.appserver._private.WOWebServiceRequestHandler.handleReque st(WOWebServiceRequestHandler.java:88) at com.webobjects.appserver.WOApplication.dispatchRequest (WOApplication.java:1306) at com.webobjects.appserver._private.WOWorkerThread.runOnce (WOWorkerThread.java:173) at com.webobjects.appserver._private.WOWorkerThread.run (WOWorkerThread.java:254)
        at java.lang.Thread.run(Thread.java:613)

...

what did I missed?

Please help!!
Dino


On Jul 2, 2007, at 4:09 PM, Kieran Kelleher wrote:

Call super with matching args in your constructors when subclassing anything. For example:


public class MyEditingContext extends ERXEC {
        
    public MyEditingContext(EOObjectStore anObjectStore) {
        super(anObjectStore);
    }

    public MyEditingContext() {
                super();
    }


/** Clears the undo stack to workaround an EOF bug (courtesy of SelfCleaningEditingContext in Practical WebObjects book. */
    public void saveChanges()
    {
        super.saveChanges();
        if ( undoManager() != null ) undoManager().removeAllActions();
    }


........... blah, blah, your methods and overrides here ..................


}


On Jul 2, 2007, at 4:52 PM, Ricardo Strausz wrote:

And how do you manage it?
simply calling to super?
can you please give me an example?

On Jul 2, 2007, at 3:33 PM, Simon McLean wrote:

We have a subclass to enable us to limit what the default editing context can and can't do and haven't had any problems.

Simon

On 2 Jul 2007, at 21:17, Ricardo Strausz wrote:

Hola!

What is the best practice to subclass the EOEditingContext (besides not subclassing at all)?

Some experience on that?

Dino


_______________________________________________
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/kieran_lists% 40mac.com

This email sent to [EMAIL PROTECTED]


 _______________________________________________
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