KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > servicemix > jms > wsdl > JmsExtension


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.jms.wsdl;
18
19 import javax.wsdl.extensions.ExtensionRegistry;
20 import javax.xml.namespace.QName JavaDoc;
21
22 import com.ibm.wsdl.Constants;
23
24 public class JmsExtension {
25
26     public static final String JavaDoc NS_URI_JMS = "http://servicemix.org/wsdl/jms/";
27
28     public static final String JavaDoc ELEM_ADDRESS = "address";
29     
30     public static final QName JavaDoc Q_ELEM_JMS_ADDRESS = new QName JavaDoc(NS_URI_JMS, ELEM_ADDRESS);
31     public static final QName JavaDoc Q_ELEM_JMS_BINDING = new QName JavaDoc(NS_URI_JMS, Constants.ELEM_BINDING);
32
33     public static final String JavaDoc INITIAL_CONTEXT_FACTORY = "initialContextFactory";
34     public static final String JavaDoc JNDI_PROVIDER_URL = "jndiProviderURL";
35     public static final String JavaDoc DESTINATION_STYLE = "destinationStyle";
36     public static final String JavaDoc JNDI_CONNECTION_FACTORY_NAME = "jndiConnectionFactoryName";
37     public static final String JavaDoc JNDI_DESTINATION_NAME = "jndiDestinationName";
38     public static final String JavaDoc JMS_PROVIDER_DESTINATION_NAME = "jmsProviderDestinationName";
39     
40     public static final String JavaDoc WSDL2_NS = "http://www.w3.org/2004/08/wsdl/";
41
42     public static void register(ExtensionRegistry registry) {
43         registry.registerDeserializer(
44                 javax.wsdl.Port.class,
45                 Q_ELEM_JMS_ADDRESS,
46                 new JmsAddressDeserializer());
47         registry.mapExtensionTypes(
48                 javax.wsdl.Port.class,
49                 Q_ELEM_JMS_ADDRESS,
50                 JmsAddress.class);
51         registry.registerDeserializer(
52                 javax.wsdl.Binding.class,
53                 Q_ELEM_JMS_BINDING,
54                 new JmsBindingDeserializer());
55         registry.mapExtensionTypes(
56                 javax.wsdl.Binding.class,
57                 Q_ELEM_JMS_BINDING,
58                 JmsBinding.class);
59     }
60     
61 }
62
Popular Tags