The problem is resolved in a strange manner. It was not an issue with soap request or wsdl.
Consider the 2 code snippets attached (earlier and now). Earlier, there was Vector which is now replaced by String[]. Reason being interoperability issues with webservice's .NET client. Earlier, the J2EE app was deployed in weblogic 8.1, and now it has to be in websphere 7.0.
Now, the problem occured due to the method getXyz(int i). Somehow the websphere runtime got confused because method name "getXyz" indicates that it is getter for property "xyz". But, since "xyz" is not of array type, the parameter (int i) caused confusion. There was no compile time issue, but there was NullPointerException at runtime during SOAP request deserialization. After commenting this method, the exception stopped occuring.
1:
2:
3:
4:
5:
6:
7:
8:
9:
10:
11:
12:
13:
14:
15:
16:
17:
18:
19:
20:
21:
|
//earlier
public class MyBean implements Serializable {
private Vector xyzCollection;
private String xyz;
public String getXyz() {...}
public void setXyz(String xyz) {...}
public Vector getXyzCollection() {...}
public void setXyzCollection(Vector xyzCollection) {...}
public String getXyz(int i) { return xyzCollection.get(i); }
}
//now
public class MyBean implements Serializable {
private String[] xyzCollection;
private String xyz;
public String getXyz() {...}
public void setXyz(String xyz) {...}
public String[] getXyzCollection() {...}
public void setXyzCollection(String[] xyzCollection) {...}
public String getXyz(int i) { return xyzCollection[i]; }
}
|