001    /*
002     * Licensed to the Apache Software Foundation (ASF) under one or more
003     * contributor license agreements.  See the NOTICE file distributed with
004     * this work for additional information regarding copyright ownership.
005     * The ASF licenses this file to You under the Apache License, Version 2.0
006     * (the "License"); you may not use this file except in compliance with
007     * the License.  You may obtain a copy of the License at
008     *
009     *      http://www.apache.org/licenses/LICENSE-2.0
010     *
011     * Unless required by applicable law or agreed to in writing, software
012     * distributed under the License is distributed on an "AS IS" BASIS,
013     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014     * See the License for the specific language governing permissions and
015     * limitations under the License.
016     */
017    package org.apache.servicemix.common.wsdl1;
018    
019    import javax.wsdl.extensions.ExtensionRegistry;
020    import javax.xml.namespace.QName;
021    
022    public class JbiExtension {
023    
024        public static final String NS_URI_JBI = "http://servicemix.org/wsdl/jbi/";
025    
026        public static final String ELEM_ENDPOINT = "endpoint";
027        
028        public static final QName Q_ELEM_JBI_ENDPOINT = new QName(NS_URI_JBI, ELEM_ENDPOINT);
029    
030        public static final String ROLE = "role";
031        public static final String ROLE_CONSUMER = "consumer";
032        public static final String ROLE_PROVIDER = "provider";
033        
034        public static final String DEFAULT_MEP = "defaultMep";
035        public static final String DEFAULT_MEP_IN_ONLY = "in-only";
036        public static final String DEFAULT_MEP_ROBUST_IN_ONLY = "robust-in-only";
037        public static final String DEFAULT_MEP_IN_OUT = "in-out";
038        
039        public static final String DEFAULT_OPERATION = "defaultOperation";
040        
041        public static final String WSDL2_NS = "http://www.w3.org/2004/08/wsdl/";
042    
043        public static void register(ExtensionRegistry registry) {
044            registry.registerDeserializer(            
045                            javax.wsdl.Port.class,
046                            Q_ELEM_JBI_ENDPOINT,
047                            new JbiEndpointDeserializer());
048            registry.registerSerializer(            
049                            javax.wsdl.Port.class,
050                            Q_ELEM_JBI_ENDPOINT,
051                            new JbiEndpointSerializer());
052            registry.mapExtensionTypes(
053                            javax.wsdl.Port.class,
054                            Q_ELEM_JBI_ENDPOINT,
055                            JbiEndpoint.class);
056        }
057        
058    }