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.

Bug 149517 - need validation warning for same functions which has to vary depends on context and not support in runtime
Summary: need validation warning for same functions which has to vary depends on conte...
Status: VERIFIED FIXED
Alias: None
Product: soa
Classification: Unclassified
Component: BPEL Mapper (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Alexander Permyakov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-08 14:03 UTC by Alexander Permyakov
Modified: 2008-10-22 23:06 UTC (History)
0 users

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
project (60.38 KB, application/octet-stream)
2008-10-22 23:06 UTC, ggenipudi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Permyakov 2008-10-08 14:03:29 UTC
Some functions depend on context. 
last(), id(), local-name(), namespace-uri(), name(), string(), string-length(), normalize-space(), lang(), number(),
position()

When I do this graphically it generates mappings of the kind....

<copy ignoreMissingFromData="yes">
      <from>$SearchBlockOut.parameters/return[position() = $ForEach1Counter]/masterPersonIndex/lastName</from>
      <to>$PersonBloackSearchOut.outPart/ns0:result[position() = $ForEach1Counter]/ns0:lastName</to>
</copy>

...but this fails with the following error.....

Exception trying to create xpath $PersonBloackSearchOut.outPart/ns0:result[position() = $ForEach1Counter]/ns0:lastName;
JXPath can only create a path if it uses exclusively the child:: and attribute:: axes and has no context-dependent
predicates

In other words, "position()" syntax should work if the node was
previously initialized, but if it does not exist it should fail.

I think, that in this case we need to add special warning "not support in runtime"
Comment 1 Alexander Permyakov 2008-10-10 17:13:05 UTC
fixed,
changeset for soa-dev:
http://hg.netbeans.org/soa-dev/rev/8bd9abdf080f
Comment 2 ggenipudi 2008-10-22 23:05:46 UTC
tested and verified and got the following error when position was initialized.

Tested and verified the attached project using position and got the following warning message

init:
Deleting directory C:\Users\ggenipudi\Documents\NetBeansProjects\BpelModule1\build
clean:
init:
Created dir: C:\Users\ggenipudi\Documents\NetBeansProjects\BpelModule1\build
C:/Users/ggenipudi/Documents/NetBeansProjects/BpelModule1/src/repeatingNodeWithPosition/repeatingNodeWithPosition.bpel:35:
15
WARNING: Currently the Sun BPEL SE does not support the operation "position()".

Copying 3 files to C:\Users\ggenipudi\Documents\NetBeansProjects\BpelModule1\build
Building jar: C:\Users\ggenipudi\Documents\NetBeansProjects\BpelModule1\build\SEDeployment.jar
dist_se:
BUILD SUCCESSFUL (total time: 0 seconds)


and ran runtime and got the following expected exception

<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://schemas.xmlsoap.org/soap/envelope/ http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
      <faultcode xmlns="">SOAP-ENV:Server</faultcode>
      <faultstring xmlns="">BPCOR-6135:A fault was not handled in the process scope; Fault Name is
{http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure; Fault Data is null. Sending errors for the
pending requests in the process scope before terminating the process instance</faultstring>
      <faultactor xmlns="">sun-bpel-engine</faultactor>
      <detail xmlns="">
        <detailText>BPCOR-6135:A fault was not handled in the process scope; Fault Name is
{http://docs.oasis-open.org/wsbpel/2.0/process/executable}selectionFailure; Fault Data is null. Sending errors for the
pending requests in the process scope before terminating the process instance
   Caused by: BPCOR-6174:Selection Failure occurred in
BPEL({http://enterprise.netbeans.org/bpel/repeatingNodeWithPosition}repeatingNodeWithPosition) at line 35
BPCOR-6129:Line Number is 28
BPCOR-6130:Activity Name is Assign1
   Caused by: Exception trying to create xpath $RepeatingNodeOperationOut.part1/ns0:Collection[position() =
$counter]/ns0:leafElement; JXPath can only create a path if it uses exclusively the child:: and attribute:: axes and has
no context-dependent predicates</detailText>
      </detail>
    </SOAP-ENV:Fault>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

when 
Comment 3 ggenipudi 2008-10-22 23:06:51 UTC
Created attachment 72496 [details]
project