This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The implementation of the validation rule that is supposed to indicate invalid presence of output variable or fromPart in the case of a one-way Invoke is broken. Steps to reproduce. Validate AsynchronousSample. XML validation started. C:/Documents and Settings/Mike/AsynchronousSample/AsynchronousSample/src/AsynchronousSample.bpel:42,6 For <invoke>, one-way invocation requires only the inputVariable (or its equivalent <toPart>?s) since a response is not expected as part of the operation. The outputVariable (or its equivalent <fromPart>?s) must be only specified for request-response invocations. This is incorrect because the Invoke does not have an output variable or from part. <invoke name="end" partnerLink="partnerLinkA" portType="wsdlNS:MyCallbackPortType" operation="onResult" inputVariable="outputVar"/> Fix: The problem is in the class BPELStaticAnalysisHelper method BPELStaticAnalysisHelper The if condition is incorrect, both the 2nd and 3rd conditions I believe are the inverse of what they should be. if ( invoke.getOutputVariable()!= null || invoke.getFromPartContaner()==null || invoke.getFromPartContaner().sizeOfFromParts() == 0 ) { addError( FIX_OUTPUT_VARIABLE_FOR_ONE_WAY_OP , invoke ); } I am changing it to be. if ( invoke.getOutputVariable()!= null || (invoke.getFromPartContaner()!=null && invoke.getFromPartContaner().sizeOfFromParts() > 0) ) { addError( FIX_OUTPUT_VARIABLE_FOR_ONE_WAY_OP , invoke ); } Notice difference in both 2nd and 3rd conditionals. However, I want Denis to review. I am not sure if we need the 3rd condition at all. I left it in to be safe. Denis, please review.
fixed - but want Denis to review.
Reviewed. Original code was written by me and there was stupid mistake. Current code ( corrected by Mike ) is correct.
i have verified