SOAP Webservice returns Array - how to setup Xcelsius?
Hello,
after a lot of tests I have recognized that Xcelsius is not able to handle Webservices which return arrays with an undefined size. So I edited the schema file in the way that the size is defined.
Here is an extract of the schema file:
<xsd:sequence>
<xsd:element name="row0" type="tns:Row" maxOccurs="10" minOccurs="10" ></xsd:element>
</xsd:sequence>
With that configuration Xcelsius is able to import the wsdl. But the preview window is showing only one Row Folder, I have excpected "10". My question is, is my config the right way to handle arrays with Xcelsius and when it is, how I have to set up the range in the Excel Map to make the data avaiable???
Thank you in advance.
Best regards,
Conrad
Here is an example, you can compare what is different. From the look of it the recipient info is missing from yours. Does it say which INI option is missing when you get an error?
<doPublishRequest xsi:type="doPublishReq_Import" xmlns="http://webservices.docucorp.com/ewps/schema/2005-12-01">
<LibraryId>CONFIGNAME</LibraryId>
<DistributionOptions xsi:type="DistributionOptions_ADHOC" source="ADHOC">
<Priority>REALTIME</Priority>
<Channel xsi:type="Channel_IMMEDIATE">
<PublishType>PDF</PublishType>
<DistributionType>IMMEDIATE</DistributionType>
<Disposition location="ATTACH" />
<Recipient name="ORIGINAL">
<Props>
<Prop name="" />
</Props>
<Copies />
<Story StoryName="" id="" alias="" />
</Recipient>
</Channel>
</DistributionOptions>
<SourceType>IMPORT</SourceType>
<Import>
<ImportFile xsi:type="ImportFile_ATTACH" d6p1:contentType="" location="ATTACH" xmlns:d6p1="http://www.w3.org/2005/05/xmlmime">O05hdXRpbH.......</ImportFile>
</Import>
</doPublishRequest>
Similar Messages
-
DataConnection: Webservice returning array
Hello,
I try to get an alternative to the SOAP call working: I have a webservice that returns the content of a row in a database in an array of strings. This works fine as long as I use the SOAP call to access and execute the service.
However, we run into some problems with the SOAP, so I want to see if we could use the Data View and a data connection to access the webservice instead.
Is there any way to access the return value of the data connection via JavaScript? Or programmatically at all? I cannot figure out which model I have to use (connectionSet, datasets, data, etc.)
If I just drag'n drop the return value field with its subforms onto my form, it just shows the first value, but does not multiple itself.
Is that alternative an alternative at all, or does it not work this way with an array?
Kind regards, KarinHello,
I try to get an alternative to the SOAP call working: I have a webservice that returns the content of a row in a database in an array of strings. This works fine as long as I use the SOAP call to access and execute the service.
However, we run into some problems with the SOAP, so I want to see if we could use the Data View and a data connection to access the webservice instead.
Is there any way to access the return value of the data connection via JavaScript? Or programmatically at all? I cannot figure out which model I have to use (connectionSet, datasets, data, etc.)
If I just drag'n drop the return value field with its subforms onto my form, it just shows the first value, but does not multiple itself.
Is that alternative an alternative at all, or does it not work this way with an array?
Kind regards, Karin -
How to setup Xcelsius to read an XML file.
Hello, I'm new to Xcelsius 2008 and I have three XML files that I need to setup as data input sources and then build a chart. I tried to setup a data connection, but I'm probably doing something wrong. What is the best way to accomplish this task.
I often use XML Data Maps in Excel to connect the XML docs. In Excel 2007, click on the 'developer' tab in the ribbon (if you don't have it you can add it in the Excel Options page), then under the XML section click 'Source'.
You'll see a sidebar comeup, click on 'XML Maps...' on the bottom right hand corner of this pane. Click 'Add' on the next screen and open the XML file from where it is saved. Once you click OK a few times you'll be back to Excel and see you're schema diagramed. From there you can drag over the schema to your excel workbook, click refresh and you should see a table of your data.
Once that's set, just go to the connections in Xcelsius, add in Excel XML Data Maps as a connection and you're good to go. -
PI SOAP access to third party Webservice,Return ERROR
Hi Experts,
I have one soap synchronous scenario access to third party WEBSERVICE,Return error.While testing the wsdl in soap ui, I am getting response, messages showing successfully processed. I think it is pi to send xmlns:ns1='http://tempuri.org/' on both sides should not be a single quotation mark, but I don't know how to adjust PI set. how do you see.
1、SOAP UI submitted to Webserver XML
[2014-05-26 08:47:24.662] --- Recv data from SocketId=272 Socket=10880
POST /MWGate/wmgw.asmx HTTP/1.1
Accept-Encoding: gzip,deflate
Content-Type: text/xml;charset=UTF-8
SOAPAction: "http://tempuri.org/MongateCsSpSendSmsNew"
User-Agent: Jakarta Commons-HttpClient/3.1
Host: 10.0.0.253:8082
Content-Length: 520
<soapen:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:tem="http://tempuri.org/">
<soapen:Header />
<soapen:Body>
<tem:MongateCsSpSendSmsNew>
<tem:userId>DOA001</tem:userId>
<tem:password>dennis</tem:password>
<tem:pszMobis>1313773654</tem:pszMobis>
<tem:pszMsg>1111</tem:pszMsg>
<tem:iMobiCount>1</tem:iMobiCount>
<tem:pszSubPort>*</tem:pszSubPort>
</tem:MongateCsSpSendSmsNew>
</soapen:Body>
</soapen:Envelope>
2、PI submitted to Webserver XML
[2014-05-26 08:36:08.725] --- Recv data from SocketId=271 Socket=10704
POST /MWGate/wmgw.asmx HTTP/1.0
Accept: */*
Host: 10.0.0.253:8082
User-Agent: SAP-Messaging-com.sap.aii.af.sdk.xi/1.0505
CallingType: SA
content-id: <[email protected]>
Content-Type: text/xml; charset=utf-8
Content-Length: 417
SOAPACTION: "http://tempuri.org/MongateCsSpSendSmsNew"
<SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
<SOAP:Header />
<SOAP:Body>
<ns1:MongateCsSpSendSmsNew xmlns:ns1='http://tempuri.org/'>
<ns1:userId>DOA001</ns1:userId>
<ns1:password>dennis</ns1:password>
<ns1:pszMobis>13637731567</ns1:pszMobis>
<ns1:pszMsg>Constant</ns1:pszMsg>
<ns1:iMobiCount>1</ns1:iMobiCount>
<ns1:pszSubPort>*</ns1:pszSubPort>
</ns1:MongateCsSpSendSmsNew>
</SOAP:Body>
</SOAP:Envelope>
3、SXI_MONITOR Payloads content:
<ns1:MongateCsSpSendSmsNew xmlns:ns1="http://tempuri.org/">
<ns1:userId>DOA001</ns1:userId>
<ns1:password>dennis</ns1:password>
<ns1:pszMobis>13637731567</ns1:pszMobis>
<ns1:pszMsg>Constant</ns1:pszMsg>
<ns1:iMobiCount>1</ns1:iMobiCount>
<ns1:pszSubPort>*</ns1:pszSubPort>
</ns1:MongateCsSpSendSmsNew>
4、PI channelHi Nathan,
Have you tried the SOAP HTTP Axis function.
http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/b092777b-ee47-2a10-17b3-c5f59380957f?overridelayout=t…
https://help.sap.com/saphelp_nw04/helpdata/en/45/a39e244b030063e10000000a11466f/content.htm
Configuring the Receiver Axis SOAP Adapter (SAP Library - SAP Exchange Infrastructure)
Regards,
Jannus Botha -
How to consume SOAP webservice in to my java/j2ee application
Hi,
I am a java developer. how to i consume SAP soap webservice in to my java application.
scenario : 1
We are migrating 2 specific java modules in to SAP System.But master details are stored in to my java application database.Those details are require
to SAP application. So that they provide me WSDL file, How to i consume soap webservice in to my java application and also, How to i provide master data details to SAP system through SOAP webservice.
Any body provide me a detail instruction how to integrate SAP Application in to my java application using SOAP webservice. or
In this scenario i will go for any one open source ESB to consume the soap webservice in to my java application, and provide master data to
SAP application, can any one guide to me.Hi,
What IDE are you using?, for example with Eclipse i used WSDL2JAVA plugin in this way i converted the WSDL in java classes easily. Depending your development environment you can use different tools that makes easier the integration using the WSDL.
Regards. -
Please help how to get return array from rpg program on java code?
Hi
I have created a rpg program that returns 2 parameter 1 is the id and another one is list of array, when I called this program I passed two programparameter from my java code (see the code below) but when i checked what value would be return it is returned only first value of array. how will i get all array values ?
please suggest me regarding this issues I amn't so much aware on java & AS400.
try
ProgramParameter[] parmList = new ProgramParameter[2];
AS400Text p1 = new AS400Text(10);
AS400Text p2 = new AS400Text(30);
try
parmList[0] = new ProgramParameter(10);
parmList[1] = new ProgramParameter(30);
parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[0].setInputData(p1.toBytes("Pune"));
parmList[1].setInputData(p2.toBytes(" "));
catch(Exception ex)
ProgramCall pgm = new ProgramCall(o);
pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
if (pgm.run())
byte s[] = parmList[1].getOutputData(); // HERE I got only first value of returning array.
parmList[1].getOutputDataLength();
//String sts = ((String) (new AS400Text(10,o).toBytes(s[0])));
else
AS400Message[] messageList = pgm.getMessageList();
for (int msg = 0; msg < messageList.length; msg++) {
catch(Exception ex)
AS400Message[] messageList = null;
finally
o.disconnectAllServices();
Reply With QuoteTry this :
try
ProgramParameter[] parmList = new ProgramParameter[2];
AS400Text p1 = new AS400Text(10);
AS400Text p2 = new AS400Text(30);
AS400Array arrP2 = new AS400Array(p2, 4);
try
parmList[0] = new ProgramParameter(10);
parmList[1] = new ProgramParameter(30);
parmList[0].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[1].setParameterType(ProgramParameter.PASS_BY_REFEREN CE);
parmList[0].setInputData(p1.toBytes("Pune"));
parmList[1].setInputData(arrP2.toBytes({"","","",""}));
catch(Exception ex)
ProgramCall pgm = new ProgramCall(o);
pgm.setProgram("/QSYS.LIB/XXX/XXX.PGM",parmList);
if (pgm.run())
Object[] objArr = (Object [])arrP2.toObject( parmList[1].getOutputData() );
for(int i =0; i<objArr.length;i++){
System.out.println( " SKU " + i +" : " + objArr.toString());
else
AS400Message[] messageList = pgm.getMessageList();
for (int msg = 0; msg < messageList.length; msg++) {
catch(Exception ex)
AS400Message[] messageList = null;
finally
o.disconnectAllServices(); -
How to return array of String to a java program.! ??
Hi All,
I am new to JNI programming. so trying with simple example. I am having one problem. I have one array of String in my Java program. I want to reverse all the elements in this array and want back this new array in the same form i.e. array of string. So how can I do this ??
Please guide me.....
The function of defination of array in my java code is
public native String[] getReverseStringArray(String[] arrString);
where as my array is like:
String[] arrStr = {"one", "two", "three", "four", "��������","�c��","�J�^�J�i"};
and I am calling function in C file like:
arrStr = employee.getReverseStringArray(arrStr);
and the function defination in my c file is
JNIEXPORT jobjectArray JNICALL
Java_Emp_getReverseStringArray (JNIEnv *env, jobject obj, jobjectArray arr)
// some code will come here......
So can anybody tell me how to do this ??
Thanx in advance...
Pandurang
[email protected]Hi,
this is quite simple. Here an example function that works like this:
JNIEXPORT jobjectArray JNICALL Java_cadagent_ugopen_UgAssembly_jni_1getStructure
(JNIEnv *env, jclass cls, jstring part)
jobjectArray retvals = NULL;
jstring j_val = NULL;
int child_count = 5;
/* initialize return array */
j_val = (*env)->NewStringUTF(env, "");
retvals = (*env)->NewObjectArray(env, child_count, (*env)->FindClass(env, "java/lang/String"), j_val);
for (i=0;i<child_count;i++)
j_val = (*env)->NewStringUTF(env, "some text");
(*env)->SetObjectArrayElement(env, retvals,i, j_val);
return retvals;
Hope this answers you question. -
public class A{
public class B{
publc C[] sample()
int i=0;
ResultSet rset = s.executeQuery("select name, id from emp ");
while(rs.next()){
name = rset.getString("nam");
id = rset.getInt("id");
c.setName(name )
c[i].setId(id)
return c[]
public class C{
// here i have getter and setter metod for name & id
When I try to return the object c[]..i am getting "cannot conver from C to C[]".
Can u pls help me, how to return array of object and how to get name and id values in other class using this array object
Thanks for ur helppublic class Starting{
public long empID;
Data data = new Data();
Value[] value;
int count = 0;
public static void executeDe(){
value = new Value[100]
try{
data.getDetails()
processDetails(value);
}catch(Exception e){e.printStackTrace();}
public static void processDetails(Value[] value){
count = data.i;
int i;
for(i=0;i<count;i++){
empID=value.getempID(); \\ here i am not getting all values..... am getting only last value of the array
public class Data{
public long empID;
public int i=0;
static Value[] value = new Value[100];
public static Value[] getDetails(){
Connection con=null;
try {
Class.forName("oracle.jdbc.driver.OracleDriver");
con=DriverManager.getConnection("jdbc:oracle:thin:@" + hostname + ":1521:" + sid, user, password);
System.out.println(" conn " + con);
System.out.println("");
Statement s=con.createStatement();
try{
ResultSet rset = s.executeQuery("select EMPID from Employee ");
while(rset.next()){
empID = rset.getLong("EMPID");
value[i].setCycleID(cy_i);
i++;
rset.close();
con.close();
}catch (SQLException sqle){sqle.printStackTrace();}
finally{
try{
s.close();
con.close();
}catch(SQLException e){e.printStackTrace();}
catch(Exception e){e.printStackTrace();}
return value;
public class Value {
public static long cycleID;
public static void setempID(long empID) {
Value.empID = empID;
public static long getempID() {
return empID;
This is my actual code..... I am able to set the values in Value class from Data class using getDetails() method, which is returning array of value object.
In Starting class, I am trying to get values using value[i].. i am getting last value of the array. This is my actual problem... here i want to get all values.
Please help me how to resolve this. -
I want to return array of unsigned integer from call library node.
If anybody knows please help me
Thanks & Regards,
Harish. G.Did you take a look at the example that ships with LabVIEW that shows how to do all sorts of data passing to DLLs. I believe your situation is one of the examples listed. You can find the example VI in the "<LabVIEW install directory>\examples\dll\data passing" directory.
-
R3 (RFC Asynch) -- XI --- SOAP (webservice Synch)
Hi Experts,
My scenario is :R3 (RFC Asynch) > XI <-> SOAP(webservice is synch)
Step1:- R3 sends the data webservie(SOAP) via XI.
Step2:- Webservice returns the response to XI, But R3(RFC) does not need the resoponse.
how to handle the webservice response in XI.
do i need to use BPM as this scenario is R3(RFC synch) > XI <--> Webservice(soap, synch). Can anybody help me out how to design this scenario.
Thanks,
SivaSo then all u need is to create a async inbound MI. Also the WS should be configured in a way that it sends a HTTP 200 with a SOAP envelope with an empty content for successful delivery.
Refer the below from the SOAP adapter FAQ;
Receiver Asynchronous Calls
Q: What are the correct receiver options for asynchronous calls?
A: The processing mode of the receiver is determined by the message that reaches the receiver. If you are sending a message with some quality of service, to provide this service of quality to the server, your must make sure two things. First, your receiver channel must be configured to pass the XI message ID to the server. Second, your web service must check duplicates using this message ID.
Q: What should my web service return to the adapter for asynchronous calls?
A: Currently, the receiver adapter expects an HTTP 200 with a SOAP envelope with an empty content for successful delivery. Any other response will result in a XI system error and triggers retries of the message. When you want to check duplicates, you should configure your receiver channel to pass the XI message header information to the server.
Prior to SP11, a SOAP fault resulted in the application or system error, depending on whether the SOAP fault contained a detail child element or not. This behavior contradicted the communication model. Therefore, it has been changed so that the adapter generates the system error for any SOAP fault in asynchronous calls.
When you want to check duplicates in your web service, you should configure your receiver channel to pass the XI message header information to the server. When your web service indeed find a duplicate, assuming that the previous message was simply lost, your web service should return an HTTP 200 with an empty SOAP envelope. -
SOAP Webservice problem on Android
Hello,
I am trying to consume my own SOAP webservice and generated webservice stubs from my wsdl in flash builder.
Testing operations is working fine. Everything is working in "simulated device". But when I run my app on my android device webservice calls are never returning.
They are actually never received on the webservice server.
Just afert 10 to 30 seconds there is a window displayed inside my app. This window is not from me, I only have two label fields in this project to display test webservice data.
Made a image for you:
"click to have good quality"
I tried 2 services:
one where the webservice server is running on my device (10.10.200.40 is devices ip address)
one where the webservice is running in internet.
The devices connection is fine. 10.10.200.40 and outside addresses are pingable and the webservice on the device can be called from flashbuilder's operation testing.
Thanks,
ThomasHello All
I also need to call some simple web mothods. How is this achieved?
I have an as3 mobile project built in flash builder 4.6 which needs to send/ receive simple data with my asp.net web service.
Is your problem related to a security setting in your xml descriptor file perhaps?? -
Soap response returns gzipped stream
I am accessing a webservice. The webservice returns a gzipped file stream. I am able to succesfully call the webservice and get the expected results, but I am having trouble unzipping and reading the file stream. I have tried using utl_compress.lz_uncompress with no luck (including the code that has been posted to test for FCOMMENT) Below is an example of the response that is returned:
Response> status_code: "200"
Response> reason_phrase: "OK"
Response> http_version: "HTTP/1.1"
Response> length: "153281"
=== Print first 20 lines of HTTP response... ===
[00]: <soap:Envelope xmlns:soap="http://schemas.xmlsoap.
[01]: org/soap/envelope/"><soap:Body><ns1:getClientDbXml
[02]: Response xmlns:ns1="http://service.clientag.ppd.co
[03]: m/"><return><buffer>H4sIAAAAAAAAANS963LjSJIu+H/N9h
[04]: 1g9WOs2k5lVk/X2Yv1dM+xIBAko4QLCwCZpP4cg8hIES0QYOOi
[05]: FPPd1vaR9hXWPUBSlJRNBxw8tntsxqpVlZHxCXHx8Ovnf/tvL7
[06]: vMetZllRb533/6989//snS+brYpPnj33+ax+NP/+dP/+0//9f/
[07]: 5W/LXWa7Svox/Itl/e2l+mu13updYqWbv/90/sOfLJgur/7+0/
[08]: GHv77Az9u63v/111+/ffv2+dtvn4vy8de//PnP//7r0nMjM8Vp
[09]: 7K7aJHXy95+aMj9OXn3apeuyqIqv9ad1sfsrjPvUjvrJ/BrtL6
[10]: IzvdN5beXJTr/5Xdqhf1WVA/8T6frvP9Vlo8//fV5puylL+Ktu
[11]: sU4yffzj48zt3IC6z/RLfNjr838//sm2SNfa2qV5sF43JXwnLN
[12]: 0ueTn9W5M/FE2+0ZufLv7ij37hhQwjFfhvh11Df/3zSv+zgd36
[13]: +IdXcP67cn6yapjx7z/hDHUJO/3Tu8/4tdOEjojljaaKgnlocy
[14]: b726//ehnMn/2rJTR/ePwliA06Hqf/0fvTwtxue47z+cL7//fC
[15]: /ncn8IT6H3/+b72+7a/9P8H6CleJ6H+65W1/6//vF7b9O0bYv7
[16]: 4MP57nwwzt72KeMnxDjxK4/aNXcfyfduyMPsViX1p/+d9+sf7y
[17]: 53//yy/Wn3/765//DP9vSSf+268Xg81fRtH7n9f+ghlghrai9T
[18]: /Haakf0nLjjP726/E/wW90mvg//3b5uJ+38j///bd4KkMxk/O/
[19]: /fr6Xy8H4fGHYfVWl8leN3W6rs5DzZ8hynHyfwHylz//5c8T6c
[20]: todRXkL38GvcGa6FxHh6rWu+oXS+Xrz33RfluMVBDZ8K9X0X77
Any tips/suggestions on how I can get the file stream unzipped and in a readable format?Any tips/suggestions on how I can get the file stream unzipped and in a readable format?The stream is base64-encoded so you have to decode it first, then you can call LZ_UNCOMPRESS.
This should get you started :
SQL> DECLARE
2
3 v_response xmltype := xmltype(
4 '<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
5 <soap:Body>
6 <ns1:getClientDbXmlResponse xmlns:ns1="http://service.clientag.ppd.com/">
7 <return>
8 <buffer>H4sIAAAAAAAAC7Mpys8vsbMpSS0usQtxDQ6x0QczbfTB4gD5B/mWHgAAAA==</buffer>
9 </return>
10 </ns1:getClientDbXmlResponse>
11 </soap:Body>
12 </soap:Envelope>');
13
14 v_buffer varchar2(4000);
15
16 BEGIN
17
18 select utl_raw.cast_to_varchar2(
19 utl_compress.lz_uncompress(
20 utl_encode.base64_decode(
21 utl_raw.cast_to_raw(buffer)
22 )
23 )
24 )
25 into v_buffer
26 from xmltable(
27 xmlnamespaces(
28 'http://schemas.xmlsoap.org/soap/envelope/' as "s"
29 , 'http://service.clientag.ppd.com/' as "ns1"
30 )
31 , '/s:Envelope/s:Body/ns1:getClientDbXmlResponse/return'
32 passing v_response
33 columns buffer varchar2(4000) path 'buffer'
34 )
35 ;
36
37 dbms_output.put_line(v_buffer);
38
39 END;
40 /
<root><test>TEST</test></root>
PL/SQL procedure successfully completed -
How to setup the drill down on union report
Hi,
I'm setting the union report.
I want to set the drill down to another report.
But I can't setup it.
Would you please tell me how to setup.
Thank you.Hi Hemlatha
In Crystal Reports, to prevent the ability to drill down into a subreport when published on the Web, add a text object that is filled with blank spaces, created by pressing the 'Space Bar' and 'Enter' for line returns, to eclipse the subreport.
This workaround is applicable only to subreports that does not grow in size. For example, subreports that display only a chart or graph.
Steps to Add a Text Object over a Subreport
1. In the Crystal Reports Designer of the main report, insert a text object over the subreport.
2. Resize the text object to be the same size or a little larger than the subreport object on the main report.
3. Fill the text object with blank spaces created by pressing the 'Space Bar' and 'Enter'. This is necessary because resizing a text object without
the blank spaces will not maintain its size when it has been published on the Web.
====================
NOTE:
You can format the text object with a hyperlink to another report, another file or a URL.
====================
Now, when the Crystal report is previewed on the Web, the text object that fully eclipses the subreport will prevent the ability to drill down into it.
Regards
Girish -
Dear all
How to Setup Forward Error Handling in PI Scenarios. Can you help me with the same with screen shots if possible?
Thanks
Regards
karanHello
These are the following errors
1. Trace level="1" type="T">no interface action for sender or receiver found</Trace>
2. <Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!
3.
<Trace level="1" type="T">Application Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="T">System Error at Receiver... => ROLLBACK WORK</Trace>
<Trace level="1" type="B" name="CL_XMS_MAIN-WRITE_MESSAGE_LOG_TO_PERSIST" />
<Trace level="1" type="System_Error">Application-Error exception return from pipeline processing!</
Trace level="3" type="T">No persisting of message after plsrv call, because of config</Trace>Trace level="3" type="T">Error of the prevous version:</TraceTrace level="3" type="T">Error ID APPLICATION_ERROR</Trace>
tThere are repeating errors also.
TThanks
Regards
kkaran -
Stored Procedure: Function returns Array
I was just wondering if following scenario is possible in a stored procedure.
I have a package, which includes 4 different functions and 1 procedure. Procdure uses ref cursor to return values in my reporting tool. What I am trying to do is to write a function which takes input and return array of varchar. Something like..
Package ABC
Function student_classes (student_no in Varchar2) return [array]
begin
select class_nbr into [array]
from student_table
where student_nbr = student_no;
return [array];
end student_classes;
procedure students_info (rpt_cursor IN OUT rpt_type)
begin
OPEN rpt_cursor FOR
select
student_name,
student_nbr,
student_address,
student_classes (student_nbr) --returns array
from student_table;
end student_info; --end of procedure
end abc; --end of pacakge.
I used [array], as I am ont sure how to define (syntax) it in spec part of package or in body. I will really appreciate if someone could help me with this function.
Thank youThanks for the reply Tonguc Y.
I declared an array in my package declaration
CREATE OR REPLACE PACKAGE rpt_TESTING_pkg
AS TYPE rpt_type IS REF CURSOR;
TYPE DIAGARRAY IS VARRAY(20) OF VARCHAR2(6);
FUNCTION DIA_CODES (MNO IN VARCHAR2) RETURN DIAGARRAY;
PROCEDURE member (rpt_cursor IN OUT rpt_type);
END rpt_TESTING_pkg;
but then when I try to use it in my function it gives me error that I should declare DIAGARRAY.
CREATE OR REPLACE PACKAGE BODY rpt_TESTING_pkg
as
FUNCTION DIA_CODES (MNO IN VARCHAR2)
RETURN DIGARRAY AS diags DIGARRAY;
begin
<sql block>
end dia_codes;
end rpt_TESTING_pkg;
Any suggestions.
Maybe you are looking for
-
How should I move to a new Apple ID?
Hey everyone! With lots of problems with my new iPhone 4s, studying Apple's devices and services such as Apple ID and iCloud, it's time for me to create new Apple ID. I have made a lot of mistakes... New Apple ID! :) So here's my question: How to mov
-
Hard drive constantly running and ruining battery life
Hello, I recently got an x200s from a legit ebay lenovo seller that came with an upgraded 500gb 7200rpm hard drive. The problem is that the hard drive is running at All times. I can tell from the sound as well as slight vibration. Even with the lowes
-
How do I get Yahoo off of my firefox page? and why is it there!!
I am trying to load Firefox--and I keep getting this version with Yahoo on it. I just want to open to a page like the plain Google site.
-
Dear Friends I have lost my iphone 5 in my office and after sometime I find it in my office in my back drawer but some one has lock it by ICloud plz help me how to recover my phone U have all details of my phone.
-
IMovie '09 doesn't see any audio files or still photos.
I just migrated my G5 iMac to a new iMac. I now have iMovie HD '06 on the new iMac and it works just fine. The problem is iMovie '09 and iPhoto. Neither application can see the audio files to add background music, sound effects, etc. Also, iMovie can