axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Thilina Gunarathne (JIRA)" <j...@apache.org>
Subject [jira] Created: (AXIS2-1202) ABD generated client cannot handle empty byteArray
Date Wed, 20 Sep 2006 13:39:22 GMT
ABD generated client cannot handle empty byteArray
--------------------------------------------------

                 Key: AXIS2-1202
                 URL: http://issues.apache.org/jira/browse/AXIS2-1202
             Project: Apache Axis 2.0 (Axis2)
          Issue Type: Bug
          Components: databinding
            Reporter: Thilina Gunarathne


Generated ADB client cannot handle empty for a base64Binary data type... This causes the OMException("Can't
find datahandler");.

IMHO throwing of OMException is also *wrong*... This gives the user a feeling that the error
is from OM...

WSDL : http://131.107.72.15/SoapWsdl_BaseDataTypes_XmlFormatter_Service_Indigo/BaseDataTypesRpcLit.svc?wsdl
                                       
Response message,

<?xml version='1.0' encoding='UTF-8'?>
   <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
      <soapenv:Header />
      <soapenv:Body>
         <RetByteArrayResponse xmlns="http://tempuri.org/">
            <RetByteArrayResult xmlns="" />
         </RetByteArrayResponse>
      </soapenv:Body>
   </soapenv:Envelope>


Bug seems to be with the following generated code in the parse method...

                                       if (reader.hasText()) {
                                            //Do the usual conversion
                                            java.lang.String content = reader.getText();
                                            object.setRetByteArrayResult(
                                                    org.apache.axis2.databinding.utils.ConverterUtil.convertToBase64Binary(content));
                                        } else
                                        if (reader.getName().equals(new javax.xml.namespace.QName(org.apache.axiom.om.impl.MTOMConstants.XOP_NAMESPACE_URI,
org.apache.axiom.om.impl.MTOMConstants.XOP_INCLUDE)))
                                        {
                                            java.lang.String id = org.apache.axiom.om.util.ElementHelper.getContentID(reader,
"UTF-8");
                                            object.setRetByteArrayResult(((org.apache.axiom.om.impl.mtom.MTOMStAXSOAPModelBuilder)
((org.apache.axiom.om.impl.llom.OMStAXWrapper) reader).getBuilder()).getDataHandler(id));
                                        } else {
                                            throw new org.apache.axiom.om.OMException("Can't
find datahandler");
                                        }

-- 
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: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Mime
View raw message