NullPointerException WSDL11ToAxisServiceBuilder due to empty documentation 
element
----------------------------------------------------------------------------------

                 Key: AXIS2-1669
                 URL: http://issues.apache.org/jira/browse/AXIS2-1669
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: kernel
    Affects Versions: nightly
         Environment: Windows XP, JRE 1.4
            Reporter: Brecht Yperman
            Priority: Minor


I get a NullPointerException in the WSDL11ToAxisServiceBuilder.

This is due to the fact that the documentation element is empty, firstChild is 
null.

=CODE=
// copy the documentation element content to the description Element 
documentationElement = wsdl4jDefinition.getDocumentationElement();
if (documentationElement != null) {
     Node firstChild = documentationElement.getFirstChild();
     String serviceDes;
     if (firstChild.getNodeType() == Node.TEXT_NODE) {
          serviceDes = firstChild.getNodeValue();
     } else {
          serviceDes = DOM2Writer.nodeToString(firstChild);
     }
     axisService.setServiceDescription(serviceDes);
}
=CODE=

For this wsdl-fragment

=WSDL=
<definitions xmlns:tns="http://www.vanos.be/webservices/iseries/isbeurscentrum"; 
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; 
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:import0="vanos:iseries:beurscentra" name="isbeurscentrum" 
targetNamespace="http://www.vanos.be/webservices/iseries/isbeurscentrum"; 
xmlns="http://schemas.xmlsoap.org/wsdl/";>
  <wsdl:documentation xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; />
  <types>
[...]
=WSDL=


-- 
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

        

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to