axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Weck, Andreas" <Andreas.W...@LDI.RLP.DE>
Subject after code generation -> local cannot resolved
Date Tue, 18 Mar 2008 10:19:39 GMT
Hallo,
 
after i generated java code with the Axis2 Code Generator Wizard i got
two classes ending with _type0 and _type1 who needs a variable named
"local". "local" will be used in the methods getPullParser() and
serialize(), but i seems that it is never decleared, so that i got the
error "local cannot resolved".

Has anybody a solution or a hint?

Regards,
Andreas



------------------------------------------------------------------------
------------ 
/**
  * databinding method to get an XML representation of this object
  *
  */
public javax.xml.stream.XMLStreamReader
getPullParser(javax.xml.namespace.QName qName)
                throws org.apache.axis2.databinding.ADBException{

    //We can safely assume an element has only one type associated with
it
    return new
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(MY_QNAM
E,
    new java.lang.Object[]{
 
org.apache.axis2.databinding.utils.reader.ADBXMLStreamReader.ELEMENT_TEX
T,
 
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(local)
    },null);
}


public void serialize(final javax.xml.namespace.QName parentQName,final
org.apache.axiom.om.OMFactory factory,
 
org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter
xmlWriter)
            throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException{
            
                
  //We can safely assume an element has only one type associated with it
  java.lang.String namespace = "";
  java.lang.String localName = "";
                        
  if (! namespace.equals("")) {
    java.lang.String prefix = xmlWriter.getPrefix(namespace);
 
    if (prefix == null) {
      prefix = generatePrefix(namespace);

      xmlWriter.writeStartElement(prefix, localName, namespace);
      xmlWriter.writeNamespace(prefix, namespace);
      xmlWriter.setPrefix(prefix, namespace);

      } else {
        xmlWriter.writeStartElement(namespace, localName);
      }

   } else {
     xmlWriter.writeStartElement(localName);
   }
                            
   if (local==null){
      throw new org.apache.axis2.databinding.ADBException("Value cannot
be null !!");
   }else{
 
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUt
il.convertToString(local));
   }
                                    
    xmlWriter.writeEndElement();
}

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Mime
View raw message