KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > common > wsdl1 > JbiExtension


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17 package org.apache.servicemix.common.wsdl1;
18
19 import javax.wsdl.extensions.ExtensionRegistry;
20 import javax.xml.namespace.QName JavaDoc;
21
22 public class JbiExtension {
23
24     public static final String JavaDoc NS_URI_JBI = "http://servicemix.org/wsdl/jbi/";
25
26     public static final String JavaDoc ELEM_ENDPOINT = "endpoint";
27     
28     public static final QName JavaDoc Q_ELEM_JBI_ENDPOINT = new QName JavaDoc(NS_URI_JBI, ELEM_ENDPOINT);
29
30     public static final String JavaDoc ROLE = "role";
31     public static final String JavaDoc ROLE_CONSUMER = "consumer";
32     public static final String JavaDoc ROLE_PROVIDER = "provider";
33     
34     public static final String JavaDoc DEFAULT_MEP = "defaultMep";
35     public static final String JavaDoc DEFAULT_MEP_IN_ONLY = "in-only";
36     public static final String JavaDoc DEFAULT_MEP_ROBUST_IN_ONLY = "robust-in-only";
37     public static final String JavaDoc DEFAULT_MEP_IN_OUT = "in-out";
38     
39     public static final String JavaDoc DEFAULT_OPERATION = "defaultOperation";
40     
41     public static final String JavaDoc WSDL2_NS = "http://www.w3.org/2004/08/wsdl/";
42
43     public static void register(ExtensionRegistry registry) {
44         registry.registerDeserializer(
45                         javax.wsdl.Port.class,
46                         Q_ELEM_JBI_ENDPOINT,
47                         new JbiEndpointDeserializer());
48         registry.registerSerializer(
49                         javax.wsdl.Port.class,
50                         Q_ELEM_JBI_ENDPOINT,
51                         new JbiEndpointSerializer());
52         registry.mapExtensionTypes(
53                         javax.wsdl.Port.class,
54                         Q_ELEM_JBI_ENDPOINT,
55                         JbiEndpoint.class);
56     }
57     
58 }
59
Popular Tags