Performance problems using RPC/literal arrays in Web services
 Technote (troubleshooting)
 
Problem(Abstract)
There are inefficiencies when using RPC/literal and sending arrays of complexTypes through Web services. Consider the following example. A SOAP message has a complexType that has an array of another complexType. Specifically, the SOAP message sends a serialized "DummyDTO" which has an array of "DummyChildDTO." The WSDL file has an operation called storeDummy. The corresponding server implementation has a prototype like the following:

public void storeDummy(com.test.DummyDTO dummy) throws java.rmi.RemoteException


Also note, com.test.DummyDTO looks like the following:

public class DummyDTO implements java.io.Serializable {
private com.test.DummyChildDTO[] children;
public com.test.DummyChildDTO[] getChildren() {
return children;
}

public void setChildren(com.test.DummyChildDTO[] children) {
System.out.println("DummyDTO.setChildren called, number of children=" + children.length);
this.children = children;
}

public com.test.DummyChildDTO getChildren(int i) {
return children[i];
}

public void setChildren(int i, com.test.DummyChildDTO value) {
this.children[i] = value;
}

//Other classes not shown for brevity
}


When the storeDummy operation is called, it actually calls setChildren(com.test.DummyChildDTO[] children) several times, when it seems like it should only be called once. The number of times it is called depends on the size of the com.test.DummyChildDTO[] array. If the array size is 100, it will be called 100 times.
 
Cause
This is by design.
 
Resolving the problem
The design was changed in WebSphere Application Server V6.0 for setChildren(array) to be called once.
 
 
Cross Reference information
Segment Product Component Platform Version Edition
Application Servers WebSphere Application Server for z/OS Web Services(for example: SOAP or UDDI or WSGW/WSIF)
Application Servers Runtimes for Java Technology Java SDK
 
 


Document Information


Product categories: Software > Application Servers > Distributed Application & Web Servers > WebSphere Application Server > Web Services (for example: SOAP or UDDI or WSGW or WSIF)
Operating system(s): z/OS
Software version: 5.1
Software edition:
Reference #: 1212986
IBM Group: Software Group
Modified date: Jul 28, 2005