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:09:00 UTC
[jira] [Updated] (CXF-8587) Don't check the validation flag and get
the schema on every iteration for SoapHeader
[ https://issues.apache.org/jira/browse/CXF-8587?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ilya Mikhailov updated CXF-8587:
--------------------------------
Summary: Don't check the validation flag and get the schema on every iteration for SoapHeader (was: Don't check the validation flag and don't get the schema on every iteration for SoapHeader)
> Don't check the validation flag and 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
> Priority: Minor
>
> 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)