Use of Java API classes unrelated to the problem domain

Hi,
I am designing a public API.
java.awt.Dimension getScreenSize(); // rows, columns
java.awt.Point getCursorLocation(); // row, columnDo you consider the above returned values abuses/misuses of existing AWT classes in a totally non-graphical context?
Should I rather:
1. Use my own (immutable) equivalent classes with better names such as getRows(), getColumns() instead of getY(), getX()?
2. Should I use separate getters like getCursorRow(), getCursorColumn() etc. and forget about Point or Point-like classes (and loose the atomicity of the operations)?
Thanks!

I also feel you should roll your own classes with class and method names that better describe the intention. I base my conclusion on the very existence of the two classes Dimension and Point in the same java.awt package, both of which encapsulate two int values and nothing else. Theoretically just one class could have served the purpose of both of these.
JTable has a constructor that takes two int arguments for numRows and numColumns, and methods getRowCount() and getcolumnCount() so would you consider using JTable as a return type for your getScreenSize()? No? I thought not.
db

Similar Messages

  • Where are the Java API classes?

    Hello All,
    I understand that Oracle9i uses a Java API different than those older classes found in sdoapi.zip here on the OTN.
    Problem is, I don't know where to find them in my newly-installed 9iR2.
    Can anyone help me with this simple question or point me to appropriate documentation?
    Thanks!
    -- john

    I believe the new Java API classes are slated for 10i.

  • How to access the SAP MDM destinations using mdm java api in 7.1

    hi,
    I have SAP MDM 7.1 SP11 and SAP Portal 7.3 and developing the custom webdynpro application using the  JAVA MDM API. I want configure the SAP MDM destinations in SAP Portal .
    How to access the MDM destinations in java code using API? and how to create the connection with MDM using the MDM destinations.
    Please provide the code for access the SAP MDM destinations in java code using MDM java api and creating the connection to MDM.
    Thanks

    Jun,
    Thanks for the reply and api information.
    I have got this api information from the following sap documentation. But i am looking for the code by implementing this class and creating the mdm connection.
    Creating an MDM Connection Using Java Code - SAP NetWeaver Master Data Management (MDM) - SAP Library
    if any thing can you share it.
    Thanks

  • How to retrieve the data from MDM hierarchy table using MDM Java API

    Hi,
    I had a hierarchy table in MDM. This table had some column say x. I want to retrieve the values of this x column and need to show them in a drop down using MDM Java API.
    Can anyone help me to solve this?
    Regards
    Vallabhaneni

    Hi,
    Here is your code...
    TableId Hier_TId = repository_schema.getTableId(<hierarchy table id>);
    java.util.List list = new ArrayList();
    ResultDefinition Supporting_result_dfn = null;
    FieldProperties[] Hier_Field_props =rep_schema.getTableSchema(Hier_TId).getFields();
    LookupFieldProperties lookup_field = null;
    TableSchema lookupTableSchema = null;
    FieldId[] lookupFieldIDs = null;
    for (int i = 0, j = Hier_Field_props.length; i < j; i++) {
    if (Hier_Field_props<i>.isLookup()) {     
                                  lookup_field = (LookupFieldProperties) Hier_Field_props<i>;
         lookupTableSchema =repository_schema.getTableSchema(lookup_field.getLookupTableId());
                                  lookupFieldIDs = lookupTableSchema.getFieldIds();
         Supporting_result_dfn = new ResultDefinition(lookup_field.getLookupTableId());
         Supporting_result_dfn.setSelectFields(lookupFieldIDs);
         list.add(Supporting_result_dfn);
    com.sap.mdm.search.Search hier_search =new com.sap.mdm.search.Search(Hier_TId);
    ResultDefinition Hier_Resultdfn =     new ResultDefinition(Hier_TId);
    Hier_Resultdfn.setSelectFields(rep_schema.getTableSchema(Hier_TId).getDisplayFieldIds());
    ResultDefinition[] supportingResultDefinitions =
    (ResultDefinition[])list.toArray(new ResultDefinition [ list.size() ]);
    RetrieveLimitedHierTreeCommand retrieve_Hier_tree_cmd =
    new RetrieveLimitedHierTreeCommand(conn_acc);
    retrieve_Hier_tree_cmd.setResultDefinition(Hier_Resultdfn);
    retrieve_Hier_tree_cmd.setSession(Auth_User_session_cmd.getSession());
    retrieve_Hier_tree_cmd.setSearch(hier_search);
    retrieve_Hier_tree_cmd.setSupportingResultDefinitions(supportingResultDefinitions);
    try {
         retrieve_Hier_tree_cmd.execute();
    } catch (CommandException e5) {
              // TODO Auto-generated catch block
              e5.printStackTrace();
    HierNode Hier_Node = retrieve_Hier_tree_cmd.getTree();
    print(Hier_Node,1);
    //method print()
    static private void print(HierNode node, int level) {
    if (!node.isRoot()) {
         for (int i = 0, j = level; i < j; i++) {
              System.out.print("\t");
         System.out.println(node.getDisplayValue());
    HierNode[] children = node.getChildren();
    if (children != null) {
              level++;
    for (int i = 0, j = children.length; i < j; i++) {
    print(children<i>, level);
    //end method print()
    Best regards,
    Arun prabhu S
    Edited by: Arun Prabhu Sivakumar on Jul 7, 2008 12:19 PM

  • [E2010][EWS-XML][JAVA]How to get the properties of meeting rooms in Exchange 2010 using EWS Java API

    When you look at meeting room properties in Outlook 2010, you can see 'City', 'Country/Region' and 'Department' information.
    Is there any way to get this information using EWS Java API? 

    Hi Glen,
    I am able to understand what u have said, but do not know how to implement it with meeting rooms....
    If i am implementing
    "Get all appointments between startDate and endDate in the specified folder, including recurring meeting occurrences" in ews-java-api, as you have mentioned above, i am able to get only my appointments from the start date to end date , as i
    have given my email id and password, how to get my organization meeting room details, booked or not.
    static ExchangeService service = new ExchangeService(ExchangeVersion.Exchange2010_SP2);
    public static void main(String[] args) throws Exception {
    // TODO Auto-generated method stub
    ExchangeCredentials credentials = new WebCredentials("[email protected]", "zzzz");
    service.setCredentials(credentials);
    try {
    System.out.println("Check");
    service.autodiscoverUrl("[email protected]",new RedirectionUrlCallback());
    } catch (Exception e) {
    // TODO Auto-generated catch block
    e.printStackTrace();
    NameResolutionCollection nameResolutions = service.resolveName("SDB1",ResolveNameSearchLocation.DirectoryOnly, true);
    System.out.println("nameResolutions==="+nameResolutions.getCount());
    for(NameResolution nameResolution : nameResolutions)
    System.out.println("NAME==="+nameResolution.getContact().getDisplayName());
    The above code gives me the output like, the meeting room in my organization with word SDB1 are
    Output:
    nameResolutions===2
    NAME===SDB1- TELCON - 1
    NAME===SDB1-TELCON - 2
     for. eg. I need to know today at what are the appointments in the room SDB1-TELCON2 and who all have booked the room.
    I do not know how to implement for the meeting room can you please help me how to give it.
    Thanks in advance.

  • Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

    Hi all,
    When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
    I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
    Environment:
    The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
    Version: 3.4.1".
    i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
    The Jars i added in the classpath:
    adobe-forms-client.jar
    adobe-livecycle-client.jar
    adobe-usermanager-client.jar
    adobe-utilities.jar
    ejb.jar
    j2ee.jar
    ecutlis.jar
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    server.jar
    utlis.jar
    wsexception.jar
    My code is :
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
    ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
    //Create a FormsServiceClient object
    FormsServiceClient formsClient = new FormsServiceClient(myFactory);
    //Get Form data to pass to the processFormSubmission method
    Document formData = new Document(req.getInputStream());
    //Set run-time options
    RenderOptionsSpec processSpec = new RenderOptionsSpec();
    processSpec.setLocale("en_US");
    //Invoke the processFormSubmission method
    FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
    List fileAttachments = formOut.getAttachments();
    Iterator iter = fileAttachments.iterator();
    int i = 0 ;
    while (iter.hasNext()) {
    Document file = (Document)iter.next();
    file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
    short processState = formOut.getAction();
    ...... (To the end of the sample)
    My Error was:
    com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
    at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
    at HandleData.doPost(HandleData.java:62)
    at HandleData.doGet(HandleData.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    a

    I assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
    Do the following test:
    - Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
    - Ping machine1 from machine1 and note the ip address.
    The two pings should match.
    - Ping machine2 from machine1 and note the ip address.
    - Ping machine2 from machine2 and note the ip address.
    The two pings should match.
    Usually this kind of error would happen if your servers have internal and external ip addresses.

  • Problem with creating customer account using TCA Java API

    Hi,
    I am trying to create customer account using TCA java API. i am getting exception saying PL/SQL numeric error: character to number conversion. but this error raises when calling API method
    HzCustAccountV2Pub.createCustAccount.
    can any body help me in solving this issue, any clue why this exception raises. i have tested even the code given in TCA API user guide. that code also gets same error.

    package client;
    import java.math.BigDecimal;
    import java.sql.Timestamp;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    import oracle.jdbc.driver.OracleConnection;
    import oracle.jdbc.driver.OracleCallableStatement;
    import oracle.jdbc.driver.OracleTypes;
    import oracle.apps.ar.hz.v2api.HzCustAccountV2Pub;
    import oracle.apps.ar.hz.v2api.HzPartyV2Pub;
    import oracle.apps.ar.hz.v2api.HzCustomerProfileV2Pub;
    class CreateCustAccount {
         public static void main(String[] args) throws Exception {
         HzCustAccountV2Pub.CustAccountRec p_cust_account_rec = new HzCustAccountV2Pub.CustAccountRec();
         HzPartyV2Pub.PersonRec p_person_rec = new HzPartyV2Pub.PersonRec();
         HzCustomerProfileV2Pub.CustomerProfileRec p_customer_profile_rec = new      HzCustomerProfileV2Pub.CustomerProfileRec();
         BigDecimal[] x_cust_account_id = new BigDecimal[1];
         String[] x_account_number = new String[1];
         BigDecimal[] x_party_id = new BigDecimal[1];
         String[] x_party_number = new String[1];
         BigDecimal[] x_profile_id = new BigDecimal[1];
         String[] x_return_status = new String[1];
         BigDecimal[] x_msg_count = new BigDecimal[1];
         String[] x_msg_data = new String[1];
         try
         Class.forName ("oracle.jdbc.driver.OracleDriver");
         OracleConnection conn = (OracleConnection) DriverManager.getConnection ("jdbc:oracle:thin:@ebiztst.trianz.int:1526:PATCH","apps","apps");
         HzCustAccountV2Pub custaccountV2Pub = new HzCustAccountV2Pub();
         p_cust_account_rec.account_name = "John Ac";
         p_person_rec.person_first_name = "John";
         p_person_rec.person_last_name = "Smith";
         p_cust_account_rec.created_by_module = "TCA_EXAMPLE";
         HzCustAccountV2Pub.createCustAccount(
         conn
         , "T"
         , p_cust_account_rec
         , p_person_rec
         , p_customer_profile_rec
         , "F"
         , x_cust_account_id
         , x_account_number
         , x_party_id
         , x_party_number
         , x_profile_id
         , x_return_status
         , x_msg_count
         , x_msg_data
         System.out.println( "x_return_status = " + x_return_status[0] );
         System.out.println( "x_msg_count = " + x_msg_count[0] );
         System.out.println( "x_msg_data = " + x_msg_data[0]);
         if (x_msg_count[0].intValue() > 1) {
              OracleCallableStatement ocs = null;
              for (int i=0; i<x_msg_count[0].intValue(); i++) {
              ocs = (OracleCallableStatement)conn.prepareCall(
              "begin ? := fnd_msg_pub.get( p_encoded => ’F’ ); end;");
              ocs.registerOutParameter(1, OracleTypes.VARCHAR);
              ocs.execute();
              System.out.println((i + 1) + ". " + ocs.getString(1));
              conn.close();
              } catch (ClassNotFoundException e) {
              System.out.println("Driver Not Found: " + e);
              } catch (SQLException e) {
              System.out.println("SQL Error." + e);
    }

  • Java API's supported in the Jdeveloper, IAS, and RDBMS product components

    If there are any technical errors or "mistatement of the facts" in this posting, please let me know about them ..
    This article is being delivered in Draft form and may contain
    errors. Please use the MetaLink "Feedback" button to advise
    Oracle of any issues related to this article.
    PURPOSE
    This article describes the "Enterprise Java Beans" (EJB), "Java Server Pages"
    (JSP) and servlets Application Programming Interfaces (API) supported by the
    Oracle products, Jdeveloper, Internet Application Server (IAS) and the Oracle
    RDBMS release 2 and release 3, also known as Version 8.1.6 and 8.1.7,
    respectively.
    SCOPE & APPLICATION
    All parties interested in the Java API's supported by these products.
    Java API's supported in the Jdeveloper, IAS, and RDBMS product components
    JDEVELOPER
    JDEVELOPER is Oracle's Java development tool designed for coding / development,
    testing / debugging, and deployment of Java Applications to the IAS and
    RDBMS platforms.
    With the java software api's being in a constant state of evolution, each new
    release of Jdeveloper adds support for the "then current" version of the java
    software api's, if it does not already have it implemented.
    JDEVELOPER SERVLET API JSP API EJB API
    VERSION VERSION VERSION VERSION
    3.2.X.X 2.2 1.1 1.1
    3.1.X.X 2.1 1.0 1.0
    NOTE :
    Sun Microsystems and their advisory teams (Oracle is on it) is working on
    "draft" specifications for the next version of all of these API's
    EJB -------> http://java.sun.com/products/ejb/index.html
    JSP -------> http://java.sun.com/products/jsp/index.html
    Servlets --> http://java.sun.com/products/servlet/?frontpage-javaplatform
    It is anticipated that future releases of Jdeveloper will continue to be
    upgraded to include support for the next version of each api.
    To obtain the latest information on Oracle's Internet Development Suite (IDS)
    of tools, please review the "Internet Developer Suite" information located
    on Oracle's technet web site at :
    http://technet.oracle.com/products/index.htm
    IAS
    IAS is Oracle's next evolution of the web server and application server
    product technology superceeding the Web Application Server (WAS) and Oracle
    Application Server (OAS) product lines.
    IAS SERVLET API JSP API EJB API EJE VERSION
    VERSION VERSION VERSION VERSION SUPPORTED
    9I(1.0.2) 2.2 1.1 1.1 817
    8i(1.0.1-NT) 2.0 1.0 1.0 816
    8i(1.0.0-UNIX) 2.0 1.0 1.0 816
    The IAS product contains two Java Virtual Machines (JVM) within it's
    architecture.
    They are called :
    1) APACHE JSERV servlet engine
    2) ORACLE ENTERPRISE JAVA ENGINE (EJE)
    APACHE JSERV servlet engine
    The APACHE JSERV servlet engine is an EXISTING product licensed from the
    apache group which supports the servlet api 2.0.ONLY.
    The APACHE JSERV product does not support ANY JSP's unless the customer
    installs a third party jsp engine.
    The IAS 8i/9i which has the APACHE JSERV product embedded in it, comes with
    Oracle's JSP engine (OJSP) already integrated into it. OJSP supports JSP's up
    to the specific JSP engine version documented in the Oracle Universal
    Installer (OUI) for the 8.1.7 RDBMS or the IAS products. It is also documented
    in the product's release notes.
    Oracle ENTERPRISE JAVA ENGINE (EJE)
    The EJE formerly known as :
    1) Oracle 8i Java Virtual Machine (JVM)
    2) JSERVER component,
    3) Aurora JVM
    was originally releas ed in the RDBMS 8.1.5 database with jdk 1.1.6 based java
    support.
    The currently supported versions of the Oracle 8i RDBMS, versions 2 and 3,
    also known as Version 8.1.6 and 8.1.7, respectively, provides a jdk 1.2.1
    based java virtual machine support.
    "EJE" Version 816
    This EJE, found in rdbms 8.1.6 and IAS 8i, contains support for the ejb
    api 1.0, corba, and java stored procedures.
    "EJE" Version 817
    This EJE, found in rdbms 8.1.7 and IAS 9i, contains support for the ejb,
    corba, and java stored procedures as well as the Oracle Servlet Engine (OSE)
    which provides support for the servlets 2.2 api and JSP 1.1 api.
    Note :
    EJB support in the "EJE" Version 817 has been upgraded to comply with the EJB
    1.1 api specification which includes "entity beans" support.
    What is the bottom line ??
    1) Servlets deployed to the APACHE JSERV must comply with servlet api 2.0.
    2) Servlets 2.1 or higher are only supported in EJE's OSE component found in
    the rdbms 817 or ias 9i products. Servlets api 2.0 can also run in the OSE.
    References
    1) "Oracle9i Application Server Technical White Paper" located at :
    http://technet.oracle.com/products/ias/pdf/9ias_102.pdf
    2) "Whats New? Oracle8i JVM Accelerator, Oracle Servlet Engine, OracleJSP ..."
    located at :
    http://technet.oracle.com/products/oracle8i/pdf/504.pdf
    3) "Oracle8i Release 3 New Features Summary" located at :
    http://technet.oracle.com/products/oracle8i/pdf/8iR3_nfs.pdf
    null

    which jvm is used by jserv ?? EJE or a separate jdk ?
    The Jserv servlet engine is running in a separate jdk JVM external to the EJE jvm which is embedded within the "database" component of ias and the RDBMS.
    See the reference below for more details ...
    if jserv only support old apis, why it is in oracle's products ?
    i would assume that the oracle servlet engine was under development when ias 8i was released and became available in time for the ias 9i and rdbms 817 products.
    looking back in history leads me to believe ias 8i was a migration path to get to ias 9i or rdbms 817.
    Based upon the long history of new releases of every oracle product being upgraded with new features, it's reasonable to assume that these products will continue to evolve.
    when I deploy a jsp how to deploy in the right servlet container ("EJE") ?
    as documented in the reference below, you can deploy JSP's to either the apache jserv jvm or the EJE since the ORACLE JSP engine functionality is in both jvm's.
    there are many posts where you can see that people have deploy in jserv and they have problems because they don't use the right container (servlet 2.0 instead of
    servlet 2.2) http://technet.oracle.com:89/ubb/Forum2/HTML/006349.html
    when ias 8i came out this was clearly an issue since servlet support was at api 2.0, and the current servlet api was probably at 2.1.
    oracle clearly made every effort to get ias 9i released quickly to supply a servlet 2.1 and 2.2 capable engine to resolve this issue.
    since ias 9i and rdbms 8.1.7 are available this is no longer an issue.
    The reference below explains the architecture and understanding it would eliminate a lot of "deploy to the wrong ias 9i component" issues.
    so why jserv is bundled with oracle 8i/9ias since EJE support the right api version ?
    if in ias 9i release , oracle had removed the jserv component without any advance warning, many customers would have been very upset since oracle makes every attempt to give advance notice before removal of functionality.
    References
    1) "Oracle9i Application Server Technical White Paper" located at :
    http://technet.oracle.com/products/ias/pdf/9ias_102.pdf

  • Attachments using MDM java API

    Hi
    How to store attachments in MDM repository using MDM java API.
    Could you please suggest us.
    Thanks
    Sowmya

    Hi Sowmya,
    You can store attachments using MDM Java API. You can use the following piece of code.
    BinaryBlobRecord record2 = RecordFactory.createEmptyBinaryObjectRecord(tableID);
    //Attachment to be saved
    String filePath = wdContext.currentContextElement().getVa_Resource().getUrl(0);
    IWDResource resource = wdContext.currentContextElement().getVa_Resource();
    FileInputStream stream = (FileInputStream)resource.read(true);
    int length = 0;
    while(stream.read() != -1)
         length++;
    byte[] b = new byte[(int) length];
    stream.read(b);
    stream.close();
    record.setName(new StringValue("filename"));
    record.setOriginalName(new StringValue("filename"));
    record.setHasOriginal(new BooleanValue(true);
    RetrieveGroupTreeCommand groupTreeCommand = new    RetrieveGroupTreeCommand(wdContext.currentContextElement().getVa_ConnectionStr());
    groupTreeCommand.setSession(wdContext.currentContextElement().getVa_SessionID());
    groupTreeCommand.setGroupType(GroupTypes.DATA_GROUP_TYPE);
    groupTreeCommand.execute();
    //Set data location and data group ID
    record.setDataLocationId(new GroupNodeId("GN2"));
    record.setDataGroupId(new GroupNodeId("GN2"));
    record.setBinary(new BinaryValue(b));
    CreateRecordCommand createRecComm =
                             new CreateRecordCommand(wdContext.currentContextElement().getVa_ConnectionStr());
    createRecComm.setSession(wdContext.currentContextElement().getVa_SessionID());
    createRecComm.setRecord(record);
    createRecComm.execute();
    //Link this record to the main table record
    Record QRec = RecordFactory.createEmptyRecord(mainTable);
    //Setting the above created record in main table record object
    QRec.setFieldValue(attachmentField, new LookupValue(record.getId()));
    CreateRecordCommand createRecComm =
                        new CreateRecordCommand(wdContext.currentContextElement().getVa_ConnectionStr());
    createRecComm.setSession(wdContext.currentContextElement().getVa_SessionID());
    createRecComm.setRecord(QRec);
    createRecComm.execute();
    Now the main table record is created with an attachment.
    Hope this helps you.
    Regards,
    Sruti

  • Code Sample: Easy RFC Lookup From XSLT Mappings Using a Java Helper Class

    Hi everyone,
    This is just a shameless plug for my article: <a href="https://www.sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/05a3d62e-0a01-0010-14bc-adc8efd4ee14">Easy RFC Lookup From XSLT Mappings Using a Java Helper Class</a>. I hope you're interested in reading it, and I welcome your comments in this thread.
    Kind regards,
    Thorsten

    Hi Stefan. Thanks for your post. I have already done that. It still does not work. As a base for my java helper class I have usesd Thorstens code.
    The problem is quite confusing. I will try to ouline both issues here.
    First of all, when try to test from within the Operation Mapping, I always get a java error saying it cannot find the communication channel (it is there and working because I have tested it with the RFCLookup in graphical mapping). I have found a way to work around this, and that is to uncheck the "Use SAP XMLToolkit" checkbox --> switch to test tab, enter my ReceiverService in the parameter tab (header parameter) --> switch back to Definition tab, check the "Use SAP XMLToolkit" checkbox --> switch to Test tab and run the test. Then the XSLT and call to java helper class will work. Of course this is not really something you want to do all the time. Maybe there is a bug.
    Secondly, it never works when I try to do it "live". I am using a file adapter to pick up one file, convert it and a file adapter to drop the converted file. I get the following error code in SXMB_MONI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Request Message Mapping   -->
    <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
      <SAP:P1>ATJ_Accounting2XML_Accounting.xsl</SAP:P1>
      <SAP:P2>http://rd.accounting.logica.com</SAP:P2>
      <SAP:P3>fd552c30-bad9-11dd-9761-c21dac1b818c</SAP:P3>
      <SAP:P4>-1</SAP:P4>
      <SAP:AdditionalText />
      <SAP:Stack>TransformerConfigurationException triggered while loading XSLT mapping ATJ_Accounting2XML_Accounting.xsl; http://rd.accounting.logica.comfd552c30-bad9-11dd-9761-c21dac1b818c-1</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Using an XSLT without a call to a java helper class, works just fine.
    I am totally at a loss here. Any more input would be much appreciated.
    /Patrik

  • Can we use Essbase JAVA API in Hyperrion Planning

    Hi,
    I want to load data and extract data from Hyperion Planning applications. can i use Essbase Java APIs to do this Or is there any separate set of APIs available for Planning Applications ?
    Thanks a lot,
    Prince

    Hi John,
    I have following doubts regarding loading data to Hyperion planning by a custom connector
    1) Loading data to Hyperion Planning application using Essbase Java API would be possible at application layer (Hyperion Planning) or at database layer (loading data directly to essbase database) ?
    2) If we load data directly to essbase database how are we going to recognize which essbase server is connected with Hyperion Planning application ? Does user require to know in advance the underlying databse server ? Is there any API in Essbase or in Planning to connect to Planning application ?
    3) If we load data directly to essbase database how to find out Planning applications and essbase application ? In other words how to differentiate between essbase applications and Hyperion Planning appllications ? Or How to recognize Planning applications ? Is there any API in Essbase to find out this ?
    4) If we read data directly from Essbase how do we recognize data from a Planning application ?
    5) What is the difference between Classic planning application and EPMA planning application ? Can we develop a connector to work with both these flavour or type ?
    Please suggest.
    Thanks,
    Prince

  • Use MDM java Api for saving an image to mdm image table

    Hi experts
    I want to save an image from web dynpro java to MDM image table using java Api's
    Can anyone provide a code snippet .
    I am using MDM 7.1 sp6.
    Thanks and regards
    Suresh

    Hello Suresh
    Unfortunatly, this is no possible, i mean, to load images to mdm repository through JAVA API.
    Sure you can do it directly to database ( but for that you need to do saome investigation)
    Here you can found JAVA API classes for MDM:
    http://help.sap.com/javadocs/MDM71/
    Next two classes are working with BLOBs (pdf, images, video, etc.) in MDM repository:
    com.sap.mdm.blobs
    com.sap.mdm.blobs.commands
    Regards
    Kanstantsin chernichenka
    Edited by: kanstantsin_ch on Sep 8, 2011 2:36 PM

  • How to populate boolean fields using MDM Java API's

    Hi Experts!
    I am trying to populate Boolean fields in main table of my repository using MDM JAVA API SP 05 patch 2.
    Problem is i am geting syntax error for any value that i try to put in.
    Please provide me sample code for the purpose.
    Thanks in advance!

    Hi,
    Here is the code snippet to populate boolean values from Main Table in the Repository:
    Populating boolean values from Main Table in the Repository:
    wdContext.currentNodeElement().setABC(Boolean.valueOf((strABC).toString()).booleanValue());
    Putting boolean values in the main table:
    Record objEmptyRecord = RecordFactory.createEmptyRecord(new TableId(strTableId));
    boolean bFieldValue = ((Boolean)strABC).booleanValue();
    objEmptyRecord.setFieldValue(new FieldId(strFieldId),new
    BooleanValue(bFieldValue));
    Hope this helps.
    Regards
    Neha Sharma

  • Send a mail on other's behalf using EWS java api

    Hi ,
     I  am using EWS java API for delgate uses.
     I have added a delegate by using following code 
                                DelegateUser newDelegate = new DelegateUser("[email protected]");
       newDelegate.permissions.setInboxFolderPermissionLevel(DelegateFolderPermissionLevel.Editor);
       Mailbox mailbox = new Mailbox("[email protected]");
       ArrayList<DelegateUser> delegates = new ArrayList<DelegateUser>();
       delegates.add(newDelegate);
       service.addDelegates(mailbox, MeetingRequestsDeliveryScope.DelegatesAndMe, delegates);
      it got added sucessfully.
    Now i ([email protected]) am trying to send a mail to somebody won behalf of  "[email protected]".
    How to achive this using java EWS ?
    Below is the message object i have created.
                                    msg = new EmailMessage(service);
    msg.setSubject("Used EWS web services by deepak");
    msg.setBody(MessageBody
    .getMessageBodyFromText("Sent using the EWS Managed API."));
    msg.getToRecipients().add("[email protected]");

    Hi,
    Actually, we have a dedicated support team regarding the Microsoft Exchange Server Development. I recommend you ask your question about EWS java API on our Exchange Server Development forum which is staffed by more experts specializing in this kind of problems.
    For your convenience:
    http://social.technet.microsoft.com/Forums/exchange/en-US/home?forum=exchangesvrdevelopment
    Thanks for your understanding.
    Best regards,
    Amy
    Amy Wang
    TechNet Community Support

  • Use BPEL Java API in JDeveloper 10.1.3

    I am now trying to use JSF with BPEL.
    I found that the JDK version in BPEL10.0.2 is 1.4.2_06 and in JDevelpoer10.1.3 is 1.5.0_05.
    Can I use BPEL Java API (invoke , worklist...) in JDevelpoer10.1.3 ?
    Or I have to use Web Service proxy to invoke BPEL?
    Thanks
    Eron Yang.

    technically yes, from a jdk persectuve, nevertheless the 10.1.4 ormi stack needs to be patched to be able to work with 10.1.2.0.2 .. pls get the appropriate patch from metalink.. as desribed here at a friends blog ..
    http://blogs.oracle.com/olaf/2006/02/09
    hth clemens

