KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > jboss > axis > deployment > wsdd > WSDDService


1 /*
2  * The Apache Software License, Version 1.1
3  *
4  *
5  * Copyright (c) 2001-2003 The Apache Software Foundation. All rights
6  * reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * 1. Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  *
15  * 2. Redistributions in binary form must reproduce the above copyright
16  * notice, this list of conditions and the following disclaimer in
17  * the documentation and/or other materials provided with the
18  * distribution.
19  *
20  * 3. The end-user documentation included with the redistribution,
21  * if any, must include the following acknowledgment:
22  * "This product includes software developed by the
23  * Apache Software Foundation (http://www.apache.org/)."
24  * Alternately, this acknowledgment may appear in the software itself,
25  * if and wherever such third-party acknowledgments normally appear.
26  *
27  * 4. The names "Axis" and "Apache Software Foundation" must
28  * not be used to endorse or promote products derived from this
29  * software without prior written permission. For written
30  * permission, please contact apache@apache.org.
31  *
32  * 5. Products derived from this software may not be called "Apache",
33  * nor may "Apache" appear in their name, without prior written
34  * permission of the Apache Software Foundation.
35  *
36  * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
37  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
38  * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
39  * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR
40  * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
41  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
42  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF
43  * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
44  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
45  * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
46  * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
47  * SUCH DAMAGE.
48  * ====================================================================
49  *
50  * This software consists of voluntary contributions made by many
51  * individuals on behalf of the Apache Software Foundation. For more
52  * information on the Apache Software Foundation, please see
53  * <http://www.apache.org/>.
54  */

55 package org.jboss.axis.deployment.wsdd;
56
57 import org.jboss.axis.AxisEngine;
58 import org.jboss.axis.AxisFault;
59 import org.jboss.axis.ConfigurationException;
60 import org.jboss.axis.Constants;
61 import org.jboss.axis.EngineConfiguration;
62 import org.jboss.axis.FaultableHandler;
63 import org.jboss.axis.Handler;
64 import org.jboss.axis.MessageContext;
65 import org.jboss.axis.attachments.Attachments;
66 import org.jboss.axis.attachments.AttachmentsImpl;
67 import org.jboss.axis.description.ServiceDesc;
68 import org.jboss.axis.encoding.DeserializerFactory;
69 import org.jboss.axis.encoding.SerializationContext;
70 import org.jboss.axis.encoding.SerializerFactory;
71 import org.jboss.axis.encoding.TypeMapping;
72 import org.jboss.axis.encoding.TypeMappingRegistry;
73 import org.jboss.axis.encoding.TypeMappingRegistryImpl;
74 import org.jboss.axis.encoding.ser.BaseDeserializerFactory;
75 import org.jboss.axis.encoding.ser.BaseSerializerFactory;
76 import org.jboss.axis.enums.Style;
77 import org.jboss.axis.enums.Use;
78 import org.jboss.axis.handlers.HandlerInfoChainFactory;
79 import org.jboss.axis.handlers.soap.SOAPService;
80 import org.jboss.axis.providers.java.JavaProvider;
81 import org.jboss.axis.utils.Messages;
82 import org.jboss.axis.utils.XMLUtils;
83 import org.jboss.logging.Logger;
84 import org.w3c.dom.Element JavaDoc;
85 import org.xml.sax.helpers.AttributesImpl JavaDoc;
86
87 import javax.xml.namespace.QName JavaDoc;
88 import java.io.IOException JavaDoc;
89 import java.util.ArrayList JavaDoc;
90 import java.util.StringTokenizer JavaDoc;
91 import java.util.Vector JavaDoc;
92
93 /**
94  * A service represented in WSDD.
95  *
96  * @author Glen Daniels (gdaniels@apache.org)
97  */

