Return generated id from DbAdapter

Hello,
I have a working insert opereration on a database adapter.
The table has a numeric primary key wich generates a new id.
This generated ID must be returned in the SOAP response message
the calling application needs this id.
How to do this?
I am using Oracle 10g Express Edition.
Thx!

I am trying to do it with a stored procedure.
Problem is this is my first stored procedure ever written,
it was kind of hard to find good examples on the www.
create or replace procedure "CREATEFACTUUR"
(p_nummer IN NUMBER,
p_klant_id IN NUMBER,
p_datum IN DATE,
o_result OUT sys_refcursor)
is
begin
INSERT INTO FACTUUR (NUMMER, KLANT_ID, DATUM) VALUES (p_nummer, p_klant_id, p_datum);
OPEN o_result FOR SELECT * FROM factuur WHERE nummer = p_nummer AND klant_id = p_klant_id AND datum = p_datum;
end;It compiles, and i have linked a DbAdapter to this procedure.
But what now? How to get the values from the result of this procedure,
i mean that JDeveloper sees the result and i can return it in the repsonse of the webservice.
Edited by: 908157 on 21-mei-2012 14:51

Similar Messages

  • Returning Multiple Rows From DBAdapter Calling PL/SQL Procedure

    Oracle XE 10g Express Edition
    JDeveloper 11.1.1.2.0
    WebLogic Server 11g
    Guys,
    I have a table of orders, which I need to interrogate, and pass back any matching rows which meet certain criteria (e.g. status = 'OPEN').
    However, rather than create a DBAdapter using an Operation Type of "Peform an Operation on a Table/Select", I need to use an Operation Type of "Call a Stored Procedure or Function".
    I therefore need the procedure to return all the matching rows, rather than a single row.
    I have looked at declaring return parameters for the procedure of the following types:
    RECORD - is good because it allows me to return the elements of the row with their correct datatypes, but does not meet my needs because it will only support the return of a single row.
    VARRAY - good because it can contain many row elements, but not good because it only supports a single row return, and also because all elements of the VARRAY must be of the same data type.
    TABLE - good because it can contain many rows, but bad because each row can contain only two elements - the index element and the data element.
    I think I could first define a RECORD (to hold a row), and then define a TABLE, with the data element being the RECORD, but I have found JDeveloper very fussy indeed when dealing with 'non-standard' data types in the DBAdapter.
    Apologies if I am missing something obvious, but can anyone suggest a way of doing this?
    Many thanks in advance.
    Edited by: user2541290 on 17-Feb-2010 02:48

    Hi, I've been able to create process that seems to work. My platform is a but different but I don't think this is important for your question.
    Here is the PL/SQL code. Just make Db Adapter for Calling stored procedure and it returns all rows!
    Be aware of possible limitations on how manyrows you could return in one select! This can have severe impact on performance.
    Succes.
    Jos Baan
    CREATE OR REPLACE PACKAGE lab2_multiple_rows IS
    -- Author : 801455
    -- Created : 18-2-2010 8:05:52
    -- Purpose :
    -- Public type declarations
    TYPE rrows IS RECORD(
    mutdat DATE,
    opmerking VARCHAR2(20));
    TYPE trows IS TABLE OF rrows INDEX BY BINARY_INTEGER;
    -- Public constant declarations
    -- Public variable declarations
    -- Public function and procedure declarations
    FUNCTION retrows RETURN trows;
    END lab2_multiple_rows;
    CREATE OR REPLACE PACKAGE BODY lab2_multiple_rows IS
    -- Private type declarations
    -- Private constant declarations
    -- Private variable declarations
    -- Function and procedure implementations
    FUNCTION retrows RETURN trows IS
    lrows trows;
    lidx binary_integer := 1;
    BEGIN
    FOR rsql IN (SELECT t.* FROM jba_transactions t ORDER BY t.mutdat)
    LOOP
    lrows(lidx).mutdat := rsql.mutdat;
    lrows(lidx).opmerking := rsql.opmerking;
    lidx := lidx + 1;
    END LOOP;
    RETURN(lrows);
    END;
    BEGIN
    -- Initialization
    NULL;
    END lab2_multiple_rows;
    Edited by: Baan, Jos on 18-feb-2010 8:53

  • Return multiple values from a Web Service

    Hi,
    I'm learning JAX-WS web services and I'm wondering, how do I return multiple data like, say multiple rows from a table through a web service? I understand that I can use Holders, but those are for JAX-RPC if I'm not mistaken, and I'd like to know the alternative for JAX-WS(if there is any).
    Any help would be much appreciated.

    Debojit Sinha wrote:
    A greeting service where the client types a string(preferably a name), and the service returns "Hello, " followed by that name. I faced the error with returning objects when I tried to return the results of a query with a set of serialized JavaBeans passed into an arraylist. I don't have the complete error log with me now, but the error was generated when deploying with JDeveloper 11g, and it was something about JAXB content model error. Also, There was an error regarding javax.naming.Name saying that JAXB couldn't handle interfaces.yes, you can't return any interfaces. so, instead of returning a List, you have to return an ArrayList. if you use xjc to generate types from a schema, then it will normally generate a "wrapper" class around any collections (which will in turn hold a List).

  • Problem in generate Java  from PL SQL package in Jdeveloper

    Hi
    i have problem in create java class from PL SQL package in JDeveloper.
    I use Database navigator of jdeveloper and right click on a package and choose Generate Java then in Jpublisher window choose my view Controller and accept other default values.
    I call methods of generated class in the Action of a button in my JSP page, but when I click the button it  throw null pointer exception !!! i fund one of generated method return null and it lead to this exception.
    protected DefaultContext __tx = null;
    public DefaultContext getConnectionContext() throws SQLException  {
    if (__tx==null){
    __tx = (getConnection()==null) ? DefaultContext.getDefaultContext() : new DefaultContext(getConnection());
        return __tx;
      public Connection getConnection() throws SQLException
        if (__onn!=null) return __onn;
         else if (__tx!=null) return __tx.getConnection();
         else if (__dataSource!=null) __onn= __dataSource.getConnection();
         return __onn;
    i try to generate class in Model project and create DataControl for that and use method action but noting change and i get null pointer again!!
    Jdeveloper Versino = 11.1.1.7.0

    Let me ask you another question: Why do you generate java from the package at all?
    Where do you want to call the package?
    Back to your question: you should see code like
        public void setDataSourceLocation(String dataSourceLocation) throws SQLException {
            javax.sql.DataSource dataSource;
            try {
                Class cls = Class.forName("javax.naming.InitialContext");
                Object ctx = cls.newInstance();
                java.lang.reflect.Method meth = cls.getMethod("lookup", new Class[] { String.class });
                dataSource = (javax.sql.DataSource) meth.invoke(ctx, new Object[] { "java:comp/env/" + dataSourceLocation });
                setDataSource(dataSource);
            } catch (Exception e) {
                throw new java.sql.SQLException("Error initializing DataSource at " + dataSourceLocation + ": " + e.getMessage());
    in the generated code. This code look up a datasource (which you have defined e.g. on the Weblogic Server) by calling the method
    setDataSourceLocaltion("jdbc/HRConnDS");
    This look up the datasource nad stores it in the class variable.
    Timo

  • Xrpcc: Generate stub from existing WSDL

    Hi, I have an error when generating stub from existing WSDL using xrpcc tool.
    Anyone know what is the problem? Thanks!
    The error message:
    warning: ignoring operation "registration": more than one part in input message
    warning: ignoring operation "checkRegistration": more than one part in input message
    warning: Port "AccountManagementService" does not contain any usable operations
    warning: ignoring operation "registration": more than one part in input message
    warning: ignoring operation "checkRegistration": more than one part in input message
    warning: Port "AccountManagementService" does not contain any usable operations
    Note: sun.tools.javac.Main has been deprecated.
    1 warning
    The WSDL file:
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions
    name="serverone.paymentofgovbill.service.useraccount.AccountManagementService"
    targetNamespace="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementService"
    xmlns:map="http://systinet.com/mapping/"
    xmlns:ns0="http://systinet.com/xsd/SchemaTypes/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:tns="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementService"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <wsdl:types>
    <xsd:schema targetNamespace="http://systinet.com/xsd/SchemaTypes/"
    elementFormDefault="qualified"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://systinet.com/xsd/SchemaTypes/"
    xmlns:map="http://systinet.com/mapping/"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns:ns0="http://systinet.com/xsd/SchemaTypes/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/">
    <xsd:element name="p0" type="xsd:string" nillable="true"/>
    <xsd:element name="p1" type="xsd:string" nillable="true"/>
    <xsd:element name="string_Response" type="xsd:string"
    nillable="true"/>
    <xsd:element name="int_Response" type="xsd:int"/>
    </xsd:schema>
    </wsdl:types>
    <wsdl:message name="AccountManagementService_registration_1_Request">
    <wsdl:part name="p0" element="ns0:p0"/>
    <wsdl:part name="p1" element="ns0:p1"/>
    </wsdl:message>
    <wsdl:message name="AccountManagementService_checkRegistration_1_Request">
    <wsdl:part name="p0" element="ns0:p0"/>
    <wsdl:part name="p1" element="ns0:p1"/>
    </wsdl:message>
    <wsdl:message name="AccountManagementService_checkRegistration_Response">
    <wsdl:part name="response" element="ns0:int_Response"/>
    </wsdl:message>
    <wsdl:message name="AccountManagementService_registration_Response">
    <wsdl:part name="response" element="ns0:string_Response"/>
    </wsdl:message>
    <wsdl:portType name="AccountManagementService">
    <wsdl:operation name="registration" parameterOrder="p0 p1">
    <wsdl:input
    message="tns:AccountManagementService_registration_1_Request"/>
    <wsdl:output
    message="tns:AccountManagementService_registration_Response"/>
    </wsdl:operation>
    <wsdl:operation name="checkRegistration" parameterOrder="p0 p1">
    <wsdl:input
    message="tns:AccountManagementService_checkRegistration_1_Request"/>
    <wsdl:output
    message="tns:AccountManagementService_checkRegistration_Response"/>
    </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="AccountManagementService"
    type="tns:AccountManagementService">
    <soap:binding transport="http://schemas.xmlsoap.org/soap/http"
    style="document"/>
    <wsdl:operation name="registration">
    <map:java-operation name="registration"
    signature="KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs="/>
    <soap:operation
    soapAction="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementServiceAccountManagementService#registration#KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylMamF2YS9sYW5nL1N0cmluZzs="
    style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    <wsdl:operation name="checkRegistration">
    <map:java-operation name="checkRegistration"
    signature="KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylJ"/>
    <soap:operation
    soapAction="urn:serverone.paymentofgovbill.service.useraccount.AccountManagementServiceAccountManagementService#checkRegistration#KExqYXZhL2xhbmcvU3RyaW5nO0xqYXZhL2xhbmcvU3RyaW5nOylJ"
    style="document"/>
    <wsdl:input>
    <soap:body use="literal"/>
    </wsdl:input>
    <wsdl:output>
    <soap:body use="literal"/>
    </wsdl:output>
    </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="AccountManagementService">
    <wsdl:port name="AccountManagementService"
    binding="tns:AccountManagementService">
    <soap:address
    location="http://localhost:6060/AccountManagementService/"/>
    </wsdl:port>
    </wsdl:service>
    </wsdl:definitions>

    The JAXRPC spec. section 6.2 states:
    "All message parts (either parameter or return value) appear inside a single wrapper element, which is the first child element of the SOAP Body element." For this to work with Doc/literal operations, all messages can contain only a single part.

  • Generating XML from SQL queries and saving to an xml file?

    Hi there,
    I was wondering if somebody could help with regards to the following:
    Generating XML from SQL queries and saving to a xml file?
    We want to have a procedure(PL/SQL) that accepts an order number as an input parameter(the procedure
    is accessed by our software on the client machine).
    Using this order number we do a couple of SQL queries.
    My first question: What would be our best option to convert the result of the
    queries to xml?
    Second Question: Once the XML has been generated, how do we save that XML to a file?
    (The XML file is going to be saved on the file system of the server that
    the database is running on.)
    Now our procedure will also have a output parameter which returns the filename to us. eg. Order1001.xml
    Our software on the client machine will then ftp this XML file(based on the output parameter[filename]) to
    the client hard drive.
    Any information would be greatly appreciated.
    Thanking you,
    Francois

    If you are using 9iR2 you do not need to do any of this..
    You can create an XML as an XMLType using the new SQL/XML operators. You can insert this XML into the XML DB repository using DBMS_XDB.createResource. You can then access the document from the resource. You can also return the XMLType containing the XML directly from the PL/SQL Procedure.

  • Generating XML from SQL queries and saving to a xml file?

    Hi there,
    I was wondering if somebody could help with regards to the following:
    Generating XML from SQL queries and saving to a xml file?
    We want to have a stored procedure(PL/SQL) that accepts an order number as an input parameter(the procedure
    is accessed by our software on the client machine).
    Using this order number we do a couple of SQL queries.
    My first question: What would be our best option to convert the result of the
    queries to xml?
    Second Question: Once the XML has been generated, how do we save that XML to a file?
    (The XML file is going to be saved on the file system of the server that
    the database is running on.)
    Now our procedure will also have a output parameter which returns the filename to us. eg. Order1001.xml
    Our software on the client machine will then ftp this XML file(based on the output parameter[filename]) to
    the client hard drive.
    Any information would be greatly appreciated.
    Thanking you,
    Francois

    Hi
    Here is an example of some code that i am using on Oracle 817.
    The create_file procedure is the one that creates the file.
    The orher procedures are utility procedures that can be used with any XML file.
    PROCEDURE create_file_with_root(po_xmldoc OUT xmldom.DOMDocument,
    pi_root_tag IN VARCHAR2,
                                            po_root_element OUT xmldom.domelement,
                                            po_root_node OUT xmldom.domnode,
                                            pi_doctype_url IN VARCHAR2) IS
    xmldoc xmldom.DOMDocument;
    root xmldom.domnode;
    root_node xmldom.domnode;
    root_element xmldom.domelement;
    record_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    xmldom.setDoctype(xmldoc, pi_root_tag, pi_doctype_url,'');
    -- Create the root --
    root := xmldom.makeNode(xmldoc);
    -- Create the root element in the file --
    create_element_and_append(xmldoc, pi_root_tag, root, root_element, root_node);
    po_xmldoc := xmldoc;
    po_root_node := root_node;
    po_root_element := root_element;
    END create_file_with_root;
    PROCEDURE create_element_and_append(pi_xmldoc IN OUT xmldom.DOMDocument,
    pi_element_name IN VARCHAR2,
                                            pi_parent_node IN xmldom.domnode,
                                            po_new_element OUT xmldom.domelement,
                                            po_new_node OUT xmldom.domnode) IS
    element xmldom.domelement;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    BEGIN
    element := xmldom.createElement(pi_xmldoc, pi_element_name);
    child_node := xmldom.makeNode(element);
    -- Append the new node to the parent --
    newelenode := xmldom.appendchild(pi_parent_node, child_node);
    po_new_node := child_node;
    po_new_element := element;
    END create_element_and_append;
    FUNCTION create_text_element(pio_xmldoc IN OUT xmldom.DOMDocument, pi_element_name IN VARCHAR2,
    pi_element_data IN VARCHAR2, pi_parent_node IN xmldom.domnode) RETURN xmldom.domnode IS
    parent_node xmldom.domnode;                                   
    child_node xmldom.domnode;
    child_element xmldom.domelement;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    create_element_and_append(pio_xmldoc, pi_element_name, pi_parent_node, child_element, child_node);
    parent_node := child_node;
    -- Create a text node --
    textele := xmldom.createTextNode(pio_xmldoc, pi_element_data);
    child_node := xmldom.makeNode(textele);
    -- Link the text node to the new node --
    compnode := xmldom.appendChild(parent_node, child_node);
    RETURN newelenode;
    END create_text_element;
    PROCEDURE create_file IS
    xmldoc xmldom.DOMDocument;
    root_node xmldom.domnode;
    xml_doctype xmldom.DOMDocumentType;
    root_element xmldom.domelement;
    record_element xmldom.domelement;
    record_node xmldom.domnode;
    parent_node xmldom.domnode;
    child_node xmldom.domnode;
    newelenode xmldom.DOMNode;
    textele xmldom.DOMText;
    compnode xmldom.DOMNode;
    BEGIN
    xmldoc := xmldom.newDOMDocument;
    xmldom.setVersion(xmldoc, '1.0');
    create_file_with_root(xmldoc, 'root', root_element, root_node, 'test.dtd');
    xmldom.setAttribute(root_element, 'interface_type', 'EXCHANGE_RATES');
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mr', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'Joe', record_node);
    parent_node := create_text_element(xmldoc,'surname', 'Blogs', record_node);
    -- Create the record element in the file --
    create_element_and_append(xmldoc, 'record', root_node, record_element, record_node);
    parent_node := create_text_element(xmldoc, 'title', 'Mrs', record_node);
    parent_node := create_text_element(xmldoc, 'name', 'A', record_node);
    parent_node := create_text_element(xmldoc, 'surname', 'B', record_node);
    -- write the newly created dom document into the buffer assuming it is less than 32K
    xmldom.writeTofile(xmldoc, 'c:\laiki\willow_data\test.xml');
    EXCEPTION
    WHEN xmldom.INDEX_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Index Size error');
    WHEN xmldom.DOMSTRING_SIZE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'String Size error');
    WHEN xmldom.HIERARCHY_REQUEST_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Hierarchy request error');
    WHEN xmldom.WRONG_DOCUMENT_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Wrong doc error');
    WHEN xmldom.INVALID_CHARACTER_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Invalid Char error');
    WHEN xmldom.NO_DATA_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Nod data allowed error');
    WHEN xmldom.NO_MODIFICATION_ALLOWED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'No mod allowed error');
    WHEN xmldom.NOT_FOUND_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not found error');
    WHEN xmldom.NOT_SUPPORTED_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'Not supported error');
    WHEN xmldom.INUSE_ATTRIBUTE_ERR THEN
    RAISE_APPLICATION_ERROR(-20120, 'In use attr error');
    WHEN OTHERS THEN
    dbms_output.put_line('exception occured' || SQLCODE || SUBSTR(SQLERRM, 1, 100));
    END create_file;

  • Return proxy instances from EJB

    Is weblogic able to return proxy instances from EJBs?
    <BR>
    I am using the session-facade pattern with DTO/Value-Object being passed between
    facade and client(s). To handle different "levels of loading", I want to have
    one DTO for an entity, but then restrict the available properties by wrapping
    in an interface using java.lang.reflect.Proxy.
    <BR>
    Should this work? It doesn't. For example (from my session bean):<P><PRE>
    return new MyDTO();
    </PRE>works fine; however, the stubs generated by weblogic.ejbc have trouble unmarshalling
    the return if I do:<P><PRE>
    return Proxy.newProxyInstance(
    MyInterface.class.getClassLoader(),
    new Class[] { MyClass.class },
    new MyPassThruHandler( new MyDTO() )
    </PRE> returning various errors.
    <BR>
    Is this valid to do from weblogic? If not, I am mystified as to how not.
    <BR>
    Thanks,<P>
    Steve
    <BR>
    P.S., I am using WL61sp3.

    Hi all,
    Finally, I solve the problem. That is my misstake, i had a interface declared as private variable in the my concreteClass (inhert from AbstractClass)... now i declare as transient, let the interface variable don't to be serialize.
    Now everything fine...:-) thanks for help anyway.
    But just wonder why it don't throw any exception ???
    Gordon

  • How to generate PDF from template via REST query

    Hello. I'm newbie in Adobe LiveCycle, will appreciate any help.
    What we need: generate PDF from template, using different data.
    What we have: LiveCycle Designer and server with deployed Adobe LiveCycle ES 2.5 image.
    Looks like server works and listen 8080.
    In Livecycle Designer I can generate XML (XDP) from PDF, so I can change this XML in PHP/Python/Go script to fill template with data.
    I'm looking for some REST method, where I can give that XML (XDP) and recieve generated PDF in response.
    I've spent whole to for googling all these things, found a lot of docs, but all is very complicated there. Also, examples from just doesn't work - maybe I have to do something on server before calling REST API method.
    Please, push me into right direction

    Your best bet is to probably create an orchestration (or "process" in Adobe speak) that accepts two document parameters, calls LiveCycle Forms (or Output depending on whether you want to interactive or non-interactive PDF), and returns the resulting document variable.
    The orchestration will return a redirect that will point you to the document object.
    See Invoking LiveCycle using REST Requests, and Creating Your First LiveCycle ES4 Application.
    Rob

  • JDeveloper + WebServices, RETURN multiple rows from pl/sql

    I need to return multiple rows from pl/sql procedure or function and publish it as a Web Service through JDeveloper.
    I try to use ref cursor, but then found that it is impossible to use ref cursor as a return value in Web Services.
    Please, help me to achieve result.

    Hello. I tried to make commands from article, but got errors
    "C:\Program Files\Java\jdk1.6.0_18\bin\java" -jar D:\oracle\Middleware\oracle_common\modules\oracle.webservices_11.1.1\wsa.jar -plsqlAssemble -appName Echo -sql wo -dataSource jdbc/OracleManagedDS -dbConnection jdbc:oracle:thin:@192.168.246.2:1521:data -dbUser syd/manager -style rpc -use encoded
    Error: Interface oracle.generated.wo: The class could not be loaded from the class path.

  • NX-OS snmp-trap strdata does not return string sent from device to object server

    NX-OS snmp-trap strdata does not return string sent from device to object server
    Applet was created:
        event manage applet TEST_VPC
        description "%ETHPORT-5-IF_DOWN_ADMIN_DOWN"
        event syslog occurs 1 priority 4 pattern "%ETHPORT-5-IF_DOWN_ADMIN_DOWN"
        action 1.0 snmp-trap strdata "Loopback0 is admin down"
    after event is generated (link admin down), trap is sent to snmp server, but string does not appear in received messages:
    2014-03-17T04:29:26: Debug: D-P_M-105-000: 1 trap in queue
    2014-03-17T04:29:26: Debug: D-P_M-105-000: V2/V3 trap/inform received
    2014-03-17T04:29:26: Information: I-P_M-104-000: Number of items in the trap queue is 0
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReqId: 1427018637
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] community: xxxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] IPaddress: x.x.x.x
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] PeerIPaddress: x.x.x.x
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReceivedPort: 162
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] ReceivedTime: 1395044966
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Protocol: UDP
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] SNMP_Version: 2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] UpTime: 1166940388
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Uptime: 1:30:03.88
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.2.1.1.3.0: (1166940388) 135 days, 1:30:03.88
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] notify: .1.3.6.1.4.1.9.9.43.2.0.2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.6.3.1.1.4.1.0: .1.3.6.1.4.1.9.9.43.2.0.2
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] OID1: .1.3.6.1.4.1.9.9.43.1.1.1.0
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_raw: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_text: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 1_hex: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.4.1.9.9.43.1.1.1.0: (1166939868) 135 days, 1:29:58.68
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] OID2: .1.3.6.1.4.1.9.9.43.1.1.6.1.6.36
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_raw: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_text: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] 2_hex: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] .1.3.6.1.4.1.9.9.43.1.1.6.1.6.36: 4
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Node: xxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] PeerAddress: xxxx
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] EventCount: 360
    2014-03-17T04:29:26: Debug: D-UNK-000-000: [Event Processor] Processing alert {0 remaining} 
    please help figure this out

    This is a CISCO-CONFIG-MAN-MIB trap, not an EEM trap.  I don't think your EEM applet is being triggered since you have that priority argument in there.  Try removing that and leave the syslog pattern alone.  You will see the string as a varbind in the trap.

  • [UIX] How To: Return multiple values from a LOV

    Hi gang
    I've been receiving a number of queries via email on how to return multiple items from a LOV using UIX thanks to earlier posts of mine on OTN. I'm unfortunately aware my previous posts on this are not that clear thanks to the nature of the forums Q&A type approach. So I thought I'd write one clear post, and then direct any queries to it from now on to save me time.
    Following is my solution to this problem. Please note it's just one method of many in skinning a cat. It's my understanding via chatting to Oracle employees that LOVs are to be changed in a future release of JDeveloper to be more like Oracle Forms LOVs, so my skinning skills may be rather bloody & crude very soon (already?).
    I'll base my example on the hr schema supplied with the standard RDBMS install.
    Say we have an UIX input-form screen to modify an employees record. The employees record has a department_id field and a fk to the departments table. Our requirement is to build a LOV for the department_id field such that we can link the employees record to any department_id in the database. In turn we want the department_name shown on the employees input form, so this must be returned via the LOV too.
    To meet this requirement follow these steps:
    1) In your ADF BC model project, create 2 EOs for employees and departments.
    2) Also in your model, create 2 VOs for the same EOs.
    3) Open your employees VO and create a new attribute DepartmentName. Check “selected in query”. In expressions type “(SELECT dept.department_name FROM departments dept WHERE dept.department_id = employees.department_id)”. Check Updateable “always”.
    4) Create a new empty UIX page in your ViewController project called editEmployees.uix.
    5) From the data control palette, drag and drop EmployeesView1 as an input-form. Notice that the new field DepartmentName is also included in the input-form.
    6) As the DepartmentName will be populated either from querying existing employees records, or via the LOV, disable the field as the user should not have the ability to edit it.
    7) Select the DepartmentId field and delete it. In the UI Model window delete the DepartmentId binding.
    8) From the data controls palette, drag and drop the DepartmentId field as a messageLovInput onto your page. Note in your application navigator a new UIX page lovWindow0.uix (or similar) has been created for you.
    9) While the lovWindow0.uix is still in italics (before you save it), rename the file to departmentsLov.uix.
    10) Back in your editEmployees.uix page, your messageLovInput source will look like the following:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="${bindings.DepartmentId.path}"
        destination="lovWindow0.uix"/>Change it to be:
    <messageLovInput
        model="${bindings.DepartmentId}"
        id="DepartmentId"
        destination="departmentsLov.uix"
        partialRenderMode="multiple"
        partialTargets="_uixState DepartmentName"/>11) Also change your DepartmentName source to look like the following:
    <messageTextInput
        id=”DepartmentName”
        model="${bindings.DepartmentName}"
        columns="10"
        disabled="true"/>12) Open your departmentsLov.uix page.
    13) In the data control palette, drag and drop the DepartmentId field of the DepartmentView1 as a LovTable into the Results area on your page.
    14) Notice in the UI Model window that the 3 binding controls have been created for you, an iterator, a range and a binding for DepartmentId.
    15) Right click on the DepartmentsLovUIModel node in the UI Model window, then create binding, display, and finally attribute. The attribute binding editor will pop up. In the select-an-iterator drop down select the DepartmentsView1Iterator. Now select DepartmentName in the attribute list and then the ok button.
    16) Note in the UI Model you now have a new binding called DCDefaultControl. Select this, and in the property palette change the Id to DepartmentName.
    17) View the LOV page’s source, and change the lovUpdate event as follows:
    <event name="lovSelect">
        <compound>
            <set value="${bindings.DepartmentId.inputValue}" target="${sessionScope}" property="MyAppDepartmentId" />
            <set value="${bindings.DepartmentName.inputValue}" target="${sessionScope}" property="MyAppDepartmentName" />
        </compound>
    </event>18) Return to editEmployees.uix source, and modify the lovUpdate event to look as follows:
    <event name="lovUpdate">
        <compound>
            <set value="${sessionScope.MyAppDepartmentId}" target="${bindings.DepartmentId}" property="inputValue"/>
            <set value="${sessionScope.MyAppDepartmentName}" target="${bindings.DepartmentName}" property="inputValue"/>     
        </compound>
    </event>That’s it. Now when you select a value in your LOV, it will return 2 (multiple!) values.
    A couple things to note:
    1) In the messageLovInput id field we don’t use the “.path” notation. This is mechanism for returning 1 value from the LOV and is useless for us.
    2) Again in the messageLovInput we supply “_uixState” as an entry in the partialTargets.
    3) We are relying on partial-page-refresh functionality to update multiple items on the screen.
    I’m not going to take the time out to explain these 3 points, but it’s worthwhile you learning more about them, especially the last 2, as a separate exercise.
    One other useful thing to do is, in your messageLovInput, include as a last entry in the partialTargets list “MessageBox”. In turn locate the messageBox control on your page (if any), and supply an id=”MessageBox”. This will allow the LOV to place any errors raised in the MessageBox and show them to the user.
    I hope this works for you :)
    Cheers,
    CM.

    Thanks Chris,
    It took me some time to find the information I needed, how to use return multiple values from a LOV popup window, then I found your post and all problems were solved. Its working perfectly, well, almost perfectly.
    Im always fighting with ADF-UIX, it never does the thing that I expect it to do, I guess its because I have a hard time letting go of the total control you have as a developer and let the framework take care of a few things.
    Anyway, I'm using your example to fill 5 fields at once, one of the fields being a messageChoice (a list with countries) with a LOV to a lookup table (id , country).
    I return the countryId from the popup LOV window, that works great, but it doesn't set the correct value in my messageChoice . I think its because its using the CountryId for the listbox index.
    So how can I select the correct value inside my messageChoice? Come to think of it, I dont realy think its LOV related...
    Can someone help me out out here?
    Kind regards
    Ido

  • Return multiple values from a method

    For a school project I have to make a parameter-less constructor that can input values from the keyboard and calculate those values. Now that I have the values how do I return them? I need to return 3 values from this parameter-less method.
    I hoope someone can help.

    Qwertyfshag wrote:
    Here is the wording of the assignment. I have copied and pasted it word for word:
    "Declare and use a no-argument (or "parameter-less") constructor to input the data needed, and to do the calculations."
    Any advice???Find a teacher who isn't an idiot. That sentence is vague ("to input the data needed"? Does that mean that it's supposed to query the user (which is terrible) or that it's supposed to encapsulate the data as hardcoded values, or what?) and is a bad design. Constructors shouldn't do this sort of thing.
    Ok I have done that part and now I want to retrieve the values of the calculations. How can I get those values out of that method What do you mean "that method"? Constructors aren't methods, and they don't return values.
    I suppose you could define a class whose constructor queries the user, and which would have a method to return values. That could be pretty simple; the method signature would be like this:
    Set<Integer> getValues();
    This seems like an advanced problem.It's not advanced; it's just garbage.
    I can't post the code in hear because that may constitute cheating. I am allowed to discuss it verbally but I cannot share code, sorry.You can't get a lot of help then. We can't psychically see what you've done so far.
    In conclusion: I have to have two methods. One method is a constructorConstructors aren't methods. If your teacher told you that they are, then he/she doesn't know what he/she is doing.
    that has NO parameters that will get input from the keyboard (done) and do the calculations (done). The other method must print that values to the screen on separate lines (not done). I don't know how to get the values out of the method.If they're two methods in the same class, then the constructor just needs to store the user input into a field of the class, and the other method can read the values in that field.

  • Returning a table from a stored procedure

    hi, i need to return a table from a stored procedure and show it, and come to this, but a don't know hoy to run it, so i don't know if it is right, can anyone help me?
    uTable out objects_uptime%rowtype
    as
    begin
    select * into uTable from objects_uptime;
    end;

    well, i finally discovered how to do the trick
    this is the code for the function:
    CREATE OR REPLACE FUNCTION FN_GET_RECORDS RETURN UPTIME PIPELINED IS
    CURSOR cUptime is select * from objects_uptime;
    p refcur.refcur_t;
    temp p%ROWTYPE;
    temp2 OUPTIME := OUPTIME(null, null, null, null, null, null, null, null, null);
    BEGIN
    OPEN cUptime;
    LOOP
    FETCH cUptime into temp;
    temp2.OBJ_NAME := temp.OBJ_NAME;
    temp2.IP := temp.IP;
    temp2.STATUS := temp.STATUS;
    temp2.DOE := temp.DOE;
    temp2.ENABLED := temp.ENABLED;
    temp2.COMMENT00000 := temp.COMMENT00000;
    temp2.USERID := temp.USERID;
    temp2.OBJECTID := temp.OBJECTID;
    temp2.MNTID := temp.MNTID;
    pipe row(temp2);
    EXIT WHEN cUptime%NOTFOUND;
    END LOOP;
    RETURN;
    END FN_GET_RECORDS;
    and this for the auxiliar package, object and table:
    CREATE OR REPLACE PACKAGE REFCUR
    as
    TYPE refcur_t IS REF CURSOR RETURN objects_uptime%ROWTYPE;
    end REFCUR;
    CREATE OR REPLACE TYPE OUPTIME AS OBJECT ( "OBJ_NAME"
    VARCHAR2(255), "IP" VARCHAR2(20), "STATUS" VARCHAR2(10),
    "DOE" DATE, "ENABLED" NUMBER(10, 1), "COMMENT00000"
    VARCHAR2(1000), "USERID" VARCHAR2(50), "OBJECTID" NUMBER(10,
    1), "MNTID" NUMBER(10, 1) )
    CREATE TYPE TUPTIME AS
    TABLE OF OUPTIME
    i call it this way:
    select * from table(FN_GET_RECORDS ())
    if anyone knows how to do the same in a shorter manner, tell me please.
    thanks to everybody for the help.

  • How do I return two values from a stored procedure into an "Execute SQL Task" within SQL Server 2008 R2

    Hi,
    How do I return two values from a
    stored procedure into an "Execute SQL Task" please? Each of these two values need to be populated into an SSIS variable for later processing, e.g. StartDate and EndDate.
    Thinking about stored procedure output parameters for example. Is there anything special I need to bear in mind to ensure that the SSIS variables are populated with the updated stored procedure output parameter values?
    Something like ?
    CREATE PROCEDURE [etl].[ConvertPeriodToStartAndEndDate]
    @intPeriod INT,
    @strPeriod_Length NVARCHAR(1),
    @dtStart NVARCHAR(8) OUTPUT,
    @dtEnd NVARCHAR(8) OUTPUT
    AS
    then within the SSIS component; -
    Kind Regards,
    Kieran. 
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Below execute statement should work along the parameter mapping which you have provided. Also try specifying the parameter size property as default.
    Exec [etl].[ConvertPeriodToStartAndEndDate] ?,?,? output, ? output
    Add a script task to check ssis variables values using,
    Msgbox(Dts.Variables("User::strExtractStartDate").Value)
    Do not forget to add the property "readOnlyVariables" as strExtractStartDate variable to check for only one variable.
    Regards, RSingh

Maybe you are looking for

  • Interest calculation with FM

    We want to implement the interest calculation for vendor invoices where the due date has been exceeded. As this is a public entity the FM module is also installed and so the interest calculation of this invoices should go instead of one specific acco

  • Help!  I bought iLife 08, but it won't put iMovie on my laptop

    How can I download an older version of iMovie that WOULD work on my G4? What version should it be?

  • MBAM 2.5 ADMX files with MBAM 2.0

    I am standing up a new MBAM 2.5 environment to integrate with ConfigMgr 2012 R2.  We currently have MBAM 2.0 integrated with ConfigMgr 2007.   I want to know if I will run into any problems if I copy the new  ADMX files to the sysvol share?  Will our

  • Line-in recording management probs - zen v p

    Hi there I'm totally new to this machine. I have no computer and am loading songs stright from a line source, and charging via the creative charger. Firstly, I am ending up with a huge list of songs under the "recorded" folder, and am having a nitema

  • Unable to start-job with credentials

    I cannot get any jobs to run while using the credential parameter and I'm absolutely sure the credentials are correct. Has anyone had this issue? PS C:\Windows\system32> Start-Job -credential $creds -scriptblock {start-sleep 10} Id              Name