You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by John Eapen <j1...@gmail.com> on 2007/03/02 00:05:37 UTC

Wrap Array and Null Pointer Exceptions :

I am using Axis 1.3 and would like to know if the issue related to
"wrapArrays" has been resolved in later versions of Axis.

Currently we see null pointer exceptions as a result of this ambiguity. In
the following example we are not using  the "undocumented option of
"wraparrays" and probably using that will help. That may mean lot of code
changes related to wrapping of arrays.

**** HAND CODED Version **********

<element name="addCredentials">
	<complexType>
		<sequence>
		  <element name="credentials" type="creds:ArrayOfCredentialInfo" />
		</sequence>
	</complexType>
</element>
	
************  Auto-Generated by AXIS ( /services/MyService?wsdl ) *********

<element name="addCredentials">
<complexType>
  <sequence>
     <element maxOccurs="unbounded" name="credentials"
type="impl:CredentialInfo"/>
  </sequence>
</complexType>


I found following information on the web.

>>I note that Axis 1.3 wsdl2java supports an undocumented option:
>>--wrapArrays.  I can see that it causes MyClass [] to be wrapped as
>>ArrayOfMyClass.

Further explaination can be found at the following url.
http://mail-archives.apache.org/mod_mbox/ws-axis-user/200511.mbox/%3C200511100358.jAA3wbZ20715@capeclear.com%3E

Any help will be greatly appreciated. If this is fixed in Axis 1.4 or Axis
2.1, then it would make sense to upgrade rather than use "wrapparrays"

Thanks
  John