Skip to Content
0
Jul 06, 2006 at 10:45 AM

Array node not being sent to web service

31 Views

Hi All,

I have a Web Dynpro app which is successfully calling several methods on a Session EJB using web services.

The one problem I have is calling a method which takes a String and an "array of long" as parameters. When I debug the EJB, the String parameter comes through OK, but the array comes through as length zero instead of containing elements.

I'm setting the context node up as follows:

Request_TechBusRoleViDocument_mapUserToBusinessRoles mapUserToBusinessRoles = 
        new Request_TechBusRoleViDocument_mapUserToBusinessRoles();
wdContext.nodeMapUserToBusinessRoles().bind(mapUserToBusinessRoles);

IMapBusRoleidNode rolesToAssign = wdContext.nodeMapBusRoleid();
	
IMapBusRoleidElement roleToAssign1 = 
         wdContext.nodeMapBusRoleid().createMapBusRoleidElement(new Array_long());
			
IMapBusRoleidElement roleToAssign2 = 
         wdContext.nodeMapBusRoleid().createMapBusRoleidElement(new Array_long());
			
roleToAssign1.setValue(1L);
roleToAssign2.setValue(2L);
			
wdContext.currentMapUserToBusinessRolesElement()
        .setUserId(wdContext.currentFindBusRolesForUserElement().getUserId());
wdContext.currentMapUserToBusinessRolesElement()
        .modelObject().execute();

The context structure is:

mapUserToBusinessRoles
 +-mapBusRoleid
 | +-value
 +-userId

So mapBusRoleId is an array of value (which is a long), and userId is a String.

I don't have any problems with methods which return a long[], the only problem is with this one method which is trying to send a long[] as a parameter.

Anyone have an idea why it doesn't work, or how to fix it?

Cheers,

Darren

Message was edited by: Darren Hague