Search in sources :

Example 1 with SOAPBinding

use of javax.wsdl.extensions.soap.SOAPBinding 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;
}
Also used : OperationInfo(org.talend.designer.webservice.ws.wsdlinfo.OperationInfo) SOAP12Binding(javax.wsdl.extensions.soap12.SOAP12Binding) BindingOperation(javax.wsdl.BindingOperation) SOAPOperation(javax.wsdl.extensions.soap.SOAPOperation) SOAP12Operation(javax.wsdl.extensions.soap12.SOAP12Operation) ArrayList(java.util.ArrayList) Iterator(java.util.Iterator) SOAPBinding(javax.wsdl.extensions.soap.SOAPBinding) List(java.util.List) ArrayList(java.util.ArrayList) Vector(java.util.Vector) UnknownExtensibilityElement(javax.wsdl.extensions.UnknownExtensibilityElement) ExtensibilityElement(javax.wsdl.extensions.ExtensibilityElement)

Example 2 with SOAPBinding

use of javax.wsdl.extensions.soap.SOAPBinding in project tomee by apache.

the class JaxRpcServiceInfoBuilder method getStyle.

private BindingStyle getStyle(Binding binding) throws OpenEJBException {
    SOAPBinding soapBinding = getExtensibilityElement(SOAPBinding.class, binding.getExtensibilityElements());
    String styleString = soapBinding.getStyle();
    BindingInput bindingInput = ((BindingOperation) binding.getBindingOperations().get(0)).getBindingInput();
    SOAPBody soapBody = getExtensibilityElement(SOAPBody.class, bindingInput.getExtensibilityElements());
    String useString = soapBody.getUse();
    BindingStyle bindingStyle = BindingStyle.getBindingStyle(styleString, useString);
    return bindingStyle;
}
Also used : BindingOperation(javax.wsdl.BindingOperation) SOAPBody(javax.wsdl.extensions.soap.SOAPBody) SOAPBinding(javax.wsdl.extensions.soap.SOAPBinding) BindingInput(javax.wsdl.BindingInput)

Example 3 with SOAPBinding

use of javax.wsdl.extensions.soap.SOAPBinding in project tomee by apache.

the class WsdlVisitor method getSOAPBinding.

protected SOAPBinding getSOAPBinding(Binding binding) {
    SOAPBinding soapBinding = null;
    List extensibilityElements = binding.getExtensibilityElements();
    for (int i = 0; i < extensibilityElements.size(); i++) {
        Object element = extensibilityElements.get(i);
        if (element instanceof SOAPBinding) {
            soapBinding = (SOAPBinding) element;
        }
    }
    return soapBinding;
}
Also used : SOAPBinding(javax.wsdl.extensions.soap.SOAPBinding) List(java.util.List)

Aggregations

SOAPBinding (javax.wsdl.extensions.soap.SOAPBinding)3 List (java.util.List)2 BindingOperation (javax.wsdl.BindingOperation)2 ArrayList (java.util.ArrayList)1 Iterator (java.util.Iterator)1 Vector (java.util.Vector)1 BindingInput (javax.wsdl.BindingInput)1 ExtensibilityElement (javax.wsdl.extensions.ExtensibilityElement)1 UnknownExtensibilityElement (javax.wsdl.extensions.UnknownExtensibilityElement)1 SOAPBody (javax.wsdl.extensions.soap.SOAPBody)1 SOAPOperation (javax.wsdl.extensions.soap.SOAPOperation)1 SOAP12Binding (javax.wsdl.extensions.soap12.SOAP12Binding)1 SOAP12Operation (javax.wsdl.extensions.soap12.SOAP12Operation)1 OperationInfo (org.talend.designer.webservice.ws.wsdlinfo.OperationInfo)1