Hello all,

I've tried to search in the archive but cant find the solution of
my problem. Actually it's very simple that I feel kind of silly to post
this thread: i need to pass integer to my method in java class in
soap's server side. 

In Apache SOAP v2.2 Documentation it's stated as follow:
To make life a little easier, a set of type mappings has been
predefined and registered into the SOAPMappingRegistry for the SOAP
encoding style. These include mappings for the following Java types:  

all Java primitive types, such as int, float, boolean, byte, etc. 
and their corresponding wrapper classes (i.e. java.lang.Integer,
java.lang.Boolean, etc.)

please correct me if i'm wrong, IMHO it means I don't have to make a
mapping?

so here's method in server side:

  public void testInteger(Integer abc) {
      System.out.println("testInteger = " + abc.intValue());
  }

and here's how SOAP client call that method:

<java_client>

call.setMethodName("testReturnInt");
call.setEncodingStyleURI(encodingStyleURI);

Vector params = new Vector();

int arg = 10;
Integer arg1 = new Integer(arg);

params.addElement(new Parameter("arg123", Integer.class,
                                arg1, null));
call.setParams(params);

// Invoke the call.
Response resp;

// other irrelevant codes

</java_client>

and here's the error
Generated fault:
  Fault Code   = SOAP-ENV:Server
  Fault String = Exception while handling service request:
  com.mycompany.MySOAPServer.testInteger(int) -- no signature match

please tell me what part that i miss.
thank you very much in advance.

-- 
Best regards,
 dion
 mailto:[EMAIL PROTECTED]

Reply via email to