use of javax.wsdl.extensions.soap12.SOAP12Binding in project pentaho-kettle by pentaho.
the class WsdlUtils method getSOAPBindingStyle.
/**
* Get the SOAPBinding style for the specified WSDL Port.
*
* @param binding
* A WSDL Binding instance.
* @return String either 'document' or 'rpc', if not found in WSDL defaults to 'document'.
*/
protected static String getSOAPBindingStyle(Binding binding) throws KettleException {
String style = SOAP_BINDING_DEFAULT;
ExtensibilityElement soapBindingElem = findExtensibilityElement(binding, SOAP_BINDING_ELEMENT_NAME);
if (soapBindingElem != null) {
if (soapBindingElem instanceof SOAP12Binding) {
style = ((SOAP12Binding) soapBindingElem).getStyle();
} else if (soapBindingElem instanceof SOAPBinding) {
style = ((SOAPBinding) soapBindingElem).getStyle();
} else {
throw new KettleException("Binding type " + soapBindingElem + " encountered. The Web Service Lookup step only supports SOAP Bindings!");
}
}
return style;
}
use of javax.wsdl.extensions.soap12.SOAP12Binding in project tdi-studio-se by Talend.
the class ComponentBuilder method buildOperations.
private List buildOperations(Binding binding) {
List operationInfos = new ArrayList();
List operations = binding.getBindingOperations();
if (operations != null && !operations.isEmpty()) {
Vector soapBindingElems = findExtensibilityElement(binding.getExtensibilityElements(), "binding");
// default
String style = "document";
ExtensibilityElement soapBindingElem = (ExtensibilityElement) soapBindingElems.elementAt(0);
if (soapBindingElem != null && soapBindingElem instanceof SOAPBinding) {
SOAPBinding soapBinding = (SOAPBinding) soapBindingElem;
style = soapBinding.getStyle();
} else if (soapBindingElem != null && soapBindingElem instanceof SOAP12Binding) {
SOAP12Binding soapBinding = (SOAP12Binding) soapBindingElem;
style = soapBinding.getStyle();
}
Iterator opIter = operations.iterator();
while (opIter.hasNext()) {
alldExtendtion.clear();
BindingOperation oper = (BindingOperation) opIter.next();
Vector operElems = findExtensibilityElement(oper.getExtensibilityElements(), "operation");
ExtensibilityElement operElem = (ExtensibilityElement) operElems.elementAt(0);
if (operElem != null && operElem instanceof SOAPOperation) {
OperationInfo operationInfo = new OperationInfo(style);
buildOperation(operationInfo, oper);
operationInfos.add(operationInfo);
} else if (operElem != null && operElem instanceof SOAP12Operation) {
OperationInfo operationInfo = new OperationInfo(style);
buildOperation(operationInfo, oper);
operationInfos.add(operationInfo);
}
}
}
return operationInfos;
}
use of javax.wsdl.extensions.soap12.SOAP12Binding in project carbon-business-process by wso2.
the class PeopleActivity method getSoapFactory.
public SOAPFactory getSoapFactory() throws FaultException {
Binding binding = getBinding();
ExtensibilityElement bindingType = SOAPHelper.getBindingExtension(binding);
if (!(bindingType instanceof SOAPBinding || bindingType instanceof SOAP12Binding || bindingType instanceof HTTPBinding)) {
throw new FaultException(BPEL4PeopleConstants.B4P_FAULT, "Service binding is not supported for service " + serviceName + " and port " + getServicePort());
}
if (bindingType instanceof SOAPBinding) {
return OMAbstractFactory.getSOAP11Factory();
} else {
return OMAbstractFactory.getSOAP12Factory();
}
}
use of javax.wsdl.extensions.soap12.SOAP12Binding in project teiid by teiid.
the class WSDLMetadataProcessor method extractExecutionBinding.
private WSExecutionFactory.Binding extractExecutionBinding(Binding binding) throws TranslatorException {
WSExecutionFactory.Binding executionBinding = WSExecutionFactory.Binding.SOAP11;
// $NON-NLS-1$
ExtensibilityElement bindingExtension = getExtensibilityElement(binding.getExtensibilityElements(), "binding");
if (bindingExtension instanceof SOAPBinding) {
executionBinding = WSExecutionFactory.Binding.SOAP11;
} else if (bindingExtension instanceof SOAP12Binding) {
executionBinding = WSExecutionFactory.Binding.SOAP12;
} else if (bindingExtension instanceof HTTPBinding) {
executionBinding = WSExecutionFactory.Binding.HTTP;
} else {
throw new TranslatorException(WSExecutionFactory.UTIL.gs(WSExecutionFactory.Event.TEIID15003));
}
return executionBinding;
}
use of javax.wsdl.extensions.soap12.SOAP12Binding in project carbon-apimgt by wso2.
the class WSDL11SOAPOperationExtractor method getSOAPBindingOperations.
/**
* Retrieves all the operations defined in the provided Binding.
*
* @param binding WSDL binding
* @return a set of {@link WSDLOperation} defined in the provided Binding
*/
private Set<WSDLSOAPOperation> getSOAPBindingOperations(Binding binding) throws APIMgtWSDLException {
Set<WSDLSOAPOperation> allBindingOperations = new HashSet<>();
if (binding.getExtensibilityElements() != null && binding.getExtensibilityElements().size() > 0) {
List extensibilityElements = binding.getExtensibilityElements();
for (Object extensibilityElement : extensibilityElements) {
if (extensibilityElement instanceof SOAPBinding || extensibilityElement instanceof SOAP12Binding) {
for (Object opObj : binding.getBindingOperations()) {
BindingOperation bindingOperation = (BindingOperation) opObj;
WSDLSOAPOperation wsdlSoapOperation = getSOAPOperation(bindingOperation);
if (wsdlSoapOperation != null) {
allBindingOperations.add(wsdlSoapOperation);
} else {
log.warn("Unable to get soap operation details from binding operation: " + bindingOperation.getName());
}
}
}
}
} else {
throw new APIMgtWSDLException("Cannot further process to get soap binding operations");
}
return allBindingOperations;
}
Aggregations