You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "Linus Kamb (JIRA)" <ax...@ws.apache.org> on 2005/07/19 23:13:49 UTC

[jira] Created: (AXIS-2129) NullPointerException sending array of org.w3c.dom.Elements

NullPointerException sending array of org.w3c.dom.Elements
----------------------------------------------------------

         Key: AXIS-2129
         URL: http://issues.apache.org/jira/browse/AXIS-2129
     Project: Apache Axis
        Type: Bug
    Versions: 1.2.1    
 Environment: Tomcat 5.0.28
Mac OSX 10.3.9
java version "1.4.2_05"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4)
Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)
    Reporter: Linus Kamb


Simple doc/lit-wrapped service that returns org.w3c.dom.Element[] per attached wsdl.

run wsdl2java to generate interface and stubs. (wsdl originally created from interface using java2wsdl)

Server side throws below exception after server method has successfully completed.

(only reporting the Caused by portion.)
Caused by: java.lang.NullPointerException
    at org.apache.axis.utils.ArrayUtil.getArrayComponentPD(ArrayUtil.java:153)
    at org.apache.axis.utils.ArrayUtil.internalIsConvertable(ArrayUtil.java:116)
    at org.apache.axis.utils.ArrayUtil.isConvertable(ArrayUtil.java:96)
    at org.apache.axis.encoding.TypeMappingImpl.getSerializer(TypeMappingImpl.java:334)
    at org.apache.axis.encoding.TypeMappingDelegate.getSerializer(TypeMappingDelegate.java:80)
    at org.apache.axis.encoding.TypeMappingDelegate.getSerializer(TypeMappingDelegate.java:83)
    at org.apache.axis.encoding.SerializationContext.getSerializer(SerializationContext.java:1507)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1390)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
    at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
    at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
    at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
    at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
    at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)


Wsdl is as follows:

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions targetNamespace="http://www.iris.edu/test"
   xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://www.iris.edu/test"
   xmlns:intf="http://www.iris.edu/test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
   xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
   xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <!--WSDL created by Apache Axis version: 1.2.1
Built on Jun 14, 2005 (09:15:57 EDT)-->
   <wsdl:types>
      <schema elementFormDefault="qualified" targetNamespace="http://www.iris.edu/test"
         xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema">
         <import namespace="http://xml.apache.org/xml-soap"/>
         <element name="getProductsById">
            <complexType>
               <sequence>
                  <element maxOccurs="unbounded" name="in0" type="xsd:string"/>
               </sequence>
            </complexType>
         </element>
         <element name="getProductsByIdResponse">
            <complexType>
               <sequence>
                  <element maxOccurs="unbounded" name="getProductsByIdReturn" type="apachesoap:Element"/>
               </sequence>
            </complexType>
         </element>
      </schema>
   </wsdl:types>
   <wsdl:message name="getProductsByIdRequest">
      <wsdl:part element="impl:getProductsById" name="parameters"/>
   </wsdl:message>
   <wsdl:message name="getProductsByIdResponse">
      <wsdl:part element="impl:getProductsByIdResponse" name="parameters"/>
   </wsdl:message>
   <wsdl:portType name="UPDS_Test">
      <wsdl:operation name="getProductsById">
         <wsdl:input message="impl:getProductsByIdRequest" name="getProductsByIdRequest"/>
         <wsdl:output message="impl:getProductsByIdResponse" name="getProductsByIdResponse"/>
      </wsdl:operation>
   </wsdl:portType>
   <wsdl:binding name="UPDS_TestServiceSoapBinding" type="impl:UPDS_Test">
      <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
      <wsdl:operation name="getProductsById">
         <wsdlsoap:operation soapAction=""/>
         <wsdl:input name="getProductsByIdRequest">
            <wsdlsoap:body use="literal"/>
         </wsdl:input>
         <wsdl:output name="getProductsByIdResponse">
            <wsdlsoap:body use="literal"/>
         </wsdl:output>
      </wsdl:operation>
   </wsdl:binding>
   <wsdl:service name="UPDS_TestService">
      <wsdl:port binding="impl:UPDS_TestServiceSoapBinding" name="UPDS_TestService">
         <wsdlsoap:address location="http://localhost:8080/axis/services/UPDS_TestService"/>
      </wsdl:port>
   </wsdl:service>
</wsdl:definitions>


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


[jira] Resolved: (AXIS-2129) NullPointerException sending array of org.w3c.dom.Elements

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://issues.apache.org/jira/browse/AXIS-2129?page=all ]
     
Davanum Srinivas resolved AXIS-2129:
------------------------------------

    Resolution: Fixed

Applied a fix for the NPE.

thanks,
dims

