get SOAP Operation - Java javax.xml.soap

Java examples for javax.xml.soap:SOAPMessage

Description

get SOAP Operation

Demo Code


import java.util.List;
import javax.wsdl.Binding;
import javax.wsdl.BindingOperation;
import javax.wsdl.Port;
import javax.wsdl.extensions.soap.SOAPAddress;
import javax.wsdl.extensions.soap.SOAPBinding;
import javax.wsdl.extensions.soap.SOAPBody;
import javax.wsdl.extensions.soap.SOAPOperation;

public class Main{
    public static SOAPOperation getSOAPOperation(BindingOperation operation) {
        SOAPOperation soapOp = null;/*from   w  w w  . j  a va  2  s. c om*/
        List extensibilityElements = operation.getExtensibilityElements();
        for (int i = 0; i < extensibilityElements.size(); i++) {
            Object element = extensibilityElements.get(i);
            if (element instanceof SOAPOperation) {
                soapOp = (SOAPOperation) element;
            }
        }
        return soapOp;
    }
}

Related Tutorials