public static String getProtocolByToken ( String token , boolean returnDefault ) { if ( StringUtils . isEmpty ( token ) && returnDefault ) { return JaxWsConstants . SOAP11HTTP_BINDING ; } if ( JaxWsConstants . SOAP11_HTTP_TOKEN . equals ( token ) ) { return JaxWsConstants . SOAP11HTTP_BINDING ; } else if ( JaxWsConstants . SOAP11_HTTP_MTOM_TOKEN . equals ( token ) ) { return JaxWsConstants . SOAP11HTTP_MTOM_BINDING ; } else if ( JaxWsConstants . SOAP12_HTTP_TOKEN . equals ( token ) ) { return JaxWsConstants . SOAP12HTTP_BINDING ; } else if ( JaxWsConstants . SOAP12_HTTP_MTOM_TOKEN . equals ( token ) ) { return JaxWsConstants . SOAP12HTTP_MTOM_BINDING ; } else if ( JaxWsConstants . XML_HTTP_TOKEN . equals ( token ) ) { return JaxWsConstants . HTTP_BINDING ; } else { return token ; } }
Get the protocol by token