ORABPEL-09503 Invalid xpath expression in a CASE expression
Hi I have the following case statement in my BPEL process -
<switch name="checkAuthenticateResult">
<case condition="upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'">
<bpelx:annotation>
<bpelx:pattern>authenticatePass
</bpelx:pattern>
</bpelx:annotation>
<assign name="assignTktOutput">
<copy>
<from expression="boolean(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')='T')"/>
<to variable="outputVariable" part="payload" query="/client:WshSendTxnToOtmServiceProcessResponse/client:result/ns2:authenticated"/>
</copy>
</assign>
</case>
<otherwise>
<throw name="throwAuthenticateFail" faultVariable="g_faultVariable" faultName="faultError"/>
</otherwise>
</switch>
When I run my process in 10.1.2, it works fine, but when I run it in 10.1.3.1, it errors out with the following error -
<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>env:Server</faultcode>
<faultstring>ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'", the reason is Unknown expression at EOF: upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'..
Please verify the xpath query "upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_RETURN_STATUS')))='S' AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'" which is defined in BPEL process.
</faultstring><faultactor></faultactor></env:Fault></env:Body></env:Envelope>
Do you think there was a bug in the expression that has surfaced due to some additional validations in 10.1.3.1 or am I missing something here?
Thanks a lot for your help.
Thanks.
RV
AND upper-case(string(bpws:getVariableData('g_InvokeAuthenticateTicketOutput','OutputParameters','/ns13:OutputParameters/X_TKT_VALID')bpws:getVariableData('isAuthenticCaller'))) = 'T'"
what is this bold part about? this looks wrong to me..
/clemens
Similar Messages
-
[Error ORABPEL-10039]: invalid xpath expression - array processing
hi,
I am trying to process multiple xml elements
<assign name="setinsideattributes">
<copy>
<from expression="ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')"/>
<to variable="ssn"/>
</copy>
</assign>
where iterator is a index variable .
I am getting into this error .
Error(48):
[Error ORABPEL-10039]: invalid xpath expression
[Description]: in line 48 of "D:\OraBPELPM_1\integration\jdev\jdev\mywork\may10-workspace\multixm-catch\multixm-catch.bpel", xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" specified in <from> is not valid, because XPath query syntax error.
Syntax error while parsing xpath expression "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')", at position "77" the exception is Expected: ).
Please verify the xpath query "ora:getElement('Receive_1_Read_InputVariable','BILL','/ns2:BILL/ns2:CMS1500['bpws:getVariableData('iterator')']/ns2:HEADER/ns2:SSN')" which is defined in BPEL process.
[Potential fix]: Please make sure the expression is valid.
any information on how to fix this .
thanks in advancecheck out this note here
http://clemensblog.blogspot.com/2006/03/bpel-looping-over-arrays-collections.html
hth clemens -
Concat Operation failing.[Error ORABPEL-10039]: invalid xpath expression
Hi ,
I am trying to concat two values which are as mentioned below
concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber'))
to /ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value (which is same as first parameter of concat operation)
the error is [Error ORABPEL-10039]: invalid xpath expression
[Description]: in line 681 of "C:\Users\varsha.tm\Desktop\InitiateMaintainContractRolesEmail\bpel\InitiateMaintainContractRolesEmail.bpel", xpath expression "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('Ac
cumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber'))" specified in <from> is not valid, because XPath query syntax error.
Syntax error while parsing xpath expression "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTyp
eCount]/ns1:ContractNumber'))", at position "76" the exception is Expected: ).
Please verify the xpath query "concat(bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value'),bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:Co.....
I also tried converting both the variables of concat to string and then giving to concat operation. please let me know what could be the possible way to do thisHi,
try storing the values of the below into a separate variables var1,var2 and then use concat(bpws:getVariableData('var1'),bpws:getVariableData(var2))....also try using the predicate[] without
bpws:getVariableData for the below variables...for this in the assign activity create copy operation window....u see the xpath text box and u can mention the predicate values there...some
thing like */ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value* , *ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType
[$ContractInfoTypeCount]/ns1:ContractNumber* instead of the below values
bpws:getVariableData('paramsVar','/ns7:parameters/ns7:item[ns7:name='ContractNumber']/ns7:value')
bpws:getVariableData('AccumilateEmail','/ns1:AccumilatePLAContracts/ns1:AccumilatePLAType[$PLACount]/ns1:ContractInfoType[$ContractInfoTypeCount]/ns1:ContractNumber') -
Custom XPath Function not working - ORABPEL-09503 error
I wrote a simple date conversion custom xpath function.
1. Implemented IXPathFunction as mentioned in Clemens and Antony Reynolds blog.
2. Also changed the xpath-functions.xml kept at C:\product\10.1.3.1\OracleAS_1\bpel\system\config\xpath-functions.xml and also at C:\product\10.1.3.1\OracleAS_1\bpel\domains\default\config\xpath-functions.xml (Not sure why this xml is in two places)
3. Placed my class file at C:\product\10.1.3.1\OracleAS_1\bpel\system\classes and also made a jar and placed in C:\product\10.1.3.1\OracleAS_1\j2ee\home\applib.
But when I run the process which uses this custom function, it is throwing the following error
<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>env:Server</faultcode>
<faultstring>ORABPEL-09503 Invalid xpath expression. Error while parsing xpath expression "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');", the reason is Error in expression: 'o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');'.. Please verify the xpath query "o2c:formatDateString('10/30/2007', 'MM/DD/yyyy', 'YYYY-MM-DD');" which is defined in BPEL process. </faultstring>
</Fault>
Can somebody help me to resolve this.My bad. I had a semi-colon after the expression. Now I am getting a different error
<Faulthttp://schemas.xmlsoap.org/soap/envelope/>
<faultcode>env:Server</faultcode>
<faultstring>ORABPEL-09500 XPath expression failed to execute. Error while processing xpath expression, the expression is "o2c:formatDateString('10/30/2007', 'MM/DD/YYYY', 'YYYY-MM-DD')", the reason is FOTY0001: type error. Please verify the xpath query. </faultstring>
</Fault> -
I have a process that gets a date (format YYYY-MM-DD; forced by Console), which has to be delivered to a Webservice, that requests dates in format 'dd MMM yyyy' (24 aug 2005).
I've tried the following options (in an Assign):
<copy>
<from variable="inputVariable" part="payload" query="ora:formatDate('/client:bpAanvraagProcessRequest/client:DatumBemonstering', 'dd MMM yyyy')"/>
<to variable="addAanvraag_addaanvraag_InputVariable" part="pDbg"/>
</copy>And:
<copy>
<from variable="inputVariable" part="payload" query="xp20:format-dateTime(/client:bpAanvraagProcessRequest/client:DatumBemonstering,'[dd] [MMM] [YYYY]')"/>
<to variable="addAanvraag_addaanvraag_InputVariable" part="pDbg"/>
</copy>Both fail with the following message:
[Error ORABPEL-10076]: invalid xpath query string
[Description]: in line 68 of "L:\workspaces\BPEL\bpAanvraag\bpAanvraag.bpel", According to BPEL4WS spec 1.1, section 14.3,
the xpath query "ora:formatDate('/client:bpAanvraagProcessRequest/client:DatumBemonstering', 'dd MMM yyyy')" is invalid,
query should be an absolute location path and it must start from the root element prefixed with "/"..
[Potential fix]: Please make sure that your xpath query starts with "/" which is the root..Anyone has any ideas how to fix this?Okey, found it:
The format-string is an XSLT 2.0 picture string, see syntax explained at http://www.w3.org/TR/xslt20/#date-picture-string
By the way:
a) w3.org publishes the function xslt:format-date(), and format it by picture. This is not offered by Oracle BPEL it seems (at least not through the Expression builder, ver 10.1.2.0.0 ).
Oracle-BPEL offers:
b) ora:formatDate(), and format it by java.text.SimpleDateFormat.
c) xp20:format-dateTime(), and format it by picture.
So I took it away by code like:
<copy>
<from expression="xp20:current-dateTime()"/>
<to variable="myDateTime"/>
</copy>
<copy>
<from expression="'P21D'"/>
<my-xml-comment>The Xpath syntax (like P21D) is for specifying an xdt:dayTimeDuration of 21 days ahead, see http://www.w3.org/TR/xpath-functions/#lexical-dayTimeDuration</my-xml-comment>
<to variable="myDuration"/>
</copy>
<copy>
<from expression="xp20:add-dayTimeDuration-to-dateTime( bpws:getVariableData('myDateTime'), bpws:getVariableData('myDuration') )"/>
<to variable="myResultTime"/>
</copy>
<copy>
<from expression="xp20:format-dateTime( bpws:getVariableData('myResultTime'), '[Y0001][M01][D01]' )"/>
<to variable="myResultTimeNOARK"/>
</copy> -
CASE STATEMENTS AND CASE EXPRESSIONS IN ORACLE9I PL/SQL
제품 : PL/SQL
작성날짜 : 2001-11-13
CASE STATEMENTS AND CASE EXPRESSIONS IN ORACLE9I PL/SQL
=======================================================
PURPOSE
아래의 자료는 Case 문에서 oracle 8.1.7과 Oracle 9i의 New Feature로 8.1.7에서는
sqlplus 에서만 가능했고, 9i 부터는 pl/sql 까지 가능하다.
Explanation
1. Oracle 8.1.7 Feature
Oracle 8.1.7 에서 Case 문은 Decode 문과 유사하지만, 기존의 decode 문을 쓰는 것보다
더 많은 확장성과 Logical Power와 좋은 성능을 제공한다. 주로 나이와 같이 category 별로
나눌때 주로 사용하고 Syntex는 아래와 같다.
CASE WHEN <cond1> THEN <v1> WHEN <cond2> THEN <v2> ... [ELSE <vn+1> ] END
각각의 WHEN...THEN 절의 argument 는 255 까지 가능하고 이 Limit를 해결하려면
Oracle 8i Reference를 참조하면 된다.
The maximum number of arguments in a CASE expression is 255, and each
WHEN ... THEN pair counts as two arguments. To avoid exceeding the limit of 128 choices,
you can nest CASE expressions. That is expr1 can itself be a CASE expression.
Case Example : 한 회사의 모든 종업원의 평균 봉급을 계산하는데 봉급이 $2000보다 작은경우
2000으로 계산을 하는 방법이 pl/sql을 대신하여 case function을 사용할 수 있다.
SELECT AVG(CASE when e.sal > 2000 THEN e.sal ELSE 2000 end) FROM emp e;
Case Example : 나이를 column으로 가지고 있는 customer table을 예로 들어보자.
SQL> SELECT
2 SUM(CASE WHEN age BETWEEN 70 AND 79 THEN 1 ELSE 0 END) as "70-79",
3 SUM(CASE WHEN age BETWEEN 80 AND 89 THEN 1 ELSE 0 END) as "80-89",
4 SUM(CASE WHEN age BETWEEN 90 AND 99 THEN 1 ELSE 0 END) as "90-99",
5 SUM(CASE WHEN age > 99 THEN 1 ELSE 0 END) as "100+"
6 FROM customer;
70-79 80-89 90-99 100+
4 2 3 1
1 SELECT
2 (CASE WHEN age BETWEEN 70 AND 79 THEN '70-79'
3 WHEN age BETWEEN 80 and 89 THEN '80-89'
4 WHEN age BETWEEN 90 and 99 THEN '90-99'
5 WHEN age > 99 THEN '100+' END) as age_group,
6 COUNT(*) as age_count
7 FROM customer
8 GROUP BY
9 (CASE WHEN age BETWEEN 70 AND 79 THEN '70-79'
10 WHEN age BETWEEN 80 and 89 THEN '80-89'
11 WHEN age BETWEEN 90 and 99 THEN '90-99'
12* WHEN age > 99 THEN '100+' END)
SQL> /
AGE_G AGE_COUNT
100+ 1
70-79 4
80-89 2
90-99 3
Example
2. Oracle 9i Feature
Oracle 9i부터는 pl/sql에서도 case문을 사용할 수 있으면 이것은
복잡한 if-else 구문을 없애고, C언어의 switch문과 같은 기능을 한다.
아래의 9i pl/sql Sample 및 제약 사항을 보면 아래와 같다.
Sample 1:
A simple example demonstrating the proper syntax for a case
statement
using a character variable as the selector. See the section entitled
'Restrictions' at the end of this article for details on which PLSQL
datatypes may appear as a selector in a case statement or
expression.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
begin
case achar
when 'A' then dbms_output.put_line('The description was Excellent');
when 'B' then dbms_output.put_line('The description was Very Good');
when 'C' then dbms_output.put_line('The description was Good');
when 'D' then dbms_output.put_line('The description was Fair');
when 'F' then dbms_output.put_line('The description was Poor');
else dbms_output.put_line('The description was No such Grade');
end case;
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 2:
A simple example demonstrating the proper syntax for a case
expression
using a character variable as the selector. See the section entitled
'Restrictions' at the end of this article for details on which PLSQL
datatypes may appear as a selector in a case statement or
expression.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
description varchar2(20);
begin
description :=
case achar
when 'A' then 'Excellent'
when 'B' then 'Very Good'
when 'C' then 'Good'
when 'D' then 'Fair'
when 'F' then 'Poor'
else 'No such grade'
end;
dbms_output.put_line('The description was ' || description);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
NOTE: The above simple samples demonstrate two subtle differences in the
syntax
required for case statements and expressions.
1) A case STATEMENT is terminated using the 'end case' keywords; a
case
EXPRESSION is terminated using only the 'end' keyword.
2) Each item in a case STATEMENT consists of one or more
statements, each
terminated by a semicolon. Each item in a case expression
consists of
exactly one expression, not terminated by a semicolon.
Sample 3:
Sample 1 demonstrates a simple case statement in which the selector
is
compared for equality with each item in the case statement body.
PL/SQL
also provides a 'searched' case statement as an alternative; rather
than
providing a selector and a list of values, each item in the body of
the
case statement provides its own predicate. This predicate can be any
valid boolean expression, but only one case will be selected.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
begin
case
when achar = 'A' then dbms_output.put_line('The description was
Excellent');
when achar = 'B' then dbms_output.put_line('The description was Very
Good');
when achar = 'C' then dbms_output.put_line('The description was
Good');
when achar = 'D' then dbms_output.put_line('The description was
Fair');
when achar = 'F' then dbms_output.put_line('The description was
Poor');
else dbms_output.put_line('The description was No such Grade');
end case;
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 4:
This sample demonstrates the proper syntax for a case expression of
the
type discussed in Sample 3 above.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
achar char(1) := '&achar';
description varchar2(20);
begin
description :=
case
when achar = 'A' then 'Excellent'
when achar = 'B' then 'Very Good'
when achar = 'C' then 'Good'
when achar = 'D' then 'Fair'
when achar = 'F' then 'Poor'
else 'No such grade'
end;
dbms_output.put_line('The description was ' || description);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 5:
This sample demonstrates the use of nested case statements. It is
also
permissable to nest case expressions within a case statement (though
it
is not demonstrated here), but nesting of case statements within a
case
expression is not possible since statements do not return any value.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
anum1 number := &anum1;
anum2 number := &anum2;
answer number;
begin
case anum1
when 1 then case anum2
when 1 then answer := 10;
when 2 then answer := 20;
when 3 then answer := 30;
else answer := 999;
end case;
when 2 then case anum2
when 1 then answer := 15;
when 2 then answer := 25;
when 3 then answer := 35;
else answer := 777;
end case;
else answer := 555;
end case;
dbms_output.put_line('The answer is ' || answer);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 6:
This sample demonstrates nesting of case expressions within another
case
expression. Note again the absence of semicolons to terminate both
the
nested case expression and the individual cases of those
expressions.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
declare
anum1 number := &anum1;
anum2 number := &anum2;
answer number;
begin
answer :=
case anum1
when 1 then case anum2
when 1 then 10
when 2 then 20
when 3 then 30
else 999
end
when 2 then case anum2
when 1 then 15
when 2 then 25
when 3 then 35
else 777
end
else 555
end;
dbms_output.put_line('The answer is ' || answer);
end;
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Although PL/SQL anonymous blocks have been used in all of the examples
so far,
case statements and expressions can also be used in procedures,
functions, and
packages with no changes to the syntax.
The following samples are included for completeness and demonstrate the
use of
case statements and/or expressions in each of these scenarios.
Sample 7:
This sample demonstrates use of a case statement in a stored
procedure.
Note that this sample also demonstrates that it is possible for each
of
the items in the case body to consist of more than one statement.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace procedure testcasestmt ( anum IN number ) is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
end;
exec testcasestmt(&anum);
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 8:
This sample demonstrates the use of a case statement in a stored
package.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace package testpkg2 is
procedure testcasestmt ( anum IN number );
function testcasestmt_f ( anum IN number ) return number;
end testpkg2;
create or replace package body testpkg2 is
procedure testcasestmt ( anum IN number ) is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
end;
function testcasestmt_f ( anum IN number ) return number is
begin
case
when anum = 1 then dbms_output.put_line('The number was One');
dbms_output.put_line('In case 1');
when anum = 2 then dbms_output.put_line('The number was Two');
dbms_output.put_line('In case 2');
when anum = 3 then dbms_output.put_line('The number was Three');
dbms_output.put_line('In case 3');
when anum = 4 then dbms_output.put_line('The number was Four');
dbms_output.put_line('In case 4');
when anum = 5 then dbms_output.put_line('The number was Five');
dbms_output.put_line('In case 5');
else dbms_output.put_line('The description was Invalid input');
dbms_output.put_line('In the else case');
end case;
return anum;
end;
end testpkg2;
exec testpkg2.testcasestmt(&anum);
variable numout number
exec :numout := testpkg2.testcasestmt_f(&anum);
print numout
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
Sample 9:
This sample demonstrates the use of a case expression in a stored
package.
- - - - - - - - - - - - - - - - Code begins here - - - - - - - - - - - -
set serveroutput on
create or replace package testpkg is
procedure testcase ( anum IN number );
function testcase_f ( anum IN number ) return number;
end testpkg;
create or replace package body testpkg is
procedure testcase ( anum IN number ) is
anumber number := anum;
anothernum number;
begin
anothernum :=
case
when anumber = 1 then anumber + 1
when anumber = 2 then anumber + 2
when anumber = 3 then anumber + 3
when anumber = 4 then anumber + 4
when anumber = 5 then anumber + 5
else 999
end;
dbms_output.put_line('The number was ' || anothernum);
end;
function testcase_f ( anum IN number ) return number is
anumber number := anum;
anothernum number;
begin
anothernum :=
case
when anumber = 1 then anumber + 1
when anumber = 2 then anumber + 2
when anumber = 3 then anumber + 3
when anumber = 4 then anumber + 4
when anumber = 5 then anumber + 5
else 999
end;
dbms_output.put_line('The number was ' || anothernum);
return anothernum;
end;
end testpkg;
variable numout number
exec testpkg.testcase(&anum);
exec :numout := testpkg.testcase_f(&anum);
print numout
- - - - - - - - - - - - - - - - Code ends here - - - - - - - - - - - -
제약 사항
다음의 databasetype은 case 문에서 지원되지 않는다.
BLOB
BFILE
VARRAY
Nested Table
PL/SQL Record
PL/SQL Version 2 tables (index by tables)
Object type (user-defined type)
All of these types except for object types face a similar restriction
even for if statements (i.e. they cannot be compared for equality directly) so this is unlikely to change for these types. Lack of support for object types is simply an implementation restriction which may be relaxed in future releases.
Reference Ducumment
Oracle 8.1.7 Manual
NOTE:131557.1I have done the following code but doesn't
like the statement of - "case(butNext)". What do you mean "doesn't like" -- did you get an error message?
I'm guessing it won't compile because you're trying to switch on a Button.
I tried something
like "g.fillOval(100,50,70,90, BorderLayout.NORTH)"...no that doesn't make sense. You only use BorderLayout.NORTH when you're adding components to a BorderLayout layout manager. An oval is not a component and fillOval isn't adding a component and Graphics is not a Panel or layout manager.
Would appreciate it if someone could tell me how to position
shapes using the graohic method. I think the problem is that you're confusing shapes with components. -
ORA-31013: Invalid XPATH expression - Oracle9i
Hello, I have to write a secure website call and below is the code snippet. I am getting following error
ORA-31013: Invalid XPATH expression
ORA-06512: at "SYS.XMLTYPE", line 0
ORA-06512: at line 104
This is on Oracle9i Enterprise Edition Release 9.2.0.6.0 - 64bit Production
Code snippet
soap_request :=
'<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<NewOrder xmlns="urn:ws.xtech.net/xtechGateway">
<newOrderRequest xsi:type="ns1:NewOrderRequestElement" xmlns:ns1="urn:ws.xtech.net/xtechGateway" xmlns="">
<ns1:xConnectionUsername>'
|| 'XXXXXXXX'
|| '</ns1:xConnectionUsername>';
UTL_HTTP.SET_WALLET ( 'file:/devdb/9.2.0/appsutil/wallet', 'password' );
http_req :=
UTL_HTTP.begin_request
('https://wsvar.xtech.net/xtechGateway',
'POST',
'HTTP/1.1'
UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
UTL_HTTP.set_header (http_req, 'Content-Length', LENGTH (soap_request));
utl_http.set_header(http_req, 'SOAPAction', '');
UTL_HTTP.write_text (http_req, soap_request);
http_resp := UTL_HTTP.get_response (http_req);
UTL_HTTP.read_text (http_resp, soap_respond);
UTL_HTTP.end_response (http_resp);
*resp := XMLTYPE.createxml (soap_respond);
resp :=
resp.EXTRACT
('/soap:Envelope/soap:Body/child::node()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
v_resp :=
resp.EXTRACT ('NewOrderResponse/return/text ()', '"approvalStatus"').getstringval
Not sure where Am I doing wrong. Please help
Thanks,
ROkay, I have removed the "ApprovalStatus" and replaced with the xmlns. Also, based on the description of child:node(), I think, then it is required.
Now I am getting following error
ORA-30625: method dispatch on NULL SELF argument is disallowed
Below is the complete code and underneath code I am providing response XML structure
I can't thank you enough for tracking this post for so long. Thank you so much, I really appreciate your diligence.
Code_
DECLARE
soap_request CLOB;
soap_respond CLOB;
v_resp VARCHAR2 (100);
v_order VARCHAR2 (100);
v_line_number VARCHAR2 (100);
http_req UTL_HTTP.req;
http_resp UTL_HTTP.resp;
resp XMLTYPE;
BEGIN
soap_request :=
'<?xml version="1.0" encoding="utf-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soapenv:Body>
<NewOrder xmlns="urn:ws.xtech.net/xtechGateway">
<newOrderRequest xsi:type="ns1:NewOrderRequestElement" xmlns:ns1="urn:ws.xtech.net/xtechGateway" xmlns="">
<ns1:XConnectionUsername>'
|| 'xxxxxxx'
|| '</ns1:xalConnectionUsername>'
|| '<ns1:xalConnectionPassword>'
|| 'xxxxxxx'
|| '</ns1:xalConnectionPassword>'
|| '<ns1:industryType>'
|| 'EC'
|| '</ns1:industryType>'
|| '<ns1:transType>'
|| 'AC'
|| '</ns1:transType>'
|| '<ns1:bin>'
|| '000002'
|| '</ns1:bin>'
|| '<ns1:merchantID>'
|| 700000208789
|| '</ns1:merchantID>'
|| '<ns1:terminalID>'
|| 001
|| '</ns1:terminalID>'
|| '<ns1:ccAccountNum>'
|| '4x1xxxx11x11x1xx1'
|| '</ns1:ccAccountNum>'
|| '<ns1:ccExp>'
|| '122012'
|| '</ns1:ccExp>'
|| '<ns1:ccCardVerifyPresenceInd>'
|| 2
|| '</ns1:ccCardVerifyPresenceInd>'
|| '<ns1:avsZip>'
|| 'T2H 2K6'
|| '</ns1:avsZip>'
|| '<ns1:avsAddress1>'
|| '112-7015 MACLEOD TRAIL SW'
|| '</ns1:avsAddress1>'
|| '<ns1:avsAddress2>'
|| ''
|| '</ns1:avsAddress2>'
|| '<ns1:avsCity>'
|| 'CALGARY'
|| '</ns1:avsCity>'
|| '<ns1:avsState>'
|| ''
|| '</ns1:avsState>'
|| '<ns1:avsName>'
|| 'Testing'
|| '</ns1:avsName>'
|| '<ns1:avsCountryCode>'
|| 'CA'
|| '</ns1:avsCountryCode>'
|| '<ns1:orderID>'
|| '31103142361483'
|| '</ns1:orderID>'
|| '<ns1:amount>'
|| 100
|| '</ns1:amount>'
|| '<ns1:comments>'
|| 'This is a AE AVSCVV AuthCap'
|| '</ns1:comments>'
|| '</newOrderRequest>'
|| '</NewOrder>'
|| '</soapenv:Body>'
|| '</soapenv:Envelope>';
UTL_HTTP.set_wallet ('file:/a01/oracle/devdb/9.2.0/appsutil/wallet',
'p4ssword'
http_req :=
UTL_HTTP.begin_request
('https://wsvar.xtech.net/xtechGateway',
'POST',
'HTTP/1.1'
UTL_HTTP.set_header (http_req, 'Content-Type', 'text/xml');
UTL_HTTP.set_header (http_req, 'Content-Length', LENGTH (soap_request));
UTL_HTTP.set_header (http_req, 'SOAPAction', 'xmlns="urn:ws.xtech.net/xtechGateway"');
UTL_HTTP.write_text (http_req, soap_request);
http_resp := UTL_HTTP.get_response (http_req);
UTL_HTTP.read_text (http_resp, soap_respond);
UTL_HTTP.end_response (http_resp);
resp := XMLTYPE.createxml (soap_respond);
resp :=
resp.EXTRACT ('/soap:Envelope/soap:Body/child::node()',
'xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"'
v_resp :=trunc(resp.EXTRACT ('/NewOrderResponse/return/text ()','xmlns:ns1="urn:ws.xtech.net/xtechGateway"').getstringval());
DBMS_OUTPUT.put_line ('Response: ' || v_resp);
END;
XML Response Structure_
<xml>
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:ns="urn:ws.xtech.net/xtechGateway">
<SOAP-ENV:Body id="_0">
<NewOrderResponse xmlns="urn:ws.xtech.net/xtechGateway" xsi:type="ns:NewOrderResponse">
<return xsi:type="ns:NewOrderResponseElement">
<industryType xsi:type="xsd:string">EC</industryType>
<transType xsi:type="xsd:string">AC</transType>
<bin xsi:type="xsd:string">000001</bin>
<merchantID xsi:type="xsd:string">041756</merchantID>
<terminalID xsi:type="xsd:string">001</terminalID>
<cardBrand xsi:type="xsd:string">DI</cardBrand>
<orderID xsi:type="xsd:string">31103142361483</orderID>
<txRefNum xsi:type="xsd:string">41C09DBC1D0710F4635C1156509F3CCF491F545E</txRefNum>
<txRefIdx xsi:type="xsd:string">1</txRefIdx>
<respDateTime xsi:type="xsd:string">20041215152533</respDateTime>
<procStatus xsi:type="xsd:string">0</procStatus>
<approvalStatus xsi:type="xsd:string">1</approvalStatus>
<respCode xsi:type="xsd:string">00</respCode>
<avsRespCode xsi:type="xsd:string">B </avsRespCode>
<cvvRespCode xsi:type="xsd:string">P</cvvRespCode>
<authorizationCode xsi:type="xsd:string">tst993</authorizationCode>
<mcRecurringAdvCode xsi:type="xsd:string"/>
<visaVbVRespCode xsi:type="xsd:string"/>
<procStatusMessage xsi:type="xsd:string">Approved</procStatusMessage>
<hostRespCode xsi:type="xsd:string">100</hostRespCode>
<hostAVSRespCode xsi:type="xsd:string">I3</hostAVSRespCode>
<hostCVVRespCode xsi:type="xsd:string">P</hostCVVRespCode>
<retryAttempCount xsi:type="xsd:string"/>
<lastRetryDate xsi:type="xsd:string"/>
<customerRefNum xsi:type="xsd:string"/>
<customerName xsi:type="xsd:string"/>
<profileProcStatus xsi:type="xsd:string"/>
<profileProcStatusMsg xsi:type="xsd:string"/>
</return>
</NewOrderResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope> </xml>
Edited by: user2913945 on Mar 8, 2010 10:42 AM -
Getting Invalid XPath expression
Hi,
I am parsing a XML document and reading a node with <xtags:valueOf .. select="product_name"/>. The value of product_name is :
<product_name>SJE6 2004Q1, 1 RTU ESD, All platforms, 1 Year</product_name> , but I am getting the following exception :
org.dom4j.InvalidXPathException: Invalid XPath expression: SJE6 2004Q1, 1 RTU ESD, All platforms, 1 Year Unexpected '2004'
at org.dom4j.xpath.DefaultXPath.parse(DefaultXPath.java:316)
at org.dom4j.xpath.DefaultXPath.<init>(DefaultXPath.java:63)
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:182)
at org.dom4j.DocumentFactory.createXPath(DocumentFactory.java:198)
at org.apache.taglibs.xtags.xpath.AbstractTag.createXPath(AbstractTag.java:195)
at org.apache.taglibs.xtags.xpath.VariableTag.setSelect(VariableTag.java:143)
I tried with <xtags:copyOf select=.../node() and text()/> but still getting the same exception. Not sure why its failing on 2004? Help!
Thanks,
-AshishThe problem was not in the <xtags:valueOf> but in the following expression :
<xtags:variable id="lName" select="<%= product_name %>"/>
where I wasassigning the value of <product_name> to a String (java) variable defined. But this will be another question : why is <xtags:variable> failing? -
Hi ,
I have an XML content as below and i am sending that as a string input to other interface . Here i have hard coded Teller ID and account ID , but i want to send the input from payload like this : ><Teller><ID>bpws:getVariableData('TellerId')</ID></Teller> .
But it is giving error as "Invalid xpath expression" . How can the below xml be sent with the teller id and account no. accepting inputs from payload?
ora:getContentAsString('<?xml version="1.0" encoding="utf-8"?><Summit xmlns="http://summit.fiserv.com" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://summit.fiserv.com /cfg/CommandSchema/sisCommands.xsd"><Spectrum><CommandRq><RequestHeader><Teller><ID>T1P1</ID></Teller><Override>0</Override></RequestHeader><RQMS_RQSTRq><Account>123123</Account><Options>M</Options></RQMS_RQSTRq></CommandRq></Spectrum></Summit>')The other interface accepts only strings . If i do it using xml fragment , it is embedding white spaces and is not acceptable by the other interface.
-
ORA-31013: Invalid XPATH expression
Hi,
I am getting this error when i am trying to execute a sp which will do xml parsing.
What all i did is i have Oracle database with 9.2.0.1.0 version. The i hav ugraded the database to 9.2.0.6.0 using the Oracle patch. After upgrading the Oracle db to 9.2.0.6.0 i got the below error:
ORA-00600: internal error code,
Then i ran the catpatch.sql to get rid off this error. After running the catpatch.sql the above error gone but i got another error
ORA-31013: Invalid XPATH expression.
What does this mean. The sp is working fine before upgrading the Oracle db to 9.2.0.6.0. Is the patch upgrade corrupted any of the XML libraries or the 9.2.0.6.0 doesn't support the xml parsing or do i need to apply any patch for this.
Please suggest me ASAP since this error has been raised at cusotmer and i am in very much need of this.
The statement which i am using for parsing the xml file is
x.xml_data.extract('/x:recording/@x:ref').getStringVal() from xml_process;
where xml_process is a table of xml_type.
Thanks
RaoHello, There,
Recently we have moved some project from 9ir2 to 10gr2, some code which worked fine before but now got error.
any patch needed for this ? did anybody get the same issue before?
here're my environment:
1)9ir2:
SQL> select * from v$version;
BANNER
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
PL/SQL Release 9.2.0.8.0 - Production
CORE 9.2.0.8.0 Production
TNS for Solaris: Version 9.2.0.8.0 - Production
NLSRTL Version 9.2.0.8.0 - Production
2) 10gr2:
SQL> select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
PL/SQL Release 10.2.0.4.0 - Production
CORE 10.2.0.4.0 Production
TNS for 64-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production
3) below are my test code which works fine in 9ir2 but got problem of "ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in..."
---===================TEST CODE START========================================
var xml_data clob;
begin
:xml_data:='<?xml version="1.0" encoding="UTF-8"?>
<MCCI_MT000100.Message xmlns="urn:hl7-org:v3" xmlns:voc="urn:hl7-org:v3/voc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<!-- NOTE
The OID values and other values used in this message are not intended to be meaningful
-->
<id root="2.16.840.1.113883.4.3.57.100000126" extension="58212040112"/>
<creationTime value="20030620"/>
<versionId>v3r1b3</versionId>
<!--
this should be the interaction ID for "Invoice Adjudication Request"
-->
<interactionId root="2.16.840.1.113883.4.3.57.100000126" extension="FICR_IN600201"/>
<processingCode code="P"/>
<processingModeCode code="T"/>
<!-- always send an acknowledgement -->
<acceptAckCode code="AL"/>
<!-- always send an acknowledgement -->
<applicationAckCode code="AL"/>
<communicationFunctionRcv>
<typeCode code="RCV"/>
<deviceRcv classCode="DEV" determinerCode="INSTANCE">
<id root="2.16.840.1.113883.4.3.57.100000126" extension="111111111"/>
<name use="L">BCE</name>
</deviceRcv>
</communicationFunctionRcv>
<communicationFunctionSnd>
<typeCode code="SND"/>
<deviceSnd>
<!-- note the defaulted classCode and determinerCode ere -->
<id root="2.16.840.1.113883.4.3.57.100000126" extension="100000126"/>
<name use="L">SampleProvider</name>
</deviceSnd>
</communicationFunctionSnd>
<controlActProcess>
<!-- 111111112 is Trading Network ID -->
<id root="2.16.840.1.113883.4.3.57.100000126" extension="111111112"/>
<effectiveTime value="20030620"/>
<subject>
<!-- element for invoiceadjudicationResults -->
<invoiceAdjudicationRequest>
<id root="2.16.840.1.113883.4.3.57.100000126" extension="58712040112"/>
<amt currency="CAD" value="200"/>
<reasonOf>
<!-- group invoice #: only one -->
<justifiedInvoiceElementOrder>
<id extension="162" root="2.16.840.1.113883.4.3.57.100000126"/>
<code code="CP"/>
<!-- CP: Clinical Product; CS: Clinical Service -->
<netAmt currency="CAD" value="200"/>
<component>
<InvoiceElementDetail>
<id extension="162.1" root="2.16.840.1.113883.4.3.57.100000126"/>
<code code="240"/> <!-- service code -->
<unitQuantity>
<numerator value="4" unit="h"/>
<denominator value="1" unit="each"/>
</unitQuantity>
<unitPriceAmt>
<numerator value="25" currency="CAD"/>
<denominator value="1" unit="1"/>
</unitPriceAmt>
<netAmt currency="CAD" value="100"/>
<reasonOf>
<justifiedAct>
<billableClinicalService>
<code code="240"/>
<!-- service code again, duplicate -->
<!-- date of service -->
<effectiveTime value="20030620"/>
<performer>
<healthCareProvider id ="100000126"/>
<!-- idb provider id as responsible provider -->
</performer>
<location>
<participant>
<COCT_MT240000.ServiceDeliveryLocation>
<code code="12"/>
<!-- facilityTypecode -->
</COCT_MT240000.ServiceDeliveryLocation>
</participant>
</location>
</billableClinicalService>
</justifiedAct>
</reasonOf>
</InvoiceElementDetail>
</component>
<component>
<InvoiceElementDetail>
<id extension="162.2" root="2.16.840.1.113883.4.3.57.100000126"/>
<code code="240"/> <!-- service code -->
<unitQuantity>
<numerator value="4" unit="h"/>
<denominator value="1" unit="each"/>
</unitQuantity>
<unitPriceAmt>
<numerator value="25" currency="CAD"/>
<denominator value="1" unit="1"/>
</unitPriceAmt>
<netAmt currency="CAD" value="100"/>
<reasonOf>
<justifiedAct>
<billableClinicalService>
<code code="240"/>
<!-- service code again, duplicate -->
<!-- date of service -->
<effectiveTime value="20030620"/>
<performer>
<healthCareProvider id ="100000126"/>
<!-- idb provider id as responsible provider -->
</performer>
<location>
<participant>
<COCT_MT240000.ServiceDeliveryLocation>
<code code="12"/>
<!-- facilityTypecode -->
</COCT_MT240000.ServiceDeliveryLocation>
</participant>
</location>
</billableClinicalService>
</justifiedAct>
</reasonOf>
</InvoiceElementDetail>
</component>
<coverage>
<coveringCoverageEvent>
<id extension="1" root="2.16.840.1.113883.4.3.57.100000126"/>
<code code="event"/>
<beneficiary>
<coveredParty>
<!-- claim # -->
<id extension="00012345" root="2.16.840.1.113883.4.3.57.100000126"/>
<code code ="spouse"/>
<coveredParty>
<CoveredPartyAsPatientPerson>
<name>
<family>Jackson</family>
<given>Robyn</given>
</name>
<administrativeGenderCode code="F"/>
<birthTime value="19490601" />
<deceasedTime value="20030123" />
<multipleBirthInd value="false" />
<multipleBirthOrderNumber value="1" />
<addr>
<postalCode>L1W3V4</postalCode>
</addr>
</CoveredPartyAsPatientPerson>
</coveredParty>
</coveredParty>
</beneficiary>
<author>
<underwriter>
<!-- Insurer ID -->
<id extension="10001" root="2.16.840.1.113883.4.3.57.100000126"/>
</underwriter>
</author>
</coveringCoverageEvent>
</coverage>
</justifiedInvoiceElementOrder>
</reasonOf>
</invoiceAdjudicationRequest>
</subject>
</controlActProcess>
<attentionLine type="AttentionLine" assoc="inboundRelationship">
<keyWordText code="BENEFITGR">Physio</keyWordText>
</attentionLine>
<attentionLine type="AttentionLine" assoc="inboundRelationship">
<keyWordText code="TPID">111111112</keyWordText>
</attentionLine>
</MCCI_MT000100.Message>
end;
select extract(xmltype(:xml_data),'/MCCI_MT000100.Message/communicationFunctionSnd/deviceSnd/id@extension','xmlns="urn:hl7-org:v3"').getStringVal() from dual;
--=====================TEST CODE END=======================================
in 9ir2 the result is:
SQL> select extract(xmltype(:xml_data),'/MCCI_MT000100.Message/communicationFunctionSnd/deviceSnd/id@extension','xmlns="urn:hl7-org:v3"').getStringVal(
) from dual ;
EXTRACT(XMLTYPE(:XML_DATA),'/MCCI_MT000100.MESSAGE/COMMUNICATIONFUNCTIONSND/DEVI
100000126
but in 10gr2, the error show as below:
SQL>
SQL> select extract(xmltype(:xml_data),'/MCCI_MT000100.Message/communicationFunctionSnd/deviceSnd/id@extension','xmlns="urn:hl7-org:v3"').getStringVal(
) from dual ;
select extract(xmltype(:xml_data),'/MCCI_MT000100.Message/communicationFunctionSnd/deviceSnd/id@extension','xmlns="urn:hl7-org:v3"').getStringVal() fro
m dual
ERROR at line 1:
ORA-31011: XML parsing failed
ORA-19202: Error occurred in XML processing
LPX-00601: Invalid token in:
'/MCCI_MT000100.Message/communicationFunctionSnd/deviceSnd/id@extension'
thanks in advance!
richard -
JAVA XML DOM4J: Invalid XPath expression
Hi everybody,
I am not sure why I am getting an exception for this expression:
Number count= document.numberValueOf("/NODE/SUBNODE/count(*)");
Exception is:
org.dom4j.InvalidXPathException: Invalid XPath expression:
Thanks regards
MarioHello
what about
"count (/NODE/SUBNODE)" as xpath expression
regards franz
reward points if useful -
JAVAMapping dom4j: Invalid XPath expression:
Hi ervybody,
I am not sure why I am getting an exception for this expression:
Number count= document.numberValueOf("/NODE/SUBNODE/count(*)");
Exception is:
org.dom4j.InvalidXPathException: Invalid XPath expression:
Thanks regards
MarioThe problem is
You don't have the correct version of jaxen or one of its dependencies on the classpath.
Please update your DOM Parser beta12.
Please visit the link.
http://jira.codehaus.org/browse/JAXEN-175 -
BPEL - 10.1.3.3 [Error ORABPEL-10057]: invalid query
Hi,
I am getting the following error when compiling the BPEL Process.
Error(1198):
[Error ORABPEL-10057]: invalid query
[Description]: in line 1198 of "C:\HealdSalesForce\trunk\WebFormsToSalesForce\bpel\WebFormsToSalesForce.bpel", query "/ns2:queryResponse/ns2:result/ns2:records[1]/child::ns1:ConvertedAccountId" is invalid, because step 'ns1:ConvertedAccountId' is not valid..
[Potential fix]: Check the XML schema and make sure your query string is valid.
This is the code segments...
xmlns:ns1="urn:sobject.enterprise.soap.sforce.com"
xmlns:ns3="http://xmlns.oracle.com/SalesForceAuthentication"
xmlns:ns2="urn:enterprise.soap.sforce.com"
<variable name="*_RetrieveDupCandidatesOutput_*"
messageType="ns2:queryResponse"/>
<invoke name="RetrieveDupCandidates" partnerLink="sForce6.0"
portType="ns2:Soap" operation="query"
inputVariable="RetrieveDupCandidatesInput"
outputVariable="*_RetrieveDupCandidatesOutput_*"
bpelx:inputHeaderVariable="sessionHeader"/>
...... ............Errors out here..........
<case condition="string-length(bpws:getVariableData('RetrieveDupCandidatesOutput','parameters','/ns2:queryResponse/ns2:result/ns2:records[1]')/ns1:ConvertedAccountId) > 0">
This code is working in 10.1.2, When upgraded to 10.1.3, it is erroring out.
Any idea why is this erroring out. Is it because of the mixed namespaces in the query path? We are trying to get the first record of the resultset(records) and get the ConvertedAccountId from the first record.
Thank you
Krish
Edited by: knandipati on 2009. 8. 31 오후 5:28
Edited by: knandipati on 2009. 8. 31 오후 5:29Hi,
I am getting the following error when compiling the BPEL Process.
Error(1198):
[Error ORABPEL-10057]: invalid query
[Description]: in line 1198 of "C:\HealdSalesForce\trunk\WebFormsToSalesForce\bpel\WebFormsToSalesForce.bpel", query "/ns2:queryResponse/ns2:result/ns2:records[1]/child::ns1:ConvertedAccountId" is invalid, because step 'ns1:ConvertedAccountId' is not valid..
[Potential fix]: Check the XML schema and make sure your query string is valid.
This is the code segments...
xmlns:ns1="urn:sobject.enterprise.soap.sforce.com"
xmlns:ns3="http://xmlns.oracle.com/SalesForceAuthentication"
xmlns:ns2="urn:enterprise.soap.sforce.com"
<variable name="*_RetrieveDupCandidatesOutput_*"
messageType="ns2:queryResponse"/>
<invoke name="RetrieveDupCandidates" partnerLink="sForce6.0"
portType="ns2:Soap" operation="query"
inputVariable="RetrieveDupCandidatesInput"
outputVariable="*_RetrieveDupCandidatesOutput_*"
bpelx:inputHeaderVariable="sessionHeader"/>
...... ............Errors out here..........
<case condition="string-length(bpws:getVariableData('RetrieveDupCandidatesOutput','parameters','/ns2:queryResponse/ns2:result/ns2:records[1]')/ns1:ConvertedAccountId) > 0">
This code is working in 10.1.2, When upgraded to 10.1.3, it is erroring out.
Any idea why is this erroring out. Is it because of the mixed namespaces in the query path? We are trying to get the first record of the resultset(records) and get the ConvertedAccountId from the first record.
Thank you
Krish
Edited by: knandipati on 2009. 8. 31 오후 5:28
Edited by: knandipati on 2009. 8. 31 오후 5:29 -
How to use the CASE Expression in Where Cluase?
Hi All,
I'm trying to use the CASE Expression in the Where Clause at some trigger on the Form?
I've tried this Code:
Declare
N Number;
begin
SELECT COUNT(E.EMP_SID)
INTO N
FROM EMPLOYEES E, RANKS R
WHERE CASE WHEN R.qualification_sid = 1104 AND E.rank_sid = 8 THEN
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1)
ELSE
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1)
END
BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR');
END;
When I run this code as a normal query at any SQL editor it works successfully, But When I Compile it at some trigger on the Form it gives me this error:
Encountered the symbol "CASE" when expecting one of the following:
( - + mod ......
Heeey how to specify the previous code to be shown as code in the thread?
Note: I'm using Forms 6iOK I tried it and worked but for one condition:
WHERE DECODE (E.qualification_sid, 1104,
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
But how to put two conditions for the same Expression:
WHERE DECODE ((E.qualification_sid, 1104) AND (E.RANK_SID, 8),
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.spe_per)+1),
(TO_DATE(E.RANK_DATE, 'DD-MM-RR')+(365*M.mili_yea_per)+1))
BETWEEN TO_DATE('01-07-2011', 'DD-MM-RR') AND TO_DATE('31-07-2011', 'DD-MM-RR')
The previous code gives me this error: missing right parenthesis -
Error(64) : invalid xpath in JDeveloper 10.1.3.1 Developer
Hi,
I am migrating the BPEL Project which was desinged for the BPEL(10.1.2) to SOA Suite using the JDeveloper 10.1.3.1 Developer Preview version.
The taken the project which is buildin and deploying correctly in the BPEL Desg&ser (10.1.2).
But the same project is not compiling in the newer preview version.i got invalid xpath exception.
my xpath is like
bpws:getVariableData('inputVariable','payload','/client:commonProjectProcessRequest/client:input/ns1:listOfProducts')
if i change like this xpath, woking fine...
bpws:getVariableData('inputVariable','payload','/client:commonProjectProcessRequest/client:input')
the element defined as string in wsdl.however am expecting in runtime process will recive an xml string as a value input element so the xpath will work fine..
is the any facility turn of xpath validation while building bpel project in the jdev10.1.3.1. preview version.
could you please any one give me solution ?
Thanks
bogiyes, i found an URL and I try to access this via browser, and the following message appears:
Error instantiating web-application
Error compiling :C:\My Documents\Java\Webservice\Service3\public_html: Syntax error in source or compilation failed in: E:\master\Oracle JDeveloper 10.1.3 Early Access\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\application-deployments\current-workspace-app\Webservice-Service3-webapp\galih\service\runtime\MyWebService1SoapHttp_Tie.java E:\master\Oracle JDeveloper 10.1.3 Early Access\jdev\system\oracle.j2ee.10.1.3.34.12\embedded-oc4j\application-deployments\current-workspace-app\Webservice-Service3-webapp\galih\service\runtime\GalihServiceService_SerializerRegistry.java:36: error #300: MyWebService1_getMessage_ResponseStruct__LiteralSerializer not found in class galih.service.runtime.GalihServiceService_SerializerRegistry
CombinedSerializer serializer = new galih.service.runtime.MyWebService1_getMessage_ResponseStruct__LiteralSerializer(type, DONT_ENCODE_TYPE);
^
1 error
Maybe you are looking for
-
Is there a solution for Higher Ed Computer Labs?
I am an instructional Technician for the Photography Department at a Community College. We currently purchase and use the Creative Suite 6 Design & Web Premium here in the Photography, Graphics and Journalism departments. We have over 150 Macintosh c
-
Mountain Lion: Copying mailbox from one user to another user on the same mac
When I bought the mac I had only one email address. Since then I have accumulated 3 more addresses. I created another User on the same MAC to seperate the personal emails from the 3 new email addresses, that I use for business. There are some mailb
-
IPod no longer connecting to the car
My iPod touch has stopped connecting to the car. It says it does not support this accessory, the car says no audio files. It has been fine for months. I have reset and restarted the iPod. I've tried my iPad with the car and that's still fine so it mu
-
Strange problem e=mailing photos
I have been sending some photos from my iMac to my wife's iPad. Yesterday I sent 4, 2 arrived and 2 did not. They are shown as "sent" in my Mail system. I tried again to day. I resent the 2 from yesterday and another one that she wanted. The new one
-
Finder window, alpha sort weird - Can it be changed
Apple has this very nice, but completely incompatible sorting order for files in finder windows ( by name ) For example: "_" (underscore) is tops on the Mac, and way down under Windows & Unix. Is there a way to set the sorting order that the Finder u