get SOAP Body - Java javax.xml.soap

Java examples for javax.xml.soap:SOAPMessage

Description

get SOAP Body

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 SOAPBody getSOAPBody(List extensibilityElements) {
        SOAPBody body = null;// w  ww . ja  v a 2  s.  c  o  m
        for (int j = 0; j < extensibilityElements.size(); j++) {
            Object element = extensibilityElements.get(j);
            if (element instanceof SOAPBody) {
                body = (SOAPBody) element;
                break;
            }
        }
        return body;
    }
}

Related Tutorials