Java Code Examples for javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING

The following examples show how to use javax.xml.ws.soap.SOAPBinding#SOAP12HTTP_BINDING . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: DeploymentDescriptorParser.java    From TencentKona-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 2
Source File: DeploymentDescriptorParser.java    From jdk8u60 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 3
Source File: DeploymentDescriptorParser.java    From openjdk-jdk8u with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 4
Source File: DeploymentDescriptorParser.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 5
Source File: DeploymentDescriptorParser.java    From openjdk-jdk9 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 6
Source File: DeploymentDescriptorParser.java    From hottub with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 7
Source File: DeploymentDescriptorParser.java    From openjdk-8-source with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 8
Source File: DeploymentDescriptorParser.java    From openjdk-8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * JSR-109 defines short-form tokens for standard binding Ids. These are
 * used only in DD. So stand alone deployment descirptor should also honor
 * these tokens. This method converts the tokens to API's standard
 * binding ids
 *
 * @param lexical binding attribute value from DD. Always not null
 * @return returns corresponding API's binding ID or the same lexical
 */
public static @NotNull String getBindingIdForToken(@NotNull String lexical) {
    if (lexical.equals("##SOAP11_HTTP")) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (lexical.equals("##SOAP11_HTTP_MTOM")) {
        return SOAPBinding.SOAP11HTTP_MTOM_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP")) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else if (lexical.equals("##SOAP12_HTTP_MTOM")) {
        return SOAPBinding.SOAP12HTTP_MTOM_BINDING;
    } else if (lexical.equals("##XML_HTTP")) {
        return HTTPBinding.HTTP_BINDING;
    }
    return lexical;
}
 
Example 9
Source File: JaxwsEndpointManager.java    From cxf with Apache License 2.0 5 votes vote down vote up
protected Endpoint createEndpoint(Object service) {
    String bindingId = SOAPBinding.SOAP11HTTP_BINDING;
    if (isCXF()) {
        bindingId = SOAPBinding.SOAP12HTTP_BINDING;
    }
    return Endpoint.create(bindingId, service);
}
 
Example 10
Source File: WSDiscoveryClient.java    From cxf with Apache License 2.0 5 votes vote down vote up
public void setSoapVersion(boolean do11) {
    String newVer = do11 ? SOAPBinding.SOAP11HTTP_BINDING : SOAPBinding.SOAP12HTTP_BINDING;
    if (!soapVersion.equals(newVer)) {
        soapVersion = newVer;
        uncache();
    }
}
 
Example 11
Source File: BindingID.java    From cxf with Apache License 2.0 5 votes vote down vote up
public static String getJaxwsBindingID(String transportID) {
    if (SoapTransportFactory.SOAP_11_HTTP_BINDING.equals(transportID)) {
        return SOAPBinding.SOAP11HTTP_BINDING;
    } else if (SoapTransportFactory.SOAP_12_HTTP_BINDING.equals(transportID)) {
        return SOAPBinding.SOAP12HTTP_BINDING;
    } else {
        return transportID;
    }
}
 
Example 12
Source File: JaxWsServerFactoryBean.java    From cxf with Apache License 2.0 4 votes vote down vote up
@Override
protected BindingInfo createBindingInfo() {
    JaxWsServiceFactoryBean sf = (JaxWsServiceFactoryBean)getServiceFactory();

    JaxWsImplementorInfo implInfo = sf.getJaxWsImplementorInfo();
    String jaxBid = implInfo.getBindingType();
    String binding = getBindingId();
    if (binding == null) {
        binding = jaxBid;
        setBindingId(binding);
    }

    if (binding.equals(SOAPBinding.SOAP11HTTP_BINDING)
        || binding.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)) {
        binding = "http://schemas.xmlsoap.org/wsdl/soap/";
        setBindingId(binding);
        if (getBindingConfig() == null) {
            setBindingConfig(new JaxWsSoapBindingConfiguration(sf));
        }
    } else if (binding.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
        binding = SOAPBinding.SOAP12HTTP_BINDING;
        setBindingId(binding);
        if (getBindingConfig() == null) {
            setBindingConfig(new JaxWsSoapBindingConfiguration(sf));
        }
    }

    if (getBindingConfig() instanceof JaxWsSoapBindingConfiguration) {
        JaxWsSoapBindingConfiguration conf = (JaxWsSoapBindingConfiguration)getBindingConfig();

        if (jaxBid.equals(SOAPBinding.SOAP12HTTP_BINDING)) {
            conf.setVersion(Soap12.getInstance());
        }

        if (jaxBid.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) {
            conf.setVersion(Soap12.getInstance());
            conf.setMtomEnabled(true);
        }
        if (jaxBid.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)) {
            conf.setMtomEnabled(true);
        }

        if (transportId != null) {
            conf.setTransportURI(transportId);
        }
        conf.setJaxWsServiceFactoryBean(sf);

    }

    BindingInfo bindingInfo = super.createBindingInfo();

    if (implInfo.isWebServiceProvider()) {
        bindingInfo.getService().setProperty("soap.force.doclit.bare", Boolean.TRUE);
        if (this.getServiceFactory().isPopulateFromClass()) {
            for (EndpointInfo ei : bindingInfo.getService().getEndpoints()) {
                ei.setProperty("soap.no.validate.parts", Boolean.TRUE);
            }
            //Provider, but no wsdl.  Synthetic ops
            for (BindingOperationInfo op : bindingInfo.getOperations()) {
                op.setProperty("operation.is.synthetic", Boolean.TRUE);
                op.getOperationInfo().setProperty("operation.is.synthetic", Boolean.TRUE);
            }
        }
    }

    return bindingInfo;
}