Axis2 using generated proxy Java classes to insert the record in CRMOnDemand

Hello
I'm new to web service development. Currently, I am trying to build a java application to insert records opportunity in CRM on demand. I use Eclipse Galileo to create my application on Tomcat server. I've correctly coded the connect/disconnect through my java application scenario. Now the problem is that I don't know how the code to insert opportunity record in CRM by using classes Proxy generated by Apache Axis2.
I met a lot of code in this forum, but all are for versions Axis1.X. Axis2 generates a different kind of a class structure, I'm not able to find a way.
Please help me.

Fill in data obj with the fields 'must '.
OpportunityData oppData = new OpportunityData();
oppData.setOpportunityName (testOppName);
oppData.setAccountId (testAccId);
oppData.setSalesStage ("qualified lead");

complete list of Articles
ListOfOpportunityData listOfOppData = new ListOfOpportunityData();
listOfOppData.addOpportunity (oppData);

Fill object Insert_Input
Entry OpportunityInsert_Input = new OpportunityInsert_Input();
input.setListOfOpportunity (listOfOppData);

call the Stub
OpportunityStub stub = getOpportunityStub (params); ensure that the heel is configured with the session token.
OpportunityInsert_Output output = stub.opportunityInsert (input);
String oppIdCreated = output.getListOfOpportunity () .getOpportunity () [0] .getId ();

Its ' the same for any record. For ex: insert account - AccountData, ListOfAccountData, AccountInsert_Input, AccountStub, etc..

Published by: 838315 on April 11, 2011 02:22

Tags: Oracle

