View Javadoc

1   /*
2    * Jbi4CorbaPartnerLinkExtension.java
3    * 
4    * Created on 12-set-2007, 17.59.07
5    * 
6    * This is an Utility class that contains the constants for the 
7    * partner link WSDL4J library.
8    */
9   
10  package it.imolinfo.jbi4corba.utils.plugin.wsdl;
11  
12  import javax.wsdl.extensions.ExtensionRegistry;
13  import javax.xml.namespace.QName;
14  
15  /**
16   *
17   * @author mcastaldi
18   */
19  public class Jbi4CorbaPartnerLinkExtension {
20  
21      /**
22       * The name of the partner link element
23      */
24      public static final String PRTLNK_ELEMENT = "partnerLinkType";
25  
26      /**
27       * The name's attribute of the partner link element
28      */
29      public static final String PRTLNK_NAME_ATTRIBUTE = "name";
30      
31      /**
32       * The role element
33      */
34      public static final String ROLE_ELEMENT = "role";
35  
36      /**
37       * The name's attribute of the role element
38      */
39      public static final String ROLE_ATTRIBUTE_NAME = "name";
40  
41      /**
42       * The port's attribute of the role element
43      */
44      public static final String ROLE_ATTRIBUTE_PORT = "portType";
45  
46      /**
47       * The NameSpace of the partner link
48      */
49      public static final String NS_PTNLNK
50          = "http://docs.oasis-open.org/wsbpel/2.0/plnktype";
51      
52      /**
53       * The namespace prefix for the partner link
54      */
55      public static final String NS_PREFIX
56          = "plnk";
57      
58      /**
59       * The QName of the partner link
60      */
61      public static final QName Q_ELEMENT_PTNLNK = 
62          new QName(PRTLNK_ELEMENT);
63  
64      /**
65       * The suffix of the role name attribute
66      */
67      public static final String ROLE_NAME_SUFFIX = 
68          "PortTypeRole";
69  
70      /**
71      * Utility method that registers the extensibility elements for WSDL4J.
72      *
73      * @param registry The ExtensionRegistry where the partner link extension is registered.
74      */
75      public static void register(ExtensionRegistry registry) 
76      {
77          // PartnerLink
78          registry.mapExtensionTypes(
79                  javax.wsdl.Definition.class,
80                  Q_ELEMENT_PTNLNK, Jbi4CorbaPartnerLink.class);
81  
82          registry.registerDeserializer(
83                  javax.wsdl.Definition.class,
84                  Q_ELEMENT_PTNLNK, new Jbi4CorbaPartnerLinkDeserializer());
85  
86          registry.registerSerializer(
87                 javax.wsdl.Definition.class,
88                 Q_ELEMENT_PTNLNK, new Jbi4CorbaPartnerLinkSerializer());
89    }
90      
91  
92  }