01: /**
02: * Licensed to the Apache Software Foundation (ASF) under one
03: * or more contributor license agreements. See the NOTICE file
04: * distributed with this work for additional information
05: * regarding copyright ownership. The ASF licenses this file
06: * to you under the Apache License, Version 2.0 (the
07: * "License"); you may not use this file except in compliance
08: * with the License. You may obtain a copy of the License at
09: *
10: * http://www.apache.org/licenses/LICENSE-2.0
11: *
12: * Unless required by applicable law or agreed to in writing,
13: * software distributed under the License is distributed on an
14: * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15: * KIND, either express or implied. See the License for the
16: * specific language governing permissions and limitations
17: * under the License.
18: */package org.apache.cxf.jaxws.support;
19:
20: import javax.xml.ws.soap.SOAPBinding;
21:
22: import org.apache.cxf.binding.soap.SoapBindingFactory;
23: import org.apache.cxf.binding.soap.SoapTransportFactory;
24:
25: public final class BindingID {
26:
27: private BindingID() {
28: }
29:
30: public static String getJaxwsBindingID(String transportID) {
31: if (SoapTransportFactory.SOAP_11_HTTP_BINDING
32: .equals(transportID)) {
33: return SOAPBinding.SOAP11HTTP_BINDING;
34: } else if (SoapTransportFactory.SOAP_12_HTTP_BINDING
35: .equals(transportID)) {
36: return SOAPBinding.SOAP12HTTP_BINDING;
37: } else {
38: return transportID;
39: }
40: }
41:
42: public static String getBindingID(String jaxwsBindingID) {
43: if (SOAPBinding.SOAP11HTTP_BINDING.equals(jaxwsBindingID)
44: || SOAPBinding.SOAP11HTTP_MTOM_BINDING
45: .equals(jaxwsBindingID)) {
46: return SoapBindingFactory.SOAP_11_BINDING;
47: } else if (SOAPBinding.SOAP12HTTP_BINDING
48: .equals(jaxwsBindingID)
49: || SOAPBinding.SOAP12HTTP_MTOM_BINDING
50: .equals(jaxwsBindingID)) {
51: return SoapBindingFactory.SOAP_12_BINDING;
52: } else {
53: return jaxwsBindingID;
54: }
55: }
56:
57: }
|