Using the Desktop API in Java SE 6 (Mustang)

<p>The Java platform continues to evolve, and Java applications can now integrate with the host desktop better than ever before. This new article describes how to integrate your Java application into the desktop using new Java SE 6 features:</p>
http://java.sun.com/developer/technicalArticles/J2SE/Desktop/mustang/desktop_api/

peterwkc wrote:
Hello to all,
this is some sort of theoretical question.
I been reading the JMS documentation for a while.
1.I could not understand what this statement means :
>
This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
>
2. What is the difference to use the JMS in java EE web orEJB container and application client ?
Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so.

Similar Messages

  • How to filter tasks on the Creation date using the IWorklist API in Java

    Hi all,
    I'm currently developing a java gui application to display usertasks set by the BPM.
    I use the WorkList API to communicate with the TaskActionActionHandler.
    I only want the tasks that has a creation that is after a specified date. Therefore I add a filter. The code for retrieving the usertasks now becomes:
    Map filterMap = new HashMap();
    SimpleDateFormat d = new SimpleDateFormat("dd-mm-yyyy");
    Date date = d.parse((String) dForm.get("filterdate"));
    Calendar cal = Calendar.getInstance();
    cal.setTime(date);
    filterMap.put(IWorklistService.FILTER_TYPE_CREATE_DATE_FROM_FILTER,
    cal);
    RemoteWorklistServiceClient client = new RemoteWorklistServiceClient();
    client.init();
    IWorklistContext ctx = client.authenticateUser(user, password);
    List tasks = client.getWorklistTasks(ctx, filterMap,
    IWorklistService.SORT_FIELD_TASK_TITLE,
    IWorklistService.SORT_ORDER_ASCENDING);
    You can see from the above code-fragment that I specify a FILTER_TYPE_CREATE_DATE_FROM_FILTER filter that is given a Calendar object. This is not working properly. Also a Date value gives a runtime error.
    The error I get is :
    ORABPEL-10150 Worklist Service Task List Error. An error occured in the Worklist Service while retrieving the task list for user jcooper. Check the task filter criterion and the error stack and fix the cause of the error. Contact oracle support if error is not fixable. at com.evermind.server.rmi.RMIConnection.EXCEPTION_ORIGINATES_FROM_THE_REMOTE_SERVER(RMIConnection.java:1602) at com.evermind.server.rmi.RMIConnection.invokeMethod(RMIConnection.java:1553) at
    Can anyone tell me what kind of dateformat I have to specify for the filter option FILTER_TYPE_CREATE_DATE_FROM_FILTER?
    Thanks in advance!
    Tom

    Hi,
    Enter the format that you have defined in the configuration of the property in the Additional Metadata parameter. Use the syntax customFormat=<pattern>.
    In this link, you have at the end screenshots where to navigate in KM to see the property metadatas of your property:
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/645d4357-0701-0010-07bd-a2ea8c4d0aaf
    Here see the Defenitions of the KM Metadata Properties:
    https://wiki.sdn.sap.com/wiki/display/KMC/DefenitionsoftheKMMetadata+Properties
    Regards,
    Praveen Gudapati

  • How to use the Worklist API from Java (classpath ??)

    Hi all,
    Sorry for a novice question but I couldn't find the way to go about this (probably because it's such common knowldge...)
    I would like to try and use the Worklist API from my Java code in Eclipse, and according to the BPEL dev-guide I need to add an Import command for oracle.tip.pc.api.worklist. Where do I find these classes ?????
    I guess I need to change my CLASSPATH but I couldn't find a single word about this in the BPEL dev-guide (chapter 17), BPEL installation guide or elseware.
    thanks.

    Hi all,
    Ok now.
    To summarize - I was trying the code from BPEL developer guide, chapter 17, page 40 for using the Worklist local API's.
    Only after adding the following JAR's to the build path, was I able to compile it:
    orabpel-common.jar
    orabpel.jar
    bpm-infra.jar
    bpm-services.jar
    So, these 4 JAR's are required for using the Worklist local API's (not a clue in the dev guide itself for this requirement though...)
    Thank you very much for your help,
    assaf.

  • Using the JMS API in Java EE Applications

    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.

    peterwkc wrote:
    Hello to all,
    this is some sort of theoretical question.
    I been reading the JMS documentation for a while.
    1.I could not understand what this statement means :
    >
    This section describes the ways in which using the JMS API in enterprise bean applications or web applications differs from using it in application clients.
    What a developer is allowed to do is different depending on whether they are writing code to run in a container or not. The container already provides lots of services so some code you would write for outside a container is not needed when you write for a container. There are APIs that you are not allowed for in container code if you want to adhere to the spec.
    >
    2. What is the difference to use the JMS in java EE web orEJB container and application client ?
    Thanks.Read more of that document to find out the differences. Application components in Web/EJBs must not create more than one active session per connection while application clients are allowed to do so.

  • How to count number of lines inside methods() using the Doclet API

    Wrote a custom doclet using the [Doclet API|http://java.sun.com/j2se/1.3/docs/tooldocs/javadoc/doclet/index.html ] .
    The purpose for the doclet is to load Java source files and create stubs (which are identical Java source files but do not contain any method implementation details).
    Instead, the method implementation details need to be replaced with blank lines...
    public class MyDoclet {
         private static String TAB = "\t";
         public static boolean start(RootDoc root) {
              ClassDoc[] classes = root.classes();
              // Parse through class or interface
              for (ClassDoc clazz : classes) {
                   Type superClass = clazz.superclassType();     
                   // Print Methods
                   MethodDoc[] methods = clazz.methods();
                   for (MethodDoc method : methods) {
                        Parameter[] parameters = method.parameters();
                        println();
                        if (!method.isPrivate()) {
                             print(TAB + method.modifiers() + " "
                                                    + method.returnType().simpleTypeName() + " " + method.name());
                             print("(");
                             for (int i=0; i < parameters.length; i++) {
                                  Parameter parameter = (Parameter) parameters;
                                  print(parameter.type().simpleTypeName() + " " + parameter.name());
                                  if (i != parameters.length - 1) {
                                       print(", ");
                             print(")");
                             println(" {");
                             println("\n");
                             println(TAB + "}");
              return true;
    As one can see, I am just creating the method and placing the opening and closing curly braces (along with a new \n line escape sequence, in between).
    Am not really that familiar with the Doclet API...
    Question(s):
    (1) What is the best way to figure out how many lines of code are inside each method and then use a for loop to insert the exact same number of blank lines inside the methods?
    (2) Is there a way to do it using the com.sun.javadoc.SourcePosition.line() method?
    Would really appreciate it if someone could help me because this is an important requirement (hence the 10 Duke Stars).
    Happy coding to all,
    Mike                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    This is not possible using the Doclet API, because JavaDoc does not store any information regarding implementation detail. Although MethodDoc#position will give you the line where the method is declared, there is no way to determine where the method body starts and ends.
    If you need that much information, maybe you would be better of using a tool such as Eclipse's Abstract Syntax Tree parser. AST will provide you with line numbers for each code expression, hence it is relatively easy to compute the first and last line in a method body.

  • Change workarea rule using the Repository API

    Hi,
    I have a simple question: Can I use the Repository API (either
    Java or PLSQL packages) to change the rule of workarea: in order
    to add to or remove configurations from the rule? I do not want
    the use the RON and preferably not the CLT either.
    I could not find anything about this functionality in the API
    doc.
    Regards,
    Rinse Veltman
    Solution Partners
    Custom Solutions

    Rinse,
    Have a look at the API jr_workarea
    FUNCTION jr_workarea.add_head_entry (workarea_id IN NUMBER
    , entry_ivid IN NUMBER
    , rule_id IN NUMBER:=NULL
    , v_param1 IN VARCHAR2:=NULL
    , v_param2 IN VARCHAR2:=NULL
    , v_param3 IN VARCHAR2:=NULL
    , c_exclude IN CHAR:=NULL)
    RETURN NUMBER;
    Where:
    workarea_id specifies the workarea.
    entry_ivid is the IVID of the configuration, if the entry is
    associated with a configuration, NULL otherwise.
    rule_id is the IRID of the rule to be used, if the entry is
    associated with a rule, NULL if the entry is configuration based.
    param1 through v_param3 are parameter values (if any) for the
    rule.
    c_exclude specifies whether to exclude or include objects
    produced by the rule or contained in the configuration.
    Use entry_ivid to specify a configuration. This is in the Model
    and API documentation.
    regards,
    David

  • Java applet using the Swing API

    write a Java applet using the Swing API to manage a PC repair shop. When a PC is brought in for repair, a member of staff will use this applet to log it into the system as a repair job. They will also be able to use the applet to manage the job e.g. allocate a person to carry out the repair and enter costs.
    You must not use a tool such as JBuilder to generate Java code. If you use code from elsewhere e.g. a text book, you must highlight the code and state the reference clearly and include a photocopy of the relevant pages from the text book or other source.
    You should hard-code some initial data into your applet. You should not store any data in a file or database.
    Level of functionality you should attempt to implement:
    Level 1 � Your applet should:
    a.     As a minimum, your program should store (in memory) at least 10 repair jobs. For each repair job, you need to store:
    �     The name and phone number of the customer bringing the PC in for repair;
    �     A brief textual description of the problem;
    �     Whether the PC is under warranty or not.
    b.     Your program must allocate and display a unique number for the job once it is accepted.
    c.     The user must be able to view the details of jobs. They should be able to select either:
    �     All the jobs in the system; or
    �     Jobs being carried out under warranty.
    Level 2 � Your applet must meet the requirements for level 1. In addition it should:
    a.     You should carry out appropriate validation checks on input data e.g. the phone number contains all digits.
    b.     System should cope with an unlimited number of jobs.
    c.     The user should be able to select a job and then allocate a repairer to that job.
    d.     The user should be able to display a list of jobs for each repairer.
    Level 3 - Your applet must meet the requirements for level 1 and 2. In addition it should allow the user to:
    a.     Select a job and input the cost of repair for:
    �     the number of hours labour;
    �     parts.
    b.     Select a job and present the user with a cost for the labour (hard code an hourly labour cost) and parts, plus a total for that job. For jobs under warranty the total will be zero, however the cost of labour and parts will be shown.
    c.     Be able to inform the business of the total expected income from the all the jobs in the system that are not under warranty.
    Level 4 � Your applet must meet the requirements for level 1 to 3. In addition:
    a.     The user should be able to enter a job priority which can be identified as high, medium or low.
    b.     Each repairer should be able to view a list of their jobs in order of priority.

    Done, what next ?
    Noah

  • Using the Preferences API

    I've never used this API before, so excuse my ignorance. I have a web application that I have been using a properties file to store base app info, such as the backend database, the url for the ldap, etc. This has been working fine, but after reading about the Preferences API, I thought that this might be the better place to store this info. However, I'm having permission problems that I haven't been able to figure out.
    I've got a development copy of everything on a single computer (using Windows XP), Sun One App Server, and Oracle.
    I created a small test class to see if I could load preferences from an xml file. Here's the class
    package portal.common;
    import java.util.*;
    import java.util.prefs.*;
    import java.io.*;
    import java.lang.*;
    public class PortalPreferences{
         Preferences sysPreferencesRoot;
         public void prefs() throws SecurityException{
    sysPreferencesRoot = Preferences.systemRoot();
         public void uploadPrefs(String file) throws IOException, InvalidPreferencesFormatException{
         FileInputStream fis = new FileInputStream(file);
         RuntimePermission rpermiss = new RuntimePermission("preferences.*");
         Preferences.importPreferences(fis);
         public Preferences getPrefs(){
         return sysPreferencesRoot;
    I then used a jsp to instantiate the class and call the uploadPrefs method. The class instantiates without error, but when I try to load the xml file I get the following error:
    access denied (java.lang.RuntimePermission preferences)
    I've never done anything with the security manager before so I'm not sure how to get around this. I tried creating a RuntimePermission object above, but that didn't work.
    If anyone has any ideas, I'd much appreciate it.

    No, actually I've got the Sun One App server loaded on a desktop I built that I'm using as a test box - its not a server. The Sun server is running fine, as is Oracle. The only problem I'm having is figuring out how to use the Preferences API. Maybe this API isn't the right thing to be using, that's why I'm asking for advice as well as how to get around the security issue that I'm having. My goal is to have application level information that can be stored somewhere other than in a database - this is because one of the pieces of app info is the database that's being used. This app will work with any backend. Currently, this info is stored in a properties file inside the WEB-INF directory. This works fine as is. However, my issue with that is that in order to load the properties file, I've got to have a real drive path. This again isn't that much of an issue except when trying to access from a class that doesn't have the servlet context, however, I am looking for an alternative solution to the properties file. The Preferences seemed like a good solution.

  • Problems while uploading files using the FileReference API

    I've built an image uploader module in Flex using the FileReference API and PHP.
    While this works perfect for images upto 1 MB, What I'm noticing is that for images greater that 1 MB even after the Event.COMPLETE  has triggered, the file hasn't yet been uploaded into the folder.. its only after a couple of seconds or minutes after the Event.COMPLETE,  that the image actually shows up in the FTP folder. Morever I also noticed that for such files the DataEvent.UPLOAD_COMPLETE_DATA that we are using to get feedback from PHP never gets called.
    I thought it would be related to the PHP script getting timed out... but the PHP script does get executed and the images do show up in the folder but thats way after the Event.Complete has been triggered and more importantly  DataEvent.UPLOAD_COMPLETE_DATA doesnt get called.
    Everything seems to work fine as long as the file size is under 1 MB
    Did others too face similar problems and any ideas on how to fix it?
    Thanks in advance

    I don't believe there is, as the browse button renders out as an html input type file component, and this has no ability to get native file size from the client. The only way to do it is to check the file size server side, but that kind of defeats the purpose to some extent, as the file is required to be uploaded before the file size can be checked.
    There is no way to do this on the client short of using a third party client side component - ie. java, flash or some other active component that gets file system level access.
    Ben

  • How to use the windows API GetCaretPos with FireFox? It works with IE

    I want to get caret position from a windows desktop application using the Windows API GetCaretPos. It works in any windows Application and in IE. It worked also in FireFox for some minutes in version 3.6.8 but than it stopped working. Can anyone tell me how to make it work?
    == This happened ==
    Every time Firefox opened

    Many site issues can be caused by corrupt cookies or cache. In order to try to fix these problems, the first step is to clear both cookies and the cache.
    Note: ''This will temporarily log you out of all sites you're logged in to.''
    To clear cache and cookies do the following:
    #Go to Firefox > History > Clear recent history or (if no Firefox button is shown) go to Tools > Clear recent history.
    #Under "Time range to clear", select "Everything".
    #Now, click the arrow next to Details to toggle the Details list active.
    #From the details list, check ''Cache'' and ''Cookies'' and uncheck everything else.
    #Now click the ''Clear now'' button.
    Did this fix your problems? Please report back to us!

  • Creating junit test cases using the reflection API

    In order to use the reflection API to get information about a *.java file's class name and methods, I need to compile the *.java file first, and then get info through the *.class file. Am I right?
    Eclipse, the Java IDE, can create junit test cases for java files the user selects right after the *.java files have been created, and even before the *.java files have been compiled by the user. I guess Eclipse internally compiles the java files before creating JUnit test cases for them. Does anyone know about it? Thanks.

    Let me explain my problem in more details.
    Given any java source tree, my program is supposed to create junit test cases for each class using java reflection. My approach is to scan through the source tree to keep the list of classes available, then compile all the java files in the given source tree, then do Class.forName() to load them to get their methods... Obviously I don't know what classes I will have at compilation time. I create a temp_classes directory as the output directory for the given source tree java files, and I add temp_classes to my classpath when I strart up my own program. However, that won't work..
    D:\eclipse\workspace\cmpe271_hw4\classes>java -classpath ..\classes;..\temp_classes Test
    javac -classpath .\temp_classes; -d .\temp_classes @temp_classes\javalist.txt
    java.lang.ClassNotFoundException: Factory
    java.lang.ClassNotFoundException: InvalidDateFormatException
    java.lang.ClassNotFoundException: MyUtility
    java.lang.ClassNotFoundException: Storage

  • Help/Example needed for creating JMSQueues/JMSTopics using the MBean API

    I am trying to create JMSQueues programmatically using the MBean API. When
    I use MBeanHome.createAdminMBean(), a queue appears in the root of the
    config file. This is progress, but the queue is in the wrong place! I need
    the queues to be part of my JMS server's "destinations" as seen on the
    console.
    So now I am trying to use createConfigurationMBean() instead, but I can't
    figure out what the "parent" parameter should be- no documentation! My
    first guess was that the parent might be the JMSServer, but that doesn't
    work.
    Anyone have example code to insert JMSQueues and JMSTopics into a specific
    JMS server's destinations?
    Here is the code I tried... All goes well until the final
    createConfigurationMBean call, where it throws a MBeanCreationException:
    // Get the MBeanHome bean
    Object obj = jndiContext.lookup("weblogic.management.adminhome");
    MBeanHome mbeanhome = (MBeanHome) javax.rmi.PortableRemoteObject.narrow
    (obj, MBeanHome.class);
    // Get the server MBean
    JMSServerMBean jmsServerMB =
    (JMSServerMBean)mbeanhome.getMBean("examplesJMSServer",
    JMSServerMBean.class);
    // Create the new Queue
    JMSQueueMBean jmsQMB = (JMSQueueMBean)mbeanhome.createConfigurationMBean
    ("weblogic.examples.jms.fooQueue", "JMSQueue", jmsServerMB);

    Ok, I still don't see how I can do it differently with the admin tool. If
    you want to see the commands I'm using, I can post them, but the basic one
    is shown below in the previous message. We're trying to set up a script so
    that developers can just run it and properly configure WebLogic with the
    right components.
    Thanks,
    Michelle
    "Michelle Baxter" <[email protected]> wrote in message
    news:[email protected]...
    I am using the weblogic.Admin tool, not doing this in code. I will attempt
    to translate your advice when I get time again.
    My commands look like this:
    java weblogic.Admin -url 127.0.0.1:7001 -username system -passwordweblogic
    CREATE -mbean "mydomain:Type=JMSQueue,Name=MyJMSQueue"
    I create this, I create the JMSServer MBean, then do and INVOKE (insteadof
    CREATE) and call the addDestination method, adding the JMS Queue MBeanthat
    I created previously, using the same naming scheme as in the above CREATE.
    "Viresh Garg" <[email protected]> wrote in message
    news:[email protected]...
    Daron Cole wrote:
    You can use createConfigurationMBean with JMSQueueConfig but in the
    end
    I used
    the code below to create a topic.The code that you posted is the right way to create queus/topics. alwayscreate admin mbeans to admin
    server and let admin server internally create config Mbeans on the
    managed
    server as per the
    location/targets that you set in admin Mbeans.
    Queue's are the same, just replace the word
    Topic with Queue and it should work. It should show up in the console
    app.
    MBeanHome home = (MBeanHome)ctx.lookup(MBeanHome.JNDI_NAME+".myserver");
    ServerMBean myserver =(ServerMBean)home.getMBean("myserver",ServerMBean.class);
    String topicName = "MyNewTopic";
    JMSServerMBean jmsServerMB =(JMSServerMBean)home.getMBean("JMSServer","JMSServer","mydomain");
    JMSTopicMBean jmsTopicMB =(JMSTopicMBean)home.createAdminMBean(topicName,"JMSTopic","mydomain");
    jmsTopicMB.setJNDIName(topicName);
    jmsServerMB.addDestination(jmsTopicMB);
    Viresh Garg
    Principal Developer Relations Engineer
    BEA Systems
    "Michelle Baxter" <[email protected]> wrote:
    There is no JMSQueueConfigMBean. What do you mean?
    "Daron Cole" <[email protected]> wrote in message
    news:[email protected]...
    Try JMSQueueConfig instead of JMSQueue.
    "Michelle Baxter" <[email protected]> wrote:
    Me too! I'm trying to use the weblogic.Admin class to set up
    queues
    and
    topics and the JMS server. The same results in the config file:
    the
    queues
    and topic were set up at the root, the JMS server was added, but
    no
    destinations, even though I invoked the addDestination method withthe
    created MBean queues and topic as arguments. No exceptions, just
    no
    destinations on the JMS server resulted. What's the right order ofexecution
    for this stuff??
    Thanks,
    Michelle
    "Jude DeMeis" <[email protected]> wrote in message
    news:[email protected]...
    I am trying to create JMSQueues programmatically using the MBean
    API.
    When
    I use MBeanHome.createAdminMBean(), a queue appears in the root
    of
    the
    config file. This is progress, but the queue is in the wrong
    place!
    I
    need
    the queues to be part of my JMS server's "destinations" as seen
    on
    the
    console.
    So now I am trying to use createConfigurationMBean() instead,
    but
    I
    can't
    figure out what the "parent" parameter should be- no
    documentation!
    My
    first guess was that the parent might be the JMSServer, but that
    doesn't
    work.
    Anyone have example code to insert JMSQueues and JMSTopics intoa
    specific
    JMS server's destinations?
    Here is the code I tried... All goes well until the final
    createConfigurationMBean call, where it throws aMBeanCreationException:
    // Get the MBeanHome bean
    Object obj =
    jndiContext.lookup("weblogic.management.adminhome");
    MBeanHome mbeanhome = (MBeanHome)javax.rmi.PortableRemoteObject.narrow
    (obj, MBeanHome.class);
    // Get the server MBean
    JMSServerMBean jmsServerMB =
    (JMSServerMBean)mbeanhome.getMBean("examplesJMSServer",
    JMSServerMBean.class);
    // Create the new Queue
    JMSQueueMBean jmsQMB =(JMSQueueMBean)mbeanhome.createConfigurationMBean
    ("weblogic.examples.jms.fooQueue", "JMSQueue", jmsServerMB);

  • Help Needed - My BB 8520 Curve has this message-CRTranRec::GetLinkedRecordID:Invalid linked record id while sychronisation using the desktop software

    Hi!
    Need some help with the same:
    Help Needed - My BB 8520 Curve has this message-CRTranRec::GetLinkedRecordID:Invalid linked record id while sychronisation using the desktop software

    Hi sameer197301 and welcome to the BlackBerry Support Community Forums!
    To clarify, are you seeing this message displayed on your BlackBerry® smartphone or on your computer?
    Thanks.
    -CptS
    Come follow your BlackBerry Technical Team on twitter! @BlackBerryHelp
    Be sure to click Kudos! for those who have helped you.Click Solution? for posts that have solved your issue(s)!

  • I am using the desktop screensaver and a file from dropbox for photos.  Does the list of screen savers actually use the file, or just link to it.  If I delete the file from the dropbox, will the screen saver be lost?

    Using the desktop slideshow, I have added a file from dropbox for the slideshow.  If I delete the dropbox file, does that delete the file from the list on the slideshow?  Do I need to leave the file on the computer itself rather than in the dropbox and then delete it from the dropbox?

    If you are going to delete the file from Dropbox, you will need the file on your computer.
    You will probably need to put the file in Library/Screen Savers

  • How to create a campaign based on a template using the REST API

    Hi CodeIt-ers,
    I'm using the REST API to create campaigns in Eloqua 10, all works well except for 1 thing: I can't seem to create a campaign based on an existing Campaign template.
    Based on the documentation on REST API - Accessing Campaigns I've tried using "sourceTemplateId" (code snippet below) but that did not do the trick.
    Does that functionality simply not work or am I missing something?
    Thanks!
    Ferry
    $campaign_data = new Campaign(); 
    $campaign_data->sourceTemplateId='442';
    $campaign_data->folderId='1137';
    $campaign_data->currentStatus='draft';

    Hi Richard,
    Unfortunately no. I reached out to support, they informed me "sourceTemplateId" could not be used to create new campaigns based on a template, instead they advised to use the "Elements " property as shown in this example: Eloqua REST API - Create a Campaign with a Segment and Email
    Thanks
    Ferry

Maybe you are looking for