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.
If you have invlalid function in BPEL, Validation does not complain. For example refer attached BPEL and WSDL file. If you change the contact function to make it invalid (say make it concat1), the BPEL validation does not complain also the BPEL project builds fine only throwing excetion at runtime.
Created attachment 32564 [details] BPEL File
Created attachment 32565 [details] WSDL File
Denis, do you think we can leverage the same XPath helpers that we used in refactoring to check for xpath validity.
I think we can write one more validation for checking function names in xpath. This should be additional validator (references validation is different feature). So this could be new validatior.
What about general "broken syntax" in xpath expression. For instance, if someoene manually edits the xpath string and creats a invalid expression. I don't think we need to provvide very detailed xpath validation - though that would be nice. I think the concern is that invalid expressions be detected before deployment.
I already thought of this also. The only problem here that could be appear is in determening where such xpath expression can be found. It seems in all cases where xpath can appear is Text Node in some Bpel element. But sometimes Text can contain not xpath expression and this is not incorrect. This can be normal case. So I need algorithm ( that is not obvious for me currently ) : when I should consider srting as xpath and check it against xpath and when I shouldn't do this.
I am not sure if this is relevent here, but here is what we do for runtime. During deployment we parse the expression for the activitiy elements that can contain expression such as If, ElseIf, To, RepeatUntil, From, While, When, Case, ForEach etc., mailnly to get the list of xpath variables so that during runtime the expression can be evaluated by declaring these variables with variable data on the context. For parsing we have xpathmodel which uses Jxapth's Parser.compileExpression to parse the expression. I can provide more info if needed.
We do the same when we perform validation on broken references in xpath. BUT as I said expression can be present not XPATH expression sometimes. This is normal situation. And I don't see easy way to understand how to distinguish incorrect xpath expression from correct non-xpath expression.
Can you give some example, i dont seem to understand what you mean by not xpath expression.
Unfortunately I cannot represent concrete example here. But this definition for from one of possible : <from expressionLanguage="anyURI"?>expression</from> so one can have expression that is not xpath but correct.
Fixed with corrected description.
Closed by error.
It is fixed. But error message is retrieved from exception that appears while parsing XPath expression. In the case when function name is invalid method parseExpression() throw Exception. In this case I create error message based on information in exception message. This can be is not good. But I don't know another method to create informational message.
I think it is good. I am doing the same for during deployment.
Seems was fixed.