Hi,
Thank you for reporting this. Actually, the problem is not in the
Input2InputTransformer. It's related to how we map a java interface to a
WSDL portType.
For a wrapper style (please see WS-JAX spec for the definition) WSDL
operation with the following input wrapper element, we don't support it yet
if the child element such as "resourcesID" with maxOccurs>1.
<xs:complexType name="editReservation">
<xs:sequence>
<xs:element name="timeSlotID" type="xs:int"/>
<xs:element name="requestedBy" type="xs:string" minOccurs="0"/>
<xs:element name="purpose" type="xs:string" minOccurs="0"/>
<xs:element name="resourcesID" type="xs:int" maxOccurs="unbounded"
minOccurs="0"/>
</xs:sequence>
</xs:complexType>
In line 382 of
org.apache.tuscany.interfacedef.wsdl.introspect.WSDLOperation.java, there is
a "TODO" :-).
Thanks,
Raymond
----- Original Message -----
From: "Paulo Henrique Trecenti" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Wednesday, May 02, 2007 7:42 AM
Subject: Throwable Input2InputTransformer.java (179)
IndexOutOfBoundsException
Hi,
I found a small bug in Input2InputTransformer.java (179)
"Object[] newArgs = new Object[source.length];
for (int i = 0; i < source.length; i++) {
Object child = mediator.mediate(source[i],
sourceType.getLogical().get(i), targetType.getLogical().get(i),
context.getMetadata());
newArgs[i] = child;
}"
When try parse a java to wsdl
My java interface method is "public TimeSlot editReservation(int
timeSlotID, String requestedBy, String purpose, int[] resourcesID);"
I have 4 input params
and my wsdl have 1 element with an type having 4 paramenters
When run this code whe have an IndexOutOfBoundsException
"Exception in thread "main" java.lang.IndexOutOfBoundsException : Index:
1,
Size: 1
at java.util.ArrayList.RangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at
org.apache.tuscany.core.databinding.transformers.Input2InputTransformer.transform
(Input2InputTransformer.java :179)
at
org.apache.tuscany.core.databinding.transformers.Input2InputTransformer.transform
(Input2InputTransformer.java:1)
at org.apache.tuscany.databinding.impl.MediatorImpl.mediate(
MediatorImpl.java:83)
at
org.apache.tuscany.core.databinding.wire.DataBindingInteceptor.transform(
DataBindingInteceptor.java:189)
at
org.apache.tuscany.core.databinding.wire.DataBindingInteceptor.invoke
(DataBindingInteceptor.java:86)
at org.apache.tuscany.spi.wire.AbstractInvocationHandler.invoke(
AbstractInvocationHandler.java:91)
at
org.apache.tuscany.implementation.java.proxy.JDKInvocationHandler.invoke(
JDKInvocationHandler.java:150)"
Not to be that I must work with OMElement in my java interface.
--
Paulo Henrique Trecenti
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]