if (operation instanceof Wsdl2HttpOperation == false) {
return;
}
Wsdl2HttpBinding httpBinding = (Wsdl2HttpBinding) message.get(Binding.class);
Wsdl2HttpOperation httpOperation = (Wsdl2HttpOperation) operation;
Wsdl2HttpMessage httpMessage;
String serialization;
if (server) {
httpMessage = httpOperation.getInput();
serialization = httpOperation.getHttpInputSerialization();
} else {
httpMessage = httpOperation.getOutput();
serialization = httpOperation.getHttpOutputSerialization();
}
if (httpMessage.getContentModel() == ContentModel.ELEMENT ||
httpMessage.getContentModel() == ContentModel.ANY) {
// Serialization rules for XML
if (HttpConstants.SERIAL_APP_URLENCODED.equals(serialization)) {
normalizeUrlEncoded(message, httpBinding, httpOperation, httpMessage);
} else if (HttpConstants.SERIAL_MULTIPART_FORMDATA.equals(serialization)) {
normalizeFormData(message);
} else {
normalizeXml(message);
}
} else if (httpMessage.getContentModel() == ContentModel.NONE) {
if (message.getContent(Source.class) != null) {
throw new Fault("No content allowed");
}
} else {
throw new Fault("Unsupported content model: " + httpMessage.getContentModel());
}
}