Maybe you are looking for

  • Drag and Drop in JTabbedPane

    My problem is this. when you drag a file in jtabbedpane after it load, the drag and drop function are not working, instead it will only work when you add a tab in it, then you drag a file.

  • Typing hang ups on Iphone 3G??

    sometimes when I am typing texts or sending emails that the text is very far behind my typing and very slow to catch up. I usually hold down the home button to completly close the program within the Iphone. I even sometimes have to do a full reset (h

  • How to set properties in a loop in jsp

    I have a problem to set properties for beans in jsp this is part of my code: <jsp:useBean id="searchHandler" class="searchHandler.class" scope="session"> </jsp:useBean> <% String[] tempStr={"hello","you","happy"}; for(int i=0; i<tempStr.length; i++)

  • Guidlines for a "thread safe" library

    I am trying to use a 3rd party library for a communications board (ARINC).  I asked the vendor if the library is "thread-safe" since the application is multi-threaded.  He had indicated to me he didn't know how to create a thread-safe library.  Are t

  • Mail Reply/Forward Arrow Missing on Server Received/Sent Mail

    Since updating to Snow Leopard, Mail (4.1) does not show the reply or forward arrow after replying or forwarding mail received from/sent to any address on our server at work. All other answered/forwarded mail that does not originate from within my bu