Bus method signature with multiple return values (array of string) [closed]

asked 2014-05-31 15:58:04 -0700

rcorbeil gravatar image

Hi, I'm having a problem with a Java bus method reply signature array of strings...

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


public interface ServiceDescriptionBusInterface


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

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?

edit retag flag offensive reopen merge delete

Closed for the following reason duplicate question by ry.jones
close date 2015-03-02 12:36:45


I should have mentioned that I am first calling ProxyBusObject proxy = bus.getProxyBusObject(this.serviceName, Constants.BUS_OBJECT_PATH, sessionID, new Class[] { ServiceDescriptionBusInterface.class }); Any ideas? Thanks.

rcorbeil ( 2014-05-31 16:11:55 -0700 )edit

1 answer

Sort by » oldest newest most voted

answered 2014-06-04 12:50:22 -0700

mquon gravatar image

Please see https://ask.allseenalliance.org/question/549/method-signature-for-multiple-return-values/ .

Basically the Java BusMethod replySignature needs to match the AllJoyn method signature.

edit flag offensive delete publish link more

Question Tools

1 follower


Asked: 2014-05-31 15:58:04 -0700

Seen: 142 times

Last updated: Jun 04 '14