98 public class WSDDService
99         extends WSDDTargetedChain
100         implements WSDDTypeMappingContainer
101 {
102
103    private static Logger log = Logger.getLogger(WSDDService.class.getName());
104
105    private TypeMappingRegistry tmr = null;
106
107    private Vector JavaDoc faultFlows = new Vector JavaDoc();
108    private Vector JavaDoc typeMappings = new Vector JavaDoc();
109    private Vector JavaDoc operations = new Vector JavaDoc();
110
111    /**
112     * Which namespaces should auto-dispatch to this service?
113     */

114    private Vector JavaDoc namespaces = new Vector JavaDoc();
115
116    private String JavaDoc descriptionURL;
117
118    /**
119     * Style - document, wrapped, message, or RPC (the default)
120     */

121    private Style style = Style.DEFAULT;
122    /**
123     * Use - encoded (the default) or literal
124     */

125    private Use use = Use.DEFAULT;
126
127    private SOAPService cachedService = null;
128
129    /**
130     * Our provider - used to figure out which Handler we use as a service
131     * pivot (see getInstance() below)
132     */

133    private QName JavaDoc providerQName;
134
135 // private HandlerInfoChainFactory _hiChainFactory;
136
private WSDDJAXRPCHandlerInfoChain _wsddHIchain;
137
138    ServiceDesc desc = new ServiceDesc();
139
140    /**
141     * Is streaming (i.e. NO high-fidelity recording, deserialize on the fly)
142     * on for this service?
143     */

144    private boolean streaming = false;
145
146    /**
147     * What attachment format should be used?
148     */

149    private int sendType = Attachments.SEND_TYPE_NOTSET;
150
151    /**
152     * Default constructor
153     */

154    public WSDDService()
155    {
156    }
157
158    /**
159     * @param e (Element) XXX
160     * @throws WSDDException XXX
161     */

162    public WSDDService(Element JavaDoc e)
163            throws WSDDException
164    {
165       super(e);
166
167       desc.setName(getQName().getLocalPart());
168
169       String JavaDoc styleStr = e.getAttribute(ATTR_STYLE);
170       if (styleStr != null && !styleStr.equals(""))
171       {
172          style = Style.getStyle(styleStr, Style.DEFAULT);
173          desc.setStyle(style);
174          providerQName = style.getProvider();
175       }
176
177       String JavaDoc useStr = e.getAttribute(ATTR_USE);
178       if (useStr != null && !useStr.equals(""))
179       {
180          use = Use.getUse(useStr, Use.DEFAULT);
181          desc.setUse(use);
182       }
183       else
184       {
185          if (style != Style.RPC)
186          {
187             // Default to use=literal if not style=RPC
188
use = Use.LITERAL;
189             desc.setUse(use);
190          }
191       }
192
193       String JavaDoc streamStr = e.getAttribute(ATTR_STREAMING);
194       if (streamStr != null && streamStr.equals("on"))
195       {
196          streaming = true;
197       }
198
199       String JavaDoc attachmentStr = e.getAttribute(ATTR_ATTACHMENT_FORMAT);
200       if (attachmentStr != null && !attachmentStr.equals(""))
201       {
202          sendType = AttachmentsImpl.getSendType(attachmentStr);
203       }
204
205       Element JavaDoc[] operationElements = getChildElements(e, ELEM_WSDD_OPERATION);
206       for (int i = 0; i < operationElements.length; i++)
207       {
208          WSDDOperation operation = new WSDDOperation(operationElements[i],
209                  desc);
210          addOperation(operation);
211       }
212
213       Element JavaDoc[] typeMappingElements = getChildElements(e, ELEM_WSDD_TYPEMAPPING);
214       for (int i = 0; i < typeMappingElements.length; i++)
215       {
216          WSDDTypeMapping mapping =
217                  new WSDDTypeMapping(typeMappingElements[i]);
218          typeMappings.add(mapping);
219       }
220
221       Element JavaDoc[] beanMappingElements = getChildElements(e, ELEM_WSDD_BEANMAPPING);
222       for (int i = 0; i < beanMappingElements.length; i++)
223       {
224          WSDDBeanMapping mapping =
225                  new WSDDBeanMapping(beanMappingElements[i]);
226          typeMappings.add(mapping);
227       }
228
229       Element JavaDoc[] namespaceElements = getChildElements(e, ELEM_WSDD_NAMESPACE);
230       for (int i = 0; i < namespaceElements.length; i++)
231       {
232          // Register a namespace for this service
233
String JavaDoc ns = XMLUtils.getChildCharacterData(namespaceElements[i]);
234          namespaces.add(ns);
235       }
236       if (!namespaces.isEmpty())
237          desc.setNamespaceMappings(namespaces);
238
239       Element JavaDoc wsdlElem = getChildElement(e, ELEM_WSDD_WSDLFILE);
240       if (wsdlElem != null)
241       {
242          String JavaDoc fileName = XMLUtils.getChildCharacterData(wsdlElem);
243          desc.setWSDLFile(fileName);
244       }
245
246       Element JavaDoc urlElem = getChildElement(e, ELEM_WSDD_ENDPOINTURL);
247       if (urlElem != null)
248       {
249          String JavaDoc endpointURL = XMLUtils.getChildCharacterData(urlElem);
250          desc.setEndpointURL(endpointURL);
251       }
252
253       String JavaDoc providerStr = e.getAttribute(ATTR_PROVIDER);
254       if (providerStr != null && !providerStr.equals(""))
255       {
256          providerQName = XMLUtils.getQNameFromString(providerStr, e);
257          if (WSDDConstants.QNAME_JAVAMSG_PROVIDER.equals(providerQName))
258          {
259             // Message style if message provider...
260
desc.setStyle(Style.MESSAGE);
261          }
262       }
263
264       // Add in JAX-RPC support for HandlerInfo chains
265
Element JavaDoc hcEl = getChildElement(e, ELEM_WSDD_JAXRPC_CHAIN);
266       if (hcEl != null)
267       {
268          _wsddHIchain = new WSDDJAXRPCHandlerInfoChain(hcEl);
269       }
270
271       // Initialize TypeMappingRegistry
272
initTMR();
273
274       // call to validate standard descriptors for this service
275
validateDescriptors();
276    }
277
278    /**
279     * Initialize a TypeMappingRegistry with the
280     * WSDDTypeMappings.
281     * Note: Extensions of WSDDService may override
282     * initTMR to popluate the tmr with different
283     * type mappings.
284     */

285    protected void initTMR() throws WSDDException
286    {
287       // If not created, construct a tmr
288
// and populate it with the type mappings.
289
if (tmr == null)
290       {
291          tmr = new TypeMappingRegistryImpl();
292          for (int i = 0; i < typeMappings.size(); i++)
293          {
294             deployTypeMapping((WSDDTypeMapping)
295                     typeMappings.get(i));
296          }
297       }
298    }
299
300
301    /**
302     * This method can be used for dynamic deployment using new WSDDService()
303     * etc. It validates some standard parameters for some standard providers
304     * (if present). Do this before deployment.deployService().
305     */

306    public void validateDescriptors() throws WSDDException
307    {
308       if (tmr == null)
309       {
310          initTMR();
311       }
312       desc.setTypeMappingRegistry(tmr);
313       desc.setTypeMapping(getTypeMapping(desc.getUse().getEncoding()));
314
315       String JavaDoc allowedMethods = getParameter(JavaProvider.OPTION_ALLOWEDMETHODS);
316       if (allowedMethods != null && !"*".equals(allowedMethods))
317       {
318          ArrayList JavaDoc methodList = new ArrayList JavaDoc();
319          StringTokenizer JavaDoc tokenizer = new StringTokenizer JavaDoc(allowedMethods, " ,");
320          while (tokenizer.hasMoreTokens())
321          {
322             methodList.add(tokenizer.nextToken());
323          }
324          desc.setAllowedMethods(methodList);
325       }
326    }
327
328    /**
329     * Add a WSDDTypeMapping to the Service.
330     *
331     * @param mapping
332     */

333    public void addTypeMapping(WSDDTypeMapping mapping)
334    {
335       typeMappings.add(mapping);
336    }
337
338    /**
339     * Add a WSDDOperation to the Service.
340     *
341     * @param operation the operation to add
342     */

343    public void addOperation(WSDDOperation operation)
344    {
345       operations.add(operation);
346       desc.addOperationDesc(operation.getOperationDesc());
347    }
348
349    protected QName JavaDoc getElementName()
350    {
351       return QNAME_SERVICE;
352    }
353
354    /**
355     * Get any service description URL which might be associated with this
356     * service.
357     *
358     * @return a String containing a URL, or null.
359     */

360    public String JavaDoc getServiceDescriptionURL()
361    {
362       return descriptionURL;
363    }
364
365    /**
366     * Set the service description URL for this service.
367     *
368     * @param sdUrl a String containing a URL
369     */

370    public void setServiceDescriptionURL(String JavaDoc sdUrl)
371    {
372       descriptionURL = sdUrl;
373    }
374
375    public QName JavaDoc getProviderQName()
376    {
377       return providerQName;
378    }
379
380    public void setProviderQName(QName JavaDoc providerQName)
381    {
382       this.providerQName = providerQName;
383    }
384
385    public ServiceDesc getServiceDesc()
386    {
387       return desc;
388    }
389
390    /**
391     * Get the service style - document or RPC
392     */

393    public Style getStyle()
394    {
395       return style;
396    }
397
398    /**
399     * Set the service style - document or RPC
400     */

401    public void setStyle(Style style)
402    {
403       this.style = style;
404    }
405
406    /**
407     * Get the service use - literal or encoded
408     */

409    public Use getUse()
410    {
411       return use;
412    }
413
414    /**
415     * Set the service use - literal or encoded
416     */

417    public void setUse(Use use)
418    {
419       this.use = use;
420    }
421
422    /**
423     * @return XXX
424     */

425    public WSDDFaultFlow[] getFaultFlows()
426    {
427       WSDDFaultFlow[] t = new WSDDFaultFlow[faultFlows.size()];
428       faultFlows.toArray(t);
429       return t;
430    }
431
432    /**
433     * Obtain the list of namespaces registered for this service
434     *
435     * @return a Vector of namespaces (Strings) which should dispatch to
436     * this service
437     */

438    public Vector JavaDoc getNamespaces()
439    {
440       return namespaces;
441    }
442
443    /**
444     * @param name XXX
445     * @return XXX
446     */

447    public WSDDFaultFlow getFaultFlow(QName JavaDoc name)
448    {
449       WSDDFaultFlow[] t = getFaultFlows();
450
451       for (int n = 0; n < t.length; n++)
452       {
453          if (t[n].getQName().equals(name))
454          {
455             return t[n];
456          }
457       }
458
459       return null;
460    }
461
462    /**
463     * @param registry XXX
464     * @return XXX
465     * @throws ConfigurationException XXX
466     */

467    public Handler makeNewInstance(EngineConfiguration registry)
468            throws ConfigurationException
469    {
470       if (cachedService != null)
471       {
472          return cachedService;
473       }
474
475       // Make sure tmr is initialized.
476
initTMR();
477
478       Handler reqHandler = null;
479       WSDDChain request = getRequestFlow();
480
481       if (request != null)
482       {
483          reqHandler = request.getInstance(registry);
484       }
485
486       Handler providerHandler = null;
487
488       if (providerQName != null)
489       {
490          try
491          {
492             providerHandler = WSDDProvider.getInstance(providerQName,
493                     this,
494                     registry);
495          }
496          catch (Exception JavaDoc e)
497          {
498             throw new ConfigurationException(e);
499          }
500          if (providerHandler == null)
501             throw new WSDDException(Messages.getMessage("couldntConstructProvider00"));
502       }
503
504       Handler respHandler = null;
505       WSDDChain response = getResponseFlow();
506
507       if (response != null)
508       {
509          respHandler = response.getInstance(registry);
510       }
511
512       SOAPService service = new SOAPService(reqHandler, providerHandler,
513               respHandler);
514       service.setStyle(style);
515       service.setUse(use);
516       service.setHighFidelityRecording(!streaming);
517       service.setSendType(sendType);
518
519       if (getQName() != null)
520          service.setName(getQName().getLocalPart());
521       service.setOptions(getParametersTable());
522
523       service.setEngine(((WSDDDeployment)registry).getEngine());
524
525       if (use != Use.ENCODED)
526       {
527          // If not encoded, turn off multi-refs and prefer
528
// not to sent xsi:type and xsi:nil
529
service.setOption(AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
530          service.setOption(AxisEngine.PROP_SEND_XSI, Boolean.FALSE);
531       }
532
533       // Set handlerInfoChain
534
if (_wsddHIchain != null)
535       {
536          HandlerInfoChainFactory hiChainFactory = _wsddHIchain.getHandlerChainFactory();
537
538          service.setOption(Constants.ATTR_HANDLERINFOCHAIN, hiChainFactory);
539       }
540
541       AxisEngine.normaliseOptions(service);
542       tmr.delegate(registry.getTypeMappingRegistry());
543
544       WSDDFaultFlow[] faultFlows = getFaultFlows();
545       if (faultFlows != null && faultFlows.length > 0)
546       {
547          FaultableHandler wrapper = new FaultableHandler(service);
548          for (int i = 0; i < faultFlows.length; i++)
549          {
550             WSDDFaultFlow flow = faultFlows[i];
551             Handler faultHandler = flow.getInstance(registry);
552             wrapper.setOption("fault-" + flow.getQName().getLocalPart(),
553                     faultHandler);
554          }
555       }
556
557       service.setServiceDescription(desc);
558       try
559       {
560          service.getInitializedServiceDesc(MessageContext.getCurrentContext());
561       }
562       catch (AxisFault axisFault)
563       {
564          throw new ConfigurationException(axisFault);
565       }
566
567       cachedService = service;
568       return service;
569    }
570
571    public void deployTypeMapping(WSDDTypeMapping mapping)
572            throws WSDDException
573    {
574       if (!typeMappings.contains(mapping))
575       {
576          typeMappings.add(mapping);
577       }
578       if (tmr == null)
579       {
580          tmr = new TypeMappingRegistryImpl();
581       }
582       try
583       {
584          // Get the encoding style from the mapping, if it isn't set
585
// use the use of the service to map doc/lit or rpc/enc
586
String JavaDoc encodingStyle = mapping.getEncodingStyle();
587          if (encodingStyle == null)
588          {
589             encodingStyle = use.getEncoding();
590          }
591          TypeMapping tm = tmr.getOrMakeTypeMapping(encodingStyle);
592          desc.setTypeMappingRegistry(tmr);
593          desc.setTypeMapping(tm);
594
595          SerializerFactory ser = null;
596          DeserializerFactory deser = null;
597
598          // Try to construct a serializerFactory by introspecting for the
599
// following:
600
// public static create(Class javaType, QName xmlType)
601
// public <constructor>(Class javaType, QName xmlType)
602
// public <constructor>()
603
//
604
// The BaseSerializerFactory createFactory() method is a utility
605
// that does this for us.
606
if (mapping.getSerializerName() != null &&
607                  !mapping.getSerializerName().equals(""))
608          {
609             ser = BaseSerializerFactory.createFactory(mapping.getSerializer(),
610                     mapping.getLanguageSpecificType(),
611                     mapping.getQName());
612          }
613
614          if (mapping.getDeserializerName() != null &&
615                  !mapping.getDeserializerName().equals(""))
616          {
617             deser = BaseDeserializerFactory.createFactory(mapping.getDeserializer(),
618                     mapping.getLanguageSpecificType(),
619                     mapping.getQName());
620          }
621          tm.register(mapping.getLanguageSpecificType(), mapping.getQName(), ser, deser);
622       }
623       catch (ClassNotFoundException JavaDoc e)
624       {
625          log.error(Messages.getMessage("unabletoDeployTypemapping00", "" + mapping.getQName()), e);
626          throw new WSDDNonFatalException(e);
627       }
628       catch (Exception JavaDoc e)
629       {
630          throw new WSDDException(e);
631       }
632    }
633
634    /**
635     * Write this element out to a SerializationContext
636     */

637    public void writeToContext(SerializationContext context)
638            throws IOException JavaDoc
639    {
640       AttributesImpl JavaDoc attrs = new AttributesImpl JavaDoc();
641       QName JavaDoc name = getQName();
642       if (name != null)
643       {
644          attrs.addAttribute("", ATTR_NAME, ATTR_NAME,
645                  "CDATA", context.qName2String(name));
646       }
647       if (providerQName != null)
648       {
649          attrs.addAttribute("", ATTR_PROVIDER, ATTR_PROVIDER,
650                  "CDATA", context.qName2String(providerQName));
651       }
652       if (style != Style.DEFAULT)
653       {
654          attrs.addAttribute("", ATTR_STYLE, ATTR_STYLE,
655                  "CDATA", style.getName());
656       }
657
658       if (use != Use.DEFAULT)
659       {
660          attrs.addAttribute("", ATTR_USE, ATTR_USE,
661                  "CDATA", use.getName());
662       }
663
664       if (streaming)
665       {
666          attrs.addAttribute("", ATTR_STREAMING, ATTR_STREAMING,
667                  "CDATA", "on");
668       }
669
670       if (sendType != Attachments.SEND_TYPE_NOTSET)
671       {
672          attrs.addAttribute("", ATTR_ATTACHMENT_FORMAT,
673                  ATTR_ATTACHMENT_FORMAT, "CDATA",
674                  AttachmentsImpl.getSendTypeString(sendType));
675       }
676       context.startElement(WSDDConstants.QNAME_SERVICE, attrs);
677
678       if (desc.getWSDLFile() != null)
679       {
680          context.startElement(QNAME_WSDLFILE, null);
681          context.writeSafeString(desc.getWSDLFile());
682          context.endElement();
683       }
684
685       for (int i = 0; i < operations.size(); i++)
686       {
687          WSDDOperation operation = (WSDDOperation)operations.elementAt(i);
688          operation.writeToContext(context);
689       }
690       writeFlowsToContext(context);
691       writeParamsToContext(context);
692
693
694       for (int i = 0; i < typeMappings.size(); i++)
695       {
696          ((WSDDTypeMapping)typeMappings.elementAt(i)).writeToContext(context);
697       }
698
699       for (int i = 0; i < namespaces.size(); i++)
700       {
701          context.startElement(QNAME_NAMESPACE, null);
702          context.writeString((String JavaDoc)namespaces.get(i));
703          context.endElement();
704       }
705
706       String JavaDoc endpointURL = desc.getEndpointURL();
707       if (endpointURL != null)
708       {
709          context.startElement(QNAME_ENDPOINTURL, null);
710          context.writeSafeString(endpointURL);
711          context.endElement();
712       }
713
714       if (_wsddHIchain != null)
715       {
716          _wsddHIchain.writeToContext(context);
717
718       }
719
720       context.endElement();
721
722
723    }
724
725    public void setCachedService(SOAPService service)
726    {
727       cachedService = service;
728    }
729
730    public Vector JavaDoc getTypeMappings()
731    {
732       return typeMappings;
733    }
734
735    public void setTypeMappings(Vector JavaDoc typeMappings)
736    {
737       this.typeMappings = typeMappings;
738    }
739
740    public void deployToRegistry(WSDDDeployment registry)
741    {
742       registry.addService(this);
743
744       // Register the name of the service as a valid namespace, just for
745
// backwards compatibility
746
registry.registerNamespaceForService(getQName().getLocalPart(), this);
747
748       for (int i = 0; i < namespaces.size(); i++)
749       {
750          String JavaDoc namespace = (String JavaDoc)namespaces.elementAt(i);
751          registry.registerNamespaceForService(namespace, this);
752       }
753
754       super.deployToRegistry(registry);
755    }
756
757    public void removeNamespaceMappings(WSDDDeployment registry)
758    {
759       for (int i = 0; i < namespaces.size(); i++)
760       {
761          String JavaDoc namespace = (String JavaDoc)namespaces.elementAt(i);
762          registry.removeNamespaceMapping(namespace);
763       }
764       registry.removeNamespaceMapping(getQName().getLocalPart());
765    }
766
767    public TypeMapping getTypeMapping(String JavaDoc encodingStyle)
768    {
769       // If type mapping registry not initialized yet, return null.
770
if (tmr == null)
771       {
772          return null;
773       }
774       return (TypeMapping)tmr.getTypeMapping(encodingStyle);
775    }
776
777
778    public WSDDJAXRPCHandlerInfoChain getHandlerInfoChain()
779    {
780       return _wsddHIchain;
781    }
782
783    public void setHandlerInfoChain(WSDDJAXRPCHandlerInfoChain hichain)
784    {
785       _wsddHIchain = hichain;
786    }
787 }
788
Popular Tags