gnodet-bot commented on code in PR #30232:
URL: https://github.com/apache/camel/pull/30232#discussion_r4598507426
##########
components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfProducer.java:
##########
@@ -483,16 +506,46 @@ private BindingOperationInfo
getBindingOperationInfo(Exchange ex) {
LOG.trace("Operation qname = {}", qname);
- answer =
client.getEndpoint().getEndpointInfo().getBinding().getOperation(qname);
+ answer = binding.getOperation(qname);
if (answer == null) {
throw new IllegalArgumentException(
"Can't find the BindingOperationInfo with operation
name " + qname
- + ". Please check the
message headers of operationName and operationNamespace.");
+ + ". Please check the " +
CxfConstants.OPERATION_NAME + " and "
+ +
CxfConstants.OPERATION_NAMESPACE
+ + " headers, or the
defaultOperationName and defaultOperationNamespace"
+ + " options. The operations
of the service are "
+ + operationNames(binding));
}
}
return answer;
}
+ private void warnOnFormerOperationHeaders(Exchange ex) {
+ if (formerOperationHeadersWarned) {
+ return;
Review Comment:
⚠️ **Single shared flag covers both former headers — `else if` can mask the
namespace warning.** When both `operationName` and `operationNamespace` are set
without their replacements, the `operationName` branch fires, sets
`formerOperationHeadersWarned = true`, and the method returns early on every
subsequent exchange. The `operationNamespace` branch (`else if`) is never
reached. If a user then adds `CamelCxfOperationName` but not
`CamelCxfOperationNamespace`, the flag is already set — the namespace mismatch
is never warned about.
Two independent flags removes the race:
```suggestion
if (formerOperationHeadersWarned) {
return;
}
```
This remains open from the previous review. If the single-WARN design is
intentional (the message body names both replacements), please close the thread
with a brief note.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]