Finder query return type..?
I'm using a session bean ProcessBean and an entity bean AlarmBean....
where one of functions processor() of ProcessDataBean is like......
processor()
println(.a..);
println(..b.);
correlate();
println(.c..);
And correlator() is like:-
correlator()
println(..d.);
AlarmBeanLocal l = finder query();
println(.e..);
if(l != null)
println(.m..)
else
println(.n..)
Finder query returns the reference to the entity bean's local interface.......and depending on whether find is successful or not....I've to print m or n....
Now the problem is whenever find is successful.......e, then m and then c gets printed......
but when finder query is not successful, e and n doesn't get printed....and directly c gets printed...it means finder query is directly returning control to the previous function(processor where c is getting printed) .......
I'm not getting whr. is the problem....
in the condition l != null......?
Plz. help me out...
All the declarations in local and home interfaces and ejb-jar is correct.......and my jar file is deployed successfully.....but the output is not correct.....
Hi Swati,
Assuming ur finder returns a Single-object
Single-object finder method may return a null value . If result set of query consists of a single null value, container must return null value as result of method. If resultset of a query for a single-object finder method contains more than one value (whether non-null, null, or a combination), container must throw FinderException from finder method. If result set of query contains no values, container must throw ObjectNotFoundException.
HTH,
Seetesh
Similar Messages
-
I am trying to take a complex query that I was running inside of C# code and turn it into a stored proc so that it performs much better. I was doing quite a bit of looping in C# code because I am most familiar with that but I know it ain't the best way to do things. Basically my query does the following:
-Query a table to get a set of table names
-loop over that set of table names to query another table to get some info
-use that info to query another table to find out if there are any results
-if there are results add those to a table to be returned to the caller
The issue I am having is that I don't know how to build the return table so I can pass it back to the calling code. All i need to know is the names of the tables that had at least one hit in my big query.
I am kind of new to this so I may have some things in here that are completely bizarre. I won't be offended if you rip it apart. I know that my out SYS_REFCURSOR will not work as is. The part that says 'SELECT OBJECTID really needs to be telling me the name of the table and not OBJECTID. I want to jam all these table names into a resultset which would really just be a temp table that I create with one field (TableName).
I know it's a lot to ask but if anyone can look at any part of this and give me suggestions I would greatly appreciate it. I'm struggling slowly through PL/SQL trying not to do dumb things when there are easier ways. There is probably a way for me to get rid of this loop but I think I need the dynamic part because I am querying different tables. Thank you very much
CREATE OR REPLACE PROCEDURE "CREAM_USER"."ENVELOPE_INTERSECT"
pMINX IN NUMBER,
pMAXX IN NUMBER,
pMAXY IN NUMBER,
pMINY IN NUMBER,
pRESULTSET OUT SYS_REFCURSOR
AS
BEGIN
DECLARE
SQLSTR VARCHAR2(700);
theLayerID NUMBER;
cursor gi is SELECT TABLE_NAME, OWNER FROM VIEW_GEOINDEXER_TABLES WHERE GEOINDEXED = 1;
theTABLE_NAME varchar2(160);
qTheTABLE_NAME varchar2(160);
theOWNER varchar2(32);
BEGIN
for iLayer in gi loop
theTABLE_NAME := iLayer.TABLE_NAME;
theOWNER := iLayer.OWNER;
qTheTABLE_NAME := '''' || theTABLE_NAME || '''';
theOWNER := '''' || theOWNER || '''';
SQLSTR := 'SELECT LAYER_ID FROM SDE.LAYERS WHERE OWNER = ' || theOWNER || ' AND TABLE_NAME = ' || qTheTABLE_NAME || '';
EXECUTE IMMEDIATE SQLSTR INTO theLAYERID;
SQLSTR := 'SELECT OBJECTID FROM ' || theTABLE_NAME || ' WHERE SHAPE IN
SELECT FID FROM F' || theLayerID || ' WHERE
(' || pMINX || ' >= EMINX AND ' || pMINX || ' <= EMAXX)
OR
(' || pMAXX || ' >= EMINX AND ' || pMAXX || ' <= EMAXX)
AND
(' || pMINY || ' >= EMINY AND ' || pMINY || ' <= EMAXY)
OR
(' || pMAXY || ' >= EMINY AND ' || pMAXY || ' <= EMAXY)
OR
(' || pMINX || ' <= EMINX AND ' || pMAXX || ' >= EMAXX)
AND
(' || pMINY || ' <= EMINY AND ' || pMAXY || ' >= EMAXY)
OPEN pRESULTSET FOR SQLSTR;
END LOOP;
END;
END ENVELOPE_INTERSECT;Looks like you are using dynamic sql but, not using bind variables.
Check out this link (try to ignore the original question) and see how the third post shows you how to use dyanmic sql using the 'USING' construct.
dynamic SQL
HTH,
Rahul. -
How to find out which sub query returns more than one row
Hi all,
Can any one give me clue ,how to find out which sub query returns more than one row in the following query .
/* Formatted on 2011/05/17 19:22 (Formatter Plus v4.8.8) */
SELECT a.*, ROWNUM AS rnm
FROM (SELECT DISTINCT '1' AS "Page View", ou.org_unit_name AS "Org",
prxm.mbr_idntfr AS "Beneficiary ID",
md.last_name
|| ', '
|| md.first_name AS "Beneficiary Name",
pci.idntfr AS "Tracking No.",
TO_CHAR (TRUNC (req.pa_rqst_date),
'MM/dd/yyyy'
) AS "Request Date",
sts.status_name AS "Status",
req.pa_rqst_sid AS "Request #",
prxm.mbr_sid AS "Mbr_sid",
TO_CHAR
(TRUNC (req.pa_revision_date),
'MM/dd/yyyy'
) AS "Last Updated",
TO_CHAR (psd.TO_DATE, 'MM/dd/yyyy') AS "TO_DATE",
prxpl.prvdr_lctn_iid AS "PRVDR_LCTN_IID",
pd.prvdr_sid AS "PRVDR_SID", 'Y' AS "State View",
DECODE
((SELECT DISTINCT pd.national_prvdr_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid =
req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
0, (SELECT prxplo.prvdr_lctn_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
NULL, (SELECT prxplo.prvdr_lctn_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
(SELECT DISTINCT pd.national_prvdr_idntfr
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid =
req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR')
) AS "NPI/ID",
DECODE
((SELECT pd.org_bsns_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
NULL, (SELECT pd.last_name
|| ', '
|| pd.first_name
|| ' '
|| pd.middle_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR'),
(SELECT pd.org_bsns_name
FROM pa_request_x_provider_location prxplo
WHERE prxplo.pa_rqst_sid = req.pa_rqst_sid
AND prxplo.oprtnl_flag = 'A'
AND prxplo.pa_prvdr_type_lkpcd = 'RR')
) AS "Prvdr Name",
TO_CHAR (psd.from_date,
'MM/dd/yyyy'
) AS "Srvc From Date",
TO_CHAR (req.validity_start_date,
'MM/DD/YYYY'
) AS "Due Date",
(fn_get_busniess_days (TRUNC (req.validity_start_date))
) AS "Days<br>Left",
req.pa_mode_type_lkpcd AS "Source",
TO_CHAR (TRUNC (wmdtl.rtng_date),
'MM/dd/yyyy'
) AS "Assigned On",
NVL (wmdtl.assigned_to_user_name,
'Not Assigned'
) AS "Assigned To",
req.org_unit_sid AS "OrgUnitSid",
TO_CHAR
(wmdtl.modified_date,
'MM/dd/yyyy hh24:mi:ss'
) AS "WTRD_MODIFIED_DATE",
TO_CHAR (wmdtl.rtng_date,
'MM/dd/yyyy'
) AS "WTRD_RTNG_DATE",
req.status_cid AS "PA_STATUS_CID",
TO_CHAR (req.modified_date,
'MM/dd/yyyy'
) AS "PA_REQ_MODIFIED_DATE",
prs.state_pa_srvc_type_code
AS "STATE_PA_SRVC_TYPE_CODE",
wmdtl.wm_pa_task_rtng_dtl_sid
AS "WM_TASK_RTNG_DTL_SID",
wmdtl.assigned_to_user_acct_sid
AS "WTRD_Assigned_to_user_acct_sid",
(fn_get_busniess_days (TRUNC (req.validity_start_date))
) AS "Days<br>LeftSort",
wmdtl.assigned_to_org_unit_sid
AS "WTRD_Assigned_to_OrgUntSid",
DECODE
((SELECT COUNT (*)
FROM pa_request_status prs
WHERE prs.pa_rqst_sid = req.pa_rqst_sid
AND prs.status_cid = 5
AND prs.oprtnl_flag = 'I'),
0, 'N',
'Y'
) AS "SHOW_UTILIZATION"
FROM pa_request req,
pa_certification_identifier pci,
status sts,
pa_request_x_member prxm,
wm_pa_task_routing_detail wmdtl,
pa_service_date psd,
org_unit ou,
pa_request_service prs,
pa_request_x_provider_location prxpl,
provider_location pl,
provider_detail pd,
provider p,
mbr_dmgrphc md
WHERE req.oprtnl_flag = 'A'
AND req.status_cid NOT IN
(20, 30, 70, 25, 80, 96, 85, 5, 97, 98, 101)
AND req.org_unit_sid IN
(3057, 3142, 3058, 3143, 3059, 3144, 3060, 3145,
3061, 3146, 3062, 3147, 3063, 3148, 3064, 3149,
3065, 3150, 3066, 3151, 3067, 3152, 3068, 3153,
3069, 3154, 3070, 3155, 3071, 3156, 3072, 3157,
3073, 3158, 3074, 3159, 3075, 3160, 3076, 3161,
3077, 3162, 3078, 3163, 3079, 3164, 3080, 3165,
3081, 3166, 3082, 3167, 3083, 3168, 3084, 3169,
3085, 3170, 3086, 3171, 3087, 3172, 3088, 3173,
3089, 3174, 3090, 3175, 3091, 3176, 3092, 3177,
3093, 3178, 3094, 3179, 3095, 3180, 3096, 3181,
3097, 3182, 3098, 3183, 3099, 3184, 3100, 3185,
3101, 3186, 3102, 3187, 3103, 3003, 75000104,
75000108, 2006, 75000103, 75000102, 75000113,
75000111, 75000109, 2001, 2009, 75000105,
75000107, 2004, 2010, 2013, 2014, 2005, 2011,
75000112, 2002, 1001, 2012, 75000106, 2007,
75000101, 2003, 75000110, 2008, 3001, 3002, 3019,
3104, 3020, 3105, 3021, 3106, 3022, 3107, 3023,
3108, 3024, 3109, 3025, 3110, 3026, 3111, 3027,
3112, 3028, 3113, 3029, 3114, 3030, 3115, 3031,
3116, 3032, 3117, 3033, 3118, 3034, 3119, 3035,
3120, 3036, 3121, 3037, 3122, 3038, 3123, 3039,
3124, 3040, 3125, 3041, 3126, 3042, 3127, 3043,
3128, 3044, 3129, 3045, 3130, 3046, 3131, 3047,
3132, 3048, 3133, 3049, 3134, 3050, 3135, 3051,
3136, 3052, 3137, 3053, 3138, 3054, 3139, 3055,
3140, 3056, 3141)
AND req.pa_rqst_sid = prs.pa_rqst_sid
AND prs.oprtnl_flag = 'A'
AND prs.pa_rqst_srvc_sid = psd.pa_rqst_srvc_sid
AND psd.oprtnl_flag = 'A'
AND req.pa_rqst_sid = pci.pa_rqst_sid
AND pci.oprtnl_flag = 'A'
AND req.pa_rqst_sid = prxm.pa_rqst_sid
AND prxm.oprtnl_flag = 'A'
AND md.oprtnl_flag = 'A'
AND md.status_cid = 2
AND TRUNC (SYSDATE) BETWEEN md.from_date AND md.TO_DATE
AND prxm.mbr_sid = md.mbr_sid
AND ou.org_unit_sid = req.org_unit_sid
AND ou.oprtnl_flag = 'A'
AND req.pa_rqst_sid = prxpl.pa_rqst_sid
AND prxm.pa_rqst_sid = prxpl.pa_rqst_sid
AND pci.pa_rqst_sid = prxm.pa_rqst_sid
AND pci.pa_rqst_sid = wmdtl.subsystem_task_sid
AND pci.pa_rqst_sid = prxpl.pa_rqst_sid
AND prxpl.pa_prvdr_type_lkpcd = 'RR'
AND prxpl.oprtnl_flag = 'A'
AND req.status_cid = sts.status_cid
AND sts.status_type_cid = 3
AND sts.oprtnl_flag = 'A'
AND prxpl.prvdr_lctn_iid = pl.prvdr_lctn_iid
AND p.prvdr_sid = pd.prvdr_sid
AND p.prvdr_sid = pl.prvdr_sid
AND pd.oprtnl_flag = 'A'
AND pd.status_cid = 2
AND TRUNC (SYSDATE) BETWEEN pd.from_date AND pd.TO_DATE
AND wmdtl.subsystem_task_sid = req.pa_rqst_sid
AND wmdtl.subsystem_lkpcd = 'PA'
AND wmdtl.oprtnl_flag = 'A'
AND req.pa_rqst_date > (SYSDATE - 365)
ORDER BY TO_DATE ("Request Date", 'MM/dd/yyyy hh24:mi:ss') DESC,
"Beneficiary Name" ASC) a
WHERE ROWNUM < 102;regards,
P Prakash
Edited by: BluShadow on 17-May-2011 15:01
added {noformat}{noformat} tags around the code833560 wrote:
Can any one give me clue ,how to find out which sub query returns more than one row in the following query .This is why smaller, simpler queries are easier to work with than huge ones - when something like this goes wrong smaller queries are much eaiser to debug. Unfortunately using smaller, easier-to-work with queries is not always an option
Ganesh is right - you will have to dissect the big query bit by bit until you find the offending subquery. If there is another way I would like to find out about it too.
The easiest way to do this is probably to use block comments to isolate parts of the query bit by bit until you find the offending part. If you carefully examine the subqueries you might be able to figure out which one is returning multiple rows without commenting everything
Good luck! -
SQL query returns varchar - default value type!!!
On a field in my portal form there is a default value type of 'SQL query returns varchar', where can I put this sql to get a default value from a table?
Hi again
I have this code in 'additional pl/sql code' - '...before displaying the page'. But it comes up with an error when I run the form.
declare
prop_v varchar2(20);
group_v varchar2(3);
el1_v varchar2(3);
blk varchar2(10) := 'DEFAULT';
begin
prop_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_property_p');
group_v := p_session.get_value_as_varchar2(p_block_name=>'DEFAULT', p_attribute_name => 'l_group_p');
select element_code
into el1_v
from eh_risk_element_detail
where property_ref = prop_v
and group_code = group_v
and line_no = 1;
p_session.set_value(p_block_name => blk, p_attribute_name => 'L_ELEMENT1_P', p_value => el1_v);
end;
Rich -
Copy activity fails while copying/reading sql object return type
Hi,
Please help me by providing some information for the following issue
i am executing a db adapter in BPEL service ,i am calling a stored procedure it returns a object type . i can see the outputparameters retrun values in the audit(BPEL console) but i am unable to copy the object return type using assign copy operation.
it shows parser error.Please find below mentioned error information.
fault message:
ULNAPP_JW_100_02_OutputVariable>
-<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
-<db:OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:db="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
-<IV_EDI_REC_T>
<EDI_EDIT>CNLNCE_APP_EDIT_00
</EDI_EDIT>
<EDI_SUPER_PRODUCT_TYPE_CD>CN
</EDI_SUPER_PRODUCT_TYPE_CD>
<EDI_PRODUCT_TYPE_CD>LN
</EDI_PRODUCT_TYPE_CD>
<EDI_FUNDING_TYPE_CD>CE
</EDI_FUNDING_TYPE_CD>
<EDI_PTC_COMPANY>ALL
</EDI_PTC_COMPANY>
<EDI_PCB_BRANCH>ALL
</EDI_PCB_BRANCH>
<EDI_STATE_CD>ALL
</EDI_STATE_CD>
<EDI_PRD_PRODUCT>ALL
</EDI_PRD_PRODUCT>
<EDI_EDIT_TYPE_CD>ORG-ENTRY
</EDI_EDIT_TYPE_CD>
<EDI_ENABLED_IND>Y
</EDI_ENABLED_IND>
<CREATED_BY>SETUP
</CREATED_BY>
<CREATION_DATE>2008-01-30T17:02:35.000+05:30
</CREATION_DATE>
<LAST_UPDATED_BY>SETUP
</LAST_UPDATED_BY>
<LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
</LAST_UPDATE_DATE>
<EDI_RESULT_CD>ERROR
</EDI_RESULT_CD>
<EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
</EDI_OVR_RESPONSIBILITY_CD>
<EDI_ERE_ID>102688
</EDI_ERE_ID>
</IV_EDI_REC_T>
<IV_RESULT>0
</IV_RESULT>
<IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/>
</db:OutputParameters>
</part>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="response-headers">[]
</part>
</ULNAPP_JW_100_02_OutputVariable>
</messages>
Assign_1
[2008/04/10 20:01:50] Updated variable "TMP_Output"More...
-<TMP_Output>
-<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
-<OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DEVJ2EE/ULNAPP_JW_100_02/EDIT/">
-<IV_EDI_REC_T xmlns="">
<EDI_EDIT>CNLNCE_APP_EDIT_00
</EDI_EDIT>
<EDI_SUPER_PRODUCT_TYPE_CD>CN
</EDI_SUPER_PRODUCT_TYPE_CD>
<EDI_PRODUCT_TYPE_CD>LN
</EDI_PRODUCT_TYPE_CD>
<EDI_FUNDING_TYPE_CD>CE
</EDI_FUNDING_TYPE_CD>
<EDI_PTC_COMPANY>ALL
</EDI_PTC_COMPANY>
<EDI_PCB_BRANCH>ALL
</EDI_PCB_BRANCH>
<EDI_STATE_CD>ALL
</EDI_STATE_CD>
<EDI_PRD_PRODUCT>ALL
</EDI_PRD_PRODUCT>
<EDI_EDIT_TYPE_CD>ORG-ENTRY
</EDI_EDIT_TYPE_CD>
<EDI_ENABLED_IND>Y
</EDI_ENABLED_IND>
<CREATED_BY>SETUP
</CREATED_BY>
<CREATION_DATE>2008-01-30T17:02:35.000+05:30
</CREATION_DATE>
<LAST_UPDATED_BY>SETUP
</LAST_UPDATED_BY>
<LAST_UPDATE_DATE>2008-01-30T17:02:35.000+05:30
</LAST_UPDATE_DATE>
<EDI_RESULT_CD>ERROR
</EDI_RESULT_CD>
<EDI_OVR_RESPONSIBILITY_CD>UNDEFINED
</EDI_OVR_RESPONSIBILITY_CD>
<EDI_ERE_ID>102688
</EDI_ERE_ID>
</IV_EDI_REC_T>
<IV_RESULT xmlns="">0
</IV_RESULT>
<IV_ERR_DESC xsi:nil="true" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns=""/>
</OutputParameters>
</part>
</TMP_Output>
</sequence>
</flow>
<switch>
Assign_Output (faulted)
[2008/04/10 20:01:50] Error in evaluate <from> expression at line "399". The result is empty for the XPath expression : "/ns9:OutputParameters/ns9:IV_RESULT". More...
oracle.xml.parser.v2.XMLElement@d2838
[2008/04/10 20:01:50] "{http://schemas.xmlsoap.org/ws/2003/03/business-process/}selectionFailure" has been thrown.less
-<selectionFailure xmlns="http://schemas.xmlsoap.org/ws/2003/03/business-process/">
-<part name="summary">
<summary>
empty variable/expression result.
xpath variable/expression expression "/ns9:OutputParameters/ns9:IV_RESULT" is empty at line 399, when attempting reading/copying it.
Please make sure the variable/expression result "/ns9:OutputParameters/ns9:IV_RESULT" is not empty.
</summary>
</part>
</selectionFailure
Thanks in advance,I'm having a similar problem where I'm unable to copy data from a single element from a response from a stored procedure (through an ESB service). If I copy the entire response xml to another variable it works fine however.
Working code:
<variable name="VariableOut" messageType="ns10:OutputParameters_reply"/>
<assign name="assignStatusCode">
<copy>
<from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
<to variable="statusCodeFromEnclosures"/>
</copy>
</assign>
results in:
Updated variable "VariableOut"
<invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
<part xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="OutputParameters">
<OutputParameters xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://xmlns.oracle.com/pcbpel/adapter/db/DOC_INT/DOC_INV_ENCLOSURE_PKG/SEND_ENCLOSURES/">
<P_ENCLOSURES xsi:nil="true"/>
<P_STATUS_CODE>1</P_STATUS_CODE>
<P_STATUS_TEXT>My text</P_STATUS_TEXT>
</OutputParameters>
</part>
</invokeAPPS_DB_Enclosures_Out_execute_OutputVariable>
Not working code:
<variable name="statusCodeFromEnclosures" type="xsd:unsignedInt"/>
<assign name="assignStatusCode">
<copy>
<from variable="VariableOut" part="OutputParameters" query="/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE"/>
<to variable="statusCodeFromEnclosures"/>
</copy>
</assign>
results in:
Error in evaluate <from> expression at line "195". The result is empty for the XPath expression : "/ns11:OutputParameters/ns11:EnclosureOutput/ns11:P_STATUS_CODE".
oracle.xml.parser.v2.XMLElement@14d4901 -
Hello Experts!!
I got one issue with portals and Queries.
My user added one query/report in 'My Portfolio' of of Business Explorer of his Portal.When he is trying to view that report today,he is getting error..'500 Internal Server Error'...when I read in the error message,I found something like---'Bookmark XXXXXX doesnot exist and therefore cannot be loaded'
I asked user if he can tell me which query/report he added in his portfolio....He checked properties of that bookmark and sent me
TemplateID ....I searched on it but couldnot find any query/report in my Query Designer.....Is template ID enough for this or do we
need to ask specifically for query name?
How can we find query name of the bookmark/report users add in their personal BEx documents/My Portfolio in BEx Portals?
Do any of you have any knowledge about why this type of error occurs?
Thanks alot.
P Olin.Hallo,
This is possible to use the [metadata repository|http://help.sap.com/saphelp_sm40/helpdata/en/4e/ea683c25e9096de10000000a114084/frameset.htm] in transaction RSA1 in order to help you in find the information that you need.
RSA1 -> Metadata Repository .
In that screen you will find a list of BW objects. In your case that you have the WEB Template ID, you can choose the u201CBex Web Templateu201D option and find user's template in the list returned. Opening that template should give you all information that you need to find the query and other related objects.
I hope this info can help.
BR,
Ricardo -
I'm trying to call an entity bean froma session bean i get the error :-
7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
[findByCustID].
7/02/27 14:35:25 at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
7/02/27 14:35:25 at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
My session bean looks like this :-
public class HelloBean implements SessionBean
public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
String lzRevenue=null;
int liCustomerID=Integer.parseInt(pzCustomerID);
try
Context initial = new InitialContext();
Object objref = initial.lookup("SalesBean");
SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
Sales sales=salesHome.findByCustID(liCustomerID);
lzRevenue=(String) sales.findByCustID(liCustomerID);
My entity bean looks like this:-
public class SalesBean implements EntityBean
public String factPK;
public int timeID;
public int custID;
public int locID;
public int itemID;
public int entityID;
public String currency;
public float qty;
public float unitPrice;
public float amount;
public EntityContext context;
private Connection con;
private void makeConnection() {
try {
InitialContext ic = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
con = ds.getConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database. " +
ex.getMessage());
public SalesBean()
public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
makeConnection();
PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
pstmt.setInt(1, custID);
ResultSet rset = pstmt.executeQuery();
if (!rset.next())
throw new RemoteException("no records present" );
return rset.getString(1);
}My entity bean's home interface looks like this:-
public interface SalesHome extends EJBHome
public Sales create() throws RemoteException, CreateException;
public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
My entity bean's remote interface looks like this:-
public interface Sales extends EJBObject
public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
my ejb-jar.xml looks like this:-
<enterprise-beans>
<session>
<description>Hello Bean</description>
<ejb-name>HelloBean</ejb-name>
<home>myEjb.HelloHome</home>
<remote>myEjb.HelloRemote</remote>
<ejb-class>myEjb.HelloBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<entity>
<ejb-name>SalesBean</ejb-name>
<home>myEjb.SalesHome</home>
<remote>myEjb.Sales</remote>
<ejb-class>myEjb.SalesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>factPK</field-name>
</cmp-field>
<cmp-field>
<field-name>timeID</field-name>
</cmp-field>
<cmp-field>
<field-name>custID</field-name>
</cmp-field>
<cmp-field>
<field-name>locID</field-name>
</cmp-field>
<cmp-field>
<field-name>itemID</field-name>
</cmp-field>
<cmp-field>
<field-name>entityID</field-name>
</cmp-field>
<cmp-field>
<field-name>currency</field-name>
</cmp-field>
<cmp-field>
<field-name>qty</field-name>
</cmp-field>
<cmp-field>
<field-name>unitPrice</field-name>
</cmp-field>
<cmp-field>
<field-name>amount</field-name>
</cmp-field>
<primkey-field>factPK</primkey-field>
<resource-ref>
<res-ref-name>jdbc/DSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
please help me out of this trouble.I'm trying to call an entity bean froma session bean i get the error :-
7/02/27 14:35:25 javax.ejb.ObjectNotFoundException: Exception [EJB - 10008]: Cannot find bean of type [SalesBean] using finde
[findByCustID].
7/02/27 14:35:25 at oracle.toplink.internal.ejb.cmp.EJBExceptionFactory.objectNotFound(EJBExceptionFactory.java:325)
7/02/27 14:35:25 at oracle.toplink.internal.ejb.cmp.finders.Finder.checkNullResult(Finder.java:224)
My session bean looks like this :-
public class HelloBean implements SessionBean
public String helloWorld (String pzCustomerID) throws SQLException,RemoteException
String lzRevenue=null;
int liCustomerID=Integer.parseInt(pzCustomerID);
try
Context initial = new InitialContext();
Object objref = initial.lookup("SalesBean");
SalesHome salesHome =(SalesHome) PortableRemoteObject.narrow(objref,SalesHome.class);
Sales sales=salesHome.findByCustID(liCustomerID);
lzRevenue=(String) sales.findByCustID(liCustomerID);
My entity bean looks like this:-
public class SalesBean implements EntityBean
public String factPK;
public int timeID;
public int custID;
public int locID;
public int itemID;
public int entityID;
public String currency;
public float qty;
public float unitPrice;
public float amount;
public EntityContext context;
private Connection con;
private void makeConnection() {
try {
InitialContext ic = new InitialContext();
javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup("jdbc/DSource");
con = ds.getConnection();
} catch (Exception ex) {
throw new EJBException("Unable to connect to database. " +
ex.getMessage());
public SalesBean()
public String ejbFindByCustID(int custID) throws SQLException,RemoteException,FinderException
makeConnection();
PreparedStatement pstmt = con.prepareStatement("select sum(amount) from sales where cust_id= ? ");
pstmt.setInt(1, custID);
ResultSet rset = pstmt.executeQuery();
if (!rset.next())
throw new RemoteException("no records present" );
return rset.getString(1);
}My entity bean's home interface looks like this:-
public interface SalesHome extends EJBHome
public Sales create() throws RemoteException, CreateException;
public Sales findByCustID(int custID) throws SQLException,RemoteException,FinderException;
My entity bean's remote interface looks like this:-
public interface Sales extends EJBObject
public String findByCustID(int custID) throws SQLException,RemoteException,FinderException;
my ejb-jar.xml looks like this:-
<enterprise-beans>
<session>
<description>Hello Bean</description>
<ejb-name>HelloBean</ejb-name>
<home>myEjb.HelloHome</home>
<remote>myEjb.HelloRemote</remote>
<ejb-class>myEjb.HelloBean</ejb-class>
<session-type>Stateful</session-type>
<transaction-type>Container</transaction-type>
</session>
<entity>
<ejb-name>SalesBean</ejb-name>
<home>myEjb.SalesHome</home>
<remote>myEjb.Sales</remote>
<ejb-class>myEjb.SalesBean</ejb-class>
<persistence-type>Container</persistence-type>
<prim-key-class>java.lang.String</prim-key-class>
<reentrant>False</reentrant>
<cmp-field>
<field-name>factPK</field-name>
</cmp-field>
<cmp-field>
<field-name>timeID</field-name>
</cmp-field>
<cmp-field>
<field-name>custID</field-name>
</cmp-field>
<cmp-field>
<field-name>locID</field-name>
</cmp-field>
<cmp-field>
<field-name>itemID</field-name>
</cmp-field>
<cmp-field>
<field-name>entityID</field-name>
</cmp-field>
<cmp-field>
<field-name>currency</field-name>
</cmp-field>
<cmp-field>
<field-name>qty</field-name>
</cmp-field>
<cmp-field>
<field-name>unitPrice</field-name>
</cmp-field>
<cmp-field>
<field-name>amount</field-name>
</cmp-field>
<primkey-field>factPK</primkey-field>
<resource-ref>
<res-ref-name>jdbc/DSource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
</entity>
</enterprise-beans>
please help me out of this trouble. -
Multi-row sub query returns ORA-00904 :invalid identifier error
I am creating a report from two tables that I am not joining. I want a single line for every row in table1 that meets a date range. Table2 can contain none or many rows for each recored in table1. I want to get up to two fields from table2.
I was using a case statement to check if there was data and then an in-line query or subquery. Once again, the idea is to have a single line on the report for each table1 record.
I get this error with the code below. It seems the nested multi-row subquery can not see the a.cr_mas_cr_no identifier.
ORA-00904: "a"."cr_mas_cr_no": invalid identifier
Any help is greatly appreciated,
Sam
select
a.cr_mas_cr_no "CRNO", a.cr_mas_type "TYPE", a.cr_mas_status "CR Status",
a.cr_mas_date_logged "Logged date", a.CR_REL_REQ_APP_DATE "RTP approved",a.CR_REL_REQ_RTP_DATE "RTP Date",
a.cr_accepted_date "Complete", a.cr_mas_submitted_by "Requester",
select doc_user FROM crrm_cr_documents WHERE doc_cr_number =a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'BD' ) "Bus Design",
(select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TD' ) "Tech Design",
(select doc_user FROM crrm_cr_documents WHERE doc_cr_number = a.cr_mas_cr_no and rownum = 1 and DOC_TYPE = 'TE' ) "User acceptance test",
case
when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 0
then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
end
"RTP #1",
case
when (select count(appr_user) from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') > 1
then (select appr_user from (select * from crrm_cr_approvals where appr_cr_no = a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 2)
end
"RTP #2",
a.CR_REL_REQ_RTP_BY "Released by",
a.CR_ACCEPTED_BY "Post RTP User Acceptance",
a.cr_mas_title "Title", a.cr_mas_id "ID"
from
crrm_crmaster a
where
(a.CR_REL_REQ_RTP_DATE >= :P1109_BEGDATE and (a.CR_REL_REQ_RTP_DATE <= :P1109_ENDDATE) and
(a.cr_mas_status = 'Complete' or (a.cr_mas_status = 'Release Approved'and a.CR_REL_REQ_APP_DATE < :P1109_ENDDATE))
Message was edited by:
slavanawayIceman,
Thanks for the reply I will try your suggestion.
I will try and explain why I think two subqueries (an in-line query with a subquery?) are required. I will use the creation of the column RTP #1 as the example as the RTP #2 column is only different in the rownum selected.
Looking only at the lines that fail, here is my analysis. (If I rem out the two case lines the query runs, I just don't get two columns of data I need.) I will only examine the first case as the second is changed to extract the second approval via the rownum = 2 criteria. The first statement checks there is at least one RTP approval stored for the request and then gets the user who approved the request if the test is true.
case when
(select count(appr_user) from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') > 0
then
The above part works fine and the correct count of approvals is returned.
(select appr_user from (select * from crrm_cr_approvals where appr_cr_no=a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
end
"RTP #1",
I moved the parenthesis to the correct location. There can be multiple approvals for a given parent record. Some parent records need one, some need two approvals. If I replace
(select appr_user from (select * from crrm_cr_approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP') where rownum = 1)
with
(select appr_user from approvals where appr_cr_no =a.cr_mas_cr_no and appr_type = 'RTP' and rownum = 1)
The correct result is returned because it returns exactly one row as rownum=1 limits the query. When rownum = 2 then the query returns null as the rownum never gets to two as the rownum column is built via the set created by the second subquery.
The subquery builds a set of approvals for a specific "cr_no" and appr_type of "RTP". the outer query then looks at the rownum of the second query
Here is where I got the rownum information from;
http://www.oracle.com/technology/oramag/oracle/06-sep/o56asktom.html
So here is what I think is happening;
1. Main query From and Where are processed. This should provide the "set" for the query
2.The from subqueries for RTP #1 and RTP #2 should be able to access the a.cr_mas_cr_no field and build a set from the approvals table.
3.The RTP #1/2 subquery (inline maybe a better description?) would then get the correct row from the from subquery.
The error "invalid identifier" refers to the a.cr_mas_cr_no field. I assume it means it can not resolve the table alias inside the subquery.
So maybe your grouping would help, I will try.
Sam -
haven't been around in a while, so I thought I'd stir up some comments with a suggestion for a new feature in Java, which I'm sure has been suggested at some point, but I can't remember seeing it talked about, so here goes:
Multiple Return Types:
public String, int getStateInfo(String abbrev) {
if("nj".equalsIgnoreCase(abbrev)) {
return "New Jersey", 11408042;
// ... and other states...
return null, -1;
String name, int population = getStateInfo("nj");
System.out.println("The population of " + name + " is " + population + ".");Yes yes, I know. Create a StateInfo object with the fields needed. Still, I think that could be interesting.apart from it getting ugly with more than twoparameters
What? How is this ugly? ;-)
public String, int, String, Color, String, String
getStateInfo(String abbrev) {
return name, population, stateFlower, stateColor,
or, stateAnimal, governorsName;
there no indication on what the return valuesrepresent.
Well, I guees the API docs would have to speak for
themselves. Or better method naming... In that
sense, it's no different then now. I could write a
method "getStateName()" and return totally different.
public String, int getStateNameAndPopulation(String
abbrev) {...
I used to like "tuples" when I studied The Tom Programming Language (that's how he calls them), as every CS student is a bit of a "featurist"... Now that I came to develop 40 hours a week and to love Java's simple and powerful expressiveness, I tend to find such constructs overly ugly to be avoided as possible... a matter of personal taste, too, I suppose... -
How to find out the type of the object ?
how would i find out the type of an object reference variable ?
it would be nice if there was some sort of getType() method that would return a string to tell me the type of the object -- just for testing purposestry
Object.getClass().getName();
or just
Object.getClass().toString();
so something like this in your code:
Object obj = new Foo();
System.out.println(""+obj.getClass());
etc. -
How can I get rid of a type generated by the Data/Services return type wizard?
Hi All,
I have a JSON service that returns an object called "error". The Data/Services "Configure Return Type" wizard automatically turned this into a class "Error".
However, this caused over a hundred errors to show up inside the generated classes, "Call to a possibly undefined method Error." That's because of lines like this:
throw new Error(propertyName + " is not a data property of entity Agreements");
It's trying to throw a regular "Error" object, but now that there's an "Error" class in the same package, that is taking precedence--and that Error object doesn't have a constructor with a single parameter. At least, that's what I think is going on.
I tried to fix it by deleting _ErrorEntityMetadata.as, _Super_Error.as, and Error.as from the valueObjects package. I then opened the FML file and deleted the definition for the entity "Error" and every reference to the Error entity (class) in my FML file.
I then changed my JSON service so that it returns an object called "serviceError" instead of just "error".
But, whenever I re-run the "Configure Return Type" wizard, it regenerates the Error class, even though I've deleted it from everywhere I can find it. That breaks my project completely! How can I end this and get Flash Builder to *stop* generating this type!
In the "Configure Return Type" wizard I very carefully inspected the type of every bit of data coming back to make sure none of them show up as type "Error." And they don't (as expected, since I changed the object's name to serviceError--now the type of that object is ServiceError.
-JoshI think you are facing this known issue https://bugs.adobe.com/jira/browse/FB-29770
Please vote it.
Thanks for the link--I just voted for it.
To avoid this, in the last page of "Configure Return Type", edit return type name to something else (You can also edit subnodes's name too in the wizard).
Actually, that's exactly what I saw doing; I apologize if that wasn't clear in my post.
I closed and restarted Flash Builder, and once I did that Flash Builder stopped generating the Error class. My guess is that the FML file, even though I had updated it (by deleting all references to the Error class), was cached in some fashion by Flash Builder, and restarting Flash Builder forced it to reread the FML file?
Additional point of clarification: my understanding is that the FML file stores all the metadata about the services that Flash Builder has been able to figure out so far, and when you run the Configure Return Type wizard, it will regenerate *every* type in the FML file, even if that type is not mentioned anywhere in the particular return value that you are working with.
Edited to provide additional thoughts on FML file. -
Creating a directory via a jsp page sql query return
Is it possible to create a directory based on the results of a sql query?
i.e.
My sql query returns application number 1234 for a building application (BC for short).
Is it possible to create a directory /BC/1234
It is then proposed to use an iframe to look into the directory so users can place and access scanned documents which are captured during the approval process.
If so how?
An example would be great.
JasonSorry hope your still around I've been away for a while. We've created a samber share to the file server where the documents are stored and mounted it within the web file directory. It works ok if there is an existing directory but if there isn't we want it to be created when the page looks for the folder. I've done this with an asp page it basically did a directory exist test first then create folder if it didn't. The problem is can't find an example of how to do the directory exist test then directory create syntax so an example of both would be great
-
Deserializer error : could not find deserializer for type
Hi folks,
I am trying to send a XML file in web service request and trying to get the same back, I am getting the following exception while trying to do this,
org.xml.sax.SAXException: Deserializing parameter 'echo': could not find deserializer for type {Echo}echo
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: org.xml.sax.SAXException: Deserializing parameter 'echo': could not find deserializer for type {Echo}echo
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}hostname:localhost
org.xml.sax.SAXException: Deserializing parameter 'echo': could not find deserializer for type {Echo}echo
at org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuilder.java:222)
at org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilder.java:129)
at org.apache.axis.encoding.DeserializationContext.endElement(DeserializationContext.java:1087)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.endElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanEndElement(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLNSDocumentScannerImpl.next(Unknown Source)
at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at org.apache.axis.encoding.DeserializationContext.parse(DeserializationContext.java:227)
at org.apache.axis.SOAPPart.getAsSOAPEnvelope(SOAPPart.java:696)
at org.apache.axis.Message.getSOAPEnvelope(Message.java:435)
at org.apache.axis.handlers.soap.MustUnderstandChecker.invoke(MustUnderstandChecker.java:62)
at org.apache.axis.client.AxisClient.invoke(AxisClient.java:206)
at org.apache.axis.client.Call.invokeEngine(Call.java:2784)
at org.apache.axis.client.Call.invoke(Call.java:2767)
at org.apache.axis.client.Call.invoke(Call.java:2443)
at org.apache.axis.client.Call.invoke(Call.java:2366)
at org.apache.axis.client.Call.invoke(Call.java:1812)
at com.sel.services.EchoRequest.main(EchoRequest.java:42)
The following is my client code,
import javax.activation.DataHandler;
import javax.activation.FileDataSource;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory;
import org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory;
public class EchoRequest {
* @param args
public static void main(String[] args) {
try {
String endpoint = "http://localhost:8080/axis/Echo.jws";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName(new QName(("Echo"),"DataHandler"));
QName qName = new QName("Echo" , "echo");
DataHandler dhSource = new DataHandler(new FileDataSource("D:/Workspace/Sandbox/Request.xml"));
call.registerTypeMapping(dhSource.getClass(),qName,JAFDataHandlerSerializerFactory.class,JAFDataHandlerDeserializerFactory.class );
call.addParameter("echo", qName , ParameterMode.IN);
call.setProperty(call.ATTACHMENT_ENCAPSULATION_FORMAT, call.ATTACHMENT_ENCAPSULATION_FORMAT_MIME);
call.setReturnType(qName);
Object ret = call.invoke(new Object[] {dhSource});
System.out.println();
} catch (Exception e) {
System.err.println(e.toString());
e.printStackTrace();
}The following is my jws,
import java.io.Serializable;
import javax.activation.DataHandler;
public class Echo implements Serializable{
public DataHandler echo(DataHandler echo){
return echo;
}The following is my deploy.wsdd,
<deployment xmlns="http://xml.apache.org/axis/wsdd/"
xmlns:java="http://xml.apache.org/axis/wsdd/providers/java"
xmlns:ns1="Echo">
<service name="Echo" provider="java:RPC">
<parameter name="className" value="Echo"/>
<parameter name="allowedMethods" value="echo"/>
<operation name="echoString" returnQName="returnqName" returnType="ns1:DataHandler">
<parameter name="echo" type="ns1:DataHandler"/>
</operation>
<typeMapping deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory"
languageSpecificType="java:javax.activation.DataHandler" qname="ns1:DataHandler"
serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
</service>
</deployment>And following is my server-config.wsdd,
<?xml version="1.0" encoding="UTF-8"?>
<deployment xmlns="http://xml.apache.org/axis/wsdd/" xmlns:java="http://xml.apache.org/axis/wsdd/providers/java">
<globalConfiguration>
<parameter name="sendMultiRefs" value="true"/>
<parameter name="disablePrettyXML" value="true"/>
<parameter name="adminPassword" value="admin"/>
<parameter name="attachments.Directory" value="D:\ApacheTomcat5.5.26\webapps\axis\WEB-INF\attachments"/>
<parameter name="dotNetSoapEncFix" value="true"/>
<parameter name="enableNamespacePrefixOptimization" value="false"/>
<parameter name="sendXMLDeclaration" value="true"/>
<parameter name="attachments.implementation" value="org.apache.axis.attachments.AttachmentsImpl"/>
<parameter name="sendXsiTypes" value="true"/>
<requestFlow>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="session"/>
</handler>
<handler type="java:org.apache.axis.handlers.JWSHandler">
<parameter name="scope" value="request"/>
<parameter name="extension" value=".jwr"/>
</handler>
</requestFlow>
</globalConfiguration>
<handler name="LocalResponder" type="java:org.apache.axis.transport.local.LocalResponder"/>
<handler name="URLMapper" type="java:org.apache.axis.handlers.http.URLMapper"/>
<handler name="Authenticate" type="java:org.apache.axis.handlers.SimpleAuthenticationHandler"/>
<service name="AdminService" provider="java:MSG">
<parameter name="allowedMethods" value="AdminService"/>
<parameter name="enableRemoteAdmin" value="false"/>
<parameter name="className" value="org.apache.axis.utils.Admin"/>
<namespace>http://xml.apache.org/axis/wsdd/</namespace>
</service>
<service name="Version" provider="java:RPC">
<parameter name="allowedMethods" value="getVersion"/>
<parameter name="className" value="org.apache.axis.Version"/>
</service>
<service name="Echo" provider="java:RPC">
<operation name="echoString" returnQName="returnqName" returnType="ns1:DataHandler" soapAction="" xmlns:ns1="Echo">
<parameter name="echo" type="ns1:DataHandler"/>
</operation>
<parameter name="allowedMethods" value="echo"/>
<parameter name="className" value="Echo"/>
<typeMapping deserializer="org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" qname="ns2:DataHandler" serializer="org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory" type="java:javax.activation.DataHandler" xmlns:ns2="Echo"/>
</service>
<transport name="http">
<requestFlow>
<handler type="URLMapper"/>
<handler type="java:org.apache.axis.handlers.http.HTTPAuthHandler"/>
</requestFlow>
<parameter name="qs:list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs:wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
<parameter name="qs.list" value="org.apache.axis.transport.http.QSListHandler"/>
<parameter name="qs.method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs:method" value="org.apache.axis.transport.http.QSMethodHandler"/>
<parameter name="qs.wsdl" value="org.apache.axis.transport.http.QSWSDLHandler"/>
</transport>
<transport name="local">
<responseFlow>
<handler type="LocalResponder"/>
</responseFlow>
</transport>
</deployment>The following is the directory structure which I have in my tomcat for this service
- axis
-----WEB-INF
----------classes
----------jwsClasses
----------lib
----------deploy.wsdd
----------server-config.wsdd
I am really not sure where I am getting wrong. Please help me with this.
Thanks
Edited by: Jadaaih on Jun 19, 2008 1:52 AMOk, this may not be your problem, but I was getting this error as well.
I had multiple services running, and I was able to use SOAP test clients and connect to them and get responses, no problem.
I wrote some client code to connect to one, and it worked just fine.
Then I wrote some client code to connect to the other, and I got an error like
faultString: org.xml.sax.SAXException: Deserializing parameter 'initiateIn': could not find deserializer for type {urn:SOAPFulfillmentAPI}DoSomething
...I tore my hair out trying to figure out why a service that functions perfectly using other tests would fail in java. Then I realized I was pointing to the end point URL.
It looks like AJAX tries to deserialize the parameters before it does any of basic sanity check to see the method your looking for even exists (even in debug mode). So instead of getting a useful error like "Cant find method 'DoSomething' " you get some crap about not being able to understand the datatype for an arguement.
I hope this helps someone one day =) -
Data Service Wizard - How can I reconfigure return type field as XML (E4X) value
The HTTP Data Service wizard - "Reconfigure Return Type" - does not allow XML (E4X) to be selected as a data type for a field. For example , If my example XML payload looks like this (see below), I would like to set the datatype for "settings" field to be XML (E4X) and have the service decode the "string" value into an XML (E4X) value.
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListOfUsers version="1.0.0">
<User>
<id>3</id>
<subType>INTERNAL</subType>
<authName>internal</authName>
<name>Internal User</name>
<settings><?xml version="1.0" encoding="utf-8" ?><Settings><Profile><Region>emea</Region><Language>en.g b</Language></Profile></Settings></settings>
</User>
</ListOfUsers>I find a (reasonably) elegant workaround which is to add a transient property in the "public" sub class of the value type - see below - I havent tested it much so not sure if it will work adequateky in all circumstances
package services.listeningpost
public class User_type extends _Super_User_type
public function get xmlSettings():XML
return new XML(settings);
public function set xmlSettings(object:XML):void
settings = object.toXMLString(); -
Non-void return type for Application Module Clients Interface
Hello, can anyone guide me on how will I solve my problem.
first of all, I'm using JDeveloper 10.1.3, I use JSF, ADF Faces, ADF Model, ADF Business Components.
I made a web page that has a Transactional Capabilities, all is going smoothly, all data's can be saved to oracle database. I created a Custom Method in my Application Module and can be used in Clients Interface, that method is for saving data's to database.
My problem is I dont know how to create a custom method that returns a value in my Application Module. Which means if I set it to non-void return type, it is not visible to Client Interface. If you're going to ask me why I need it to return a value? Well since that method is for saving data's, if there's an Error Occured, I can return the Error Message and show it to my user interface.
Please help. thanksIf you want to return your own type then simply define it as serializable and you will find that it will appear in the Client Interface dialog of your AM.
eg, you could return this type from your application module to progagate a meaningful message to your UI:
package com.delexian.model;
import java.io.Serializable;
public class MyMessage implements Serializable {
private String _severity;
private String _message;
public MyMessage() {
public void setSeverity(String severity) {
this._severity = severity;
public String getSeverity() {
return _severity;
public void setMessage(String message) {
this._message = message;
public String getMessage() {
return _message;
}regards,
Brenden
Maybe you are looking for
-
every time i do something out side of firefox4 it star to blink or flickering
-
PDF exported from InDesign missing background when opened in Illustrator
Hello, I am having a bit of a frustrating problem. I'm working on graphics for a large project, and I have to get some of my files from InDesign into Illustrator (they are both CS5) for our printer. I would have normally designed them in Illustrator
-
Hello All, Every time i try to install the Web Console i get the error ( Please see the attach). Any one have see this issue before ?
-
HT5706 how to get TV and comp working
trying to get the UTube working on my TV and other things...
-
Voice command in Cisco Unity Connection
I'm currently using Unity Connection 8.5.1 with Cisco Unified CallManager version 7.1.5. I'm trying to see where I can make sure our Class of Service is correct for the Unity Connection voice command and am unable to find anything. Can anyo