List of usage examples for javax.xml.ws.soap SOAPBinding SOAP12HTTP_MTOM_BINDING
String SOAP12HTTP_MTOM_BINDING
To view the source code for javax.xml.ws.soap SOAPBinding SOAP12HTTP_MTOM_BINDING.
Click Source Link
From source file:org.apache.axis2.jaxws.description.builder.JAXWSRIWSDLGenerator.java
/** * This will set up the arguments that will be used by the WsGen tool. */// w ww . jav a 2 s. c o m private String[] getWsGenArguments(String className, String bindingType, String localOutputDirectory) throws WebServiceException { String[] arguments = null; if (bindingType == null || bindingType.equals("") || bindingType.equals(SOAPBinding.SOAP11HTTP_BINDING) || bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING)) { if (log.isDebugEnabled()) { log.debug("Generating WSDL with SOAP 1.1 binding type"); } arguments = new String[] { "-cp", classPath, className, "-keep", "-wsdl:soap1.1", "-d", localOutputDirectory }; } else if (bindingType.equals(SOAPBinding.SOAP12HTTP_BINDING) || bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING)) { if (log.isDebugEnabled()) { log.debug("Generating WSDL with SOAP 1.2 binding type"); } arguments = new String[] { "-cp", classPath, className, "-keep", "-extension", "-wsdl:Xsoap1.2", "-d", localOutputDirectory }; } else { throw new WebServiceException("The binding " + bindingType + " specified by the " + "class " + className + " cannot be used to generate a WSDL. Please choose " + "a supported binding type."); } return arguments; }
From source file:org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.java
private static boolean isMTOMBinding(String url) { if (url != null && (url.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) || url.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING) || url.equals(MDQConstants.SOAP11JMS_MTOM_BINDING) || url.equals(MDQConstants.SOAP12JMS_MTOM_BINDING))) { return true; }//from w w w. j a v a 2 s . com return false; }
From source file:org.apache.axis2.jaxws.description.impl.EndpointDescriptionImpl.java
private boolean validateClientBindingID(String bindingId) { boolean isValid = true; if (bindingId != null && !(bindingId.equals(SOAPBinding.SOAP11HTTP_BINDING) || bindingId.equals(javax.xml.ws.http.HTTPBinding.HTTP_BINDING) || bindingId.equals(SOAPBinding.SOAP12HTTP_BINDING) || bindingId.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) || bindingId.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING) || bindingId.equals(MDQConstants.SOAP11JMS_BINDING) || bindingId.equals(MDQConstants.SOAP12JMS_BINDING) || bindingId.equals(MDQConstants.SOAP11JMS_MTOM_BINDING) || bindingId.equals(MDQConstants.SOAP12JMS_MTOM_BINDING))) { throw ExceptionFactory .makeWebServiceException(Messages.getMessage("addPortErr0", getPortQName().toString())); }//w w w . ja va 2 s . c o m return isValid; }
From source file:org.apache.axis2.jaxws.description.impl.ServiceDescriptionImpl.java
/** * Validate that, if using PAYLOAD mode, then interfaces list cannot contain SOAPMessage or * DataSource/*from ww w . j a v a 2s. com*/ * * @return */ private void validateProviderInterfaces() { // Default for ServiceMode is 'PAYLOAD'. So, if it is specified (explicitly or // implicitly) then verify that we are not implementing improper interfaces) if ((composite.getServiceModeAnnot() == null) || composite.getServiceModeAnnot().value() == javax.xml.ws.Service.Mode.PAYLOAD) { Iterator<String> iter = composite.getInterfacesList().iterator(); while (iter.hasNext()) { String interfaceString = iter.next(); if (interfaceString.equals(MDQConstants.PROVIDER_SOAP) || interfaceString.equals(MDQConstants.PROVIDER_DATASOURCE)) { throw ExceptionFactory.makeWebServiceException( Messages.getMessage("validatePIsErr1", composite.getClassName())); } } } else { // We are in MESSAGE mode // Conformance: JAXWS Spec.- Sec. 4.3 (javax.activation.DataSource) // REVIEW: Should the provider interface validation be moved to post-construction validation, // since it seems that the logic to understand the default values for binding type // (see comment below) should be left to the creation of the Description objects. String bindingType = null; if (composite.getBindingTypeAnnot() != null) { bindingType = composite.getBindingTypeAnnot().value(); } Iterator<String> iter = composite.getInterfacesList().iterator(); while (iter.hasNext()) { String interfaceString = iter.next(); if (interfaceString.equals(MDQConstants.PROVIDER_SOAP)) { // Make sure BindingType is SOAP/HTTP with SOAPMessage // object, Default for Binding Type is SOAP/HTTP if (!DescriptionUtils.isEmpty(bindingType) && !bindingType.equals(SOAPBinding.SOAP11HTTP_BINDING) && !bindingType.equals(SOAPBinding.SOAP11HTTP_MTOM_BINDING) && !bindingType.equals(SOAPBinding.SOAP12HTTP_BINDING) && !bindingType.equals(SOAPBinding.SOAP12HTTP_MTOM_BINDING) && !bindingType.equals(MDQConstants.SOAP11JMS_BINDING) && !bindingType.equals(MDQConstants.SOAP11JMS_MTOM_BINDING) && !bindingType.equals(MDQConstants.SOAP12JMS_BINDING) && !bindingType.equals(MDQConstants.SOAP12JMS_MTOM_BINDING) && !bindingType.equals(MDQConstants.SOAP_HTTP_BINDING)) throw ExceptionFactory.makeWebServiceException( Messages.getMessage("validatePIsErr2", composite.getClassName())); } else if (interfaceString.equals(MDQConstants.PROVIDER_DATASOURCE)) { // Make sure BindingType is XML/HTTP with DataSource object if (DescriptionUtils.isEmpty(bindingType) || !bindingType.equals(javax.xml.ws.http.HTTPBinding.HTTP_BINDING)) throw ExceptionFactory.makeWebServiceException( Messages.getMessage("validatePIsErr3", composite.getClassName())); } } } }
From source file:org.seedstack.seed.ws.internal.WSPlugin.java
private String getBindingIdForToken(String lexical) { // NOSONAR if ("##SOAP11_HTTP".equals(lexical)) { return SOAPBinding.SOAP11HTTP_BINDING; } else if ("##SOAP11_HTTP_MTOM".equals(lexical)) { return SOAPBinding.SOAP11HTTP_MTOM_BINDING; } else if ("##SOAP12_HTTP".equals(lexical)) { return SOAPBinding.SOAP12HTTP_BINDING; } else if ("##SOAP12_HTTP_MTOM".equals(lexical)) { return SOAPBinding.SOAP12HTTP_MTOM_BINDING; } else if ("##XML_HTTP".equals(lexical)) { return HTTPBinding.HTTP_BINDING; }/* w w w . ja v a 2 s .c om*/ return lexical; }