Map httpLocationTable = new TreeMap(new Comparator(){
public int compare(Object o1, Object o2) {
return (-1 * ((Comparable)o1).compareTo(o2));
}
});
SOAPBindingExtensions soapBindingExtensions;
try {
soapBindingExtensions = (SOAPBindingExtensionsImpl) binding
.getComponentExtensionContext(new URI(WSDL2Constants.URI_WSDL2_SOAP));
} catch (URISyntaxException e) {
throw new AxisFault("Soap Binding Extention not found");
}
String soapVersion;
if ((soapVersion = soapBindingExtensions.getSoapVersion()) != null) {
if (soapVersion.equals(WSDL2Constants.SOAP_VERSION_1_1)) {
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_VERSION,
SOAP11Constants.SOAP_ENVELOPE_NAMESPACE_URI);
} else {
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_VERSION,
SOAP12Constants.SOAP_ENVELOPE_NAMESPACE_URI);
}
} else {
// Set the default to soap 1.2
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_VERSION,
WSDL20DefaultValueHolder.getDefaultValue(
WSDL2Constants.ATTR_WSOAP_VERSION));
}
URI soapUnderlyingProtocol = soapBindingExtensions.getSoapUnderlyingProtocol();
if (soapUnderlyingProtocol != null) {
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_PROTOCOL,
soapUnderlyingProtocol.toString());
}
URI soapMepDefault = soapBindingExtensions.getSoapMepDefault();
if (soapMepDefault != null) {
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_MEP,
soapMepDefault.toString());
}
axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_CONTENT_ENCODING,
soapBindingExtensions.getHttpContentEncodingDefault());
axisBinding.setProperty(WSDL2Constants.ATTR_WSOAP_MODULE,
createSoapModules(soapBindingExtensions.getSoapModules()));
axisBinding.setProperty(WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
soapBindingExtensions.getHttpQueryParameterSeparatorDefault());
// Capture all the fault specific properties
BindingFault[] bindingFaults = binding.getBindingFaults();
for (int i = 0; i < bindingFaults.length; i++) {