View Javadoc

1   
2   /**
3    * ResourceMatcherServiceStub.java
4    *
5    * This file was auto-generated from WSDL
6    * by the Apache Axis2 version: 1.5.1  Built on : Oct 19, 2009 (10:59:00 EDT)
7    */
8           package de.fraunhofer.first.resmatch.client;
9   
10          
11  
12          /*
13          *  ResourceMatcherServiceStub java implementation
14          */
15  
16          
17          public class ResourceMatcherServiceStub extends org.apache.axis2.client.Stub
18          {
19          protected org.apache.axis2.description.AxisOperation[] _operations;
20  
21          //hashmaps to keep the fault mapping
22          private java.util.HashMap faultExceptionNameMap = new java.util.HashMap();
23          private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap();
24          private java.util.HashMap faultMessageMap = new java.util.HashMap();
25  
26          private static int counter = 0;
27  
28          private static synchronized java.lang.String getUniqueSuffix(){
29              // reset the counter if it is greater than 99999
30              if (counter > 99999){
31                  counter = 0;
32              }
33              counter = counter + 1; 
34              return java.lang.Long.toString(System.currentTimeMillis()) + "_" + counter;
35          }
36  
37      
38      private void populateAxisService() throws org.apache.axis2.AxisFault {
39  
40       //creating the Service with a unique name
41       _service = new org.apache.axis2.description.AxisService("ResourceMatcherService" + getUniqueSuffix());
42       addAnonymousOperations();
43  
44          //creating the operations
45          org.apache.axis2.description.AxisOperation __operation;
46  
47          _operations = new org.apache.axis2.description.AxisOperation[1];
48          
49                     __operation = new org.apache.axis2.description.OutInAxisOperation();
50                  
51  
52              __operation.setName(new javax.xml.namespace.QName("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher", "match"));
53  	    _service.addOperation(__operation);
54  	    
55  
56  	    
57  	    
58              _operations[0]=__operation;
59              
60          
61          }
62  
63      //populates the faults
64      private void populateFaults(){
65           
66  
67  
68      }
69  
70      /**
71        *Constructor that takes in a configContext
72        */
73  
74      public ResourceMatcherServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
75         java.lang.String targetEndpoint)
76         throws org.apache.axis2.AxisFault {
77           this(configurationContext,targetEndpoint,false);
78     }
79  
80  
81     /**
82       * Constructor that takes in a configContext  and useseperate listner
83       */
84     public ResourceMatcherServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext,
85          java.lang.String targetEndpoint, boolean useSeparateListener)
86          throws org.apache.axis2.AxisFault {
87           //To populate AxisService
88           populateAxisService();
89           populateFaults();
90  
91          _serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,_service);
92          
93  	
94          _serviceClient.getOptions().setTo(new org.apache.axis2.addressing.EndpointReference(
95                  targetEndpoint));
96          _serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
97          
98      
99      }
100 
101     /**
102      * Default Constructor
103      */
104     public ResourceMatcherServiceStub(org.apache.axis2.context.ConfigurationContext configurationContext) throws org.apache.axis2.AxisFault {
105         
106                     this(configurationContext,"http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher" );
107                 
108     }
109 
110     /**
111      * Default Constructor
112      */
113     public ResourceMatcherServiceStub() throws org.apache.axis2.AxisFault {
114         
115                     this("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher" );
116                 
117     }
118 
119     /**
120      * Constructor taking the target endpoint
121      */
122     public ResourceMatcherServiceStub(java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
123         this(null,targetEndpoint);
124     }
125 
126 
127 
128         
129                     /**
130                      * Auto generated method signature
131                      * 
132                      * @see de.fraunhofer.first.resmatch.client.ResourceMatcherService#match
133                      * @param match0
134                     
135                      */
136 
137                     
138 
139                             public  de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse match(
140 
141                             de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match match0)
142                         
143 
144                     throws java.rmi.RemoteException
145                     
146                     {
147               org.apache.axis2.context.MessageContext _messageContext = null;
148               try{
149                org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
150               _operationClient.getOptions().setAction("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher/ResourceMatcher/matchRequest");
151               _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
152 
153               
154               
155                   addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
156               
157 
158               // create a message context
159               _messageContext = new org.apache.axis2.context.MessageContext();
160 
161               
162 
163               // create SOAP envelope with that payload
164               org.apache.axiom.soap.SOAPEnvelope env = null;
165                     
166                                                     
167                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
168                                                     match0,
169                                                     optimizeContent(new javax.xml.namespace.QName("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher",
170                                                     "match")));
171                                                 
172         //adding SOAP soap_headers
173          _serviceClient.addHeadersToEnvelope(env);
174         // set the message context with that soap envelope
175         _messageContext.setEnvelope(env);
176 
177         // add the message contxt to the operation client
178         _operationClient.addMessageContext(_messageContext);
179 
180         //execute the operation client
181         _operationClient.execute(true);
182 
183          
184                org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(
185                                            org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
186                 org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
187                 
188                 
189                                 java.lang.Object object = fromOM(
190                                              _returnEnv.getBody().getFirstElement() ,
191                                              de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse.class,
192                                               getEnvelopeNamespaces(_returnEnv));
193 
194                                
195                                         return (de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse)object;
196                                    
197          }catch(org.apache.axis2.AxisFault f){
198 
199             org.apache.axiom.om.OMElement faultElt = f.getDetail();
200             if (faultElt!=null){
201                 if (faultExceptionNameMap.containsKey(faultElt.getQName())){
202                     //make the fault by reflection
203                     try{
204                         java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());
205                         java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
206                         java.lang.Exception ex=
207                                 (java.lang.Exception) exceptionClass.newInstance();
208                         //message class
209                         java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
210                         java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
211                         java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
212                         java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
213                                    new java.lang.Class[]{messageClass});
214                         m.invoke(ex,new java.lang.Object[]{messageObject});
215                         
216 
217                         throw new java.rmi.RemoteException(ex.getMessage(), ex);
218                     }catch(java.lang.ClassCastException e){
219                        // we cannot intantiate the class - throw the original Axis fault
220                         throw f;
221                     } catch (java.lang.ClassNotFoundException e) {
222                         // we cannot intantiate the class - throw the original Axis fault
223                         throw f;
224                     }catch (java.lang.NoSuchMethodException e) {
225                         // we cannot intantiate the class - throw the original Axis fault
226                         throw f;
227                     } catch (java.lang.reflect.InvocationTargetException e) {
228                         // we cannot intantiate the class - throw the original Axis fault
229                         throw f;
230                     }  catch (java.lang.IllegalAccessException e) {
231                         // we cannot intantiate the class - throw the original Axis fault
232                         throw f;
233                     }   catch (java.lang.InstantiationException e) {
234                         // we cannot intantiate the class - throw the original Axis fault
235                         throw f;
236                     }
237                 }else{
238                     throw f;
239                 }
240             }else{
241                 throw f;
242             }
243             } finally {
244                 _messageContext.getTransportOut().getSender().cleanup(_messageContext);
245             }
246         }
247             
248                 /**
249                 * Auto generated method signature for Asynchronous Invocations
250                 * 
251                 * @see de.fraunhofer.first.resmatch.client.ResourceMatcherService#startmatch
252                     * @param match0
253                 
254                 */
255                 public  void startmatch(
256 
257                  de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match match0,
258 
259                   final de.fraunhofer.first.resmatch.client.ResourceMatcherServiceCallbackHandler callback)
260 
261                 throws java.rmi.RemoteException{
262 
263               org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
264              _operationClient.getOptions().setAction("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher/ResourceMatcher/matchRequest");
265              _operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
266 
267               
268               
269                   addPropertyToOperationClient(_operationClient,org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,"&");
270               
271 
272 
273               // create SOAP envelope with that payload
274               org.apache.axiom.soap.SOAPEnvelope env=null;
275               final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
276 
277                     
278                                     //Style is Doc.
279                                     
280                                                     
281                                                     env = toEnvelope(getFactory(_operationClient.getOptions().getSoapVersionURI()),
282                                                     match0,
283                                                     optimizeContent(new javax.xml.namespace.QName("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher",
284                                                     "match")));
285                                                 
286         // adding SOAP soap_headers
287          _serviceClient.addHeadersToEnvelope(env);
288         // create message context with that soap envelope
289         _messageContext.setEnvelope(env);
290 
291         // add the message context to the operation client
292         _operationClient.addMessageContext(_messageContext);
293 
294 
295                     
296                         _operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
297                             public void onMessage(org.apache.axis2.context.MessageContext resultContext) {
298                             try {
299                                 org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
300                                 
301                                         java.lang.Object object = fromOM(resultEnv.getBody().getFirstElement(),
302                                                                          de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse.class,
303                                                                          getEnvelopeNamespaces(resultEnv));
304                                         callback.receiveResultmatch(
305                                         (de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse)object);
306                                         
307                             } catch (org.apache.axis2.AxisFault e) {
308                                 callback.receiveErrormatch(e);
309                             }
310                             }
311 
312                             public void onError(java.lang.Exception error) {
313 								if (error instanceof org.apache.axis2.AxisFault) {
314 									org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
315 									org.apache.axiom.om.OMElement faultElt = f.getDetail();
316 									if (faultElt!=null){
317 										if (faultExceptionNameMap.containsKey(faultElt.getQName())){
318 											//make the fault by reflection
319 											try{
320 													java.lang.String exceptionClassName = (java.lang.String)faultExceptionClassNameMap.get(faultElt.getQName());
321 													java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
322 													java.lang.Exception ex=
323 														(java.lang.Exception) exceptionClass.newInstance();
324 													//message class
325 													java.lang.String messageClassName = (java.lang.String)faultMessageMap.get(faultElt.getQName());
326 														java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
327 													java.lang.Object messageObject = fromOM(faultElt,messageClass,null);
328 													java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
329 															new java.lang.Class[]{messageClass});
330 													m.invoke(ex,new java.lang.Object[]{messageObject});
331 													
332 					
333 										            callback.receiveErrormatch(new java.rmi.RemoteException(ex.getMessage(), ex));
334                                             } catch(java.lang.ClassCastException e){
335                                                 // we cannot intantiate the class - throw the original Axis fault
336                                                 callback.receiveErrormatch(f);
337                                             } catch (java.lang.ClassNotFoundException e) {
338                                                 // we cannot intantiate the class - throw the original Axis fault
339                                                 callback.receiveErrormatch(f);
340                                             } catch (java.lang.NoSuchMethodException e) {
341                                                 // we cannot intantiate the class - throw the original Axis fault
342                                                 callback.receiveErrormatch(f);
343                                             } catch (java.lang.reflect.InvocationTargetException e) {
344                                                 // we cannot intantiate the class - throw the original Axis fault
345                                                 callback.receiveErrormatch(f);
346                                             } catch (java.lang.IllegalAccessException e) {
347                                                 // we cannot intantiate the class - throw the original Axis fault
348                                                 callback.receiveErrormatch(f);
349                                             } catch (java.lang.InstantiationException e) {
350                                                 // we cannot intantiate the class - throw the original Axis fault
351                                                 callback.receiveErrormatch(f);
352                                             } catch (org.apache.axis2.AxisFault e) {
353                                                 // we cannot intantiate the class - throw the original Axis fault
354                                                 callback.receiveErrormatch(f);
355                                             }
356 									    } else {
357 										    callback.receiveErrormatch(f);
358 									    }
359 									} else {
360 									    callback.receiveErrormatch(f);
361 									}
362 								} else {
363 								    callback.receiveErrormatch(error);
364 								}
365                             }
366 
367                             public void onFault(org.apache.axis2.context.MessageContext faultContext) {
368                                 org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
369                                 onError(fault);
370                             }
371 
372                             public void onComplete() {
373                                 try {
374                                     _messageContext.getTransportOut().getSender().cleanup(_messageContext);
375                                 } catch (org.apache.axis2.AxisFault axisFault) {
376                                     callback.receiveErrormatch(axisFault);
377                                 }
378                             }
379                 });
380                         
381 
382           org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
383         if ( _operations[0].getMessageReceiver()==null &&  _operationClient.getOptions().isUseSeparateListener()) {
384            _callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
385           _operations[0].setMessageReceiver(
386                     _callbackReceiver);
387         }
388 
389            //execute the operation client
390            _operationClient.execute(false);
391 
392                     }
393                 
394 
395 
396        /**
397         *  A utility method that copies the namepaces from the SOAPEnvelope
398         */
399        private java.util.Map getEnvelopeNamespaces(org.apache.axiom.soap.SOAPEnvelope env){
400         java.util.Map returnMap = new java.util.HashMap();
401         java.util.Iterator namespaceIterator = env.getAllDeclaredNamespaces();
402         while (namespaceIterator.hasNext()) {
403             org.apache.axiom.om.OMNamespace ns = (org.apache.axiom.om.OMNamespace) namespaceIterator.next();
404             returnMap.put(ns.getPrefix(),ns.getNamespaceURI());
405         }
406        return returnMap;
407     }
408 
409     
410     
411     private javax.xml.namespace.QName[] opNameArray = null;
412     private boolean optimizeContent(javax.xml.namespace.QName opName) {
413         
414 
415         if (opNameArray == null) {
416             return false;
417         }
418         for (int i = 0; i < opNameArray.length; i++) {
419             if (opName.equals(opNameArray[i])) {
420                 return true;   
421             }
422         }
423         return false;
424     }
425      //http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher
426         public static class MatchResponse
427         implements org.apache.axis2.databinding.ADBBean{
428         
429                 public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
430                 "http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher",
431                 "matchResponse",
432                 "ns2");
433 
434             
435 
436         private static java.lang.String generatePrefix(java.lang.String namespace) {
437             if(namespace.equals("http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher")){
438                 return "ns2";
439             }
440             return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
441         }
442 
443         
444 
445                         /**
446                         * field for MatchReturn
447                         */
448 
449                         
450                                     protected org.apache.axis2.databinding.types.soapencoding.String localMatchReturn ;
451                                 
452 
453                            /**
454                            * Auto generated getter method
455                            * @return org.apache.axis2.databinding.types.soapencoding.String
456                            */
457                            public  org.apache.axis2.databinding.types.soapencoding.String getMatchReturn(){
458                                return localMatchReturn;
459                            }
460 
461                            
462                         
463                             /**
464                                * Auto generated setter method
465                                * @param param MatchReturn
466                                */
467                                public void setMatchReturn(org.apache.axis2.databinding.types.soapencoding.String param){
468                             
469                                             this.localMatchReturn=param;
470                                     
471 
472                                }
473                             
474 
475      /**
476      * isReaderMTOMAware
477      * @return true if the reader supports MTOM
478      */
479    public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
480         boolean isReaderMTOMAware = false;
481         
482         try{
483           isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
484         }catch(java.lang.IllegalArgumentException e){
485           isReaderMTOMAware = false;
486         }
487         return isReaderMTOMAware;
488    }
489      
490      
491         /**
492         *
493         * @param parentQName
494         * @param factory
495         * @return org.apache.axiom.om.OMElement
496         */
497        public org.apache.axiom.om.OMElement getOMElement (
498                final javax.xml.namespace.QName parentQName,
499                final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
500 
501 
502         
503                 org.apache.axiom.om.OMDataSource dataSource =
504                        new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
505 
506                  public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
507                        MatchResponse.this.serialize(MY_QNAME,factory,xmlWriter);
508                  }
509                };
510                return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
511                MY_QNAME,factory,dataSource);
512             
513        }
514 
515          public void serialize(final javax.xml.namespace.QName parentQName,
516                                        final org.apache.axiom.om.OMFactory factory,
517                                        org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
518                                 throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
519                            serialize(parentQName,factory,xmlWriter,false);
520          }
521 
522          public void serialize(final javax.xml.namespace.QName parentQName,
523                                final org.apache.axiom.om.OMFactory factory,
524                                org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
525                                boolean serializeType)
526             throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
527             
528                 
529 
530 
531                 java.lang.String prefix = null;
532                 java.lang.String namespace = null;
533                 
534 
535                     prefix = parentQName.getPrefix();
536                     namespace = parentQName.getNamespaceURI();
537 
538                     if ((namespace != null) && (namespace.trim().length() > 0)) {
539                         java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
540                         if (writerPrefix != null) {
541                             xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
542                         } else {
543                             if (prefix == null) {
544                                 prefix = generatePrefix(namespace);
545                             }
546 
547                             xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
548                             xmlWriter.writeNamespace(prefix, namespace);
549                             xmlWriter.setPrefix(prefix, namespace);
550                         }
551                     } else {
552                         xmlWriter.writeStartElement(parentQName.getLocalPart());
553                     }
554                 
555                   if (serializeType){
556                
557 
558                    java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://fhrg.first.fraunhofer.de:8080/resmatch/services/ResourceMatcher");
559                    if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
560                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
561                            namespacePrefix+":matchResponse",
562                            xmlWriter);
563                    } else {
564                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
565                            "matchResponse",
566                            xmlWriter);
567                    }
568 
569                
570                    }
571                
572                                             if (localMatchReturn==null){
573                                                  throw new org.apache.axis2.databinding.ADBException("matchReturn cannot be null!!");
574                                             }
575                                            localMatchReturn.serialize(new javax.xml.namespace.QName("","matchReturn"),
576                                                factory,xmlWriter);
577                                         
578                     xmlWriter.writeEndElement();
579                
580 
581         }
582 
583          /**
584           * Util method to write an attribute with the ns prefix
585           */
586           private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
587                                       java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
588               if (xmlWriter.getPrefix(namespace) == null) {
589                        xmlWriter.writeNamespace(prefix, namespace);
590                        xmlWriter.setPrefix(prefix, namespace);
591 
592               }
593 
594               xmlWriter.writeAttribute(namespace,attName,attValue);
595 
596          }
597 
598         /**
599           * Util method to write an attribute without the ns prefix
600           */
601           private void writeAttribute(java.lang.String namespace,java.lang.String attName,
602                                       java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
603                 if (namespace.equals(""))
604               {
605                   xmlWriter.writeAttribute(attName,attValue);
606               }
607               else
608               {
609                   registerPrefix(xmlWriter, namespace);
610                   xmlWriter.writeAttribute(namespace,attName,attValue);
611               }
612           }
613 
614 
615            /**
616              * Util method to write an attribute without the ns prefix
617              */
618             private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
619                                              javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
620 
621                 java.lang.String attributeNamespace = qname.getNamespaceURI();
622                 java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
623                 if (attributePrefix == null) {
624                     attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
625                 }
626                 java.lang.String attributeValue;
627                 if (attributePrefix.trim().length() > 0) {
628                     attributeValue = attributePrefix + ":" + qname.getLocalPart();
629                 } else {
630                     attributeValue = qname.getLocalPart();
631                 }
632 
633                 if (namespace.equals("")) {
634                     xmlWriter.writeAttribute(attName, attributeValue);
635                 } else {
636                     registerPrefix(xmlWriter, namespace);
637                     xmlWriter.writeAttribute(namespace, attName, attributeValue);
638                 }
639             }
640         /**
641          *  method to handle Qnames
642          */
643 
644         private void writeQName(javax.xml.namespace.QName qname,
645                                 javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
646             java.lang.String namespaceURI = qname.getNamespaceURI();
647             if (namespaceURI != null) {
648                 java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
649                 if (prefix == null) {
650                     prefix = generatePrefix(namespaceURI);
651                     xmlWriter.writeNamespace(prefix, namespaceURI);
652                     xmlWriter.setPrefix(prefix,namespaceURI);
653                 }
654 
655                 if (prefix.trim().length() > 0){
656                     xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
657                 } else {
658                     // i.e this is the default namespace
659                     xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
660                 }
661 
662             } else {
663                 xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
664             }
665         }
666 
667         private void writeQNames(javax.xml.namespace.QName[] qnames,
668                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
669 
670             if (qnames != null) {
671                 // we have to store this data until last moment since it is not possible to write any
672                 // namespace data after writing the charactor data
673                 java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
674                 java.lang.String namespaceURI = null;
675                 java.lang.String prefix = null;
676 
677                 for (int i = 0; i < qnames.length; i++) {
678                     if (i > 0) {
679                         stringToWrite.append(" ");
680                     }
681                     namespaceURI = qnames[i].getNamespaceURI();
682                     if (namespaceURI != null) {
683                         prefix = xmlWriter.getPrefix(namespaceURI);
684                         if ((prefix == null) || (prefix.length() == 0)) {
685                             prefix = generatePrefix(namespaceURI);
686                             xmlWriter.writeNamespace(prefix, namespaceURI);
687                             xmlWriter.setPrefix(prefix,namespaceURI);
688                         }
689 
690                         if (prefix.trim().length() > 0){
691                             stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
692                         } else {
693                             stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
694                         }
695                     } else {
696                         stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
697                     }
698                 }
699                 xmlWriter.writeCharacters(stringToWrite.toString());
700             }
701 
702         }
703 
704 
705          /**
706          * Register a namespace prefix
707          */
708          private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
709                 java.lang.String prefix = xmlWriter.getPrefix(namespace);
710 
711                 if (prefix == null) {
712                     prefix = generatePrefix(namespace);
713 
714                     while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
715                         prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
716                     }
717 
718                     xmlWriter.writeNamespace(prefix, namespace);
719                     xmlWriter.setPrefix(prefix, namespace);
720                 }
721 
722                 return prefix;
723             }
724 
725 
726   
727         /**
728         * databinding method to get an XML representation of this object
729         *
730         */
731         public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
732                     throws org.apache.axis2.databinding.ADBException{
733 
734 
735         
736                  java.util.ArrayList elementList = new java.util.ArrayList();
737                  java.util.ArrayList attribList = new java.util.ArrayList();
738 
739                 
740                             elementList.add(new javax.xml.namespace.QName("",
741                                                                       "matchReturn"));
742                             
743                             
744                                     if (localMatchReturn==null){
745                                          throw new org.apache.axis2.databinding.ADBException("matchReturn cannot be null!!");
746                                     }
747                                     elementList.add(localMatchReturn);
748                                 
749 
750                 return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
751             
752             
753 
754         }
755 
756   
757 
758      /**
759       *  Factory class that keeps the parse method
760       */
761     public static class Factory{
762 
763         
764         
765 
766         /**
767         * static method to create the object
768         * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
769         *                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
770         * Postcondition: If this object is an element, the reader is positioned at its end element
771         *                If this object is a complex type, the reader is positioned at the end element of its outer element
772         */
773         public static MatchResponse parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
774             MatchResponse object =
775                 new MatchResponse();
776 
777             int event;
778             java.lang.String nillableValue = null;
779             java.lang.String prefix ="";
780             java.lang.String namespaceuri ="";
781             try {
782                 
783                 while (!reader.isStartElement() && !reader.isEndElement())
784                     reader.next();
785 
786                 
787                 if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
788                   java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
789                         "type");
790                   if (fullTypeName!=null){
791                     java.lang.String nsPrefix = null;
792                     if (fullTypeName.indexOf(":") > -1){
793                         nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
794                     }
795                     nsPrefix = nsPrefix==null?"":nsPrefix;
796 
797                     java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
798                     
799                             if (!"matchResponse".equals(type)){
800                                 //find namespace for the prefix
801                                 java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
802                                 return (MatchResponse)ExtensionMapper.getTypeObject(
803                                      nsUri,type,reader);
804                               }
805                         
806 
807                   }
808                 
809 
810                 }
811 
812                 
813 
814                 
815                 // Note all attributes that were handled. Used to differ normal attributes
816                 // from anyAttributes.
817                 java.util.Vector handledAttributes = new java.util.Vector();
818                 
819 
820                  
821                     
822                     reader.next();
823                 
824                                     
825                                     while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
826                                 
827                                     if (reader.isStartElement() && new javax.xml.namespace.QName("","matchReturn").equals(reader.getName())){
828                                 
829                                                 object.setMatchReturn(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));
830                                               
831                                         reader.next();
832                                     
833                               }  // End of if for expected property start element
834                                 
835                                 else{
836                                     // A start element we are not expecting indicates an invalid parameter was passed
837                                     throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
838                                 }
839                               
840                             while (!reader.isStartElement() && !reader.isEndElement())
841                                 reader.next();
842                             
843                                 if (reader.isStartElement())
844                                 // A start element we are not expecting indicates a trailing invalid property
845                                 throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
846                             
847 
848 
849 
850             } catch (javax.xml.stream.XMLStreamException e) {
851                 throw new java.lang.Exception(e);
852             }
853 
854             return object;
855         }
856 
857         }//end of factory class
858 
859         
860 
861         }
862            
863           
864         public static class Match
865         implements org.apache.axis2.databinding.ADBBean{
866         
867                 public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName(
868                 "http://resmatch.first.fhg.de",
869                 "match",
870                 "ns1");
871 
872             
873 
874         private static java.lang.String generatePrefix(java.lang.String namespace) {
875             if(namespace.equals("http://resmatch.first.fhg.de")){
876                 return "ns1";
877             }
878             return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
879         }
880 
881         
882 
883                         /**
884                         * field for Gworkflowdl
885                         */
886 
887                         
888                                     protected org.apache.axis2.databinding.types.soapencoding.String localGworkflowdl ;
889                                 
890 
891                            /**
892                            * Auto generated getter method
893                            * @return org.apache.axis2.databinding.types.soapencoding.String
894                            */
895                            public  org.apache.axis2.databinding.types.soapencoding.String getGworkflowdl(){
896                                return localGworkflowdl;
897                            }
898 
899                            
900                         
901                             /**
902                                * Auto generated setter method
903                                * @param param Gworkflowdl
904                                */
905                                public void setGworkflowdl(org.apache.axis2.databinding.types.soapencoding.String param){
906                             
907                                             this.localGworkflowdl=param;
908                                     
909 
910                                }
911                             
912 
913      /**
914      * isReaderMTOMAware
915      * @return true if the reader supports MTOM
916      */
917    public static boolean isReaderMTOMAware(javax.xml.stream.XMLStreamReader reader) {
918         boolean isReaderMTOMAware = false;
919         
920         try{
921           isReaderMTOMAware = java.lang.Boolean.TRUE.equals(reader.getProperty(org.apache.axiom.om.OMConstants.IS_DATA_HANDLERS_AWARE));
922         }catch(java.lang.IllegalArgumentException e){
923           isReaderMTOMAware = false;
924         }
925         return isReaderMTOMAware;
926    }
927      
928      
929         /**
930         *
931         * @param parentQName
932         * @param factory
933         * @return org.apache.axiom.om.OMElement
934         */
935        public org.apache.axiom.om.OMElement getOMElement (
936                final javax.xml.namespace.QName parentQName,
937                final org.apache.axiom.om.OMFactory factory) throws org.apache.axis2.databinding.ADBException{
938 
939 
940         
941                 org.apache.axiom.om.OMDataSource dataSource =
942                        new org.apache.axis2.databinding.ADBDataSource(this,MY_QNAME){
943 
944                  public void serialize(org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
945                        Match.this.serialize(MY_QNAME,factory,xmlWriter);
946                  }
947                };
948                return new org.apache.axiom.om.impl.llom.OMSourcedElementImpl(
949                MY_QNAME,factory,dataSource);
950             
951        }
952 
953          public void serialize(final javax.xml.namespace.QName parentQName,
954                                        final org.apache.axiom.om.OMFactory factory,
955                                        org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter)
956                                 throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
957                            serialize(parentQName,factory,xmlWriter,false);
958          }
959 
960          public void serialize(final javax.xml.namespace.QName parentQName,
961                                final org.apache.axiom.om.OMFactory factory,
962                                org.apache.axis2.databinding.utils.writer.MTOMAwareXMLStreamWriter xmlWriter,
963                                boolean serializeType)
964             throws javax.xml.stream.XMLStreamException, org.apache.axis2.databinding.ADBException{
965             
966                 
967 
968 
969                 java.lang.String prefix = null;
970                 java.lang.String namespace = null;
971                 
972 
973                     prefix = parentQName.getPrefix();
974                     namespace = parentQName.getNamespaceURI();
975 
976                     if ((namespace != null) && (namespace.trim().length() > 0)) {
977                         java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
978                         if (writerPrefix != null) {
979                             xmlWriter.writeStartElement(namespace, parentQName.getLocalPart());
980                         } else {
981                             if (prefix == null) {
982                                 prefix = generatePrefix(namespace);
983                             }
984 
985                             xmlWriter.writeStartElement(prefix, parentQName.getLocalPart(), namespace);
986                             xmlWriter.writeNamespace(prefix, namespace);
987                             xmlWriter.setPrefix(prefix, namespace);
988                         }
989                     } else {
990                         xmlWriter.writeStartElement(parentQName.getLocalPart());
991                     }
992                 
993                   if (serializeType){
994                
995 
996                    java.lang.String namespacePrefix = registerPrefix(xmlWriter,"http://resmatch.first.fhg.de");
997                    if ((namespacePrefix != null) && (namespacePrefix.trim().length() > 0)){
998                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
999                            namespacePrefix+":match",
1000                            xmlWriter);
1001                    } else {
1002                        writeAttribute("xsi","http://www.w3.org/2001/XMLSchema-instance","type",
1003                            "match",
1004                            xmlWriter);
1005                    }
1006 
1007                
1008                    }
1009                
1010                                             if (localGworkflowdl==null){
1011                                                  throw new org.apache.axis2.databinding.ADBException("gworkflowdl cannot be null!!");
1012                                             }
1013                                            localGworkflowdl.serialize(new javax.xml.namespace.QName("","gworkflowdl"),
1014                                                factory,xmlWriter);
1015                                         
1016                     xmlWriter.writeEndElement();
1017                
1018 
1019         }
1020 
1021          /**
1022           * Util method to write an attribute with the ns prefix
1023           */
1024           private void writeAttribute(java.lang.String prefix,java.lang.String namespace,java.lang.String attName,
1025                                       java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
1026               if (xmlWriter.getPrefix(namespace) == null) {
1027                        xmlWriter.writeNamespace(prefix, namespace);
1028                        xmlWriter.setPrefix(prefix, namespace);
1029 
1030               }
1031 
1032               xmlWriter.writeAttribute(namespace,attName,attValue);
1033 
1034          }
1035 
1036         /**
1037           * Util method to write an attribute without the ns prefix
1038           */
1039           private void writeAttribute(java.lang.String namespace,java.lang.String attName,
1040                                       java.lang.String attValue,javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException{
1041                 if (namespace.equals(""))
1042               {
1043                   xmlWriter.writeAttribute(attName,attValue);
1044               }
1045               else
1046               {
1047                   registerPrefix(xmlWriter, namespace);
1048                   xmlWriter.writeAttribute(namespace,attName,attValue);
1049               }
1050           }
1051 
1052 
1053            /**
1054              * Util method to write an attribute without the ns prefix
1055              */
1056             private void writeQNameAttribute(java.lang.String namespace, java.lang.String attName,
1057                                              javax.xml.namespace.QName qname, javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
1058 
1059                 java.lang.String attributeNamespace = qname.getNamespaceURI();
1060                 java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
1061                 if (attributePrefix == null) {
1062                     attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
1063                 }
1064                 java.lang.String attributeValue;
1065                 if (attributePrefix.trim().length() > 0) {
1066                     attributeValue = attributePrefix + ":" + qname.getLocalPart();
1067                 } else {
1068                     attributeValue = qname.getLocalPart();
1069                 }
1070 
1071                 if (namespace.equals("")) {
1072                     xmlWriter.writeAttribute(attName, attributeValue);
1073                 } else {
1074                     registerPrefix(xmlWriter, namespace);
1075                     xmlWriter.writeAttribute(namespace, attName, attributeValue);
1076                 }
1077             }
1078         /**
1079          *  method to handle Qnames
1080          */
1081 
1082         private void writeQName(javax.xml.namespace.QName qname,
1083                                 javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
1084             java.lang.String namespaceURI = qname.getNamespaceURI();
1085             if (namespaceURI != null) {
1086                 java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
1087                 if (prefix == null) {
1088                     prefix = generatePrefix(namespaceURI);
1089                     xmlWriter.writeNamespace(prefix, namespaceURI);
1090                     xmlWriter.setPrefix(prefix,namespaceURI);
1091                 }
1092 
1093                 if (prefix.trim().length() > 0){
1094                     xmlWriter.writeCharacters(prefix + ":" + org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
1095                 } else {
1096                     // i.e this is the default namespace
1097                     xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
1098                 }
1099 
1100             } else {
1101                 xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qname));
1102             }
1103         }
1104 
1105         private void writeQNames(javax.xml.namespace.QName[] qnames,
1106                                  javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException {
1107 
1108             if (qnames != null) {
1109                 // we have to store this data until last moment since it is not possible to write any
1110                 // namespace data after writing the charactor data
1111                 java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
1112                 java.lang.String namespaceURI = null;
1113                 java.lang.String prefix = null;
1114 
1115                 for (int i = 0; i < qnames.length; i++) {
1116                     if (i > 0) {
1117                         stringToWrite.append(" ");
1118                     }
1119                     namespaceURI = qnames[i].getNamespaceURI();
1120                     if (namespaceURI != null) {
1121                         prefix = xmlWriter.getPrefix(namespaceURI);
1122                         if ((prefix == null) || (prefix.length() == 0)) {
1123                             prefix = generatePrefix(namespaceURI);
1124                             xmlWriter.writeNamespace(prefix, namespaceURI);
1125                             xmlWriter.setPrefix(prefix,namespaceURI);
1126                         }
1127 
1128                         if (prefix.trim().length() > 0){
1129                             stringToWrite.append(prefix).append(":").append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
1130                         } else {
1131                             stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
1132                         }
1133                     } else {
1134                         stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(qnames[i]));
1135                     }
1136                 }
1137                 xmlWriter.writeCharacters(stringToWrite.toString());
1138             }
1139 
1140         }
1141 
1142 
1143          /**
1144          * Register a namespace prefix
1145          */
1146          private java.lang.String registerPrefix(javax.xml.stream.XMLStreamWriter xmlWriter, java.lang.String namespace) throws javax.xml.stream.XMLStreamException {
1147                 java.lang.String prefix = xmlWriter.getPrefix(namespace);
1148 
1149                 if (prefix == null) {
1150                     prefix = generatePrefix(namespace);
1151 
1152                     while (xmlWriter.getNamespaceContext().getNamespaceURI(prefix) != null) {
1153                         prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
1154                     }
1155 
1156                     xmlWriter.writeNamespace(prefix, namespace);
1157                     xmlWriter.setPrefix(prefix, namespace);
1158                 }
1159 
1160                 return prefix;
1161             }
1162 
1163 
1164   
1165         /**
1166         * databinding method to get an XML representation of this object
1167         *
1168         */
1169         public javax.xml.stream.XMLStreamReader getPullParser(javax.xml.namespace.QName qName)
1170                     throws org.apache.axis2.databinding.ADBException{
1171 
1172 
1173         
1174                  java.util.ArrayList elementList = new java.util.ArrayList();
1175                  java.util.ArrayList attribList = new java.util.ArrayList();
1176 
1177                 
1178                             elementList.add(new javax.xml.namespace.QName("",
1179                                                                       "gworkflowdl"));
1180                             
1181                             
1182                                     if (localGworkflowdl==null){
1183                                          throw new org.apache.axis2.databinding.ADBException("gworkflowdl cannot be null!!");
1184                                     }
1185                                     elementList.add(localGworkflowdl);
1186                                 
1187 
1188                 return new org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl(qName, elementList.toArray(), attribList.toArray());
1189             
1190             
1191 
1192         }
1193 
1194   
1195 
1196      /**
1197       *  Factory class that keeps the parse method
1198       */
1199     public static class Factory{
1200 
1201         
1202         
1203 
1204         /**
1205         * static method to create the object
1206         * Precondition:  If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
1207         *                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
1208         * Postcondition: If this object is an element, the reader is positioned at its end element
1209         *                If this object is a complex type, the reader is positioned at the end element of its outer element
1210         */
1211         public static Match parse(javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
1212             Match object =
1213                 new Match();
1214 
1215             int event;
1216             java.lang.String nillableValue = null;
1217             java.lang.String prefix ="";
1218             java.lang.String namespaceuri ="";
1219             try {
1220                 
1221                 while (!reader.isStartElement() && !reader.isEndElement())
1222                     reader.next();
1223 
1224                 
1225                 if (reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance","type")!=null){
1226                   java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
1227                         "type");
1228                   if (fullTypeName!=null){
1229                     java.lang.String nsPrefix = null;
1230                     if (fullTypeName.indexOf(":") > -1){
1231                         nsPrefix = fullTypeName.substring(0,fullTypeName.indexOf(":"));
1232                     }
1233                     nsPrefix = nsPrefix==null?"":nsPrefix;
1234 
1235                     java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(":")+1);
1236                     
1237                             if (!"match".equals(type)){
1238                                 //find namespace for the prefix
1239                                 java.lang.String nsUri = reader.getNamespaceContext().getNamespaceURI(nsPrefix);
1240                                 return (Match)ExtensionMapper.getTypeObject(
1241                                      nsUri,type,reader);
1242                               }
1243                         
1244 
1245                   }
1246                 
1247 
1248                 }
1249 
1250                 
1251 
1252                 
1253                 // Note all attributes that were handled. Used to differ normal attributes
1254                 // from anyAttributes.
1255                 java.util.Vector handledAttributes = new java.util.Vector();
1256                 
1257 
1258                  
1259                     
1260                     reader.next();
1261                 
1262                                     
1263                                     while (!reader.isStartElement() && !reader.isEndElement()) reader.next();
1264                                 
1265                                     if (reader.isStartElement() && new javax.xml.namespace.QName("","gworkflowdl").equals(reader.getName())){
1266                                 
1267                                                 object.setGworkflowdl(org.apache.axis2.databinding.types.soapencoding.String.Factory.parse(reader));
1268                                               
1269                                         reader.next();
1270                                     
1271                               }  // End of if for expected property start element
1272                                 
1273                                 else{
1274                                     // A start element we are not expecting indicates an invalid parameter was passed
1275                                     throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
1276                                 }
1277                               
1278                             while (!reader.isStartElement() && !reader.isEndElement())
1279                                 reader.next();
1280                             
1281                                 if (reader.isStartElement())
1282                                 // A start element we are not expecting indicates a trailing invalid property
1283                                 throw new org.apache.axis2.databinding.ADBException("Unexpected subelement " + reader.getLocalName());
1284                             
1285 
1286 
1287 
1288             } catch (javax.xml.stream.XMLStreamException e) {
1289                 throw new java.lang.Exception(e);
1290             }
1291 
1292             return object;
1293         }
1294 
1295         }//end of factory class
1296 
1297         
1298 
1299         }
1300            
1301           
1302         public static class ExtensionMapper{
1303 
1304           public static java.lang.Object getTypeObject(java.lang.String namespaceURI,
1305                                                        java.lang.String typeName,
1306                                                        javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception{
1307 
1308               
1309              throw new org.apache.axis2.databinding.ADBException("Unsupported type " + namespaceURI + " " + typeName);
1310           }
1311 
1312         }
1313     
1314             private  org.apache.axiom.om.OMElement  toOM(de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match param, boolean optimizeContent)
1315             throws org.apache.axis2.AxisFault {
1316 
1317             
1318                         try{
1319                              return param.getOMElement(de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match.MY_QNAME,
1320                                           org.apache.axiom.om.OMAbstractFactory.getOMFactory());
1321                         } catch(org.apache.axis2.databinding.ADBException e){
1322                             throw org.apache.axis2.AxisFault.makeFault(e);
1323                         }
1324                     
1325 
1326             }
1327         
1328             private  org.apache.axiom.om.OMElement  toOM(de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse param, boolean optimizeContent)
1329             throws org.apache.axis2.AxisFault {
1330 
1331             
1332                         try{
1333                              return param.getOMElement(de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse.MY_QNAME,
1334                                           org.apache.axiom.om.OMAbstractFactory.getOMFactory());
1335                         } catch(org.apache.axis2.databinding.ADBException e){
1336                             throw org.apache.axis2.AxisFault.makeFault(e);
1337                         }
1338                     
1339 
1340             }
1341         
1342                                     
1343                                         private  org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory, de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match param, boolean optimizeContent)
1344                                         throws org.apache.axis2.AxisFault{
1345 
1346                                              
1347                                                     try{
1348 
1349                                                             org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
1350                                                             emptyEnvelope.getBody().addChild(param.getOMElement(de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match.MY_QNAME,factory));
1351                                                             return emptyEnvelope;
1352                                                         } catch(org.apache.axis2.databinding.ADBException e){
1353                                                             throw org.apache.axis2.AxisFault.makeFault(e);
1354                                                         }
1355                                                 
1356 
1357                                         }
1358                                 
1359                              
1360                              /* methods to provide back word compatibility */
1361 
1362                              
1363 
1364 
1365         /**
1366         *  get the default envelope
1367         */
1368         private org.apache.axiom.soap.SOAPEnvelope toEnvelope(org.apache.axiom.soap.SOAPFactory factory){
1369         return factory.getDefaultEnvelope();
1370         }
1371 
1372 
1373         private  java.lang.Object fromOM(
1374         org.apache.axiom.om.OMElement param,
1375         java.lang.Class type,
1376         java.util.Map extraNamespaces) throws org.apache.axis2.AxisFault{
1377 
1378         try {
1379         
1380                 if (de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match.class.equals(type)){
1381                 
1382                            return de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.Match.Factory.parse(param.getXMLStreamReaderWithoutCaching());
1383                     
1384 
1385                 }
1386            
1387                 if (de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse.class.equals(type)){
1388                 
1389                            return de.fraunhofer.first.resmatch.client.ResourceMatcherServiceStub.MatchResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
1390                     
1391 
1392                 }
1393            
1394         } catch (java.lang.Exception e) {
1395         throw org.apache.axis2.AxisFault.makeFault(e);
1396         }
1397            return null;
1398         }
1399 
1400 
1401 
1402     
1403    }
1404