0

I'm using resin in one project. So far so good except for one little issue?

I created a generic method that takes any Object as the only argument but when I call the method it looks for the method name but with a different argument type, of course with the passed object type.

I'm not sure if Resin or any other Application Server can actually do this or am I making a mistaker here?

I'm developing the front end in Objective-j/Cappuccino and I'm mapping remote Java methods through CP2JavaWS.

Basically in Objective-J I declare something like this:

-(CPString) updateQuote:(id)modifiedQuote
    {}

I don't need to implement it, just declare it.

Then in my WebApp I declare and Implement the method like this:

public String updateQuote(Object modifiedQuote)
        {
      // implementation
        }

Then in the front end I call the method like this:

[DBManagerRemoteService updateQuote:aObject delegateRespHandler:@selector(success:) delegateFailHandler:@selector(failed:)];

The problem is that aObject is an instance of CYQuote class, so when I call the remote method it appears that is not looking for updateObject(java.lang.Object) and instead is looking for updateObject(com.myApp.services.CYQuote) which is not declared or implemented. Of course I could just implement a method for each class but my goal is to create a generic update method.

jigzat
  • 3,498
  • 1
  • 21
  • 23
  • You need to expand your question with more detail. Resin is an application server like Tomcat, JBoss - your problem is probably related more to Java EE. Post some code samples. – Perception Sep 16 '11 at 04:16
  • Thank you very much for your answer. I just added more info in the first post – jigzat Sep 17 '11 at 00:28
  • Well I decided to take a look at CP2JavaWS and it might have something to do with the way it makes the HTTP request. I'm not sure, this is new for me. Anyway I would like to hear your point of view. – jigzat Sep 17 '11 at 03:20

1 Answers1

0

I must answer myself and apologize for any inconvenience caused by my nonsense question. The issue had nothing to do with Resin or any Web Application Server. CP2JavaWS creates the Http Request based on the passed object so I am modifying it to accept some extra parameters.

jigzat
  • 3,498
  • 1
  • 21
  • 23