Iterator extElementsIterator =extElements.iterator();
String bindingS = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING; //this is the default.
while (extElementsIterator.hasNext()) {
Object o = extElementsIterator.next();
if (o instanceof SOAPBinding) {
SOAPBinding sp = (SOAPBinding)o;
if (sp.getElementType().getNamespaceURI().equals("http://schemas.xmlsoap.org/wsdl/soap/")) {
//todo: how to we tell if it is MTOM or not.
bindingS = javax.xml.ws.soap.SOAPBinding.SOAP11HTTP_BINDING;
}
} else if (o instanceof SOAP12Binding) {
SOAP12Binding sp = (SOAP12Binding)o;
if (sp.getElementType().getNamespaceURI().equals("http://schemas.xmlsoap.org/wsdl/soap12/")) {
//todo: how to we tell if it is MTOM or not.
bindingS = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING;
}
} else if (o instanceof HTTPBinding) {
HTTPBinding sp = (HTTPBinding)o;
if (sp.getElementType().getNamespaceURI().equals("http://www.w3.org/2004/08/wsdl/http")) {
bindingS = javax.xml.ws.http.HTTPBinding.HTTP_BINDING;
}
}
}