Similar Questions

  • On the screen that it says "the proxy server refuses connections" Firefox is configured to use a proxy server refusing connections. The result is no internet.

    the proxy server refuses connections"Firefox is configured to use a proxy server refusing connections. The result is no internet

    You are welcome

  • How to use several adf 12 shape and insert the form data in to table during the click on "submit" button

    How to use several adf 12 shape and insert the form data in to table during the click on "submit" button. Can we use several form from adf or not?

    Make sure that you dragged the VO based EO.

    Also make sure that the VO attributes based EO Updatable property.

    The query according to VO is used only to add LOV to the column of the original VO ModelId.

    See you soon

    AJ

  • Insert the record type

    Hi all

    I created a table with two columns method. I am assigned two values to variable recordtype.
    When inserting the record in the table, a compiler error is to be there.
    Create table emp_info(empno number(5),ename varchar2(30));
    
    DECLARE
    
    l_rec emp_info%rowtype;
    
    BEGIN
    
    l_rec.empno := 101;
    l_rec.ename := 'KING';
    
    insert into emp_info(empno,ename)
    values(l_rec);
    
    commit;
    
    END;
    ERROR on line 11:
    ORA-06550: line 10, column 35:
    PL/SQL: ORA-00947: not enough values
    ORA-06550: line 10, column 1:
    PL/SQL: SQL statement ignored


    Can I insert with output Recordtype variables indicating the column names. Can someone help me?

    Do not list of columns. Do not put brackets in the record variable:

    SQL> DECLARE
      2      l_rec emp_info%rowtype;
      3  BEGIN
      4      l_rec.empno := 101;
      5      l_rec.ename := 'KING';
      6      insert
      7        into emp_info
      8        values l_rec;
      9       commit;
     10  END;
     11  /
    
    PL/SQL procedure successfully completed.
    
    SQL> 
    

    SY.

  • Insert the record of one table to another with the help of the cursor

    Help, please!

    the tables are - 1. countries (country_id pk, country_name, region_id)
    2A (country_id, country_name, region_id)
    table data are
    1 to 1
    2 b 2
    3 C 3
    NULL d 4
    5 e 5
    6 f 6
    7 g 7
    -----------------------
    Insert the record in the table a country table with the help of the cursor, insert all the non-null records.
    This procedure does not correct result
    -----------------------

    create or replace
    Amit procedure as
    cursor c1 is select * from a;
    RW a % rowtype;
    Start
    Open c1;
    Fetch c1 into rw.
    While (C1% found)
    loop
    insert into countries values (rw.country_id, rw.country_name, rw.region_id);
    commit;
    Fetch c1 into rw.
    If rw.country_id is null then
    Fetch c1 into rw.
    end if;
    end loop;
    Close c1;
    exception
    while others then
    dbms_output.put_line ('exception = name ' |) RW.country_name);
    end;

    You don't need cursor at all;

    create or replace procedure amit as
    
    begin
      insert into countries (Country_ID, Country_Name, Region_ID)
      (select a.Country_ID
             ,a.Country_Name
             ,a.Region_ID
       from a
      );
    
      dbms_output.put_line('Rows inserted : ' || sql%rowcount);
    
      commit;
    
    end;
    /
    
  • Error on Java class calling in the Oracle database

    I have a java class indicated below:

    /*

    * To change this license header, choose license headers in the project properties.

    * To change this template file, choose Tools | Templates

    * and open the template in the editor.

    */

    package oracletree1;

    import java.sql.Connection;

    to import java.sql.DriverManager;

    import java.sql.ResultSet;

    import java.sql.SQLException;

    import java.sql.Statement;

    /**

    *

    * @author oracle

    */

    public class TREEUPDATER {}

    int levels;

    int NodeId;

    int ParentId;

    String FatherID;

    int ChildBed_new;

    int ChildBes_new;

    int ChildMande_new;

    int ChildBed_old;

    int ChildBes_old;

    int ChildMande_old;

    int ParentBed;

    int ParentBes;

    int ParentMande;

    Script string;

    String ValueState;

    String TreeState;

    Public TREEUPDATER() throws SQLException {}

    }

    public void update (levels int, int NodeIds, int childBed_old, int childBes_old, int childMande_old) throws SQLException {}

    This. ChildBed_old = childBed_old;

    This. ChildBes_old = childBes_old;

    This. ChildMande_old = childMande_old;

    This. Levels = levels;

    This. NodeId = NodeIds;

    String [] array;

    try {}

    Class.forName ("oracle.jdbc.driver.OracleDriver");

    } catch (ClassNotFoundException e) {}

    System.out.println ("where is your Oracle JDBC Driver?');

    return;

    }

    System.out.println ("Oracle JDBC Driver registered!");

    Fitting out = null;

    try {}

    connection = DriverManager.getConnection)

    "jdbc:oracle:thin:@192.168.1.12:1521:orcl", "tree1"

    'oracle');

    } catch (SQLException e) {}

    System.out.println ("connection failed! Check the console output");

    return;

    }

    If (connection! = null) {}

    Statement stmt = connection.createStatement ();

    Instruction stmt2 = connection.createStatement ();

    stmt.executeUpdate ("insert into test.java_test (id) values (21)" ");

    ResultSet rs = stmt.executeQuery ("SELECT * from value" + "where nodeid =" + NodeId);

    ResultSet rs2 = stmt.executeQuery ("select * from tree where id =" + NodeId);

    While (RS. Next {}

    This. FatherID = rs2.getNString("FatherID");

    This. ChildBed_new = rs2.getInt ("bed");

    This. ChildBes_new = rs2.getInt ("bes");

    This. ChildMande_new = rs2.getInt ("control");

    table = new String [100000];

    Table = FatherID.split ("_");

    for (int i = 0; i < array.length; i ++) {}

    ResultSet rs3 = stmt2.executeQuery ("SELECT * from tree" + "where id =" + array [i]);

    This. ParentId = rs3.getInt ("id");

    This. ParentBed = rs3.getInt ("bed");

    This. ParentBes = rs3.getInt ("bes");

    This. ParentMande = rs3.getInt ("control");

    connection.setAutoCommit (false);

    ParentBed = ChildBed_new - ChildBed_old;

    ParentBes = ChildBes_new - ChildBes_old;

    This. TreeState = rs2.getNString ("state");

    If (TreeState.equalsIgnoreCase ("BED")) {}

    This. ParentMande = ParentBed - ParentBes;

    } else {}

    This. ParentMande = ParentBes - ParentBed;

    }

    This. Script = ("update the bed = bed set value +" + ParentBed + "and bes = bes +" + ParentBes + "and control = control +"+ ParentMande ")

    + ' where id = "+ ParentId);»

    stmt2. ExecuteUpdate ("" + Script);

    }

    }

    }

    }

    }

    I have a main class, which show below:

    /*

    * To change this license header, choose license headers in the project properties.

    * To change this template file, choose Tools | Templates

    * and open the template in the editor.

    */

    package oracletree1;

    import java.sql.SQLException;

    /**

    *

    * @author oracle

    */

    public class OracleTree1 {}

    /**

    @param args command-line arguments

    */

    Public Shared Sub main (String [] args) throws SQLException {}

    TODO logical application of the code here

    TREEUPDATER t = new TREEUPDATER();

    }

    }

    I was responsible for these classes in oracle database 11 g 2 and I want to use a trigger to execute the updating() method. If I created a procedure like this:

    CREATE OR REPLACE PROCEDURE REPORT4

    (

    LEVELS IN NUMBERS

    NODEID NUMBER

    CHILDBED_OLD NUMBER

    CHILDBES_OLD NUMBER

    CHILDMANDE_OLD NUMBER

    ) AS

    Name of the java LANGUAGE "TREEUPDATER.updating (1,2,3,4,5);

    But when I want to compile and run this procedure, I get this error:

    Error: PL/SQL: analysis of completed Compilation unit

    Error (9,16): PLS-00311: the declaration of 'TREEUPDATER.updating' (1,2,3,4,5) is incomplete or incorrect

    Can any one solve this?

    Thank you

    The correct syntax for PORCEDURE4 is:

    No it's not. I already gave the correct syntax, which apparently ignored you.

    I don't know how can pass these parameters to this method.

    My question is clear?

    It is clear that you are interested in reading the documentation. All the answers are there.

    You're mixing two things:

    (1) creating the procedure (once), and I already told you how to do it

    (2) the procedure call

    For 1)-do you only once :

    CREATE OR REPLACE PROCEDURE REPORT4)

    LEVELS IN NUMBERS

    NODEID NUMBER

    CHILDBED_OLD NUMBER

    CHILDBES_OLD NUMBER

    CHILDMANDE_OLD NUMBER

    )

    AS

    JAVA LANGUAGE

    NAME of ' oracletree1. TREEUPDATER.updating (int, int, int, int, int)';

    For 2)-procedure call:

    ...

    BEGIN

    ... of the code

    -you call proc with your real settings:

    procedure4 (v_levels, v_nodeid, v_childbed_old, v_childbes_old, v_childmande_old);

    ... rest of your code

    END;

    Pay attention to remarks from other institutions.

  • Pass parameters to the Java class constructor in the Task Scheduler

    Hi all

    I wrote a Java (MySechudler) class that extends from 'SchedulerBaseTask '. This class is configured to run in "IOM-Task Scheduler", and within this class, I update the table in a database.
    The connection string to the database is considered to be a parameter to the constructor of the class 'MySechudler '.

    If I hard code the connection string and use a default constructor, it works well, but if I use a parameterized constructor, and try to pass the attribute, it will give an exception. I am doing wrong?

    If someone can tell me, how can I pass the value to my class of Java through "IOM Task Scheduler?

    HERE
    Thirlk

    private String getAttributeWithDefaultValue (String s, String s1) {}
    String s2 = getAttribute (s);
    If (s2 == null: s2.equals("")) {}
    return of s1;
    } else {}
    return s2;
    }
    }

    public void init() {}
    dataProvider = getDataBase();
    String uid = getAttributeWithDefaultValue("Attribute_Name",_"").trim();
    }

    Place this code in your task scheduler class and pass through Task Scheduler attribute setting such as:
    Value name

    User name attribute ID

  • Insert the record into the database using hyperlink

    My dev environment is DWCS3/MSAccess/ASP

    I have a pretty simple site where I want to enable connected users to save documents to a Favorites page (the ID of the page they are on). For aesthetic reasons, for the most part, I want to be able to click on a hyperlink for the kickoff of the insert and allows their right to return to the page they were on the behavior of the FORM action.

    Is this possible in ASP Classic? Does anyone have suggestions as to how I can do this?

    Thank you very much.

    Since my main goal was to avoid putting a button on the page, I used the kind of a workaround plan b. I've created a save"link" which leads to a "success" - style page where they then click on a button to continue. I had passed the form hidden as variables to this page then used values built in behavior record insert to write the record in the Database when they click on "continue". Not the thing I wanted to do initially, but it works.

  • Could not create Java class: associated with the region:

    Hi all

    I extend the gamepad standard oracle.apps.pos.supplier.webui.SuppSummCO
    With a controller custom xxmycomp.oracle.apps.pos.supplier.webui.XXSuppSummCO

    I built the project in my local JDEV
    Updated the custom controller and place it under $JAVA_TOP
    I even checked by ls-l $JAVA_TOP/xxmycomp/oracle/apps/pos/supplier/webui/XXSuppSummCO.class


    I gave all the folder permissions of xxmycomp under $JAVA_TOP (chmod-r 777 xxmycomp)

    I did the rebound in core OC4J

    After you have set the controller custom level of personalization of the region site.
    When I'm back to the application, I get the following error

    oracle.apps.fnd.framework.OAException: could not create Java class: (xxmycomp.oracle.apps.pos.supplier.webui.XXSuppSummCO) associated with the area: (PageLayoutRN). It is probably because the class name is incorrect or not included in the project.
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.prepareException(OAPageErrorHandler.java:1247)
    at oracle.apps.fnd.framework.webui.OAPageErrorHandler.processErrors(OAPageErrorHandler.java:1435)
    at oracle.apps.fnd.framework.webui.OAPageBean.processRequest(OAPageBean.java:2559)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:1894)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:538)
    at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:426)
    in OA. jspService(_OA.java:212)
    at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)
    at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:379)
    at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)
    at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
    at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
    at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
    at com.evermind.server.http.ServletRequestDispatcher.unprivileged_forward(ServletRequestDispatcher.java:259)
    in com.evermind.server.http.ServletRequestDispatcher.access$ 100 (ServletRequestDispatcher.java:51)
    to com.evermind.server.http.ServletRequestDispatcher$ 2.oc4jRun(ServletRequestDispatcher.java:193)
    at oracle.oc4j.security.OC4JSecurity.doPrivileged(OC4JSecurity.java:284)
    at com.evermind.server.http.ServletRequestDispatcher.forward(ServletRequestDispatcher.java:198)
    at com.evermind.server.http.EvermindPageContext.forward(EvermindPageContext.java:395)
    to the RFjspService(_RF.java:225)



    The custom controller is for test and has only the following code

    public void processRequest (OAPageContext oapagecontext,
    OAWebBean oawebbean)
    {
    super.processRequest (oapagecontext, oawebbean);
    }

    public void processFormRequest (OAPageContext oapagecontext,
    OAWebBean oawebbean)
    {
    super.processFormRequest (oapagecontext, oawebbean);
    }

    I created the directory xxmycomp under $JAVA_TOP
    I have read only access to the other directories under $JAVA_TOP outside xxmycomp.

    Can someone help me solve this error?

    I do the same steps in another case where it works very well.




    Kind regards
    Chaouki

    Two things:
    1. check that you have moved the code of the application server and database server
    2. check the path (spaces, upper/lower case etc.)
    3. check the permissions of the file.

    If all goes well, then make a backup of existing on the server controller and redeploy the file (compile the file in Jdeveloper, after removal of the myclasses directory). Bounce the server.

    Concerning
    Sumit

  • I have some problems with a ONE_TO_MANY relationship, can not insert the record

    I have some problems with a ONE_TO_MANY relationship:

    Imagine the following entities:

    -J' have an operational entity with a relationship to workers one_to_many something like:
    @SecondaryKey(relate = Relationship.ONE_TO_MANY,
        relatedEntity = Worker.class)
        private Set<String> workers;
    -The category of workers is a simple annotated entity.


    Now, I want to do the following and I get the error:

    -Create a bunch of tasks
    -Insert tasks into the entitystore
    -create a set containing all the tasks of primary key
    -involve workers to tasks
    -Insert the task in the database


    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:
    com.sleepycat.je.DatabaseException: (JE 3.3.75) Could not insert secondary key in persist#Sample#sample.Task#workers OperationStatus.KEYEXIST
            at com.sleepycat.je.SecondaryDatabase.insertKey(SecondaryDatabase.java:887)
            at com.sleepycat.je.SecondaryDatabase.updateSecondary(SecondaryDatabase.java:807)
            at com.sleepycat.je.SecondaryTrigger.databaseUpdated(SecondaryTrigger.java:42)
            at com.sleepycat.je.Database.notifyTriggers(Database.java:1735)
            at com.sleepycat.je.Cursor.putInternal(Cursor.java:1368)
            at com.sleepycat.je.Cursor.putNoOverwrite(Cursor.java:498)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:366)
            at com.sleepycat.persist.PrimaryIndex.put(PrimaryIndex.java:315)
    Can someone please clarify what my problem is and where I should change for this case study work?

    Thank you

    The above procedure works fine, but when I try to associate the same set of workers with another task I get an exception like:

    The table in this javadoc should help. Please think about whether they are 1 of many, many 1 or many is the appropriate link.

    http://www.Oracle.com/technology/documentation/Berkeley-DB/je/Java/COM/Sleepycat/persist/model/SecondaryKey.html#relate)

    -mark

  • How can I use ODE independently OWD unaided, but showing the record of decision?

    Hi all

    I want to integrate the OPA with my java application without using the OWD.

    But how can I show the record of decision like that of OWD?

    Thank you

    This should be fairly simple. You can obtain a record of decision of the engine API. The decision paper referred is a tree of nodes that are very similar to the decision in OWD HTML report, it should just be a matter of this tree to market and building an html like structure.

    Take a look on example: retrieve a record of decision for an example of how to retrieve a record of decision.

  • Insert the record in the second table by making the trigger on the first table

    I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
    so I want to know what is the problem in my sql code.
    Pls correct!

    SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));

    SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));

    SQL > create the sequence myuser2_seq;

    SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;

    SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;

    SQL > CREATE TRIGGER MYTRIGGER
    2 AFTER INSERT ON myuser1
    3 FOR EACH LINE
    4 BEGIN
    5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
    6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
    1)
    7 END;
    8.

    WARNING: Trigger created with compilation errors.

    JKMourya wrote:
    I hv created 2 tables as shown below the code sql. I want to insert some record (line current value) column of the first table, next sequence value and sysdate into second table. I hv created trigger but I gave warning.
    so I want to know what is the problem in my sql code.
    Pls correct!

    SQL > create table myuser1 (u_id varchar2 (10), uname varchar2 (20), sex char(1));

    SQL > create table myuser2 (reg_no number (5), reg_date Date, u_id varchar2 (20));

    SQL > create the sequence myuser2_seq;

    SQL > alter table myuser1 add constraint pk_myuser1 key (u_id) primary;

    SQL > alter table myuser2 add constraint pk_myuser2 key (reg_no) primary;

    SQL > CREATE TRIGGER MYTRIGGER
    2 AFTER INSERT ON myuser1
    3 FOR EACH LINE
    4 BEGIN
    5 INSERT INTO myuser2 (reg_no, reg_date, u_id)
    6 VALUES (myuser2_seq.nextval, SELECT SYSDATE FROM DUAL, select u_id myuser)
    1)
    7 END;
    8.

    WARNING: Trigger created with compilation errors.

    SELECT inside VALUES clause is NOT allowed.
    do SELECT statements before the INSERT command

  • Insert the record with the decimal string?

    I want to insert a record with commas, as the below:
    INSERT INTO TABLEA(CITY) VALUES('ALBANY,NEWYORK,TROY')
    Is there a way we can insert commas in the table?

    This statement has been inserted

    What is your question.

    SQL> INSERT INTO TABLEA(CITY) VALUES('ALBANY,NEWYORK,TROY') ;
    
    1 row created.
    
  • How can I configure proxy system Linux Debian for Firefox uses for example when "Use System Proxy settings" is selected in the preferences of Firefox?

    I want to be able to change the proxy settings without having to go through Firefox' tedious settings menu. Chrome allows me to define a proxy as a command line option, or you can also set an environment variable would be ok for me. In its options, FF offers to the "Auto-detect" proxy settings, and also, Alternatively, of "Using the system" proxy settings, but I can't find any documentation to tell me what he's looking for in both cases, how to set the system proxy settings or what the difference between these two options apparently similar. Currently I do Menu-> Preferences-> advanced-> network, and then type the details of proxy, which takes too much time!
    Thank you.

    CAP file is an option. However, the documentation of the difference between these options can be found here

    Another add on who could be a work is about: Selector of Proxy

  • [ADF, JDev12.1.3] Can I use this FacesUtils.java in applications of the ADF with no problems?

    Hallo,

    I would like to know if I can use this http://www.google.it/url?sa=t & rct = j & q = & esrc = s & source = web & cd = 2 & ved = 0CCoQFjAB & url = http %3 C % 2F % www.icesoft.org%2Fwiki%2Fdo 2F... in my ADF applications without any problem.

    Ore is at - it a specific class of more JDev ADF to use?

    Thank you

    Federico

    Federico, the code can be used without problem. However, if you use the class you get a different path to the "org.icesoft.samples.mobi.example1.view.util" package; That points to a different framework. As you have the source, you can easily create your own class in your package structure. You can get almost the same code of samples of the oracle too.

    The code is standard, and I don't think you break anything by copying in your path.

    Timo

Maybe you are looking for