You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Ilya Mikhailov (Jira)" <ji...@apache.org> on 2021/08/29 06:08:00 UTC
[jira] [Created] (CXF-8587) Don't check the validation flag and
don't get the schema on every iteration for SoapHeader
Ilya Mikhailov created CXF-8587:
-----------------------------------
Summary: Don't check the validation flag and don't get the schema on every iteration for SoapHeader
Key: CXF-8587
URL: https://issues.apache.org/jira/browse/CXF-8587
Project: CXF
Issue Type: Improvement
Components: Soap Binding
Affects Versions: 3.4.4
Reporter: Ilya Mikhailov
It seems like we don't need to check the schema enabled flag and get schema on every iteration for a SoapHeder.
{code:java}
for (SoapHeaderInfo header : headers) {
MessagePartInfo mpi = header.getPart();
try {
if (ServiceUtils.isSchemaValidationEnabled(SchemaValidationType.IN, message)) {
Schema schema = EndpointReferenceUtils.getSchema(service.getServiceInfos().get(0), message
.getExchange().getBus());
validateHeader(message, mpi, schema);
}
} catch (Fault f) {
if (!isRequestor(message)) {
f.setFaultCode(Fault.FAULT_CODE_CLIENT);
}
throw f;
}
...
}{code}
Removing these actions outside of the loop can provide a slight performance improvement if multiple headers are present in the request.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)