You are viewing a plain text version of this content. The canonical link for it is here.
Posted to wsif-user@ws.apache.org by Matthew Bateman <mb...@knowmadic.com> on 2003/03/21 20:09:48 UTC

primitive arrays with the java provider

I'm trying to use the WSIF java provider to call a java class that takes
an array of ints (int[]).  However, I can't figure out how to specify
that its an array of ints.  The docs on the provider page say it has to
be a primitive or a fully qualified java class.  So how is an array
specified?  I have the xsd:schema element defining the array (it was
generated by Axis).  I tried using elementName and typeName in the
binding, neither worked.

 

I tried using "int" as the formatType.  This is the error I get:

 

org.apache.wsif.WSIFException:
org.apache.wsif.providers.java.WSIFOperation_Java@4634b9 : Could not
invoke 'addArray'; nested exception is: 

            org.apache.wsif.WSIFException: No method named 'addArray'
found that match the parts specified

 

It seems obvious because I assume WSIF is looking for addArray(int
args), when its addArray(int[] args).

 

I tried using "int[]" as the formatType.  This is the error I get:

 

The meta information is not consistent.; nested exception is: 

            org.apache.wsif.WSIFException: Could not instantiate class
'int[]'; nested exception is: 

            java.lang.ClassNotFoundException: int[]

org.apache.wsif.WSIFException: Could not instantiate class 'int[]';
nested exception is: 

            java.lang.ClassNotFoundException: int[]

java.lang.ClassNotFoundException: int[]

            at java.lang.Class.forName0(Native Method)

            at java.lang.Class.forName(Class.java:190)

            at
org.apache.wsif.providers.java.WSIFOperation_Java.getClassForName(Unknow
n Source)

            at
org.apache.wsif.providers.java.WSIFOperation_Java.getMethodArgumentClass
es(Unknown Source)

            at
org.apache.wsif.providers.java.WSIFOperation_Java.getConstructors(Unknow
n Source)

            at
org.apache.wsif.providers.java.WSIFOperation_Java.&lt;init&gt;(Unknown
Source)

            at
org.apache.wsif.providers.java.WSIFPort_Java.getDynamicWSIFOperation(Unk
nown Source)

            at
org.apache.wsif.providers.java.WSIFPort_Java.createOperation(Unknown
Source)

Which again seems obvious.

 

So how do I specifiy an array of ints?  (Or any array for that matter, I
assume I would have the same problem with an array of String or
something.)

 

Thanks in advance.