axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sa...@apache.org
Subject svn commit: r469113 [2/2] - in /webservices/axis2/branches/java/1_1/modules/samples/pojo: ./ src/META-INF/ src/address_book_client/ src/address_book_entry/ src/address_book_service/ src/sample/ src/sample/addressbook/ src/sample/addressbook/adbclient/ ...
Date Mon, 30 Oct 2006 10:54:01 GMT
Added: webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AdressBookServiceStub.java
URL: http://svn.apache.org/viewvc/webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AdressBookServiceStub.java?view=auto&rev=469113
==============================================================================
--- webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AdressBookServiceStub.java (added)
+++ webservices/axis2/branches/java/1_1/modules/samples/pojo/src/sample/addressbook/stub/AdressBookServiceStub.java Mon Oct 30 02:53:59 2006
@@ -0,0 +1,2478 @@
+
+        /**
+        * AdressBookServiceStub.java
+        *
+        * This file was auto-generated from WSDL
+        * by the Apache Axis2 version: #axisVersion# #today#
+        */
+        package sample.addressbook.stub;
+
+        
+
+        /*
+        *  AdressBookServiceStub java implementation
+        */
+
+        
+        public class AdressBookServiceStub extends org.apache.axis2.client.Stub
+        {
+        protected org.apache.axis2.description.AxisOperation[] _operations;
+
+        //hashmaps to keep the fault mapping
+        private java.util.HashMap faultExeptionNameMap = new java.util.HashMap();
+        private java.util.HashMap faultExeptionClassNameMap = new java.util.HashMap();
+        private java.util.HashMap faultMessageMap = new java.util.HashMap();
+
+    
+    private void populateAxisService() throws org.apache.axis2.AxisFault {
+
+     //creating the Service with a unique name
+     _service = new org.apache.axis2.description.AxisService("AdressBookService" + this.hashCode());
+     
+    
+
+        //creating the operations
+        org.apache.axis2.description.AxisOperation __operation;
+    
+
+
+        _operations = new org.apache.axis2.description.AxisOperation[2];
+        
+                   __operation = new org.apache.axis2.description.OutInAxisOperation();
+                
+
+            __operation.setName(new javax.xml.namespace.QName("", "addEntry"));
+	    _service.addOperation(__operation);
+	    
+	    
+	    
+            _operations[0]=__operation;
+            
+        
+                   __operation = new org.apache.axis2.description.OutInAxisOperation();
+                
+
+            __operation.setName(new javax.xml.namespace.QName("", "findEntry"));
+	    _service.addOperation(__operation);
+	    
+	    
+	    
+            _operations[1]=__operation;
+            
+        
+        }
+
+    //populates the faults
+    private void populateFaults(){
+         
+
+
+    }
+
+   /**
+    Constructor that takes in a configContext
+    */
+   public AdressBookServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
+        java.lang.String targetEndpoint)
+        throws org.apache.axis2.AxisFault {
+         //To populate AxisService
+         populateAxisService();
+         populateFaults();
+
+        _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);
+		_service.applyPolicy();
+	
+        configurationContext = _serviceClient.getServiceContext().getConfigurationContext();
+
+        _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(
+                targetEndpoint));
+        
+    
+    }
+
+    /**
+     * Default Constructor
+     */
+    public AdressBookServiceStub() throws org.apache.axis2.AxisFault {
+        
+                    this("http://192.168.1.65:8080/axis2/services/AdressBookService" );
+                
+    }
+
+    /**
+     * Constructor taking the target endpoint
+     */
+    public AdressBookServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
+        this(null,targetEndpoint);
+    }
+
+
+
+        
+                    /**
+                    * Auto generated method signature
+                    * @see sample.addressbook.stub.AdressBookService#addEntry
+                        * @param param4
+                    
+                    */
+                    public void addEntry(
+
+                    sample.addressbook.stub.AdressBookServiceStub.AddEntry param4)
+                    throws java.rmi.RemoteException
+                    
+                    {
+              try{
+               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
+              _operationClient.getOptions().setAction("urn:addEntry");
+              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+              
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env = null;
+                    
+                                    //Style is Doc.
+                                    
+                                                    
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    param4,
+                                                    optimizeContent(new javax.xml.namespace.QName("",
+                                                    "addEntry")));
+                                                
+        //adding SOAP headers
+         _serviceClient.addHeadersToEnvelope(env);
+        // create message context with that soap envelope
+        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+        _messageContext.setEnvelope(env);
+
+        // add the message contxt to the operation client
+        _operationClient.addMessageContext(_messageContext);
+
+        //execute the operation client
+        _operationClient.execute(true);
+
+         
+                return;
+            
+         }catch(org.apache.axis2.AxisFault f){
+            org.apache.axiom.om.OMElement faultElt = f.getDetail();
+            if (faultElt!=null){
+                if (faultExeptionNameMap.containsKey(faultElt.getQName())){
+                    //make the fault by reflection
+                    try{
+                        java.lang.String exceptionClassName = (java.lang.String)faultExeptionClassNameMap.get(faultElt.getQName());
+                        java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
+                        java.lang.Exception ex=
+                                (java.lang.Exception) exceptionClass.newInstance();
+                        //message class
+                        java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
+                        java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
+                        java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
+                        java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
+                                   new java.lang.Class[]{messageClass});
+                        m.invoke(ex,new java.lang.Object[]{messageObject});
+                        
+
+                        throw new java.rmi.RemoteException(ex.getMessage(), ex);
+                    }catch(java.lang.ClassCastException e){
+                       // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.ClassNotFoundException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }catch (java.lang.NoSuchMethodException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.reflect.InvocationTargetException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }  catch (java.lang.IllegalAccessException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }   catch (java.lang.InstantiationException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }
+                }else{
+                    throw f;
+                }
+            }else{
+                throw f;
+            }
+        }
+        }
+            
+                /**
+                * Auto generated method signature for Asynchronous Invocations
+                * @see sample.addressbook.stub.AdressBookService#startaddEntry
+                    * @param param4
+                
+                */
+                public  void startaddEntry(
+
+                 sample.addressbook.stub.AdressBookServiceStub.AddEntry param4,
+
+                  final sample.addressbook.stub.AdressBookServiceCallbackHandler callback)
+
+                throws java.rmi.RemoteException{
+
+              org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
+             _operationClient.getOptions().setAction("urn:addEntry");
+             _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+          
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env=null;
+                    
+                                    //Style is Doc.
+                                    
+                                                    
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    param4,
+                                                    optimizeContent(new javax.xml.namespace.QName("",
+                                                    "addEntry")));
+                                                
+        //adding SOAP headers
+         _serviceClient.addHeadersToEnvelope(env);
+        // create message context with that soap envelope
+        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+        _messageContext.setEnvelope(env);
+
+        // add the message contxt to the operation client
+        _operationClient.addMessageContext(_messageContext);
+
+
+                    
+                            //Nothing to pass as the callback!!!
+                        
+
+          org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
+        if ( _operations[0].getMessageReceiver()==null &&  _operationClient.getOptions().isUseSeparateListener()) {
+           _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
+          _operations[0].setMessageReceiver(
+                    _callbackReceiver);
+        }
+
+           //execute the operation client
+           _operationClient.execute(false);
+
+                    }
+                
+                    /**
+                    * Auto generated method signature
+                    * @see sample.addressbook.stub.AdressBookService#findEntry
+                        * @param param6
+                    
+                    */
+                    public sample.addressbook.stub.AdressBookServiceStub.FindEntryResponse findEntry(
+
+                    sample.addressbook.stub.AdressBookServiceStub.FindEntry param6)
+                    throws java.rmi.RemoteException
+                    
+                    {
+              try{
+               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
+              _operationClient.getOptions().setAction("urn:findEntry");
+              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+              
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env = null;
+                    
+                                    //Style is Doc.
+                                    
+                                                    
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    param6,
+                                                    optimizeContent(new javax.xml.namespace.QName("",
+                                                    "findEntry")));
+                                                
+        //adding SOAP headers
+         _serviceClient.addHeadersToEnvelope(env);
+        // create message context with that soap envelope
+        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+        _messageContext.setEnvelope(env);
+
+        // add the message contxt to the operation client
+        _operationClient.addMessageContext(_messageContext);
+
+        //execute the operation client
+        _operationClient.execute(true);
+
+         
+               org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(
+                                           org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
+                org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
+                
+                
+                           java.lang.Object object = fromOM(
+                                        _returnEnv.getBody().getFirstElement() ,
+                                        sample.addressbook.stub.AdressBookServiceStub.FindEntryResponse.class,
+                                         getEnvelopeNamespaces(_returnEnv));
+                           _messageContext.getTransportOut().getSender().cleanup(_messageContext);
+                           return (sample.addressbook.stub.AdressBookServiceStub.FindEntryResponse)object;
+                    
+         }catch(org.apache.axis2.AxisFault f){
+            org.apache.axiom.om.OMElement faultElt = f.getDetail();
+            if (faultElt!=null){
+                if (faultExeptionNameMap.containsKey(faultElt.getQName())){
+                    //make the fault by reflection
+                    try{
+                        java.lang.String exceptionClassName = (java.lang.String)faultExeptionClassNameMap.get(faultElt.getQName());
+                        java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
+                        java.lang.Exception ex=
+                                (java.lang.Exception) exceptionClass.newInstance();
+                        //message class
+                        java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
+                        java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
+                        java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
+                        java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
+                                   new java.lang.Class[]{messageClass});
+                        m.invoke(ex,new java.lang.Object[]{messageObject});
+                        
+
+                        throw new java.rmi.RemoteException(ex.getMessage(), ex);
+                    }catch(java.lang.ClassCastException e){
+                       // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.ClassNotFoundException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }catch (java.lang.NoSuchMethodException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    } catch (java.lang.reflect.InvocationTargetException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }  catch (java.lang.IllegalAccessException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }   catch (java.lang.InstantiationException e) {
+                        // we cannot intantiate the class - throw the original Axis fault
+                        throw f;
+                    }
+                }else{
+                    throw f;
+                }
+            }else{
+                throw f;
+            }
+        }
+        }
+            
+                /**
+                * Auto generated method signature for Asynchronous Invocations
+                * @see sample.addressbook.stub.AdressBookService#startfindEntry
+                    * @param param6
+                
+                */
+                public  void startfindEntry(
+
+                 sample.addressbook.stub.AdressBookServiceStub.FindEntry param6,
+
+                  final sample.addressbook.stub.AdressBookServiceCallbackHandler callback)
+
+                throws java.rmi.RemoteException{
+
+              org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
+             _operationClient.getOptions().setAction("urn:findEntry");
+             _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
+
+          
+
+              // create SOAP envelope with that payload
+              org.apache.axiom.soap.SOAPEnvelope env=null;
+                    
+                                    //Style is Doc.
+                                    
+                                                    
+                                                    env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
+                                                    param6,
+                                                    optimizeContent(new javax.xml.namespace.QName("",
+                                                    "findEntry")));
+                                                
+        //adding SOAP headers
+         _serviceClient.addHeadersToEnvelope(env);
+        // create message context with that soap envelope
+        org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext() ;
+        _messageContext.setEnvelope(env);
+
+        // add the message contxt to the operation client
+        _operationClient.addMessageContext(_messageContext);
+
+
+                    
+                           _operationClient.setCallback(new org.apache.axis2.client.async.Callback() {
+                    public void onComplete(
+                            org.apache.axis2.client.async.AsyncResult result) {
+                        java.lang.Object object = fromOM(result.getResponseEnvelope().getBody().getFirstElement(),
+                               sample.addressbook.stub.AdressBookServiceStub.FindEntryResponse.class,
+                               getEnvelopeNamespaces(result.getResponseEnvelope())
+                            );
+                        callback.receiveResultfindEntry((sample.addressbook.stub.AdressBookServiceStub.FindEntryResponse) object);
+                    }
+
+                    public void onError(java.lang.Exception e) {
+                        callback.receiveErrorfindEntry(e);
+                    }
+                });
+                        
+
+          org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
+        if ( _operations[1].getMessageReceiver()==null &&  _operationClient.getOptions().isUseSeparateListener()) {
+           _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
+          _operations[1].setMessageReceiver(
+                    _callbackReceiver);
+        }
+
+           //execute the operation client
+           _operationClient.execute(false);
+
+                    }
+                
+
+       /**
+        *  A utility method that copies the namepaces from the SOAPEnvelope
+        */
+       private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
+        java.util.Map returnMap = new java.util.HashMap();
+        java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
+        while (namespaceIterator.hasNext()) {
+            org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
+            returnMap.put(ns.getPrefix(),ns.getNamespaceURI());
+        }
+       return returnMap;
+    }
+
+    
+    
+    private javax.xml.namespace.QName[] opNameArray = null;
+    private boolean optimizeContent(javax.xml.namespace.QName opName) {
+        
+
+        if (opNameArray == null) {
+            return false;
+        }
+        for (int i = 0; i < opNameArray.length; i++) {
+            if (opName.equals(opNameArray[i])) {
+                return true;   
+            }
+        }
+        return false;
+    }
+     //http://192.168.1.65:8080/axis2/services/AdressBookService
+        public static class ExtensionMapper{
+
+          public static java.lang.Object getTypeObject(java.lang.String namespaceURI,
+                                                       java.lang.String typeName,
+                                                       javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+
+              
+                  if (
+                  "http://address_book_entry/xsd".equals(namespaceURI) &&
+                  "Entry".equals(typeName)){
+                   
+                            return  Entry.Factory.parse(reader);
+                        
+
+                  }
+
+              
+             throw new java.lang.RuntimeException("Unsupported type " + namespaceURI + " " + typeName);
+          }
+
+        }
+    
+        public static class Entry0
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+                "http://address_book_entry/xsd",
+                "Entry",
+                "ns1");
+
+            
+
+                        /**
+                        * field for Entry
+                        */
+
+                        protected Entry localEntry ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return Entry
+                           */
+                           public  Entry getEntry(){
+                               return localEntry;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Entry
+                               */
+                               public void setEntry(Entry param){
+                            
+                                    this.localEntry=param;
+                            
+
+                               }
+                            
+
+     
+     
+     /**
+     *
+     * @param parentQName
+     * @param factory
+     * @return org.apache.axiom.om.OMElement
+     */
+    public org.apache.axiom.om.OMElement getOMElement(
+            final javax.xml.namespace.QName parentQName,
+            final org.apache.axiom.om.OMFactory factory){
+
+
+        org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
+
+         public void serialize(
+                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            
+                
+                //We can safely assume an element has only one type associated with it
+                
+                                 if (localEntry==null){
+                                   throw new RuntimeException("Property cannot be null!");
+                                 }
+                                 localEntry.getOMElement(
+                                         MY_QNAME,
+                                         factory).serialize(xmlWriter);
+                            
+
+        }
+
+         /**
+          * Util method to write an attribute with the ns prefix
+          */
+          private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+              if (xmlWriter.getPrefix(namespace) == null) {
+                       xmlWriter.writeNamespace(prefix, namespace);
+                       xmlWriter.setPrefix(prefix, namespace);
+
+              }
+
+              xmlWriter.writeAttribute(namespace,attName,attValue);
+
+         }
+
+         /**
+          * Util method to write an attribute without the ns prefix
+          */
+          private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+    	  	  if (namespace.equals(""))
+        	  {
+        		  xmlWriter.writeAttribute(attName,attValue);
+        	  }
+        	  else
+        	  {
+                  registerPrefix(xmlWriter, namespace);
+                  xmlWriter.writeAttribute(namespace,attName,attValue);
+              }
+          }
+
+         /**
+         * Register a namespace prefix
+         */
+         private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+                java.lang.String prefix = xmlWriter.getPrefix(namespace);
+
+                if (prefix == null) {
+                    prefix = createPrefix();
+
+                    while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+                        prefix = createPrefix();
+                    }
+
+                    xmlWriter.writeNamespace(prefix, namespace);
+                    xmlWriter.setPrefix(prefix, namespace);
+                }
+
+                return prefix;
+            }
+
+         /**
+          * Create a prefix
+          */
+          private java.lang.String createPrefix() {
+                return "ns" + (int)Math.random();
+          }
+        };
+
+        
+               return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
+               MY_QNAME,factory,dataSource);
+            
+    }
+
+  
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                
+                //We can safely assume an element has only one type associated with it
+                return localEntry.getPullParser(MY_QNAME);
+
+        }
+
+  
+
+     /**
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+
+
+        /**
+        * static method to create the object
+        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
+        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
+        * Postcondition: If this object is an element, the reader is positioned at its end element
+        *                If this object is a complex type, the reader is positioned at the end element of its outer element
+        */
+        public static Entry0 parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            Entry0 object = new Entry0();
+            int event;
+            try {
+                
+                while (!reader.isStartElement() && !reader.isEndElement())
+                    reader.next();
+
+                
+
+                
+                // Note all attributes that were handled. Used to differ normal attributes
+                // from anyAttributes.
+                java.util.Vector handledAttributes = new java.util.Vector();
+                
+
+                boolean isReaderMTOMAware = false;
+                
+                try{
+                  isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
+                }catch(java.lang.IllegalArgumentException e){
+                  isReaderMTOMAware = false;
+                }
+
+
+                   
+                while(!reader.isEndElement()) {
+                    if (reader.isStartElement() ){
+                
+                                    if (reader.isStartElement() && new javax.xml.namespace.QName("http://address_book_entry/xsd","Entry").equals(reader.getName())){
+                                
+                                        object.setEntry(Entry.Factory.parse(reader));
+                                    
+                              }  // End of if for expected property start element
+                            
+                             else{
+                                        // A start element we are not expecting indicates an invalid parameter was passed
+                                        throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                             }
+                          
+                             } else reader.next();  
+                            }  // end of while loop
+                        
+
+
+            } catch (javax.xml.stream.XMLStreamException e) {
+                throw new java.lang.Exception(e);
+            }
+
+            return object;
+        }
+
+        }//end of factory class
+
+        
+
+        }
+           
+          
+        public static class FindEntry
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+                "http://address_book_service/xsd",
+                "findEntry",
+                "ns2");
+
+            
+
+                        /**
+                        * field for Name
+                        */
+
+                        protected java.lang.String localName ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getName(){
+                               return localName;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Name
+                               */
+                               public void setName(java.lang.String param){
+                            
+                                    this.localName=param;
+                            
+
+                               }
+                            
+
+     
+     
+     /**
+     *
+     * @param parentQName
+     * @param factory
+     * @return org.apache.axiom.om.OMElement
+     */
+    public org.apache.axiom.om.OMElement getOMElement(
+            final javax.xml.namespace.QName parentQName,
+            final org.apache.axiom.om.OMFactory factory){
+
+
+        org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
+
+         public void serialize(
+                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            
+                
+
+                java.lang.String prefix = parentQName.getPrefix();
+                java.lang.String namespace = parentQName.getNamespaceURI();
+
+                if (namespace != null) {
+                    java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+                    if (writerPrefix != null) {
+                        xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+                    } else {
+                        if (prefix == null) {
+                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+                        }
+
+                        xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+                        xmlWriter.writeNamespace(prefix, namespace);
+                        xmlWriter.setPrefix(prefix, namespace);
+                    }
+                } else {
+                    xmlWriter.writeStartElement(parentQName.getLocalPart());
+                }
+
+                
+               
+                                    namespace = "http://address_book_service/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"name", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"name");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("name");
+                                    }
+                                
+
+                                          if (localName==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                   
+               xmlWriter.writeEndElement();
+            
+            
+
+        }
+
+         /**
+          * Util method to write an attribute with the ns prefix
+          */
+          private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+              if (xmlWriter.getPrefix(namespace) == null) {
+                       xmlWriter.writeNamespace(prefix, namespace);
+                       xmlWriter.setPrefix(prefix, namespace);
+
+              }
+
+              xmlWriter.writeAttribute(namespace,attName,attValue);
+
+         }
+
+         /**
+          * Util method to write an attribute without the ns prefix
+          */
+          private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+    	  	  if (namespace.equals(""))
+        	  {
+        		  xmlWriter.writeAttribute(attName,attValue);
+        	  }
+        	  else
+        	  {
+                  registerPrefix(xmlWriter, namespace);
+                  xmlWriter.writeAttribute(namespace,attName,attValue);
+              }
+          }
+
+         /**
+         * Register a namespace prefix
+         */
+         private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+                java.lang.String prefix = xmlWriter.getPrefix(namespace);
+
+                if (prefix == null) {
+                    prefix = createPrefix();
+
+                    while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+                        prefix = createPrefix();
+                    }
+
+                    xmlWriter.writeNamespace(prefix, namespace);
+                    xmlWriter.setPrefix(prefix, namespace);
+                }
+
+                return prefix;
+            }
+
+         /**
+          * Create a prefix
+          */
+          private java.lang.String createPrefix() {
+                return "ns" + (int)Math.random();
+          }
+        };
+
+        
+               return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
+               MY_QNAME,factory,dataSource);
+            
+    }
+
+  
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                
+                             elementList.add(new javax.xml.namespace.QName("http://address_book_service/xsd",
+                                                                      "name"));
+                            
+                                         elementList.add(localName==null?null:
+                                         org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));
+                                    
+
+                return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
+            
+            
+
+        }
+
+  
+
+     /**
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+
+
+        /**
+        * static method to create the object
+        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
+        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
+        * Postcondition: If this object is an element, the reader is positioned at its end element
+        *                If this object is a complex type, the reader is positioned at the end element of its outer element
+        */
+        public static FindEntry parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            FindEntry object = new FindEntry();
+            int event;
+            try {
+                
+                while (!reader.isStartElement() && !reader.isEndElement())
+                    reader.next();
+
+                
+                if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
+                  java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
+                        "type");
+                  if (fullTypeName!=null){
+                    java.lang.String nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
+                    nsPrefix = nsPrefix==null?"":nsPrefix;
+
+                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
+                    if (!"findEntry".equals(type)){
+                        //find namespace for the prefix
+                        java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+                        return (FindEntry)ExtensionMapper.getTypeObject(
+                             nsUri,type,reader);
+                      }
+
+                  }
+
+                }
+                
+
+                
+                // Note all attributes that were handled. Used to differ normal attributes
+                // from anyAttributes.
+                java.util.Vector handledAttributes = new java.util.Vector();
+                
+
+                boolean isReaderMTOMAware = false;
+                
+                try{
+                  isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
+                }catch(java.lang.IllegalArgumentException e){
+                  isReaderMTOMAware = false;
+                }
+
+
+                
+                    
+                    reader.next();
+                
+                                    
+                                    while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
+                                
+                                    if (reader.isStartElement() && new javax.xml.namespace.QName("http://address_book_service/xsd","name").equals(reader.getName())){
+                                
+                                       if (!"true".equals(reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"))){
+                                    
+                                    java.lang.String content = reader.getElementText();
+                                    
+                                              object.setName(
+                                        org.apache.axis2.databinding.utils.ConverterUtil.convertToString(content));
+                                            
+                                       } else {
+                                           reader.getElementText(); // throw away text nodes if any.
+                                       }
+                                      
+                                        reader.next();
+                                    
+                              }  // End of if for expected property start element
+                            
+                                else{
+                                    // A start element we are not expecting indicates an invalid parameter was passed
+                                    throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                                }
+                              
+                            while (!reader.isStartElement() && !reader.isEndElement())
+                                reader.next();
+                            if (reader.isStartElement())
+                                // A start element we are not expecting indicates a trailing invalid property
+                                throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                        
+
+
+            } catch (javax.xml.stream.XMLStreamException e) {
+                throw new java.lang.Exception(e);
+            }
+
+            return object;
+        }
+
+        }//end of factory class
+
+        
+
+        }
+           
+          
+        public static class AddEntry
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+                "http://address_book_service/xsd",
+                "addEntry",
+                "ns2");
+
+            
+
+                        /**
+                        * field for Entry
+                        */
+
+                        protected Entry localEntry ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return Entry
+                           */
+                           public  Entry getEntry(){
+                               return localEntry;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Entry
+                               */
+                               public void setEntry(Entry param){
+                            
+                                    this.localEntry=param;
+                            
+
+                               }
+                            
+
+     
+     
+     /**
+     *
+     * @param parentQName
+     * @param factory
+     * @return org.apache.axiom.om.OMElement
+     */
+    public org.apache.axiom.om.OMElement getOMElement(
+            final javax.xml.namespace.QName parentQName,
+            final org.apache.axiom.om.OMFactory factory){
+
+
+        org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
+
+         public void serialize(
+                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            
+                
+
+                java.lang.String prefix = parentQName.getPrefix();
+                java.lang.String namespace = parentQName.getNamespaceURI();
+
+                if (namespace != null) {
+                    java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+                    if (writerPrefix != null) {
+                        xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+                    } else {
+                        if (prefix == null) {
+                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+                        }
+
+                        xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+                        xmlWriter.writeNamespace(prefix, namespace);
+                        xmlWriter.setPrefix(prefix, namespace);
+                    }
+                } else {
+                    xmlWriter.writeStartElement(parentQName.getLocalPart());
+                }
+
+                
+               
+                                    if (localEntry==null){
+
+                                            java.lang.String namespace2 = "http://address_book_service/xsd";
+
+                                        if (! namespace2.equals("")) {
+                                            java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
+
+                                            if (prefix2 == null) {
+                                                prefix2 = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                                xmlWriter.writeStartElement(prefix2,"entry", namespace2);
+                                                xmlWriter.writeNamespace(prefix2, namespace2);
+                                                xmlWriter.setPrefix(prefix2, namespace2);
+
+                                            } else {
+                                                xmlWriter.writeStartElement(namespace2,"entry");
+                                            }
+
+                                        } else {
+                                            xmlWriter.writeStartElement("entry");
+                                        }
+
+
+                                       // write the nil attribute
+                                      writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                      xmlWriter.writeEndElement();
+                                    }else{
+                                     localEntry.getOMElement(
+                                       new javax.xml.namespace.QName("http://address_book_service/xsd","entry"),
+                                        factory).serialize(xmlWriter);
+                                    }
+                                
+                   
+               xmlWriter.writeEndElement();
+            
+            
+
+        }
+
+         /**
+          * Util method to write an attribute with the ns prefix
+          */
+          private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+              if (xmlWriter.getPrefix(namespace) == null) {
+                       xmlWriter.writeNamespace(prefix, namespace);
+                       xmlWriter.setPrefix(prefix, namespace);
+
+              }
+
+              xmlWriter.writeAttribute(namespace,attName,attValue);
+
+         }
+
+         /**
+          * Util method to write an attribute without the ns prefix
+          */
+          private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+    	  	  if (namespace.equals(""))
+        	  {
+        		  xmlWriter.writeAttribute(attName,attValue);
+        	  }
+        	  else
+        	  {
+                  registerPrefix(xmlWriter, namespace);
+                  xmlWriter.writeAttribute(namespace,attName,attValue);
+              }
+          }
+
+         /**
+         * Register a namespace prefix
+         */
+         private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+                java.lang.String prefix = xmlWriter.getPrefix(namespace);
+
+                if (prefix == null) {
+                    prefix = createPrefix();
+
+                    while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+                        prefix = createPrefix();
+                    }
+
+                    xmlWriter.writeNamespace(prefix, namespace);
+                    xmlWriter.setPrefix(prefix, namespace);
+                }
+
+                return prefix;
+            }
+
+         /**
+          * Create a prefix
+          */
+          private java.lang.String createPrefix() {
+                return "ns" + (int)Math.random();
+          }
+        };
+
+        
+               return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
+               MY_QNAME,factory,dataSource);
+            
+    }
+
+  
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                
+                            elementList.add(new javax.xml.namespace.QName("http://address_book_service/xsd",
+                                                                      "entry"));
+                            
+                            
+                                    elementList.add(localEntry==null?null:
+                                    localEntry);
+                                
+
+                return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
+            
+            
+
+        }
+
+  
+
+     /**
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+
+
+        /**
+        * static method to create the object
+        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
+        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
+        * Postcondition: If this object is an element, the reader is positioned at its end element
+        *                If this object is a complex type, the reader is positioned at the end element of its outer element
+        */
+        public static AddEntry parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            AddEntry object = new AddEntry();
+            int event;
+            try {
+                
+                while (!reader.isStartElement() && !reader.isEndElement())
+                    reader.next();
+
+                
+                if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
+                  java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
+                        "type");
+                  if (fullTypeName!=null){
+                    java.lang.String nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
+                    nsPrefix = nsPrefix==null?"":nsPrefix;
+
+                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
+                    if (!"addEntry".equals(type)){
+                        //find namespace for the prefix
+                        java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+                        return (AddEntry)ExtensionMapper.getTypeObject(
+                             nsUri,type,reader);
+                      }
+
+                  }
+
+                }
+                
+
+                
+                // Note all attributes that were handled. Used to differ normal attributes
+                // from anyAttributes.
+                java.util.Vector handledAttributes = new java.util.Vector();
+                
+
+                boolean isReaderMTOMAware = false;
+                
+                try{
+                  isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
+                }catch(java.lang.IllegalArgumentException e){
+                  isReaderMTOMAware = false;
+                }
+
+
+                
+                    
+                    reader.next();
+                
+                                    
+                                    while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
+                                
+                                    if (reader.isStartElement() && new javax.xml.namespace.QName("http://address_book_service/xsd","entry").equals(reader.getName())){
+                                
+                                      if ("true".equals(reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"))){
+                                          object.setEntry(null);
+                                          reader.next();
+                                            
+                                            reader.next();
+                                          
+                                      }else{
+                                    
+                                        object.setEntry(Entry.Factory.parse(reader));
+                                      
+                                        reader.next();
+                                    }
+                              }  // End of if for expected property start element
+                            
+                                else{
+                                    // A start element we are not expecting indicates an invalid parameter was passed
+                                    throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                                }
+                              
+                            while (!reader.isStartElement() && !reader.isEndElement())
+                                reader.next();
+                            if (reader.isStartElement())
+                                // A start element we are not expecting indicates a trailing invalid property
+                                throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                        
+
+
+            } catch (javax.xml.stream.XMLStreamException e) {
+                throw new java.lang.Exception(e);
+            }
+
+            return object;
+        }
+
+        }//end of factory class
+
+        
+
+        }
+           
+          
+        public static class FindEntryResponse
+        implements org.apache.axis2.databinding.ADBBean{
+        
+                public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
+                "http://address_book_service/xsd",
+                "findEntryResponse",
+                "ns2");
+
+            
+
+                        /**
+                        * field for _return
+                        */
+
+                        protected Entry local_return ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return Entry
+                           */
+                           public  Entry get_return(){
+                               return local_return;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param _return
+                               */
+                               public void set_return(Entry param){
+                            
+                                    this.local_return=param;
+                            
+
+                               }
+                            
+
+     
+     
+     /**
+     *
+     * @param parentQName
+     * @param factory
+     * @return org.apache.axiom.om.OMElement
+     */
+    public org.apache.axiom.om.OMElement getOMElement(
+            final javax.xml.namespace.QName parentQName,
+            final org.apache.axiom.om.OMFactory factory){
+
+
+        org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
+
+         public void serialize(
+                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            
+                
+
+                java.lang.String prefix = parentQName.getPrefix();
+                java.lang.String namespace = parentQName.getNamespaceURI();
+
+                if (namespace != null) {
+                    java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+                    if (writerPrefix != null) {
+                        xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+                    } else {
+                        if (prefix == null) {
+                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+                        }
+
+                        xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+                        xmlWriter.writeNamespace(prefix, namespace);
+                        xmlWriter.setPrefix(prefix, namespace);
+                    }
+                } else {
+                    xmlWriter.writeStartElement(parentQName.getLocalPart());
+                }
+
+                
+               
+                                    if (local_return==null){
+
+                                            java.lang.String namespace2 = "http://address_book_service/xsd";
+
+                                        if (! namespace2.equals("")) {
+                                            java.lang.String prefix2 = xmlWriter.getPrefix(namespace2);
+
+                                            if (prefix2 == null) {
+                                                prefix2 = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                                xmlWriter.writeStartElement(prefix2,"return", namespace2);
+                                                xmlWriter.writeNamespace(prefix2, namespace2);
+                                                xmlWriter.setPrefix(prefix2, namespace2);
+
+                                            } else {
+                                                xmlWriter.writeStartElement(namespace2,"return");
+                                            }
+
+                                        } else {
+                                            xmlWriter.writeStartElement("return");
+                                        }
+
+
+                                       // write the nil attribute
+                                      writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                      xmlWriter.writeEndElement();
+                                    }else{
+                                     local_return.getOMElement(
+                                       new javax.xml.namespace.QName("http://address_book_service/xsd","return"),
+                                        factory).serialize(xmlWriter);
+                                    }
+                                
+                   
+               xmlWriter.writeEndElement();
+            
+            
+
+        }
+
+         /**
+          * Util method to write an attribute with the ns prefix
+          */
+          private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+              if (xmlWriter.getPrefix(namespace) == null) {
+                       xmlWriter.writeNamespace(prefix, namespace);
+                       xmlWriter.setPrefix(prefix, namespace);
+
+              }
+
+              xmlWriter.writeAttribute(namespace,attName,attValue);
+
+         }
+
+         /**
+          * Util method to write an attribute without the ns prefix
+          */
+          private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+    	  	  if (namespace.equals(""))
+        	  {
+        		  xmlWriter.writeAttribute(attName,attValue);
+        	  }
+        	  else
+        	  {
+                  registerPrefix(xmlWriter, namespace);
+                  xmlWriter.writeAttribute(namespace,attName,attValue);
+              }
+          }
+
+         /**
+         * Register a namespace prefix
+         */
+         private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+                java.lang.String prefix = xmlWriter.getPrefix(namespace);
+
+                if (prefix == null) {
+                    prefix = createPrefix();
+
+                    while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
+                        prefix = createPrefix();
+                    }
+
+                    xmlWriter.writeNamespace(prefix, namespace);
+                    xmlWriter.setPrefix(prefix, namespace);
+                }
+
+                return prefix;
+            }
+
+         /**
+          * Create a prefix
+          */
+          private java.lang.String createPrefix() {
+                return "ns" + (int)Math.random();
+          }
+        };
+
+        
+               return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
+               MY_QNAME,factory,dataSource);
+            
+    }
+
+  
+        /**
+        * databinding method to get an XML representation of this object
+        *
+        */
+        public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName){
+
+
+        
+                 java.util.ArrayList elementList = new java.util.ArrayList();
+                 java.util.ArrayList attribList = new java.util.ArrayList();
+
+                
+                            elementList.add(new javax.xml.namespace.QName("http://address_book_service/xsd",
+                                                                      "return"));
+                            
+                            
+                                    elementList.add(local_return==null?null:
+                                    local_return);
+                                
+
+                return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
+            
+            
+
+        }
+
+  
+
+     /**
+      *  Factory class that keeps the parse method
+      */
+    public static class Factory{
+
+
+        /**
+        * static method to create the object
+        * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
+        *                If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
+        * Postcondition: If this object is an element, the reader is positioned at its end element
+        *                If this object is a complex type, the reader is positioned at the end element of its outer element
+        */
+        public static FindEntryResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
+            FindEntryResponse object = new FindEntryResponse();
+            int event;
+            try {
+                
+                while (!reader.isStartElement() && !reader.isEndElement())
+                    reader.next();
+
+                
+                if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
+                  java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
+                        "type");
+                  if (fullTypeName!=null){
+                    java.lang.String nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
+                    nsPrefix = nsPrefix==null?"":nsPrefix;
+
+                    java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
+                    if (!"findEntryResponse".equals(type)){
+                        //find namespace for the prefix
+                        java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
+                        return (FindEntryResponse)ExtensionMapper.getTypeObject(
+                             nsUri,type,reader);
+                      }
+
+                  }
+
+                }
+                
+
+                
+                // Note all attributes that were handled. Used to differ normal attributes
+                // from anyAttributes.
+                java.util.Vector handledAttributes = new java.util.Vector();
+                
+
+                boolean isReaderMTOMAware = false;
+                
+                try{
+                  isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
+                }catch(java.lang.IllegalArgumentException e){
+                  isReaderMTOMAware = false;
+                }
+
+
+                
+                    
+                    reader.next();
+                
+                                    
+                                    while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
+                                
+                                    if (reader.isStartElement() && new javax.xml.namespace.QName("http://address_book_service/xsd","return").equals(reader.getName())){
+                                
+                                      if ("true".equals(reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","nil"))){
+                                          object.set_return(null);
+                                          reader.next();
+                                            
+                                            reader.next();
+                                          
+                                      }else{
+                                    
+                                        object.set_return(Entry.Factory.parse(reader));
+                                      
+                                        reader.next();
+                                    }
+                              }  // End of if for expected property start element
+                            
+                                else{
+                                    // A start element we are not expecting indicates an invalid parameter was passed
+                                    throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                                }
+                              
+                            while (!reader.isStartElement() && !reader.isEndElement())
+                                reader.next();
+                            if (reader.isStartElement())
+                                // A start element we are not expecting indicates a trailing invalid property
+                                throw new java.lang.RuntimeException("Unexpected subelement " + reader.getLocalName());
+                        
+
+
+            } catch (javax.xml.stream.XMLStreamException e) {
+                throw new java.lang.Exception(e);
+            }
+
+            return object;
+        }
+
+        }//end of factory class
+
+        
+
+        }
+           
+          
+        public static class Entry
+        implements org.apache.axis2.databinding.ADBBean{
+        /* This type was generated from the piece of schema that had
+                name = Entry
+                Namespace URI = http://address_book_entry/xsd
+                Namespace Prefix = ns1
+                */
+            
+
+                        /**
+                        * field for City
+                        */
+
+                        protected java.lang.String localCity ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getCity(){
+                               return localCity;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param City
+                               */
+                               public void setCity(java.lang.String param){
+                            
+                                    this.localCity=param;
+                            
+
+                               }
+                            
+
+                        /**
+                        * field for Name
+                        */
+
+                        protected java.lang.String localName ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getName(){
+                               return localName;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Name
+                               */
+                               public void setName(java.lang.String param){
+                            
+                                    this.localName=param;
+                            
+
+                               }
+                            
+
+                        /**
+                        * field for PostalCode
+                        */
+
+                        protected java.lang.String localPostalCode ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getPostalCode(){
+                               return localPostalCode;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param PostalCode
+                               */
+                               public void setPostalCode(java.lang.String param){
+                            
+                                    this.localPostalCode=param;
+                            
+
+                               }
+                            
+
+                        /**
+                        * field for State
+                        */
+
+                        protected java.lang.String localState ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getState(){
+                               return localState;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param State
+                               */
+                               public void setState(java.lang.String param){
+                            
+                                    this.localState=param;
+                            
+
+                               }
+                            
+
+                        /**
+                        * field for Street
+                        */
+
+                        protected java.lang.String localStreet ;
+                        
+
+                           /**
+                           * Auto generated getter method
+                           * @return java.lang.String
+                           */
+                           public  java.lang.String getStreet(){
+                               return localStreet;
+                           }
+
+                           
+                        
+                            /**
+                               * Auto generated setter method
+                               * @param param Street
+                               */
+                               public void setStreet(java.lang.String param){
+                            
+                                    this.localStreet=param;
+                            
+
+                               }
+                            
+
+     
+     
+     /**
+     *
+     * @param parentQName
+     * @param factory
+     * @return org.apache.axiom.om.OMElement
+     */
+    public org.apache.axiom.om.OMElement getOMElement(
+            final javax.xml.namespace.QName parentQName,
+            final org.apache.axiom.om.OMFactory factory){
+
+
+        org.apache.axiom.om.OMDataSource dataSource =
+                       new org.apache.axis2.databinding.ADBDataSource(this,parentQName){
+
+         public void serialize(
+                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
+            
+                
+
+                java.lang.String prefix = parentQName.getPrefix();
+                java.lang.String namespace = parentQName.getNamespaceURI();
+
+                if (namespace != null) {
+                    java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
+                    if (writerPrefix != null) {
+                        xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
+                    } else {
+                        if (prefix == null) {
+                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+                        }
+
+                        xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
+                        xmlWriter.writeNamespace(prefix, namespace);
+                        xmlWriter.setPrefix(prefix, namespace);
+                    }
+                } else {
+                    xmlWriter.writeStartElement(parentQName.getLocalPart());
+                }
+
+                
+               
+                                    namespace = "http://address_book_entry/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"city", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"city");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("city");
+                                    }
+                                
+
+                                          if (localCity==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localCity));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                                    namespace = "http://address_book_entry/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"name", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"name");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("name");
+                                    }
+                                
+
+                                          if (localName==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localName));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                                    namespace = "http://address_book_entry/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"postalCode", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"postalCode");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("postalCode");
+                                    }
+                                
+
+                                          if (localPostalCode==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localPostalCode));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                                    namespace = "http://address_book_entry/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"state", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"state");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("state");
+                                    }
+                                
+
+                                          if (localState==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localState));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                                    namespace = "http://address_book_entry/xsd";
+                                    if (! namespace.equals("")) {
+                                        prefix = xmlWriter.getPrefix(namespace);
+
+                                        if (prefix == null) {
+                                            prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
+
+                                            xmlWriter.writeStartElement(prefix,"street", namespace);
+                                            xmlWriter.writeNamespace(prefix, namespace);
+                                            xmlWriter.setPrefix(prefix, namespace);
+
+                                        } else {
+                                            xmlWriter.writeStartElement(namespace,"street");
+                                        }
+
+                                    } else {
+                                        xmlWriter.writeStartElement("street");
+                                    }
+                                
+
+                                          if (localStreet==null){
+                                              // write the nil attribute
+                                              
+                                                     writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","nil","true",xmlWriter);
+                                                  
+                                          }else{
+
+                                        
+                                                   xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(localStreet));
+                                            
+                                          }
+                                    
+                                   xmlWriter.writeEndElement();
+                             
+                   
+               xmlWriter.writeEndElement();
+            
+            
+
+        }
+
+         /**
+          * Util method to write an attribute with the ns prefix
+          */
+          private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+              if (xmlWriter.getPrefix(namespace) == null) {
+                       xmlWriter.writeNamespace(prefix, namespace);
+                       xmlWriter.setPrefix(prefix, namespace);
+
+              }
+
+              xmlWriter.writeAttribute(namespace,attName,attValue);
+
+         }
+
+         /**
+          * Util method to write an attribute without the ns prefix
+          */
+          private void writeAttribute(java.lang.String namespace,java.lang.String attName,
+                                      java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
+    	  	  if (namespace.equals(""))
+        	  {
+        		  xmlWriter.writeAttribute(attName,attValue);
+        	  }
+        	  else
+        	  {
+                  registerPrefix(xmlWriter, namespace);
+                  xmlWriter.writeAttribute(namespace,attName,attValue);
+              }
+          }
+
+         /**
+         * Register a namespace prefix
+         */
+         private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
+                java.lang.String prefix = xmlWriter.getPrefix(namespace);
+

[... 389 lines stripped ...]


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


Mime
View raw message