[ https://issues.apache.org/jira/browse/ODE-960?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16752305#comment-16752305 ]
Vitaliy Tkachenko edited comment on ODE-960 at 1/28/19 10:22 AM: ----------------------------------------------------------------- Hello! Could you please get me some link to a specification which describes that this is proper behavior what is required by this fix? I actually can't say this is obviously expected. In the last expression from the attached testProcess.bpel the effective formula is: $extPLRequest.parameters/ns:userIdin This means that the full userIdin node and its subnodes should be replaced with new value. If new value doesn't contain the corresponding attribute (testUserIdAttribute) which is subnode of the replaced node effectively then it is correct behavior that it is removed along with the whole userIdin node replacement. In case if user wants to access the inner node text (which is meant as "text node" in the XPath specification) there is the special text() function which selects only text node to be accessed and the lvalue should be as the following: $extPLRequest.parameters/ns:userIdin/text() Exactly this selection means access to userIdin's text content only (userIdin's node text subnode) thus only inner text should be replaced. But in the case above without of the text() function the behavior appears correct and the fix brings improper behavior not fix. was (Author: virtualvat): Hello! Could you please get me some link to a specification which describes that this is proper behavior what is required by this fix? I actually can't say this is obviously expected. In the last expression from the attached testProcess.bpel the effective formula is: $extPLRequest.parameters/ns:userIdin This means that the full userIdin node and its subnodes should be replaced with new value. If new value doesn't contain the corresponding attribute (testUserIdAttribute) which subnode of the replaced node effectively then it is correct behavior that it is removed along with the whole userIdin node replacement. In case if user wants to access the inner node text only the special text() function exists so the lvalue should be as the following: $extPLRequest.parameters/ns:userIdin/text() This means access to userIdin's text content only not the hole node it its substructure thus only inner text should be replaced. But in the case above without of the text() function the behavior appears correct to me and the fix brings improper behavior not fix. > Attribute of a xml element is missing after an <assign/> a value for that xml > element > ------------------------------------------------------------------------------------- > > Key: ODE-960 > URL: https://issues.apache.org/jira/browse/ODE-960 > Project: ODE > Issue Type: Bug > Components: BPEL Runtime > Affects Versions: 1.3.5, 1.4 > Environment: ode-axis2-war-1.4-SNAPSHOT > Reporter: Denis Weerasiri > Assignee: Tammo van Lessen > Priority: Major > Labels: patch > Fix For: 1.3.6, 1.4 > > Attachments: ODE-960.patch, testXPathAttribute.zip > > > How to reproduce the issue: > 1. Deploy the attached testXPathAttribute.zip > 2. Invoke it with > <body> > <p:testProcessRequest xmlns:p="http://eclipse.org/bpel/sample"> > <p:input>1</p:input> > </p:testProcessRequest> > </body> > 3. Check the variable value of "extPLRequest" > 4. It should have been something like > <message> > <parameters> > <getRewardTransRecord xmlns="http://ws.wso2.org/dataservice" > testAttribute="testAttributeValue"> > <ns1:userIdin testUserIdAttribute="testValue" > xmlns:ns1="http://ws.wso2.org/dataservice">1</ns1:userIdin> > <ns1:countIn > xmlns:ns1="http://ws.wso2.org/dataservice">9</ns1:countIn> > </getRewardTransRecord> > </parameters> > </message> > But the real value is > <message> > <parameters> > <getRewardTransRecord xmlns="http://ws.wso2.org/dataservice" > testAttribute="testAttributeValue"> > <ns1:userIdin > xmlns:ns1="http://ws.wso2.org/dataservice">1</ns1:userIdin> > <ns1:countIn > xmlns:ns1="http://ws.wso2.org/dataservice">9</ns1:countIn> > </getRewardTransRecord> > </parameters> > </message> > So the attribute is missing. > Regards, > Denis Weerasiri -- This message was sent by Atlassian JIRA (v7.6.3#76005)