> NullPointerException sending array of org.w3c.dom.Elements
> ----------------------------------------------------------
>
>          Key: AXIS-2129
>          URL: http://issues.apache.org/jira/browse/AXIS-2129
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Tomcat 5.0.28
> Mac OSX 10.3.9
> java version "1.4.2_05"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_05-141.4)
> Java HotSpot(TM) Client VM (build 1.4.2-38, mixed mode)
>     Reporter: Linus Kamb

>
> Simple doc/lit-wrapped service that returns org.w3c.dom.Element[] per attached wsdl.
> run wsdl2java to generate interface and stubs. (wsdl originally created from interface using java2wsdl)
> Server side throws below exception after server method has successfully completed.
> (only reporting the Caused by portion.)
> Caused by: java.lang.NullPointerException
>     at org.apache.axis.utils.ArrayUtil.getArrayComponentPD(ArrayUtil.java:153)
>     at org.apache.axis.utils.ArrayUtil.internalIsConvertable(ArrayUtil.java:116)
>     at org.apache.axis.utils.ArrayUtil.isConvertable(ArrayUtil.java:96)
>     at org.apache.axis.encoding.TypeMappingImpl.getSerializer(TypeMappingImpl.java:334)
>     at org.apache.axis.encoding.TypeMappingDelegate.getSerializer(TypeMappingDelegate.java:80)
>     at org.apache.axis.encoding.TypeMappingDelegate.getSerializer(TypeMappingDelegate.java:83)
>     at org.apache.axis.encoding.SerializationContext.getSerializer(SerializationContext.java:1507)
>     at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1390)
>     at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:914)
>     at org.apache.axis.message.RPCParam.serialize(RPCParam.java:200)
>     at org.apache.axis.message.RPCElement.outputImpl(RPCElement.java:433)
>     at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
>     at org.apache.axis.message.SOAPBody.outputImpl(SOAPBody.java:139)
>     at org.apache.axis.message.SOAPEnvelope.outputImpl(SOAPEnvelope.java:477)
>     at org.apache.axis.message.MessageElement.output(MessageElement.java:1208)
>     at org.apache.axis.SOAPPart.writeTo(SOAPPart.java:315)
> Wsdl is as follows:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions targetNamespace="http://www.iris.edu/test"
>    xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://www.iris.edu/test"
>    xmlns:intf="http://www.iris.edu/test" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>    xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/"
>    xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>    <!--WSDL created by Apache Axis version: 1.2.1
> Built on Jun 14, 2005 (09:15:57 EDT)-->
>    <wsdl:types>
>       <schema elementFormDefault="qualified" targetNamespace="http://www.iris.edu/test"
>          xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2001/XMLSchema">
>          <import namespace="http://xml.apache.org/xml-soap"/>
>          <element name="getProductsById">
>             <complexType>
>                <sequence>
>                   <element maxOccurs="unbounded" name="in0" type="xsd:string"/>
>                </sequence>
>             </complexType>
>          </element>
>          <element name="getProductsByIdResponse">
>             <complexType>
>                <sequence>
>                   <element maxOccurs="unbounded" name="getProductsByIdReturn" type="apachesoap:Element"/>
>                </sequence>
>             </complexType>
>          </element>
>       </schema>
>    </wsdl:types>
>    <wsdl:message name="getProductsByIdRequest">
>       <wsdl:part element="impl:getProductsById" name="parameters"/>
>    </wsdl:message>
>    <wsdl:message name="getProductsByIdResponse">
>       <wsdl:part element="impl:getProductsByIdResponse" name="parameters"/>
>    </wsdl:message>
>    <wsdl:portType name="UPDS_Test">
>       <wsdl:operation name="getProductsById">
>          <wsdl:input message="impl:getProductsByIdRequest" name="getProductsByIdRequest"/>
>          <wsdl:output message="impl:getProductsByIdResponse" name="getProductsByIdResponse"/>
>       </wsdl:operation>
>    </wsdl:portType>
>    <wsdl:binding name="UPDS_TestServiceSoapBinding" type="impl:UPDS_Test">
>       <wsdlsoap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>       <wsdl:operation name="getProductsById">
>          <wsdlsoap:operation soapAction=""/>
>          <wsdl:input name="getProductsByIdRequest">
>             <wsdlsoap:body use="literal"/>
>          </wsdl:input>
>          <wsdl:output name="getProductsByIdResponse">
>             <wsdlsoap:body use="literal"/>
>          </wsdl:output>
>       </wsdl:operation>
>    </wsdl:binding>
>    <wsdl:service name="UPDS_TestService">
>       <wsdl:port binding="impl:UPDS_TestServiceSoapBinding" name="UPDS_TestService">
>          <wsdlsoap:address location="http://localhost:8080/axis/services/UPDS_TestService"/>
>       </wsdl:port>
>    </wsdl:service>
> </wsdl:definitions>

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira