XQuery dynamic type mismatch
Hi all, I am new to xmldb and XQuery. Having trouble with relational xmltable quering... Any help is appriciated.
I want the following output
id info loc
4 stuff2 1
5 stuff3 1
6 stuff1 1
7 stuff4 2
etc....
The problem if feel is loc does not have a relation to transaction in the data. But I get an error "XQuery dynamic type mismatch"....
I have created a basic example below:
SELECT a.*
FROM "testTable",
XMLTABLE('/root/org/transaction'
PASSING testTable.column
COLUMNS
id varchar2(2) PATH '@id',
info varchar2(50) PATH '/info',
loc varchar2(2) PATH '@loc'
) a
<root>
<org loc="1">
<Transaction id="4"><info>stuff2</info></Transaction>
<Transaction id="5"><info>stuff3</info></Transaction>
<Transaction id="6"><info>stuff1</info></Transaction>
</org>
<org loc="2">
<Transaction id="7"><info>stuff4</info></Transaction>
<Transaction id="8"><info>stuff5</info></Transaction>
</org>
<org loc="3">
<Transaction id="9"><info>stuff6</info></Transaction>
<Transaction id="10"><info>stuff7</info></Transaction>
</org>
</root>
Thanks again for any help.
Edited by: user8820504 on Jan 14, 2010 2:27 PM
You need two distinct tables, one that maps Transactions and one that maps Orgs. Then join them on id. Something like this:
SQL> with testTable as (
2 select xmltype('<root>
3 <org loc="1">
4 <Transaction id="4"><info>stuff2</info></Transaction>
5 <Transaction id="5"><info>stuff3</info></Transaction>
6 <Transaction id="6"><info>stuff1</info></Transaction>
7 </org>
8 <org loc="2">
9 <Transaction id="7"><info>stuff4</info></Transaction>
10 <Transaction id="8"><info>stuff5</info></Transaction>
11 </org>
12 <org loc="3">
13 <Transaction id="9"><info>stuff6</info></Transaction>
14 <Transaction id="10"><info>stuff7</info></Transaction>
15 </org>
16 </root>') doc
17 from dual)
18 SELECT id, info, loc
19 FROM testTable,
20 XMLTABLE('/root/org/Transaction'
21 PASSING testTable.doc
22 COLUMNS
23 id varchar2(2) PATH '@id',
24 info varchar2(50) PATH 'info',
25 tr xmltype PATH '.'
26 ) trans ,
27 XMLTABLE('/root/org'
28 PASSING testTable.doc
29 COLUMNS
30 loc varchar2(2) PATH '@loc',
31 trs xmltype PATH 'Transaction'
32 ) orgs
33 where extractValue(orgs.trs,'/Transaction[@id="'||id||'"]/@id') is not null ;
ID INFO LO
4 stuff2 1
5 stuff3 1
6 stuff1 1
7 stuff4 2
8 stuff5 2
9 stuff6 3
10 stuff7 3
Selezionate 7 righe.Max
[My Italian Oracle blog|http://oracleitalia.wordpress.com/2010/01/10/crittografia-in-plsql-utilizzando-dbms_crypto/]
Similar Messages
-
Hello,
How can I improve the XQuery below in order to obtain a minimised return to escape from both errors ORA-19279 and ORA-01706?
XQUERY for $book in fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy where $cont [ora:contains(text(), "(near((The,power,Love),10, TRUE))") > 0] return $book
ERROR:
ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence
- got multi-item sequence
XQUERY for $book in fn:collection("oradb:/HR/TB_XML")//article let $cont := $book/bdy where $cont [ora:contains(., "(near((The,power,Love),10, TRUE))") > 0] return $book//bdy
/*ERROR:
ORA-01706: user function result value was too large
Regards,
Daianebelow query works for 1 iteration . but for multiple sets i am getting following error .
When you want to present repeating groups in relational format, you have to extract the sequence of items in the main XQuery expression.
Each item is then passed to the COLUMNS clause to be further shredded into columns.
This should work as expected :
select x.*
from abc t
, xmltable(
xmlnamespaces(
default 'urn:swift:xsd:fin.970.2011'
, 'urn:swift:xsd:mtmsg.2011' as "ns0"
, '/ns0:FinMessage/ns0:Block4/Document/MT970/F61a/F61'
passing t.col1
columns F61ValueDate Varchar(40) Path 'ValueDate'
, DebitCreditMark Varchar(40) Path 'DebitCreditMark'
, Amount Varchar(40) Path 'Amount'
, TransactionType Varchar(40) Path 'TransactionType'
, IdentificationCode Varchar(40) Path 'IdentificationCode'
, ReferenceForTheAccountOwner Varchar(40) Path 'ReferenceForTheAccountOwner'
, SupplementaryDetails Varchar(40) Path 'SupplementaryDetails'
) x ; -
Hi ,
I executed the below query in database version 11.2.0.3.0, it throws the error like "ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence"
with PAYMENT_XML as (
select XMLTYPE(
'<Document>
<pain.002.001.02>
<GrpHdr>
<MsgId>CITIBANK/20091204-PSR/4274</MsgId>
<CreDtTm>2009-12-04T09:36:00</CreDtTm>
</GrpHdr>
<OrgnlGrpInfAndSts>
<OrgnlMsgId>10002</OrgnlMsgId>
<OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
<OrgnlNbOfTxs>20</OrgnlNbOfTxs>
<OrgnlCtrlSum>7000</OrgnlCtrlSum>
<GrpSts>PART</GrpSts>
<StsRsnInf>
<AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
</StsRsnInf>
</OrgnlGrpInfAndSts>
<OrgnlGrpInfAndSts>
<OrgnlMsgId>10001</OrgnlMsgId>
<OrgnlMsgNmId>pain.001.001.02</OrgnlMsgNmId>
<OrgnlNbOfTxs>202</OrgnlNbOfTxs>
<OrgnlCtrlSum>9000</OrgnlCtrlSum>
<GrpSts>PART</GrpSts>
<StsRsnInf>
<AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
<AddtlStsRsnInf>Formated</AddtlStsRsnInf>
</StsRsnInf>
</OrgnlGrpInfAndSts>
</pain.002.001.02>
</Document>') as OBJECT_VALUE1
from dual
select R.*
from PAYMENT_XML,
XMLTABLE(
'for $COMP in $COMPANY/Document/pain.002.001.02
for $DEPT at $DEPTIDX in $COMP/OrgnlGrpInfAndSts
return <RESULT>
<NAME>{fn:data($COMP/GrpHdr/MsgId)}</NAME>
$DEPT/OrgnlMsgId,
$DEPT/OrgnlNbOfTxs,
$DEPT/OrgnlCtrlSum,
$DEPT/GrpSts,
$DEPT/StsRsnInf/AddtlStsRsnInf
</RESULT>'
passing OBJECT_VALUE1 as "COMPANY"
columns
NAME VARCHAR(10) path 'NAME',
OrgnlMsgId VARCHAR2(24) path 'OrgnlMsgId',
ORGNLNBOFTXS VARCHAR2(24) path 'OrgnlNbOfTxs',
ORGNLCTRLSUM NUMBER path 'OrgnlCtrlSum',
GRPSTS VARCHAR2(24) path 'GrpSts',
ADDTLSTSRSNINF VARCHAR2(40) path 'AddtlStsRsnInf'
) r
Errors comes this part :
<StsRsnInf>
<AddtlStsRsnInf>ACK - FILE PARTIALLY SUCCESSFUL</AddtlStsRsnInf>
<AddtlStsRsnInf>Formated</AddtlStsRsnInf>
</StsRsnInf>
if i put the single statement for this xml element <AddtlStsRsnInf> it works fine if more than one element comes it raised the error.
i want the output like the below format : want to merge the element value with (, comma) delimiter with single coloumn value
NAME
ORGNLMSGID
ORGNLNBOFTXS
ORGNLCTRLSUM
GRPSTS
ADDTLSTSRSNINF
CITIBANK/2
10002
20
7,000
PART
ACK - FILE PARTIALLY SUCCESSFUL
CITIBANK/2
10001
202
9,000
PART
ACK - FILE PARTIALLY SUCCESSFUL, Formated
Thanks is advance for reply
Thanks,
ChidamTry with XQuery string-join() function :
ADDTLSTSRSNINF VARCHAR2(40) path 'string-join(AddtlStsRsnInf, ", ")' -
ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequ
I have been working with XML files containing only one record. I downloaded instructions to create/insert/select and the statements below work fine for the XML files with one record. Now I have XML files with multiple records/sections, but the select statement returns ORA-19279. How would I change the create/insert/select statements to handle XML files with more than one record? There is still only one vendata section, but there are multiple VendorData sections.
Thanks.
1. Create a table with an XML column:
create table vendxml_col (
vend_id number primary key,
vend_doc XMLType);
2. Insert xml document:
insert into vendxml_col values (1,
XMLType(bfilename('ING_FEED', 'VenData.xml'),
nls_charset_id('AL32UTF8')));
3. Query the xml columns in vendxml_col:
select vend_id,
a.cage, a.repl_cage, a.status, a.company1, a.company2, a.address1, a.address2,
a.pobox, a.city, a.state, a.zip, a.country, a.phone, a.fax, a.cao, a.adpp,
a.assoc, a.type, a.affil, a.sizex, a.pri_bus, a.type_bus, a.woman, a.sic,
a.formerly, a.formerly2, a.comp1key, a.comp2key, a.Revseq, a.Source,
a.RequestID
FROM vendxml_col,
XMLTABLE('/vendata'
PASSING vendxml_col.vend_doc
COLUMNS
cage varchar2(5) PATH '/vendata/VendorData/cage',
repl_cage varchar2(5) PATH '/vendata/VendorData/repl_cage',
status varchar2(1) PATH '/vendata/VendorData/status',
company1 varchar2(30) PATH '/vendata/VendorData/company1',
company2 varchar2(30) PATH '/vendata/VendorData/company2',
address1 varchar2(40) PATH '/vendata/VendorData/address1',
address2 varchar2(40) PATH '/vendata/VendorData/address2',
pobox varchar2(10) PATH '/vendata/VendorData/pobox',
city varchar2(30) PATH '/vendata/VendorData/city',
state varchar2(2) PATH '/vendata/VendorData/state',
zip varchar2(20) PATH '/vendata/VendorData/zip',
country varchar2(20) PATH '/vendata/VendorData/country',
phone varchar2(20) PATH '/vendata/VendorData/phone',
fax varchar2(20) PATH '/vendata/VendorData/fax',
cao varchar2(20) PATH '/vendata/VendorData/cao',
adpp varchar2(20) PATH '/vendata/VendorData/adpp',
assoc varchar2(20) PATH '/vendata/VendorData/assoc',
type varchar2(1) PATH '/vendata/VendorData/type',
affil varchar2(1) PATH '/vendata/VendorData/affil',
sizex varchar2(1) PATH '/vendata/VendorData/sizex',
pri_bus varchar2(1) PATH '/vendata/VendorData/pri_bus',
type_bus varchar2(1) PATH '/vendata/VendorData/type_bus',
woman varchar2(1) PATH '/vendata/VendorData/woman',
sic varchar2(4) PATH '/vendata/VendorData/sic',
formerly varchar2(5) PATH '/vendata/VendorData/formerly',
formerly2 varchar2(5) PATH '/vendata/VendorData/formerly2',
comp1key varchar2(30) PATH '/vendata/VendorData/comp1key',
comp2key varchar2(30) PATH '/vendata/VendorData/comp2key',
Revseq varchar2(1) PATH '/vendata/VendorData/Revseq',
Source varchar2(3) PATH '/vendata/VendorData/Source',
RequestID varchar2(3) PATH '/vendata/VendorData/RequestID'
) a
SQL*Plus: Release 10.2.0.1.0 - Production on Thu Jun 9 13:28:00 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL>select * from V$VERSION;
BANNER
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
PL/SQL Release 11.2.0.1.0 - Production
CORE 11.2.0.1.0 Production
TNS for Linux: Version 11.2.0.1.0 - Production
NLSRTL Version 11.2.0.1.0 - Production
Edited by: user8058903 on Jun 9, 2011 11:28 AMWelcome to the XML DB forums.
As everything in your sample XML is coming from the VendorData node, you can just include that in the XQuery string parm such as shown below. As you didn't include any sample XML, I just built a really simple test case with two VendorData nodes. As the note says, I used WITH to simulate your table/data because I was too lazy to create and populate a table in my playground.
WITH vendxml_col AS
(SELECT 1 vend_id,
XMLTYPE('<vendata><VendorData><cage>c1</cage></VendorData>
<VendorData><cage>c2</cage></VendorData></vendata>') vend_doc
FROM dual)
-- Above WITH used to simulate your table/data. You only care about below
SELECT vend_id, a.cage
FROM vendxml_col,
XMLTABLE('/vendata/VendorData'
PASSING vendxml_col.vend_doc
COLUMNS
cage VARCHAR2(5) PATH 'cage') a;
VEND_ID CAGE
1 c1
1 c2 -
ORA-19279: Query dynamic type mismatch: expected singleton sequence
Hi,
I have my xml stored in the table 'xml_table’
The content of XML is a follows:
<COMPANY NAME="ABC">
<DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
<ADDRESS>Rue de nevers</ADDRESS>
<DEPARTMENT_NAME>London</DEPARTMENT_NAME>
<ADDRESS>Northampton Square</ADDRESS>
</COMPANY>
I would like to query the xml to get the output like that:
COMPANY_NAME | DEPARTMENT_NAME | ADDRESS
ABC | Paris | rue de nevers
ABC | London | Northampton Square
However when I execute the query:
SELECT t.company_name, t.address, t.department_name
FROM xml_table p,
XMLTable('/COMPANY' PASSING p.OBJECT_VALUE
COLUMNS company_name PATH '@NAME',
address VARCHAR2(100) PATH '/COMPANY/ADDRESS',
department_name VARCHAR2(100) PATH '/COMPANY/DEPARTMENT_NAME') t
I am getting error:
ORA-19279: XPTY0004 - XQuery dynamic type mismatch: expected singleton sequence - got multi-item sequence
What can be wrong with the query? Howe should it be modified to get desired output?
Thank for help
GroxyAs was mentioned... Enclosing the tags for each department in a DEPARTMENT tag would make this easier and more effiecient but here's an alternative approach if modifying the XML is not an option
SQL> with COMPANY_XML as
2 (
3 select XMLTYPE(
4 '<COMPANY NAME="ABC">
5 <DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
6 <ADDRESS>Rue de nevers</ADDRESS>
7 <DEPARTMENT_NAME>London</DEPARTMENT_NAME>
8 <ADDRESS>Northampton Square</ADDRESS>
9 </COMPANY>') as OBJECT_VALUE from dual
10 )
11 select R.*
12 from COMPANY_XML,
13 XMLTABLE
14 (
15 'for $COMP in $COMPANY/COMPANY
16 for $DEPT at $DEPTIDX in $COMP/DEPARTMENT_NAME
17 return <RESULT>
18 <NAME>{fn:data($COMP/@NAME)}</NAME>
19 {
20 $COMP/DEPARTMENT_NAME[$DEPTIDX],
21 $COMP/ADDRESS[$DEPTIDX]
22 }
23 </RESULT>'
24 passing OBJECT_VALUE as "COMPANY"
25 ) r
26 /
COLUMN_VALUE
<RESULT><NAME>ABC</NAME><DEPARTMENT_NAME>Paris</DEPARTMENT_NAME><ADDRESS>Rue de
nevers</ADDRESS></RESULT>
<RESULT><NAME>ABC</NAME><DEPARTMENT_NAME>London</DEPARTMENT_NAME><ADDRESS>Northa
mpton Square</ADDRESS></RESULT>This above step creates a document for all tags with a particular index and then we can apply a columns cause to get the results..
SQL> with COMPANY_XML as
2 (
3 select XMLTYPE(
4 '<COMPANY NAME="ABC">
5 <DEPARTMENT_NAME>Paris</DEPARTMENT_NAME>
6 <ADDRESS>Rue de nevers</ADDRESS>
7 <DEPARTMENT_NAME>London</DEPARTMENT_NAME>
8 <ADDRESS>Northampton Square</ADDRESS>
9 </COMPANY>') as OBJECT_VALUE from dual
10 )
11 select R.*
12 from COMPANY_XML,
13 XMLTABLE
14 (
15 'for $COMP in $COMPANY/COMPANY
16 for $DEPT at $DEPTIDX in $COMP/DEPARTMENT_NAME
17 return <RESULT>
18 <NAME>{fn:data($COMP/@NAME)}</NAME>
19 {
20 $COMP/DEPARTMENT_NAME[$DEPTIDX],
21 $COMP/ADDRESS[$DEPTIDX]
22 }
23 </RESULT>'
24 passing OBJECT_VALUE as "COMPANY"
25 columns
26 NAME VARCHAR(10),
27 DEPARTMENT_NAME VARCHAR2(24),
28 ADDRESS VARCHAR2(24)
29 ) r
30 /
NAME DEPARTMENT_NAME ADDRESS
ABC Paris Rue de nevers
ABC London Northampton Square
SQL> -
Type Mismatch error while saving a BPC Report using eTools
Hi,
Iam getting a 'type mismatch' error when trying to save a BPC Excel workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
Can anyone please help out and let me know why I am getting this error.
Thanks
ArvindHi,
You need to save the file as .xls extension. -
Hi,
Iam getting a 'type mismatch' error when trying to save a BPC Excel Ecel workbook using eTools>Save Dynamic Template >Company>eExcel. I am saving it as an .xlsx file.
Can anyone please help out and let me know why I am getting this error.
Thanks
ArvindHi Arvind,
You need to save the template as .xls file. This will work properly. -
"Type mismatch" error in IE7/8 when using custom Actions Menu Image
Hi all,
in APEX 4.2: when using a custom image in the "Actions Menu Image" attribute in an interactive report, I get a "Type mismatch" error in IE7/8 when refreshing the report through PPR (filtering, sorting, paginating etc.). When I leave the "Actions Menu Image" field empty, everything works fine. The error doesn't seem to happen in IE9 (unless using compatibility mode), or in any non-IE browser.
I've been able to reproduce the issue in an application on apex.oracle.com:
http://apex.oracle.com/pls/apex/f?p=69347:1
Some debugging seems to indicate that the following line in widget.interactiveReport.js is the culprit:
lTemp.parentNode.replaceChild($x('apexir_WORKSHEET'), lTemp);Does anybody know if this is a known issue, or if there is some workaround?
Thanks,
TobiasHi,
Great solution Paul! It cost me a while before I found out the Action Menu Image was causing my interactive reports to stop refreshing in IE10 and not other browsers. Your solution works great, I've implemented it with a few minor adjustments:
- Put the css in report template (for some reason it didn't work in our own application stylesheet)
- replace 'url("/c/action_dropdown.gif")' with 'url("&APP_IMAGE_PREFIX./<path_to_image>")'
- place one dynamic action on page 0: after refresh of '#apexir_DATA_PANEL' , set event scope to "Dynamic".
- Let the Dynamic action also fire on page load.
- To make sure the dynamic action only works for pages with an interactive report add condition of type 'Exists' with expression:
select 1
from dual
where :APP_PAGE_ID in (select page_id
from apex_application_page_ir
where application_id = :APP_ID
Best regards,
Vincent Deelen -
TYPE003: Runtime Type Mismatch
A general question:
ODSI 10gR3
Has anyone seen the "TYPE003: Runtime Type Mismatch" error returned when you pass a variable through a function rather than a literal? The variable is the exact same value as the literal and I have casted all to a xs:double before passing through the "getReferencesByVersionID" function in code below.
=============================================================
(: Always tested with the same $VersionID and only 1 order in the database :)
for $Order in tns:getOrdersByVersionID($VersionID)
return
(: let $OrderNum := tns:getOrderNum(fn:data($Order/ns1:OrderNum)) :) (: Fail :)
let $OrderNum := xs:double(fn:data($Order/ns1:OrderNum)) (: Fail :)
(: let $OrderNum := xs:double(12001002) :) (: Success :)
let $References := tns:getReferencesByVersionID($VersionID, $OrderNum)
return
Returned XML snippet when run successfully:
<ns0:Order ns0:TransactionPurpose="ADD/UPDATE">
<ns0:ShipperRef>J10310ST12001002</ns0:ShipperRef>
<ns0:OrderNum>12001002</ns0:OrderNum> (: Populated by: "data($Order/ns1:OrderNum)". "ns0:OrderNum" defined as xs:double in schema. Note: same value as literal :)
<ns0:Comments/>
<ns0:OrderType>O</ns0:OrderType>
<ns0:Workflow>O</ns0:Workflow>
Returned Trace when not working:
com.bea.dsp.das.exception.DASException: weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
at com.bea.dsp.das.ejb.EJBClient.invokeOperation(EJBClient.java:160)
at com.bea.dsp.das.DataAccessServiceImpl.invokeOperation(DataAccessServiceImpl.java:171)
at com.bea.dsp.das.DataAccessServiceImpl.invoke(DataAccessServiceImpl.java:122)
at com.bea.dsp.ide.xquery.views.test.QueryExecutor.invokeFunctionOrProcedure(QueryExecutor.java:113)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.getFunctionExecutionResult(XQueryTestView.java:1041)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.executeFunction(XQueryTestView.java:1176)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedImpl(XQueryTestView.java:1866)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.access$300(XQueryTestView.java:174)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent$3.run(XQueryTestView.java:1594)
at org.eclipse.swt.custom.BusyIndicator.showWhile(BusyIndicator.java:67)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelectedBusy(XQueryTestView.java:1597)
at com.bea.dsp.ide.xquery.views.test.XQueryTestViewContent.widgetSelected(XQueryTestView.java:1560)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:227)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3687)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3298)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at org.eclipse.ui.internal.ide.application.IDEApplication.start(IDEApplication.java:106)
at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
The obvious answer is that "fn:data($Order/ns1:OrderNum)" does not equal "xs:double(12001002)" when passed through the " tns:getReferencesByVersionID()" function but it appears to be the same value.
This is happening in the Application layer so too much to include all the code. Thoughts/Comments on where to look or what I am missing?
Thanks
TomThanks Mike. No other web services... all physical ODSI to a single Oracle 11g denormalized table, selected several times to get different parts of the data (order header, shipping info, items, etc) and bubbled up through the layers via transformations finally getting into a single XML ORDER at the app layer.
I'm not a guru at reading traces but it appears numieric vs double issue?
The full stack trace:
weblogic.xml.query.exceptions.XQueryTypeException: {bea-err}TYPE003: Runtime Type Mismatch
at weblogic.xml.query.runtime.core.ExecutionWrapper.asXQueryException(ExecutionWrapper.java:165)
at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:94)
at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
java.lang.ClassCastException: weblogic.xml.query.tokens.basic.Basic_StringToken
at weblogic.xml.query.runtime.numeric.compare.DoubleEqual.compare(DoubleEqual.java:31)
at weblogic.xml.query.runtime.compare.ComparisonIterator.execute(ComparisonIterator.java:45)
at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.logic.BoolEffValue.exec(BoolEffValue.java:47)
at weblogic.xml.query.runtime.logic.BoolEffValue.execute(BoolEffValue.java:43)
at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:91)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.iterators.BasicMaterializedTokenStream.next(BasicMaterializedTokenStream.java:109)
at weblogic.xml.query.iterators.BasicMaterializedTokenStream$MatStreamIterator.fetchNext(BasicMaterializedTokenStream.java:448)
at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
at weblogic.xml.query.runtime.core.RTVariable.fetchNext(RTVariable.java:53)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:221)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.sequences.Exists.execute(Exists.java:37)
at weblogic.xml.query.iterators.FunctionIterator.fetchNext(FunctionIterator.java:30)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.IfThenElse.fetchNext(IfThenElse.java:79)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.buildPreserveModeTextNode(SuperElementConstructor.java:320)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:405)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.matEverything(PartMatElemConstructor.java:123)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:197)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.LetIterator.fetchNext(LetIterator.java:133)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.CountMapIterator.fetchNext(CountMapIterator.java:167)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.constructor.SuperElementConstructor.getPhase2(SuperElementConstructor.java:388)
at weblogic.xml.query.runtime.constructor.PartMatElemConstructor.fetchNext(PartMatElemConstructor.java:229)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.debug.Trace.fetchNext(Trace.java:70)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
at weblogic.xml.query.runtime.sequences.Subsequence.fetchNext(Subsequence.java:101)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:237)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
at weblogic.xml.query.runtime.node.DeflateRec.fetchNext(DeflateRec.java:43)
at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
at com.bea.ld.server.ResultPusher$ChunkyBinxmlChunker.nextChunk(ResultPusher.java:402)
at com.bea.ld.server.ResultPusher$AsyncChunkyBinxmlChunker.nextChunk(ResultPusher.java:520)
at com.bea.ld.server.ResultPusher$BinxmlChunker.next(ResultPusher.java:292)
at com.bea.ld.EJBRequestHandler$1.next(EJBRequestHandler.java:938)
at com.bea.ld.ServerBean.maybeStreamResult(ServerBean.java:97)
at com.bea.ld.ServerBean.executeOperationStreaming(ServerBean.java:86)
at com.bea.ld.Server_ydm4ie_EOImpl.executeOperationStreaming(Server_ydm4ie_EOImpl.java:72)
at com.bea.ld.Server_ydm4ie_EOImpl_WLSkel.invoke(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:589)
at weblogic.rmi.cluster.ClusterableServerRef.invoke(ClusterableServerRef.java:230)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:477)
at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
at weblogic.security.service.SecurityManager.runAs(Unknown Source)
at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:473)
at weblogic.rmi.internal.wls.WLSExecuteRequest.run(WLSExecuteRequest.java:118)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) -
Hi,
I'm having a problem in calling the Java Applet's Function from Visual Basic. First, I'm getting the handle of the Java Applet and components of it using "Document.Applets(n)" which is a HTML function. I'm calling this function from Visual Basic. My code is something like this...
' // Web1 is IE Browser in my Form.
Dim Ap,Comp
Dim Bol as Boolean
Bol = true
Ap = Web1.Document.Applets(0).getWindow() ' \\ Gets the Parent Window.
Ap.setTitle("My Java Applet") ' \\ Sets the Title of the window.
msgbox Ap.getVisibility() ' \\ This will return a Java boolean ( true or false )
Ap.setVisibility(Bol) ' \\ Function Syntax is : void setVisibility(boolean b)
Here in my code , i'm able to call any function that which accepts Integer or String but not boolean. So, i m facing problem with Ap.setVisibility() function. It gives me a "Type mismatch error" while executing it. Can you please tell me a way to do this from Visual Basic !
I'm using Visual Basic 6.0, Windows 2000 , J2SDK 1.4.2_05.
Please help me Friends.
Thanks and Regards,
Srinivas Annam.Hi
I am not sure about this solution. try this
Declare a variable as variant and store the boolean value in that variable and then use in ur method.
Post ur reply in this forum.
bye for now
sat -
Type mismatch on SOAP Web Service method invocation
When I run the generated client for a web service, I get the following error, which I can get rid of by using a primitive type (e.g. String) as the parameter to doSomething instead of wstest.test2.APIClass3, i.e. the SOAP server seems happy handling wstest.test2.APIClass1 as a return type, but not a similar class as a parameter type:
[SOAPException: faultCode=SOAP-ENV:Server; msg=type mismatch [java.lang.IllegalArgumentException]]
wstest.test2.APIClass1 wstest.test2.EmbeddedStatelessTest2Stub.doSomething(wstest.test2.APIClass3)
EmbeddedStatelessTest2Stub.java:89
void wstest.test2.EmbeddedStatelessTest2Stub.main(java.lang.String[])
EmbeddedStatelessTest2Stub.java:48
I am using JDeveloper9i 9.0.3 Preview and the standalone OC4J 9.0.3 that came with it. I followed the Oracle9i JDeveloper 9.0.3 Web Services Quickstart Install (http://otn.oracle.com/tech/webservices/htdocs/quickstart/quickstart903.html) to get OC4J running standalone. I had to register the stateless EJB provider, and the WEB services wizard didn't manage to include APIClass2 (an instance of which is contained in APIClass1) in the .dd so I added it manually which works fine with APIClass1 as the method return type.
Sorry for the length of this posting, but I wasn't sure which bits would be relevant.
WSDL
====
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services WSDL Generator-->
<!--Date Created: Wed Sep 11 15:54:08 BST 2002-->
<definitions
name="StatelessTest2"
targetNamespace="http://wstest/test2/StatelessTest2.wsdl"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://wstest/test2/StatelessTest2.wsdl"
xmlns:ns1="http://wstest.test2/IStatelessTest2.xsd">
<types>
<schema
targetNamespace="http://wstest.test2/IStatelessTest2.xsd"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<complexType name="wstest_test2_APIClass3" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
<all>
<element name="Name" type="string"/>
<element name="Value" type="double"/>
</all>
</complexType>
<complexType name="wstest_test2_APIClass1" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
<all>
<element name="Name" type="string"/>
<element name="Value" type="double"/>
<element name="APIClass2" type="ns1:wstest_test2_APIClass2"/>
</all>
</complexType>
<complexType name="wstest_test2_APIClass2" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
<all>
<element name="IntegerValue" type="int"/>
<element name="DoubleValue" type="double"/>
<element name="Name" type="string"/>
</all>
</complexType>
</schema>
</types>
<message name="doSomething0Request">
<part name="p0" type="ns1:wstest_test2_APIClass3"/>
</message>
<message name="doSomething0Response">
<part name="return" type="ns1:wstest_test2_APIClass1"/>
</message>
<portType name="StatelessTest2PortType">
<operation name="doSomething">
<input name="doSomething0Request" message="tns:doSomething0Request"/>
<output name="doSomething0Response" message="tns:doSomething0Response"/>
</operation>
</portType>
<binding name="StatelessTest2Binding" type="tns:StatelessTest2PortType">
<soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="doSomething">
<soap:operation soapAction="" style="rpc"/>
<input name="doSomething0Request">
<soap:body use="encoded" namespace="wstest.test2.StatelessTest2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</input>
<output name="doSomething0Response">
<soap:body use="encoded" namespace="wstest.test2.StatelessTest2" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</output>
</operation>
</binding>
<service name="StatelessTest2">
<port name="StatelessTest2Port" binding="tns:StatelessTest2Binding">
<soap:address location="http://localhost:8888/soap/servlet/soaprouter"/>
</port>
</service>
</definitions>
Deployment Decriptor
====================
<?xml version = '1.0' encoding = 'windows-1252'?>
<!--Generated by the Oracle9i JDeveloper Web Services Deployment Descriptor Generator-->
<!--This Deployment Descriptor file is for use with the Oracle9iAS Release 2 / Apache 2.2 SOAP Server SOAP Server-->
<!--Date Created: Wed Sep 11 15:54:09 BST 2002-->
<isd:service
id="wstest.test2.StatelessTest2"
type="rpc"
xmlns:isd="http://xmlns.oracle.com/soap/2001/04/deploy/service">
<isd:provider
id="stateless-ejb-provider"
methods="doSomething"
scope="Request">
<isd:option key="JNDILocation" value="StatelessTest2"/>
<isd:option key="DeploymentName" value="StatelessTest2"/>
</isd:provider>
<isd:faultListener
class="org.apache.soap.server.DOMFaultListener"/>
<isd:mappings>
<isd:map
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
qname="x:wstest_test2_APIClass1"
javaType="wstest.test2.APIClass1"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
<isd:map
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
qname="x:wstest_test2_APIClass2"
javaType="wstest.test2.APIClass2"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
<isd:map
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:x="http://wstest.test2/IStatelessTest2.xsd"
qname="x:wstest_test2_APIClass3"
javaType="wstest.test2.APIClass3"
java2XMLClassName="org.apache.soap.encoding.soapenc.BeanSerializer"
xml2JavaClassName="org.apache.soap.encoding.soapenc.BeanSerializer"/>
</isd:mappings>
</isd:service>
StatelesTest2.java
==================
package wstest.test2;
import javax.ejb.EJBObject;
import java.rmi.RemoteException;
public interface StatelessTest2 extends EJBObject {
* @webmethod
APIClass1 doSomething(APIClass3 p0) throws RemoteException;
StatelessTest2Bean.java
=======================
package wstest.test2.impl;
import javax.ejb.SessionBean;
import javax.ejb.SessionContext;
import wstest.test2.APIClass1;
import wstest.test2.APIClass2;
import wstest.test2.APIClass3;
public class StatelessTest2Bean implements SessionBean {
public void ejbCreate() {
public void ejbActivate() {
public void ejbPassivate() {
public void ejbRemove() {
public void setSessionContext(SessionContext ctx) {
public APIClass1 doSomething(APIClass3 p0) {
APIClass1 ac1 = new APIClass1();
ac1.setName(p0.getName() + "1");
ac1.setValue(p0.getValue());
APIClass2 ac2 = ac1.getAPIClass2();
ac2.setName(p0.getName() + "2");
ac2.setIntegerValue(new Integer(ac1.getValue().intValue()));
ac2.setDoubleValue(new Double(ac1.getValue().doubleValue() * 2.0));
return ac1;
EmbeddedStatelessTest2Stub.java
===============================
I change the http port from 8988 to 8888 to get this working. Also, the generated referenced a new class APIClass31, also generated, but as it didn't make any difference to the problem I replaced it with APIClass3, which has essentially the same characteristics.
package wstest.test2;
import oracle.soap.transport.http.OracleSOAPHTTPConnection;
import org.apache.soap.encoding.soapenc.BeanSerializer;
import org.apache.soap.encoding.SOAPMappingRegistry;
import org.apache.soap.util.xml.QName;
import java.net.URL;
import org.apache.soap.Constants;
import org.apache.soap.Fault;
import org.apache.soap.SOAPException;
import org.apache.soap.rpc.Call;
import org.apache.soap.rpc.Parameter;
import org.apache.soap.rpc.Response;
import wstest.test2.*;
import java.util.Vector;
import java.util.Properties;
import wstest.test2.APIClass1;
import wstest.test2.APIClass2;
import wstest.test2.APIClass3;
* Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
* Date Created: Wed Sep 11 15:41:19 BST 2002
* WSDL URL: file:/C:/Projects/WSTest/Test2/src/wstest/test2/StatelessTest2.wsdl
public class EmbeddedStatelessTest2Stub
public EmbeddedStatelessTest2Stub()
m_httpConnection = new OracleSOAPHTTPConnection();
m_smr = new SOAPMappingRegistry();
BeanSerializer beanSer = new BeanSerializer();
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass1"), wstest.test2.APIClass1.class, beanSer, beanSer);
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass2"), wstest.test2.APIClass2.class, beanSer, beanSer);
m_smr.mapTypes(Constants.NS_URI_SOAP_ENC, new QName("http://wstest.test2/IStatelessTest2.xsd", "wstest_test2_APIClass3"), wstest.test2.APIClass3.class, beanSer, beanSer);
public static void main(String[] args)
try
EmbeddedStatelessTest2Stub stub = new EmbeddedStatelessTest2Stub();
// Add your own code here.
APIClass3 ac3 = new APIClass3();
ac3.setName("fred");
ac3.setValue(new Double(17.36));
printAPIClass3("Input", ac3);
APIClass1 retAc1 = stub.doSomething(ac3);
printAPIClass1("Return", retAc1);
catch(Exception ex)
ex.printStackTrace();
public String endpoint = "http://172.25.1.176:8888/soap/servlet/soaprouter";
private OracleSOAPHTTPConnection m_httpConnection = null;
private SOAPMappingRegistry m_smr = null;
public APIClass1 doSomething(APIClass3 p0) throws Exception
APIClass1 returnVal = null;
URL endpointURL = new URL(endpoint);
Call call = new Call();
call.setSOAPTransport(m_httpConnection);
call.setTargetObjectURI("wstest.test2.StatelessTest2");
call.setMethodName("doSomething");
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
Vector params = new Vector();
params.addElement(new Parameter("p0", wstest.test2.APIClass3.class, p0, null));
call.setParams(params);
call.setSOAPMappingRegistry(m_smr);
Response response = call.invoke(endpointURL, "");
if (!response.generatedFault())
Parameter result = response.getReturnValue();
returnVal = (APIClass1)result.getValue();
else
Fault fault = response.getFault();
throw new SOAPException(fault.getFaultCode(), fault.getFaultString());
return returnVal;
private static void printAPIClass3(String prefix, APIClass3 ac3)
System.out.println(prefix + ": [" + ac3.getName() + ", " + ac3.getValue() + "]");
private static void printAPIClass1(String prefix, APIClass1 ac1)
APIClass2 ac2 = ac1.getAPIClass2();
System.out.println(prefix + ": [" + ac1.getName() + ", " + ac1.getValue() + " ["
+ ac2.getName() + ", " + ac2.getIntegerValue() + ", " + ac2.getDoubleValue()
+ "]]");
public void setMaintainSession(boolean maintainSession)
m_httpConnection.setMaintainSession(maintainSession);
public boolean getMaintainSession()
return m_httpConnection.getMaintainSession();
public void setTransportProperties(Properties props)
m_httpConnection.setProperties(props);
public Properties getTransportProperties()
return m_httpConnection.getProperties();
APIClass1.java
==============
package wstest.test2;
import java.io.Serializable;
public class APIClass1 implements Serializable {
private String name;
private Double value;
private APIClass2 apiClass2;
public APIClass1() {
name = new String("");
value = new Double(0.0);
apiClass2 = new APIClass2();
public String getName() {
return name;
public void setName(String newName) {
name = new String(newName);
public Double getValue() {
return value;
public void setValue(Double newValue) {
value = new Double(newValue.doubleValue());
public APIClass2 getAPIClass2() {
return apiClass2;
public void setAPIClass2(APIClass2 newAPIClass2) {
apiClass2 = new APIClass2();
apiClass2.setName(newAPIClass2.getName());
apiClass2.setDoubleValue(newAPIClass2.getDoubleValue());
apiClass2.setIntegerValue(newAPIClass2.getIntegerValue());
APIClass2.java
==============
package wstest.test2;
import java.io.Serializable;
public class APIClass2 implements Serializable {
private String name;
private Integer iVal;
private Double dVal;
public APIClass2() {
iVal = new Integer(0);
dVal = new Double(0.0);
name = new String("");
public Integer getIntegerValue() {
return iVal;
public void setIntegerValue(Integer newIVal) {
iVal = new Integer(newIVal.intValue());
public Double getDoubleValue() {
return dVal;
public void setDoubleValue(Double newDoubleValue) {
dVal = new Double(newDoubleValue.doubleValue());
public String getName() {
return name;
public void setName(String newName) {
name = new String(newName);
APIClass3.java
==============
package wstest.test2;
import java.io.Serializable;
public class APIClass3 implements Serializable {
private String name;
private Double value;
public APIClass3() {
public String getName() {
return name;
public void setName(String newName) {
name = new String(newName);
public Double getValue() {
return value;
public void setValue(Double newValue) {
value = new Double(newValue.doubleValue());
APIClass31.java
===============
package wstest.test2;
* Generated by the Oracle9i JDeveloper Web Services Stub/Skeleton Generator.
* Date Created: Wed Sep 11 10:44:56 BST 2002
* <pre>
* <complexType name="wstest_test2_APIClass3" jdev:packageName="wstest.test2" xmlns:jdev="http://xmlns.oracle.com/jdeveloper/webservices">
* <all>
* <element name="Name" type="string"/>
* <element name="Value" type="double"/>
* </all>
* </complexType>
* </pre>
public class APIClass31 {
private String m_Name;
private Double m_Value;
public APIClass31() {
public APIClass31(String Name, Double Value) {
m_Name = Name;
m_Value = Value;
public void setName(String Name) {
m_Name = Name;
public String getName() {
return m_Name;
public void setValue(Double Value) {
m_Value = Value;
public Double getValue() {
return m_Value;I believe this is a bug in JDev/OC4J 9.0.3 that is being further investigated right now. I have duplicated your problem in a simpler test case and folks are looking into it.
Mike. -
Hi,
I am facing issues like Type Mismatch while passing Array of interfaces from .NET to VBA and vice versa using VSTO technology.
My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
My Interface definition is somewhat like this
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
public interface IInterface1
[DispId(0)]
IInterface2[] GetObj();
[DispId(1)]
void SetObj(ref IInterface2[] obj);
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
public interface IInterface2
IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
Kindly provide some assistance regarding the same.
ThanksHi,
I am facing issues like Type Mismatch while passing Array of interfaces from .NET to VBA and vice versa using VSTO technology.
My requirement is that ComInterfaceType needs to be InterfaceIsIDispatch.
My Interface definition is somewhat like this
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("AAF48FBC-52B6-4179-A8D2-944D7FBF264E")]
public interface IInterface1
[DispId(0)]
IInterface2[] GetObj();
[DispId(1)]
void SetObj(ref IInterface2[] obj);
[ComVisible(true)]
[InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]
[Guid("CDC06E1D-FE8C-477E-97F1-604B73EF868F")]
public interface IInterface2
IF i am passing array of above interface (created in C#.Net) to VBA using GetObj API,i am getting type mismatch error in VBA while assigning the value to variable in VBA.Even assigning to variant type variable gives TypeMismatch.
Also while passing Array of interfaces from VBA using SetObj API,excel crashes and sometimes it says method doesn't exists.
Kindly provide some assistance regarding the same.
Thanks -
Type Mismatch using Implicit Cursor
The actual error I get is
PLS-00386: type mismatch found at 'EMP_REC' between FETCH cursor and INTO variables
I have copied the code in below (taken some logic out to make example easier). I think the problem is with the EMP_REC CHILDKNOWDES declaration - I dont think I need to add %ROWTYPE? Is the type mismatch a case of trying to parse an int into a string (which i have checked for), or a case of the object being stored with attributes in dif order (alphabetical?), or is something more sinister going on?
CREATE OR REPLACE TYPE &HKDB_Schema_Name..CHILDKNOWDES AS OBJECT
KnowdeID INT,
Description varchar2(512),
Connector CHAR(1),
WhyCount INT
CREATE OR REPLACE TYPE &HKDB_Schema_Name..TEMP_CHILDKNOWDES_TABLE AS TABLE OF &HKDB_Schema_Name..CHILDKNOWDES;
CREATE OR REPLACE PROCEDURE &HKDB_Schema_Name..QueryChildKnowdes
aKnowdeID int,
aCur out sys_refcursor
AS
l_ChildKnowdeTable TEMP_CHILDKNOWDES_TABLE := TEMP_CHILDKNOWDES_TABLE();
EMP_REC CHILDKNOWDES;
BEGIN
DECLARE CURSOR c1 is SELECT k.KnowdeID, k.Description, KnowdeAssociation.Connector
FROM Knowde k
INNER JOIN KnowdeAssociation ka on ka.KnowdeID = k.KnowdeID
BEGIN
OPEN c1;
FETCH c1 INTO EMP_REC; --error
WHILE c1%FOUND
LOOP
BEGIN
QueryWhyCount(EMP_REC.KnowdeID, aWhyCountResult);
l_ChildKnowdeTable.extend;
l_ChildKnowdeTable(l_ChildKnowdeTable.last) := CHILDKNOWDES
(EMP_REC.KnowdeID,
EMP_REC.Description,
EMP_REC.Connector,
aWhyCountResult);
FETCH c1 INTO EMP_REC; --error
END;
END LOOP;
END;
END QueryChildKnowdes;Thanks in advance,
TobyKnowde
Name Null? Type
KNOWDEID NOT NULL NUMBER(10)
VERBID NOT NULL NUMBER(10)
NOUNID NOT NULL NUMBER(10)
KGID NOT NULL NUMBER(10)
DATECREATED NOT NULL DATE
DESCRIPTION VARCHAR2(51
UDRID NUMBER(10)
UVRID NUMBER(10)
RESOURCEID NUMBER(10)
VERSIONID NUMBER(10)
CHECKEDOUT NUMBER(1)
CLIENTKNOWDEID NUMBER(10)
GENERICKNOWDEID NUMBER(10)
SOURCEKNOWDEID NUMBER(10)
UNEDITABLE NUMBER(1)
DATEUPDATED NOT NULL DATE
PREVIOUSKNOWDEID NUMBER(10)KnowdeAssociation
Name Null? Type
KNOWDEASSOCIATIONID NOT NULL NUMBER(10)
HOWID NOT NULL NUMBER(10)
WHYID NOT NULL NUMBER(10)
CONNECTOR CHAR(1)
HOWCHAINPOSITION NUMBER(10)
WHYCHAINPOSITION NUMBER(10) -
How to solve the "type mismatch" error in jCOM early binding program?
I got a "type mismatch" error jCOM early binding program.
I use the VB as the jCOM client to access the EJB deployed on WLS7. While using the
object parameter like "java.lang.Integer" in EJB method call, I got that error message
and my VB client had to be stopped?
The same situation, the VB program work perfect when using the "int" as the parameter.
And I try to instance the "myTLB.JavaLangInteger" in my VB program, but how ? The
"New", "CreateObject" and "GetObject" all failure, I don't know what to do next ???Hi,
This problem Could happen when you referesh quality or test system.
Your delta setup for the related master and transaction data needs to be reinit.
What happens is when you init. the delta and subsequent delta is all maintained in your source system
please check Notes 852443,424848,834229
Hope this helps
Thanks
Teja
Message was edited by:
Teja badugu -
RowSet Column Type Mismatch Error
Hi,
I am using SOA 11g,
JDeveloper 11.1.1.3.0
BPEL, SOA 11g, DB2 Stored procedure,
In a BPEL service I am getting this error while invoking a DB2 Stored procedure with Strong XSD.
while running I am getting this error message. This error message while invoking DB2 stored procedure, both XSD are identical. Input to service & input to DB adapter.
java.lang.Exception: oracle.sysman.emSDK.webservices.wsdlapi.SoapTestException: Exception occured when binding was invoked. Exception occured during invocation of JCA binding: "JCA Binding execute of Reference operation 'dba' failed due to: RowSet Column Type Mismatch Error. The SQL type in the XSD (CHARACTER) does not match the SQL type in the RowSet (VARCHAR) for column LONGITEM of parameter RowSet. This procedure returns a RowSet which could in theory return any arbitrary result. However you chose at design time to generate a single strongly typed XSD describing this result set in all cases, based on a test execution of the stored procedure. This makes later XML transforms easier. You may have also edited the XSD directly. ". The invoked JCA adapter raised a resource exception. Please examine the above error message carefully to determine a resolution.
-CDHi CD,
maybe if your strong XSD contains db:type="CHAR", you could try to change it to "VARCHAR" instead.
HTH,
Steve
Maybe you are looking for
-
Kodak ESP 3200 stopped working after upgrading to Yosemite
Kodak ESP 3200 stopped working after upgrading to Yosemite
-
Oracle XE storage limit.
Hi, i developed one schema with 2 tables, the tables have a maximum row size of 330 bytes and the second table has a maximum row size of 92 bytes. If divided for 4.294.967.296 bytes (4GB) bytes for to the maximum size of tables , get 11,59 MB(13.015.
-
Do I need the Migration and DVD/CD Sharing Update...
...if I run only an iMac and a Windows laptop?
-
Can't change the keyboard layout in Xorg
I tried the different possibilities in the wiki to change the keyboard layout in X. setxkbmap does work, but I'd like to keep the settings across reboots. I tried the two methods in the wiki, here are my config files: /etc/X11/xorg.conf.d/00-keyboard
-
As above, the bar across the bottom, which shows the URL, the "lock" symbol on secure sites, etc., IS NOT THERE on any firefox page I open. It is there on other browsers but I would like to continue using firefox. What should I do?