Object type issue

Hi, 
I have a business requirement,where I'll be getting associative array as a INPUT parameter to a procedure,I Need to query the values in the collection in a table. What would be the best way?
I tried the below approach
Create two object types
create or replace
type t_st_id as object (
supply_type_id varchar2(50)
Create type t_nested_st_id IS TABLE OF t_st_id;
Also created the below function
create or replace
function return_st_id(p_in_st_id IN t_st_id) return T_NESTED_ST_ID as
  v_ret_st_id   T_NESTED_ST_ID;
BEGIN 
v_ret_st_id:=T_NESTED_ST_ID();
FOR i IN 1..p_in_st_id.count
LOOP
  v_ret_st_id.extend;
  v_ret_st_id(v_ret_st_id.last):= T_st_id(p_in_st_id(i));
END LOOP;
   return v_ret_st_id;
end return_st_id;
But got this Error
5,24): PLS-00302: component 'COUNT'
must be declared
Could you please help me out in this resolving issue? Also is there any better way to handle this type of prob
Regards,
Achyut K

Karthick_Arp wrote:
create or replace type t_st_id as object (supply_type_id varchar2(50));
create type t_nested_st_id is table of t_st_id;
This is not associative array. This is a nested table. I think i understand what you want let me give an example using emp table.
The scenario is user will pass a list of empno and we we will get ename for that empno.
SQL> create or replace type empno_table as table of integer
  2  /
Type created.
SQL> create or replace type emp_obj as object(empno integer, ename varchar2(100))
  2  /
Type created.
SQL> create or replace type emp_table as table of emp_obj
  2  /
Type created.
SQL> create or replace function get_emp_detail
  2  (
  3    p_empno_list empno_table
  4  )
  5  return emp_table
  6  pipelined
  7  as
  8  begin
  9     for i in (select emp_obj(empno, ename) emp_detail
10                 from emp
11                where empno in (select column_value
12                                  from table(p_empno_list)))
13     loop
14        pipe row(i.emp_detail);
15     end loop;
16
17     return;
18  end;
19  /
Function created.
SQL> select *
  2    from table(get_emp_detail(empno_table(7369,7499,7521)));
     EMPNO ENAME
      7369 SMITH
      7499 ALLEN
      7521 WARD
