Revision history [back]

click to hide/show revision 1
initial version

Method Signature for multiple return values

For a method such as <method name="GetAllIDs">" <arg name="responseCode" type="u" direction="out"/>" <arg name="IDs" type="as" direction="out"/>" </method>"

Java interface... public interface ServiceDescriptionBusInterface { … public class GetAllIDsValues { @Position(0) public int responseCode; @Position(1) public String[] IDs; } …

@BusMethod(replySignature="ias") public GetAllIDsValues GetAllIDs() throws BusException;

… GetAllIDsValues result = new GetAllIDsValues(); result.IDs = new String[];

//this crashes... result = proxy.getInterface(ServiceDescriptionBusInterface.class).GetAllIDs();

The code above is getting “java.lang.StringIndexOutOfBoundsException: length=1; regionStart=2; regionLength=-2” at proxy.getInterface. Is my bus method signature correct?

click to hide/show revision 2
No.2 Revision

Method Signature for multiple return values

For a method such as as

<method name="GetAllIDs">"
    name='GetAllIDs'>"
     <arg name="responseCode" type="u" direction="out"/>"
    name='responseCode' type='u' direction='out'/>"
     <arg name="IDs" type="as" direction="out"/>"
 </method>"

name='IDs' type='as' direction='out'/>" </method>"

Java interface... interface...

public interface ServiceDescriptionBusInterface
{
…
 public class GetAllIDsValues {
     @Position(0) public int responseCode;
     @Position(1) public String[] IDs;
 }

@BusMethod(replySignature="ias") public GetAllIDsValues GetAllIDs() throws BusException;

BusException;

… GetAllIDsValues result = new GetAllIDsValues(); result.IDs = new String[];

String[];

//this crashes... result = proxy.getInterface(ServiceDescriptionBusInterface.class).GetAllIDs();

proxy.getInterface(ServiceDescriptionBusInterface.class).GetAllIDs();

The code above is getting “java.lang.StringIndexOutOfBoundsException: "java.lang.StringIndexOutOfBoundsException: length=1; regionStart=2; regionLength=-2” regionLength=-2” at proxy.getInterface. Is my bus method signature correct?