Re: NULL Pointer exception in BeanDeserializer

2005-04-13 Thread Ramesh Vijayaraghavan
Thanks Peter, Line 282 falls somewhere in the comments section in the 
source. Can somebody provide some information if this issue will be fixed in 
the stable release. Any workarounds are welcome.

Thanks,
   // Register value target
   if (propDesc.isWriteable()) {
   // If this is an indexed property, and the deserializer we found
   // was NOT the ArrayDeserializer, this is a non-SOAP array:
   // bean
   //   fieldvalue1/field
   //   fieldvalue2/field
   // ...
Line 282   // In this case, we want to use the collectionIndex and 
make sure
   // the deserialized value for the child element goes into the
   // right place in the collection.
   if (propDesc.isIndexed()  (
   !(dSer instanceof ArrayDeserializer) ||
   propDesc.getType().isArray())) {
   collectionIndex++;
   dSer.registerValueTarget(new BeanPropertyTarget(value,
   propDesc, 
collectionIndex));
   } else {
   // If we're here, the element maps to a single field value,
   // whether that be a basic type or an array, so use the
   // normal (non-indexed) BeanPropertyTarget form.
   collectionIndex = -1;
   dSer.registerValueTarget(new BeanPropertyTarget(value,
   propDesc));
   }
   }

   // Let the framework know that we need this deserializer to complete
   // for the bean to complete.
   addChildDeserializer(dSer);



Re: NULL Pointer exception in BeanDeserializer

2005-04-13 Thread Ramesh Vijayaraghavan
Also, please note that his looks like an array within an array, Array of 
variables enclosing an Array of anytype. Is this WSDL definition corrrect?
Thanks,




RE: NULL Pointer exception in BeanDeserializer

2005-04-13 Thread Simon Fell
That would refer to a local definition of a type called anyType, it
probably should be referencing the XML schema type anyType, e.g.

s:complexType name=ArrayOfAnyType
  s:sequence
 s:element minOccurs=0 maxOccurs=unbounded name=item
type=s:anyType nillable=true /
  /s:sequence
/s:complexType 

Cheers
Simon

 -Original Message-
 From: Anne Thomas Manes [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, April 13, 2005 5:11 PM
 To: axis-user@ws.apache.org
 Subject: Re: NULL Pointer exception in BeanDeserializer
 
 I'm a little leary of this definition in the schema:
 
 s:complexType name=ArrayOfAnyType
   s:sequence
 s:element minOccurs=0 maxOccurs=unbounded name=anyType
  nillable=true /
   /s:sequence
 /s:complexType
 
 This defines an *element* named anyType (rather than a 
 *type* named anyType), which I suspect could cause a lot of 
 confusion.
 
 I would suggest changing it to 
 
 s:complexType name=ArrayOfAnyType
   s:sequence
  s:element minOccurs=0 maxOccurs=unbounded 
 name=item type=anyType 
  nillable=true /
   /s:sequence
 /s:complexType
 
 Anne
 
 On 4/13/05, Ramesh Vijayaraghavan [EMAIL PROTECTED] wrote:
  
  Also, please note that his looks like an array within an 
 array, Array 
  of variables enclosing an Array of anytype. Is this WSDL 
 definition corrrect?
  Thanks,
  
 
 
 


Re: NULL Pointer exception in BeanDeserializer

2005-04-12 Thread Peter Smith
A bug detection tool I ran recently identified a possible null pointer 
dereference in this very method. (line numbers don't match exactly but I 
was using 1.2beta3 source code).

The problem detected by the tool related to an unguarded dereference of 
the 'dSer' local var:

   dSer.registerValueTarget(new BeanPropertyTarget(value,
   propDesc, collectionIndex))
Unfortunately, I am not at all familiar with the Axis code, nor how your 
scenario has caused this problem, but at least now that there is 
apparently a *real* user problem I hope my earlier bug report may be 
taken a bit more seriously ;-)

See http://issues.apache.org/jira/browse/AXIS-1924
Peter
Ramesh Vijayaraghavan wrote:

I am getting this exception when use an apache axis java client to 
consume a .NET webservice.
. The version of axis is 1.2RC3. Can somebody point out what the 
problem is
I am passing an input parameter with a forward slash like 
COMPANYNAME/USERNAME.
This is when I see this exception.

C:\downloads\test_ult_wrappedjava TestClient
- Unable to find required classes (javax.activation.DataHandler and 
javax.mail.i
nternet.MimeMultipart). Attachment support is disabled.
- Exception:
java.lang.NullPointerException
  at 
org.apache.axis.encoding.ser.BeanDeserializer.onStartChild(BeanDeseri
alizer.java:282)
  at 
org.apache.axis.encoding.DeserializationContext.startElement(Deserial
izationContext.java:1035)
  at 
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.ja
va:165)
  at 
org.apache.axis.message.MessageElement.publishToHandler(MessageElemen
t.java:1140)
  at 
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:238)
  at 
org.apache.axis.message.RPCElement.getParams(RPCElement.java:386)
  at org.apache.axis.client.Call.invoke(Call.java:2437)
  at org.apache.axis.client.Call.invoke(Call.java:2336)
  at org.apache.axis.client.Call.invoke(Call.java:1793)

This is an email from Fujitsu Australia Software Technology Pty Ltd, ABN 27 
003 693 481. It is confidential to the ordinary user of the email address to 
which it was addressed and may contain copyright and/or legally privileged 
information. No one else may read, print, store, copy or forward all or any of 
it or its attachments. If you receive this email in error, please return to 
sender. Thank you.
If you do not wish to receive commercial email messages from Fujitsu Australia 
Software Technology Pty Ltd, please email [EMAIL PROTECTED]