axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alan Moore <amo...@ciphergen.com>
Subject RE: returning arrays of beans
Date Wed, 17 Jul 2002 18:52:58 GMT
We have an axis service that returns arrays of beans that include null array
element values and it does work.

FYI: This may not be related to your problem but our axis client is setting
the org.apache.axis.AxisEngine.PROP_DOMULTIREFS property to false like so:

stub._setProperty( org.apache.axis.AxisEngine.PROP_DOMULTIREFS,
Boolean.FALSE );

but the server does not set any such property in the .wsdd

We did this in the client to solve the following exception on the server:

Caused by: java.lang.NullPointerException
        at
org.xml.sax.helpers.AttributesImpl.getValue(AttributesImpl.java:286)
        at org.apache.axis.Constants.getValue(Constants.java:156)
        at
org.apache.axis.encoding.DeserializationContextImpl.getTypeFromAttributes(De
serializationContextImpl.java:341)
        at
org.apache.axis.message.RPCHandler.onStartChild(RPCHandler.java:157)
        at
org.apache.axis.encoding.DeserializationContextImpl.startElement(Deserializa
tionContextImpl.java:859)
        at
org.apache.axis.message.SAX2EventRecorder.replay(SAX2EventRecorder.java:199)
        at
org.apache.axis.message.MessageElement.publishToHandler(MessageElement.java:
637)
        at
org.apache.axis.message.RPCElement.deserialize(RPCElement.java:200)
        at org.apache.axis.message.RPCElement.getParams(RPCElement.java:258)
        at
org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:1
61)
        at
org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:285)
        ... 37 more

and the corresponding one on the client:

- Mapping Exception to AxisFault
java.lang.NullPointerException
        at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:13
5)
        at
org.apache.axis.encoding.DeserializationContextImpl.endElement(Deserializati
onContextImpl.java:906)
        at
org.apache.xerces.parsers.AbstractSAXParser.endElement(AbstractSAXParser.jav
a:559)
        at
org.apache.xerces.impl.XMLNamespaceBinder.handleEndElement(XMLNamespaceBinde
r.java:853)
        at
org.apache.xerces.impl.XMLNamespaceBinder.endElement(XMLNamespaceBinder.java
:643)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.handleEndElement(XMLDTDValidator.
java:2978)
        at
org.apache.xerces.impl.dtd.XMLDTDValidator.endElement(XMLDTDValidator.java:9
18)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.handleEndElement(XMLDo
cumentFragmentScannerImpl.java:1145)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanEndElement(XMLDocu
mentFragmentScannerImpl.java:988)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatc
her.dispatch(XMLDocumentFragmentScannerImpl.java:1446)
        at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocume
ntFragmentScannerImpl.java:333)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:529)
        at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserCo
nfiguration.java:585)
        at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
        at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:114
8)
        at javax.xml.parsers.SAXParser.parse(SAXParser.java:345)
        at
org.apache.axis.encoding.DeserializationContextImpl.parse(DeserializationCon
textImpl.java:216)
        at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:455)
        at org.apache.axis.Message.getSOAPEnvelope(Message.java:321)
        at org.apache.axis.client.Call.invokeEngine(Call.java:1962)
        at org.apache.axis.client.Call.invoke(Call.java:1932)
        at org.apache.axis.client.Call.invoke(Call.java:1705)
        at org.apache.axis.client.Call.invoke(Call.java:1633)
        at org.apache.axis.client.Call.invoke(Call.java:1180)

Again, this may not be related to your question and this problem may be
fixed in beta3 (TBD.)

Good luck!

alan

> -----Original Message-----
> From: James Black [mailto:jblack@ieee.org]
> Sent: Wednesday, July 17, 2002 8:37 AM
> To: axis-user@xml.apache.org
> Subject: Re: returning arrays of beans
> 
> 
> Heitzso wrote:
> 
> > just confirming that bean with attribute of array of beans
> > can be handled correctly by axis, though will be serialized/de.
> > via multiref unless that is toggled false.  Some attributes
> > of my beans have been null and that's worked, but I've never
> > had null bean array elements.
> 
>   I use java2wsdl to create the appropriate files for my web 
> services.  For
> some reason I haven't been able to get it to return an array 
> of beans, or even
> an array of ints, but I can convert everything into an XML 
> string and it
> works.
>   I have some attributes that I set to null, and that may 
> have been part of
> the problem, so I will be testing it out today.
> 

Mime
View raw message