SQL>
Thanks Kartheek
My requirement is similar. I need to do some kind of IN operator functionality  . For the INPUT collection type , I need to pull out the records for the values that I got from the collection.
Example
select employees
from employees,
where emp_no in (select empno from table(get_emp_table(1,2,3))
Assuming 1,2,3 are the values that I got from the INPUT parameter of collection type.
Regards,
Achyut K

Similar Messages

  • Issue with RCDC for Custom "Department" object type

    Hey Guys,
    Maybe somebody can point out where the issue is with the RCDC. I have a custom object type called Department in FIM portal and wanted to create a simple interface for it so users can add and edit department fields.
    The only two fields that should show on the RCDC is department and divisions(this is the name of the custom field) all the fields work but I keep getting the following error "There's an error in the Department display configuration.Please contact your
    system administrator"
    Below is the RCDC:
    <?xml version="1.0" encoding="utf-8"?>
    <!--Copyright (c) Microsoft Corporation. All rights reserved.-->
    <my:ObjectControlConfiguration xmlns:xd="http://schemas.microsoft.com/office/infopath/2003" xmlns:my="http://schemas.microsoft.com/2006/11/ResourceManagement" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <my:ObjectDataSource my:Name="object" my:TypeName="PrimaryResourceObjectDataSource"/>
    <my:ObjectDataSource my:Name="delta" my:TypeName="PrimaryResourceDeltaDataSource"/>
    <my:ObjectDataSource my:Name="rights" my:TypeName="PrimaryResourceRightsDataSource"/>
    <my:ObjectDataSource my:Name="schema" my:TypeName="SchemaDataSource"/>
    <my:XmlDataSource my:Name="summaryTransformXsl" <my:Parameters="Microsoft.IdentityManagement.WebUI.Controls.Resources.DefaultSummary.xsl"/>
    <my:Panel my:Name="page" my:Caption="Default Configuration" my:AutoValidate="true">
    <my:Grouping my:Name="_caption" my:Caption="Caption" my:IsHeader="true">
    <my:Control my:Name="_caption" my:TypeName="UocCaptionControl" my:Caption="Create Department" my:Description="" my:ExpandArea="true">
    <my:Properties>
    <my:Property my:Name="MaxHeight" my:Value="32"/>
    <my:Property my:Name="MaxWidth" my:Value="32"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    <my:Grouping my:Name="DepartmentInformation" my:Caption="Department Information">
    <my:Control my:Name="Department" my:TypeName="UocLabel" my:Caption="{Binding Source=schema, Path=Department.DisplayName}" my:Description="" my:RightsLevel="{Binding Source=rights, Path=Department}">
    <my:Properties>
    <my:Property my:Name="Required" my:Value="True"/>
    <my:Property my:Name="Text" my:Value="{Binding Source=object, Path=Department, Mode=TwoWay}"/>
    </my:Properties>
    </my:Control>
    <my:Control my:Name="Divisions" my:TypeName="UocDropDownList" my:Caption="{Binding Source=schema, Path=Divisions.DisplayName}" my:Description="{Binding Source=schema, Path=Divisions.Description}">
    <my:Options>
    <my:Option my:Value="" my:Caption="" my:Hint="Please Select a Division"/>
    <my:Option my:Value="Division of Academic Affairs" my:Caption="Division of Academic Affairs"/>
    <my:Option my:Value="Division of Administration" my:Caption="Division of Administration"/>
    <my:Option my:Value="Division of Adult &amp; Continuing Education" my:Caption="Division of Adult &amp; Continuing Education"/>
    <my:Option my:Value="Division of Information Technology" my:Caption="Division of Information Technology"/>
    <my:Option my:Value="Division of Institutional Advancement" my:Caption="Division of Institutional Advancement"/>
    <my:Option my:Value="Division of President's Office" my:Caption="Division of President's Office"/>
    <my:Option my:Value="Division of Student Affairs" my:Caption="Division of Student Affairs"/>
    </my:Options>
    <my:Properties>
    <my:Property my:Name="Required" my:Value="{Binding Source=schema, Path=Divisions.Required}"/>
    <my:Property my:Name="ValuePath" my:Value="Value"/>
    <my:Property my:Name="CaptionPath" my:Value="Caption"/>
    <my:Property my:Name="HintPath" my:Value="Hint"/>
    <my:Property my:Name="ItemSource" my:Value="Custom"/>
    <my:Property my:Name="SelectedValue" my:Value="{Binding Source=object, Path=Divisions, Mode=TwoWay}"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    <my:Grouping my:Name="summary" my:Caption="Summary" my:IsSummary="true">
    <my:Control my:Name="summaryControl" my:TypeName="UocHtmlSummary" my:ExpandArea="true">
    <my:Properties>
    <my:Property my:Name="ModificationsXml" my:Value="{Binding Source=delta, Path=DeltaXml}"/>
    <my:Property my:Name="TransformXsl" my:Value="{Binding Source=summaryTransformXsl, Path=/}"/>
    <my:Property my:Name="Hint" my:Value="{Binding Source=schema, Path=%AttributeName%.Hint}"/>
    </my:Properties>
    </my:Control>
    </my:Grouping>
    </my:Panel>
    </my:ObjectControlConfiguration>
    Any advice is appreciated.

    I don't know RCDCs well enough to debug it from the xml. One approach when I don't know something too well is to brute it. Copy one of the default RCDCs and make sure it's working then add the required attributes one by one checking that it works each
    time. Once it's working with the added attributes remove all the ones you don't need. If that breaks it, go back to where it was working and remove them one by one.

  • How to sort a Vector that stores a particular object type, by an attribute?

    Hi guys,
    i need help on this problem that i'm having. i have a vector that stores a particular object type, and i would like to sort the elements in that vector alphabetically, by comparing the attribute contained in that element. here's the code:
    Class that creates the object
    public class Patient {
    private String patientName, nameOfParent, phoneNumber;
    private GregorianCalendar dateOfBirth;
    private char sex;
    private MedicalHistory medHistory;
    public Patient (String patientName, String nameOfParent, String phoneNumber, GregorianCalendar dateOfBirth, char sex) {
    this.patientName = patientName;
    this.nameOfParent = nameOfParent;
    this.phoneNumber = phoneNumber;
    this.dateOfBirth = dateOfBirth;
    this.sex = sex;
    this.medHistory = new MedicalHistory();
    Class that creates the Vector.
    public class PatientDatabase {
    private Vector <Patient> patientDB = new Vector <Patient> ();
    private DateFunction date = new DateFunction();
    public PatientDatabase () throws IOException{
    String textLine;
    BufferedReader console = new BufferedReader(new FileReader("patient.txt"));
    while ((textLine = console.readLine()) != null) {
    StringTokenizer inReader = new StringTokenizer(textLine,"\t");
    if(inReader.countTokens() != 7)
    throw new IOException("Invalid Input Format");
    else {
    String patientName = inReader.nextToken();
    String nameOfParent = inReader.nextToken();
    String phoneNum = inReader.nextToken();
    int birthYear = Integer.parseInt(inReader.nextToken());
    int birthMonth = Integer.parseInt(inReader.nextToken());
    int birthDay = Integer.parseInt(inReader.nextToken());
    char sex = inReader.nextToken().charAt(0);
    GregorianCalendar dateOfBirth = new GregorianCalendar(birthYear, birthMonth, birthDay);
    Patient newPatient = new Patient(patientName, nameOfParent, phoneNum, dateOfBirth, sex);
    patientDB.addElement(newPatient);
    console.close();
    *note that the constructor actually reads a file and tokenizes each element to an attribute, and each attribute is passed through the constructor of the Patient class to instantiate the object.  it then stores the object into the vector as an element.
    based on this, i would like to sort the vector according to the object's patientName attribute, alphabetically. can anyone out there help me on this?
    i have read most of the threads posted on this forum regarding similar issues, but i don't really understand on how the concept works and how would the Comparable be used to compare the patientName attributes.
    Thanks for your help, guys!

    Are you sure that you will always sort for the patient's name throughout the application? If not, you should consider using Comparators rather than implement Comparable. For the latter, one usually should ensure that the compare() method is consistent with equals(). As for health applications it is likely that there are patients having the same name, reducing compare to the patient's name is hazardous.
    Both, Comparator and Comparable are explained in Sun's Tutorial.

  • Creating PL/SQL web services from object types

    Hello
    Jdeveloper, pl/sql web-services working successfully with object types.If we want to send the web-services to the client, do we need to send the entire folder that is created in the web-services folder of the external oc4j..?
    Creating the client process:
    we are using the wsdl file that is generated in the web-services and adding to the partner link to Invoke the operations of web-services. Is there any other way to invoke the webservices?Could any one please suggest me?
    Thanking you
    Malathi

    Hello
    Accessing the pl/sql webservices from the application server:
    I have created pl/sql webservice using the nested tables. This will insert the object data into database tables.after deplying the webservice into external oc4j, when I test the webservice locally with url: http://localmachine:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    The above web-services working and I am able to insert into the database tables.
    Same when I want to access through the application server, I have changed the wsdl file soap address as
    <soap:address location="http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort"/>
    When I access this url, I am able to give the input data
    http://10.91.20.7:8888/PL_SQL_WS-Nest_Obj_Webservice-context-root/ObjWebserviceSoapHttpPort
    but the out from the web-service is:
    <env:Envelope
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
    <env:Body>
    <env:Fault
    xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <faultcode>env:Server</faultcode>
    <faultstring>Error creating target: DBConnImpMftest.ObjWebserviceUser</faultstring>
    <faultactor/>
    </env:Fault>
    </env:Body>
    </env:Envelope>
    Err from the OC4j log:<PAYLOAD>
    <MSG_TEXT>An error occurred for port: {http://dbconnimpmftest/Nested_Webserv.wsdl}Nested_WebservSoapHttpPort: javax.xml.rpc.JAXRPCException: Error creating target: dbconnimpmftest.Nested_WebservUser.</MSG_TEXT>
    </PAYLOAD>
    Could any one help me to solve the above issue?
    Kind regards
    Malathi

  • Error: Object type '' could not be generated when creating sales order

    Hello Friends,
    I am using a SAP standard ITS service to create sales order.
    When I am creatin SO, it gives me error Object type '' could not be generated.
    Can you plz suggest me what is that issue & how I can reslove it.
    Regards,
    Narendra

    any inputs around this plz??

  • Calling a PL/SQL from VB with IN argument of object type

    I need to call a PL/SQL function in Oracle 8.1.6 from VB. One of the IN arguments is an object type (TYPE). How would I instantiate the variable of Oracle object type on VB side so that it can be passed to the Oracle?
    Thank you

    You have some flaws in your code.
    First - don't use same identifier for pl sql variables ( including parameters) and column names. In your case oracle will evaluate the where clause as where column_name=column_name which is probably not what you want. The next one - you should ensure that select into yields one row , not more, not less, otherwise you 'll run into exception.
    To actually print the desired values, you have to use dbms_output aware client ( sqlplus is such one) and for sqlplus in particular you have to issue set serveroutput on
    Here is a very basic example how can you get it to work:
    SQL> SELECT * FROM V$VERSION;
    BANNER
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Product
    PL/SQL Release 10.2.0.1.0 - Production
    CORE    10.2.0.1.0      Production
    TNS for Linux: Version 10.2.0.1.0 - Production
    NLSRTL Version 10.2.0.1.0 - Production
    SQL> CREATE OR REPLACE PROCEDURE FIND_EMPLOYEES
      2  (p_first_name IN VARCHAR2)
      3  IS
      4  LAST varchar2(10);
      5  BEGIN
      6          SELECT LAST_NAME INTO LAST FROM EMPLOYEES WHERE FIRST_NAME = p_first_name;
      7          dbms_output.put_line(LAST);
      8  EXCEPTION
      9    WHEN no_data_found THEN
    10    dbms_output.put_line('There is no one employee with such first name!');
    11    WHEN too_many_rows THEN
    12    dbms_output.put_line('There are many employees with such first name, try with another one!');
    13  END FIND_EMPLOYEES;
    14  /
    Procedure created.
    SQL> SET SERVEROUTPUT ON
    SQL> EXEC FIND_EMPLOYEES('Julia')
    There are many employees with such first name, try with another one!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Eugenia')
    There is no one employee with such first name!
    PL/SQL procedure successfully completed.
    SQL> EXEC FIND_EMPLOYEES('Adam')
    Fripp
    PL/SQL procedure successfully completed.Best regards
    Maxim

  • How to automate the employees info. from R/3 to xRPM for object type P

    We need to automate the employees information (new/change) whose object type (P) from R/3 system to xRPM system (CProject component).
    We did ALE distribution model  with the message type (HRMD_ABA) and able to achieved  distribution(R/3 -> xRPM) thru manual step using PFAL transaction. I have no issues on this part.
    Now we want to automate the same process to distribution(R/3 -> xRPM) that whenever employees have been created/change in R/3.
    By using standard program “RBDIDOC” which can be achieve by defining background job with message type “HRMD_ABA”. But it pulls all the object types for the given message type at selection screen. But i am interested only employees with object type P.
    There is no much provision existed to restrict only for employees with object type (P).
    Systems Release version details:
    Source(R/3 system version): SAP R/3 Enterprise
    Target(xRPM: SAP ECC 6.0 with HR component: 6.00)
    Any help would be appreciated...

    Check Tx r3ac5 DNL_COND* objects.
    Regards,
    Praveen

  • Core Data Services in ABAP : No URI-Mapping defined for object type DDLS

    Hi ,
    When creating a DDL source , I get the error
    " No URI-Mapping defined for object type DDLS and object name ZCDSV_01_06".
    Can you please suggest what the issue could be?
    Thanks,
    Chakram Govindarajan

    Now I am able to proceed to the next step. Not sure how this started working. However, I get the below error when I open the DDL source editor for one particular ABAP system added in the eclipse environment. I however do not get the error when I open the DDL source editor for another system ( AH4) .I am providing the log error details . I updated the ADT installation. However the issue has not been resolved. Also I tried implementing the Note: 1834948. However I cannot find the option "Team -> Share project..." in the ABAP project.
    Thanks,
    Chakram Govindarajan

  • Getting "No Object type found error" in BPM sceanrio.

    Hi Friends,
    I am doing File to RFC with response sceanrio using BPM. For this i configured one receiver step, one send synchronous step to send input message to RFC and one asynchronous send step to send the response to a file.
    I have configured 3 receiver determinations(file to bpm,bpm to ECC, bpm to file),  3 interface determinations(file to bpm, bpm to ecc, bpm to file) and 2 Receiver agreements(bpm to ecc and bpm to file).
    I am getting the followin error:
    No object type found for the message. Check that the corresponding process is activated
    My sxi_cache has return code as ' 0 '. And as suggested in some threads, i deleted the objects and recreated them again. but still getting the same error.
    Please help me in solving this issue.
    Thanks & Regards,
    Senthil.

    Hi Senthil,
    Is all the objects created in IR and ID are reflecting in SPROXY tcode.
    Check SM59=> AI_JCO_Server connection is working or not ?
    Check SXMB_IFR tcode is working fine or not ?
    Check sm22 and let us know the dumps are there ?
    Check default trace files for any errors in the following paths ?
    1.usr/SAP/X7systemname/DVEBMGS07/J2EE//cluster/server0/log/defaulttrace.trc
    2.usr/SAP/X7systemname/DVEBMGS07/J2EE//cluster/dispatcher/log/defaulttrace.trc
    3.usr/SAP/X7systemname/DVEBMGS07/J2EE//cluster/dispatcher/logs/services/http/req_resp.trc
    Thanks,
    Jogula Ramesh

  • DB Adapter - Calling Stored Procedure with Object Type

    So, we are using JDeveloper 10.1.3.3
    We are trying to create an ESB process that invokes a SP with an object type. However, the owner of the package / SP, is NOT the owner of the object type. When going through the DB Adapter wizard, it gives us the following error:
    When attempting to use the DB Adapter in JDeveloper to create a partner link to execute a stored procedure. JDeveloper returns the following error:
    Unable to import WSDL.
    Error while writing wsdl file
    Database type is either not supported or is not implemented.
    Check to ensure that the type of the parameter is one of the supported datatypes or that there is a collection or user defined type definition representing this type defined in the database.
    However, if I create a wrapper package / SP, it works just fine. I'd really like to not be having to create wrapper code for these SPs to work. Is this resolved in 11g? Is there a patch available for 10.1.3.3?
    I think this is a JDeveloper Wizard issue, but thought I'd post this here as well.
    Thanks,
    BradW

    This problem can be resolved by granting execute permission on the object type to the caller. For example, if the stored procedure is in schema1 and the object type is in schema2 then you would connect as schema2 and execute
    SQL> grant execute on <object type> to schema1
    Referencing object types defined in other schemas is documented. This is the described method for accessing object types in other schemas.

  • Invoking stored procedure that returns array(oracle object type) as output

    Hi,
    We have stored procedures which returns arrays(oracle type) as an output, can anyone shed some light on how to map those arrays using JPA annotations? I tried using jdbcTypeName but i was getting wrong type or argument error, your help is very much appreciated. Below is the code snippet.
    JPA Class:
    import java.io.Serializable;
    import java.sql.Array;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.Id;
    import org.eclipse.persistence.annotations.Direction;
    import org.eclipse.persistence.annotations.NamedStoredProcedureQuery;
    import org.eclipse.persistence.annotations.StoredProcedureParameter;
    * The persistent class for the MessagePublish database table.
    @Entity
    @NamedStoredProcedureQuery(name="GetTeamMembersDetails",
         procedureName="team_emp_maintenance_pkg.get_user_team_roles",
         resultClass=TeamMembersDetails.class,
         returnsResultSet=true,
         parameters={  
         @StoredProcedureParameter(queryParameter="userId",name="I_USER_ID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="employeeId",name="I_EMPLOYEEID",direction=Direction.IN,type=Long.class),
         @StoredProcedureParameter(queryParameter="TEAMMEMBERSDETAILSOT",name="O_TEAM_ROLES",direction=Direction.OUT,jdbcTypeName="OBJ_TEAM_ROLES"),
         @StoredProcedureParameter(queryParameter="debugMode",name="I_DEBUGMODE",direction=Direction.IN,type=Long.class)
    public class TeamMembersDetails implements Serializable {
         private static final long serialVersionUID = 1L;
    @Id
         private long userId;
         private List<TeamMembersDetailsOT> teamMembersDetailsOT;
         public void setTeamMembersDetailsOT(List<TeamMembersDetailsOT> teamMembersDetailsOT) {
              this.teamMembersDetailsOT = teamMembersDetailsOT;
         public List<TeamMembersDetailsOT> getTeamMembersDetailsOT() {
              return teamMembersDetailsOT;
    Procedure
    PROCEDURE get_user_team_roles (
    i_user_id IN ue_user.user_id%TYPE
    , o_team_roles OUT OBJ_TEAM_ROLES_ARRAY
    , i_debugmode IN NUMBER :=0)
    AS
    OBJ_TEAM_ROLES_ARRAY contains create or replace TYPE OBJ_TEAM_ROLES_ARRAY AS TABLE OF OBJ_TEAM_ROLES;
    TeamMembersDetailsOT contains the same attributes defined in the OBJ_TEAM_ROLES.

    A few things.
    You are not using a JDBC Array type in your procedure, you are using a PLSQL TABLE type. An Array type would be a VARRAY in Oracle. EclipseLink supports both VARRAY and TABLE types, but TABLE types are more complex as Oracle JDBC does not support them, they must be wrapped in a corresponding VARRAY type. I assume your OBJ_TEAM_ROLES is also not an OBJECT TYPE but a PLSQL RECORD type, this has the same issue.
    Your procedure does not return a result set, so "returnsResultSet=true" should be "returnsResultSet=false".
    In general I would recommend you change your stored procedure to just return a select from a table using an OUT CURSOR, that is the easiest way to return data from an Oracle stored procedure.
    If you must use the PLSQL types, then you will need to create wrapper VARRAY and OBJECT TYPEs. In EclipseLink you must use a PLSQLStoredProcedureCall to access these using the code API, there is not annotation support. Or you could create your own wrapper stored procedure that converts the PLSQL types to OBJECT TYPEs, and call the wrapper stored procedure.
    To map to Oracle VARRAY and OBJECT TYPEs the JDBC Array and Struct types are used, these are supported using EclipseLink ObjectRelationalDataTypeDescriptor and mappings. These must be defined through the code API, as there is currently no annotation support.
    I could not find any good examples or doc on this, your best source of example is the EclipseLink test cases in SVN,
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/plsql/
    http://dev.eclipse.org/svnroot/rt/org.eclipse.persistence/trunk/foundation/eclipselink.core.test/src/org/eclipse/persistence/testing/tests/customsqlstoredprocedures/
    James : http://www.eclipselink.org

  • Support for unit testing object types

    There's a Feature Request that suggests expanding the unit test tool to object types:
    Title
    Provide object type support for unit tests
    Description
    In the current version (2.1.0.63) I can perform only unit test for packages, function and procedures. But we use a lot of object types in the database and would like to test them. When is a support for object types scheduled?
    Average Rating
    10
    Development Comment
    This is planned for the next release.
    Status
    Scheduled for 3.0
    Although the status suggests inclusion in v3, in my current version 3.2.20.09 there is nothing.
    This is clearly an important issue for those who have voted for it as it scores a perfect 10 on average rating.
    Is there any sign of object types being supported in the 4.0EA1 release? There is a strong desire within my organisation to move to a more object-based approach to PL/SQL coding but until we are able to unit test easily there will be no real progress.

    If you are ready to learn a little bit of Ruby then you can try [PL/SQL unit testing with Ruby|http://blog.rayapps.com/2009/11/27/oracle-plsql-unit-testing-with-ruby/]. ruby-plsql library [supports also PL/SQL object types|http://blog.rayapps.com/2009/11/25/more-oracle-data-types-supported-by-ruby-plsql-gem/] as input and output parameters and return values.

  • XDB Native Web Services - Collection of object types

    Hello,
    my DB 11g (11.1.0.6.0) is enabled to use XDB Native Web Services, everything works as it should. I already use it successfully to publish a web service with object types as OUT parameter. They are created as complex types in the XML response as described here: [http://download.oracle.com/docs/cd/B28359_01/appdev.111/b28369/xdb_web_services.htm#CHDGBFID]
    But what I need is a collection of these object types, e.g.
    I have a type FLIGHT with some information elements (departure, arrival, date, time, price) and I have a web service function GET_AVAILABILITY with parameters departure, arrival and date. What I want is to return a collection of FLIGHT objects, it could be none, one or many flights for a request.
    For the moment I create another object type which contains a fix number of FLIGHT objects to work around the collection issue:
    create flight_tab_typ as object (
    fl1 flight_typ
    ,fl2 flight_typ
    ,fl3 flight_typ
    I tried to build a PL/SQL table of object type and also a VARRAY of object type but for both the WSDL of the web service cannot be build up correctly in the web browser. For me it seems that this is not supported by the Native Web Services.
    I know I can build up my own XMLTYPE with XML structure as OUT parameter but to use object types is much easier and it builds up the XML structure automatically.
    Does anybody know how to use collections (VARRAY or PL/SQL Tables) with the Native XML DB Web Services?
    Thanks,
    Andreas

    Hi flea,
    I use complex types with XDB native webservices. Here is an example. Using people/groups objects. I haven't compiled this so there may be some typos etc, but it should give you the idea.
    Beware!I have had problems with the created WSDL file in that it doesn't always include the namespace from all types. In many client packages ( JDevloper , SOAPUI etc) this causes a wsdl import failure.
    You can add the missing namespace by hand a load the WSDL file locally and then it should work. I haven't raised an SR with Oracle about this yet.
    Assume you create the following under SCoTT schema on machine host.com on port 8080.
    The webservice[WSDL] will be available from
    http://host.com:8080/orawsv/SCOTT/WEBSERVCIES/GET_GROUP[?wsdl]
    For other peoples sanity it took me a little while to realise the WSDL url is case specific. E.g. the schema, package and functions have to be UPPER case.
    create table people_groups_tab (group_name varchar2(40 char),first_name varchar2(40 char),last_name varchar2(40 char))
    insert into people_groups_tab values ('FINANCE','Joe','Bloggs')
    insert into people_groups_tab values ('FINANCE','Bob','Jones')
    insert into people_groups_tab values ('IT','Alan','Andrews')
    create or replace type person_obj
    as object
         first_name people_groups_tab.first_name%type
         ,last_name people_groups_tab.last_name%type
    create or replace type people_obj
    as table of person_obj
    create or replace type people_groups_obj
    as object
    group_name varchar2(40 char)
    people people_obj
    create or replace package webservices
    as
              function get_group
         p_group_name varchar2
              ) return people_groups_obj;
    end;
    create or replace package body webservices
    as
              function get_group
         p_group_name varchar2
              ) return people_groups_obj
    as
    l_group people_groups_obj;
              l_people people_obj;
    begin
              select person_obj
                        first_name
                        ,last_name
              bulk collect into l_people
              from people_groups_tab
              where group_name p_group_name;
              l_group := people_groups_obj(p_group_name,l_people);
              return l_group;
    end;
    end;
    /

  • No authorization for number range object type BTI and activity SHOW

    Hi All,
    When I try to execute
    SAP Easy Access screen - > Auto-ID Infrastructure -> Master data -> Number Ranges -> Number Range Administration
    on the next web window when I select the object type BTI , it comes up with the error
    Number range table not maintained for object BTI in customizing  
      No authorization for number range object type BTI and activity SHOW  
    I am using AIN 5.1 .  Is this an authorization issue ?. If so which all roles I should give to the user?  IF you have any idea about this please share some tips.

    Hi Sahad,
    Only few number range object types are available in the standard system:
    Follow the link for help .
    http://help.sap.com/saphelp_autoid2007/helpdata/EN/45/e2240c7abb56dde10000000a114a6b/frameset.htm
    Follow the for setting up the others.
    http://help.sap.com/saphelp_autoid2007/helpdata/EN/45/e2240c7abb56dde10000000a114a6b/frameset.htm

  • Business Object type - Obsolete to Released

    Hi,
    We have object type ZBUS1022, which is a copy of BUS1022. The status has been changed to OBSOLETE. I would like to undo this, but can't find a way to do this. Is it possible?
    I have searched the forums and SAP Help without success. We are on SAP ECC 6.0.
    All help appreciated.
    Thanks.
    Ann

    Hi Ann,
    I suspect you are getting the message "Change release status not supported by object BUS1022" or something similar.
    What you do is go to the SWO1 screen and use the menu path:
    Object Type>Change Release Status to>Released.
    This is the only way to restore the status that I know of.  You cannot do this from the detail screen.
    Give me a call if there is any issues, and say hi to all for me.
    Regards
    Gareth

Maybe you are looking for

  • How to inactive the push button on tool bar of alv report

    hi masters, i m working on the ALV interactive report, in this report i have to do 2 different operation on 2 screen. eg.- on first screen i have the push button for 'data' and on second screen i will have the push button for 'upload'. in this i don'

  • How do I use my iPhone as a remote for my apple tv

    I am trying to use my iPhone or iPad as a remote for my Apple TV, but on my TV screen the "add remote" option is grey and cannot be selected. Any suggestions? Thanks, Cliff

  • BIA Roll up taking more time

    Hi, Some of our cubes are taking a very long time to roll up the data to BIA. Since all these cubes have common objects, we are doing roll up in parallel. But still the problem exists. In general , this should complete within 10 minutes but now they

  • ORA-12560 &  imp\exp commands

    When typing imp and supplying the login system along with my password I got the ORA-12560 error. After reading about the problem on the forums and the internet, I found that setting the sid with the command "set ORACLE_SID=" solved the issue. The pro

  • Using shuffle on iPod nano

    When I use the shuffle option on my iPod my audiobooks also get shuffled. I think they are not being recognized properly. Any suggestions on how to fix this? I would like to just shuffle my songs. I have them in their own playlist and the audiobooks