axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kent Tong (JIRA)" <>
Subject [jira] Created: (AXIS2-774) NullPointerException in XMLbeans code generation with xmime:contentType
Date Sun, 28 May 2006 06:33:30 GMT
NullPointerException in XMLbeans code generation with xmime:contentType

         Key: AXIS2-774
     Project: Apache Axis 2.0 (Axis2)
        Type: Bug

  Components: databinding  
    Versions: 1.0    
    Reporter: Kent Tong

In the org.apache.axis2.xmlbeans.CodeGenerationUtility class, the findBase64Types() method
(as shown below) contains a bug: It is calling getDocumentElementName() on the outer type
but this method works on the "document type" only, otherwise it will return null:

            if (sType.getContentType() == SchemaType.SIMPLE_CONTENT && sType.getPrimitiveType()
!= null) {
                if (Constants.BASE_64_CONTENT_QNAME.equals(sType.getPrimitiveType().getName()))
                    outerType = sType.getOuterType();
                    //check the outer type further to see whether it has the contenttype attribute
                    //XMime namespace
                    SchemaProperty[] properties = sType.getProperties();
                    for (int j = 0; j < properties.length; j++) {
                        if (Constants.XMIME_CONTENT_TYPE_QNAME.equals(properties[j].getName()))

The result is, the base64 qname list will only contain null's as its elements. This will later
cause the AxisServiceBasedMultiLanguageEmitter.getBase64Elements() to fail. The stack trace
     [java] Caused by: java.lang.NullPointerException
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.getBase64Elements(
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDOMElementforDatabinders(AxisServiceBasedMultiLanguageEmitte
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.createDocumentForMessageReceiver(AxisServiceBasedMultiLanguageEmit
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.writeMessageReceiver(
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeletonService(
     [java]     at org.apache.axis2.wsdl.codegen.emitter.AxisServiceBasedMultiLanguageEmitter.emitSkeleton(

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message