Return a Data Holder Object from WS

Hi!
My colleagues at the other end of the office are building Web Services using .NET
and Visual Studio and I'm trying to beat them with Workshop. Most of the time I win
but I have one problem, that is returning objects. When I return objects from my
Web Service I'm forced to format the return XML myself via ECMA script. If I don't
do that my Web Service returns an empty xml message. The problem is that when calling
my WS from .NET it returns an XMLNode instead of an object. I would like my method
to return an object which could be used from .NET without manual conversion from
XML. Is this possible?
When I'm calling .NET Web Services which return an object I receive an object automatically
without manually converting XML to the actual object I want.
/Jesper

Hi!
My colleagues at the other end of the office are building Web Services using .NET
and Visual Studio and I'm trying to beat them with Workshop. Most of the time I win
but I have one problem, that is returning objects. When I return objects from my
Web Service I'm forced to format the return XML myself via ECMA script. If I don't
do that my Web Service returns an empty xml message. The problem is that when calling
my WS from .NET it returns an XMLNode instead of an object. I would like my method
to return an object which could be used from .NET without manual conversion from
XML. Is this possible?
When I'm calling .NET Web Services which return an object I receive an object automatically
without manually converting XML to the actual object I want.
/Jesper

Similar Messages

  • Problem with return a ColdFusion query object from a Java class

    Hi!
    I need to return a ColdFusion query object from a Java class
    using a JDBC result set ( java.sql.ResultSet);
    I have tried to pass my JDBC result set in to the constructor
    of the coldfusion.sql.QueryTable class with this code:
    ColdFusion code
    <cfset pra = createObject("java","QueryUtil").init()>
    <cfset newQuery = CreateObject("java",
    "coldfusion.sql.QueryTable")>
    <cfset newQuery.init( pra.getColdFusionQuery () ) >
    My java class execute a query to db and return QueryTable
    Java code (QueryUtil.java)
    import coldfusion.sql.QueryTable; // (CFusion.jar for class
    QueryTable)
    import com.allaire.cfx //(cfx.jar for class Query used from
    QueryTable)
    public class QueryUtil
    public static coldfusion.sql.QueryTable
    getColdFusionQuery(java.sql.ResultSet rs)
    return new coldfusion.sql.QueryTable(rs);
    but when i run cfm page and coldfusion server tries to
    execute : "<cfset pra =
    createObject("java","QueryUtil").init()>" this error appears:
    Object Instantiation Exception.
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    If i try to execute QueryUtil.java with Eclipse all it works.
    Also I have tried to return java.sql.ResultSet directly to
    coldfusion.sql.QueryTable.init () with failure.
    Do you know some other solution?

    ok
    i print all my code
    pratica.java execute a query to db and return a querytable
    java class
    import java.util.*;
    import java.sql.*;
    import coldfusion.sql.*;
    public class Pratica {
    private HashMap my;
    private String URI,LOGIN,PWD,DRIVER;
    private Connection conn=null;
    //funzione init
    //riceve due strutture converite in hashmap
    // globals
    // dbprop
    public Pratica(HashMap globals,HashMap dbprop) {
    my = new HashMap();
    my.put("GLOBALS",globals);
    my.put("DBPROP",dbprop);
    URI = "jdbc:sqlserver://it-bra-s0016;databaseName=nmobl";
    LOGIN = "usr_dev";
    PWD = "developer";
    DRIVER = "com.microsoft.sqlserver.jdbc.SQLServerDriver";
    try{
    // Carico il driver JDBC per la connessione con il database
    MySQL
    Class.forName(DRIVER);
    /* Connessione alla base di dati */
    conn=DriverManager.getConnection(URI,LOGIN,PWD);
    if(conn!=null) System.out.println("Connection Successful!");
    } catch (ClassNotFoundException e) {
    // Could not find the database driver
    System.out.print("\ndriver non trovato "+e.getMessage());
    System.out.flush();
    catch (SQLException e) {
    // Could not connect to the database
    System.out.print("\nConnessione fallita "+e.getMessage());
    System.out.flush();
    //funzione search
    //riceve un hash map con i filtri di ricerca
    public QueryTable search(/*HashMap arg*/) {
    ResultSet rs=null;
    Statement stmt=null;
    QueryTable ret=null;
    String query="SELECT * FROM TAN100pratiche";
    try{
    stmt = conn.createStatement();// Creo lo Statement per
    l'esecuzione della query
    rs=stmt.executeQuery(query);
    // while (rs.next()) {
    // System.out.println(rs.getString("descrizione"));
    catch (Exception e) {
    e.printStackTrace();
    try {
    ret = Pratica.RsToQueryTable(rs);
    } catch (SQLException e) {
    e.printStackTrace();
    this.close();
    return(ret);
    // ret=this.RsToQuery(rs);
    // this.close(); //chiude le connessioni,recordset e
    statament
    //retstruct CF vede HashMap come struct
    //METODO DI TEST
    public HashMap retstruct(){
    return(my);
    //conversione resultset to querytable
    private static QueryTable RsToQueryTable(ResultSet rs)
    throws SQLException{
    return new QueryTable(rs);
    //chiura resultset statament e connessione
    private void close(){
    try{
    conn.close();
    conn=null;
    catch (Exception e) {
    e.printStackTrace();
    coldfusion code
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01
    Transitional//EN">
    <html>
    <head>
    <title>Test JDBC CFML Using CFScript</title>
    </head>
    <body>
    <cftry>
    <cfset glb_map =
    createObject("java","java.util.HashMap")>
    <cfset dbprop_map =
    createObject("java","java.util.HashMap")>
    <cfset glb_map.init(glb)> <!---are passed from
    another page--->
    <cfset dbprop_map.init(glb["DBPROP"])>
    <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    <cfset ourQuery
    =createObject("java","coldfusion.sql.QueryTable").init(pra.search())>
    <cfcatch>
    <h2>Error - info below</h2>
    <cfdump var="#cfcatch#"><cfabort>
    </cfcatch>
    </cftry>
    <h2>Success - statement dumped below</h2>
    <cfdump var="#ourQuery#">
    </body>
    </html>
    error at line <cfset pra =
    createObject("java","Pratica").init(glb_map,dbprop_map)>
    An exception occurred when instantiating a java object. The
    cause of this exception was that: coldfusion/sql/QueryTable.
    -----------------------------------------------------------------------

  • Can i return an Array of Objects from c++ to java ??

    hello all,
    Can i return an Array of Objects from c++ to java ??
    If so how is it possible ??
    regards,
    gautam

    I suggest you look into the JNI, Java Native Interface. The answer is yes.

  • Is it possible to return an array of objects from a web service?

    I have been trying to do this for a while now, and I have come to the conclusion that it may be impossible. To demonstate what I want to do I enclose a simple java file [1]. I have deployed this with Axis 2 and I enclose the responce [2], it is obciously not wat I want.
    Is it porrible to do this? If so, how?
    Thanks for any help,
    [1]
    package org.impress;
    public class SampleObject {
         public SampleElement[] noParameters(){
              SampleElement[] retArray = new SampleElement[2];
              retArray[0] = new SampleElement();
              retArray[0].name = "one";
              retArray[0].value = "alpha";
              retArray[1] = new SampleElement();
              retArray[1].name = "two";
              retArray[1].value = "beta";
              return retArray;
         public class SampleElement {
              public String name;
              public String value;
    }[2]
    <ns:noParametersResponse>
         <ns:return type="org.impress.SampleObject$SampleElement"/>
         <ns:return type="org.impress.SampleObject$SampleElement"/>
    </ns:noParametersResponse>

    Hi
    Can anybody help me with the code of how to return a resultset from a web service. i have put the resultset data's in an object array and tried to return it, but in the client side no data comes ,,, i mean it is printed as null.... and plz tell me where to specify the return type of a object in the wsdl file....
    thanks..

  • How to return more than one object from SwingWorker

    I am using a SwingWorker to call 3 different methods of another class (data fetch class). Each of these 3 methods returns a String array. I am able to get the first array outside the thread code using the get() method of the SwingWorker class,
    final String tmpOrdNum = OrderNum;
    SwingWorker worker = new SwingWorker() {
         DATA_FETCH_TO_ARRAY data_fetch = new DATA_FETCH_TO_ARRAY(tmpOrdNum);
         public Object construct(){
              String [] orderArr = data_fetch.getHeaderArray();
              //String [] detailArr = data_fetch.getDetailArray();
              //String [] storeArr = data_fetch.getStoreArray();                    
              return orderArr;
         //Runs on the event-dispatching thread.
         public void finished(){     }
    worker.start() ;
    String[] testArr = (String[])worker.get();      //gets the header array
    /* HOW DO I GET THE DETAIL AND STORE ARRAYS HERE?*/I want to be able to call the other 2 methods of the data fetch class - getDetailArray() and getStoreArray() shown commented in the above code one by one.
    Can someone please suggest a way of doing this? Thank you.

    Return String[][] from construct method.
    Here is an example (observe test method):
    import java.util.*;
    public class ArrayTest{
         public static void main(String[] args){
              String[][] result=(String[][])new ArrayTest().test();          
              System.out.println("result1: "+Arrays.toString(result[0]));
              System.out.println("result2: "+Arrays.toString(result[1]));
              System.out.println("result3: "+Arrays.toString(result[2]));
         public Object test(){
              String[] str1={"A","B","C"};
              String[] str2={"M","N","O"};
              String[] str3={"X","Y","Z"};          
              String[][] out=new String[3][];
              out[0]=str1;
              out[1]=str2;
              out[2]=str3;
              return out;
    }Thanks,
    Mrityunjoy

  • Master Data Vendor Object access from RFX

    HI all,
    I am trying to access Master Data Vendor object form RFx. I was able to find a method to get the Vendor reference from Master Agreement using doc.getVendorRef().But i don't find any direct method to get VendorReference from RFx.
    Basically i got the Vendorlist from RFX using getVendorList() method (it returns RfxVendorIBeanIfc)and able iterate and get the each supplier. But unable to access Master Data Vendor Object. My requirement is need to access Master Data Vendor object from Rfx. Since RFx has multiple suppliers.
    i am unable to access Master Data Vendor Object. its throwing exception.
    Code is as Follows:
    rfxDocHome = IBeanHomeLocator.lookup(session, RfxDocIBeanHomeIfc.sHOME_NAME);
            rfxDocBean = rfxDocHome.find(doc.getObjectReference());
    vendCol = rfxDocBean.getVendorList(); 
         itr = vendCol.iterator();
                 while(itr.hasNext()) {
                       rfxVendor = itr.next();
    mdVendHome =  IBeanHomeLocator.lookup(session,VendorIBeanHomeIfc.sHOME_NAME);
                   mdVendBean =mdVendHome.find(rfxVendor.getDocumentId());
    Thanks,
    Jali Reddy

    Hi,
    Please brief me in details.
    My observation - First the Vendor is in nature of A, over a period of time he migrated to nature B,
    Onething i can tell u that please add one more field in the output screen from there you can sort it.
    Shiv

  • Returning object from stored procedures

    I am having a lot of trouble finding an example to demonstate how I return a Java/DB Object from a Java Stored Procedure. All the examples I have been able to find return one of the native types (VARCHAR, NUMBER, etc). As an example...
    public static DataPoint getPoint() {
      return new DataPoint(
          new Timestamp(System.currentTimeMillis()),
          new BigDecimal(50.0));
    Assuming DataPoint is a Java class mapped to an Oracle Data Type created via the following statement.
    create or replace type data_point as object (
      p_date date,
      p_data number
    After loading and publishing the procedure I get no (zero, 0) rows returned when calling. I should be getting one row returned.
    Thanks,
    Mike

    Mike,
    You said:
    Assuming DataPoint is a Java class mapped to an Oracle
    Data TypeI think your assumption is incorrect.
    In any case, isn't this what "TopLink" is used for?
    (I don't know, since I don't use "TopLink".)
    Have you tried the TopLink/JPA forum?
    Good Luck,
    Avi.

  • Client unable to get the javax.activation.DataHandler object from Server

    Hi All,
    I am trying to download the file from the server to the client using Javax.Activation.Data Handler object with IBM web services. But server always returning the Data Handler object is null. I am wondering why it is behaving like this.
    My requirement is add the file to the Data Handler object from the server and read the same from the client. But I am always getting Data Handler object is  null at the client place.
    Please see the client side code and server side code below.
    Server side Code:
    This is the simple web service method, its creating the Data Handler object and adding it to the Hash Map and returning the Hash Map object to the client.
    public Hashtable download()
              DataHandler dh = null;
              HashMap hashMap =new HashMap();
              try{
                   //Sample test files contains data
                   String downLoadFName="C:/ADP/downLoadData.txt";
                   //Creating the DataHandler Object with sample file
                   dh      =      new DataHandler(new FileDataSource(new File(downLoadFName)));
                   //Keeping the DataHandler object in the HashMap.
                   hashMap.put("DATAHANDLER",dh);
                   //keeping the sample test message object in the HashMap
                   hashMap.put("TEST","Keeping the DataHandler and test messages in the hashTable");                         
              }catch(Exception e){
                   logger.error("Error :while sending the data:"+e.getMessage(), e);
              //retrun the HashMap object to the client.
              return hashMap;
    Client Side Code:
    This is the simple client code, and connecting to the server and invoking the web service method
    //This is the client code,Just invoking the webservice method from the Webspehre server.
    public class WebserviceClient {
         static DocumentTransfer controller     =     null;
         public static void main(String args[]){     
                DocumentTransferService service          =     null;
              try{
                   //Creating the service Object
                   service               =     new DocumentTransferServiceLocator();
                   //Getting the Server connection
                    controller          =      (DocumentTransfer)service.getDocumentTransfer(new java.net.URL("http://localhost:9081/eNetsRuntimeEngine/services/DocumentTransfer"));
                    //Calling the download method from the server and it returns HashMap object.
                   HashMap hashMap     = controller.download();
                   //Getting the DataHandler Object from the HashMap
                    DataHandler dh=(DataHandler)hashMap.get("DATAHANDLER");
                   System.out.println("DATAHANDLER: :"+dh);
                   //Getting the String object from the HashMap.
                   String message=(String)hashMap.get("TEST");
                   System.out.println(": :"+message);
               }catch(Exception e){
                    System.out.println("Exception :Not able to get the file :"+e.getMessage());
    Could you please give me some inputs on this?
    Thanks in advance,
    Sreeni.

    Hi Stif,
    Thanks for your response.I did debug from server side,it has printing content of Data Handler properly.
    Also i have debug request and response messages using TCP/IP monitor(RAD environment has this feature).The response from the server is going proplery.
    But the client side Data Handler is coming null.
    Any advice or solution would be greatly appreciated.
    Thanks,
    Sreeni.

  • Managed Beans and Data Access Object

    I have a question / need help understanding how to configure backing bean and model objects so that memory and object creation/deletion is done as efficiently as possible.
    1. I have a .jsf page with a form and a commandbutton that submits the form inputs to a backing bean (enrollispbean is backing bean)
    <h:commandButton value="Enter" action="#{enrollispbean.insert}"/>
    2. The backing bean is used for form handling - the insert() method is used to read the data fields from the form and create a SQL string that will be submitted to a model object, DbInsert, that is used as a generic data access object that connects to the database and insert the SQL string:
    public class EnrollIspBean {
    private String beanvar1="";
    private String beanvar2= "";
    // DbInsert is data access object
    private DbInsert dbinsert = new DbInsert();
    public String insert (){
    String sqlstmt;
    sqlstmt = "INSERT INTO ispmain VALUES(beanvar1, beanvar2,..)"
    dbinsert.insert(sqlstmt);
    return "success"; }
    3. DbInsert is the data access object that contains a method, insert(), that accepts a sql string to insert into the database. This method contains the code to obtain a connection from the database connection pool and then execute the sql statement (note: error checking code not shown):
    public class DbInsert {
    public void insert(String sqlstmt) throws SQLException {
    Connection conn = null;
    GetDBConnection getdbconnection = new GetDBConnection();
    PreparedStatement stmt = null;
    conn = getdbconnection.getdbconn();
    stmt = conn.prepareStatement(sqlstmt);
    stmt.executeUpdate();
    stmt.close();
    conn.close();
    return;
    Where I need help understanding is how to set up the scope for the managed beans and data access object. Currently, I have the backing bean within the session scope (using the facesconfig.xml file). My main question is how to set up the scope for the Data Access Object - currently I do not have it as a managed bean within facesconfig.xml. Instead I am creating a new instance within the backing bean:
    private DbInsert dbinsert = new DbInsert();
    Is this the best way to do this? Will the DBInsert object now be tied to the session scope of the backing bean (i.e., when backing bean is deleted, the DbInsert object will be deleted from session scope as well.)
    Ideally I would like the data access object to be available as a shared object throughout the life of the application. When I was programming using a servlet approach, I would have created a servlet to load on startup. Now that I'm using java server faces, I'm confused about the scope / how to efficiently set up a data access object that I want to be available to all backing beans in the application.
    tnanks for any help understanding this.
    Tom

    I was thinking about setting the data access object as application scope so that it can be used by an backing bean to execute sql statements.
    If I do set it as application scope, however, if I do this, do I still need to declare a new instance of the object from within each bean that uses the object?
    For example do I need to declare a new instance of the data access object from within the bean? or, should I assume that there is always an instance of the bean available in the application scope, and if so, how do I reference it from within the bean?
    Bean Code:
    public class EnrollIspBean {
    // DbInsert is data access object
    private DbInsert dbinsert = new DbInsert();
    Finally, I understand performance may be an issue if I have one instance of the data access object available in the application scope - is there a way to make multiple instances available in the application scope?
    thanks

  • Error while Data Store Object  activation

    Dear Guru's
        I'm new to BI 7.......
        I'm trying to load data to Data Store Object from PSA through DTP and it was successful upto newdata table. But while activating the request to active table the total status of the request turned as red and in DETAILS all the messages were in green.
        Kindly let me know what could be the problem.
    Surely points will be awarded
    thanks in advance.....
    with regards,
    Viswa

    Dear KK,
    Here I printed the log pls go theough it..
    Job started
    Step 001 started (program RSDELPART1, variant &0000000000000, user ID 160624)
    Delete is running: Data target ZIC_EX1, from 57 to 57
    FB RSM1_CHECK_DM_GOT_REQUEST called from PRG RSDELPART1; row 000875
    Request '57'; DTA 'ZIC_EX1'; action 'D'; with dialog 'X'
    Leave RSM1_CHECK_DM_GOT_REQUEST in row 70; Req_State ''
    Overall status 'Red' (user 160624)
    Incorrect data could be visible in Reporting (see long text)
    Status transition 2 / 3 to 9 / 9 completed successfully
    SQL: 15.05.2007 13:26:26 160624
    ALTER TABLE "/BIC/B0000161000" TRUNCATE PARTITION
    "/BIC/B00001610000000000002"
    SQL-END: 15.05.2007 13:26:26 00:00:00
    Request DTPR_6K1ZWLCJLY9ZF4NLHC91N1J10 deleted from PSA;REQICODS entry also deleted
    Request DTPR_6K1ZWLCJLY9ZF4NLHC91N1J10 not found in IC ZIC_EX1;CODS also deleted
    Request DTPR_6K1ZWLCJLY9ZF4NLHC91N1J10 deleted from PSA;EQICODS entry also deleted
    Overall status 'Deleted' (user 160624)
    Delete is finished: Data target ZIC_EX1, from 57 to 57
    Job finished
    with regards
    Viswa

  • Download & Upload Data Dictionary objects

    Hi,
      Like we have utilities for downloading and uploading ABAP Reports, SAP Scripts & Dynpros; does anybody have some tool to download data dictionary objects from one system and uploading it onto another??
      Else we would have to use transports from source to destination - which is my fallback option.
      Any pointers to such tools would be highly appreciated.
    Thanks,
    Pramod

    Hi,
    Refer to below threads:
    How to Download Upload Dictionary Tables (No data)????
    Re: Upload/download DDIC Objects, FM, Classes ....
    Hope you find your solution here.
    Reward points for useful answers
    Rgds,

  • Data Access Objects (Wizard)

    Does SJSE 8 happen to have a wizard that allows you to use the database explorer and create Data Access Objects from tables? If not does anybody know of a good tool to do so. I will be working with IBM iSeries (DB2).

    I worked on a JDO runtime a long time ago during JDO's infancy, so I'm personally biased towards it . I like it because it allows you to treat your data objects as normal java objects instead of heavy-weight objects such as CMP beans. As I remember, the JDO runtime I worked on used byte code enhancer to inject code into your byte code to keep track of changes made by plain assignment statements. (Not sure if it works that way for other implementations.)
    You might want to check out the following link on SDN:
    http://java.sun.com/products/jdo/
    Also, there is FAQ on JDO vs. J2EE Persistence you should read before you make a decision:
    http://java.sun.com/j2ee/persistence/faq.html
    Good luck.

  • Return Date object from StoredProcedureCall

    Hi,
    I have a simple call to a StoredProcedure through toplink which returns date parameter. I want to know if I can retrieve a Timestamp or a Date object from executeQuery().
    I get a ClassCastException every time I do that. It works only if I retrieve it as a string. Am I doing something wrong? My code is as follows -
    Session session = getSessionFactory().acquireSession();
    StoredProcedureCall call = new StoredProcedureCall();
    call.setProcedureName("PROC_NAME");
    call.addNamedArgument("P_1");
    call.addNamedArgument("P_2");
    call.addNamedArgument("P_3");
    call.addNamedOutputArgument("P_TRX_DT");
    ValueReadQuery query = new ValueReadQuery();
    query.setCall(call);
    query.addArgument("P_1");
    query.addArgument("P_2");
    query.addArgument("P_3");
    Vector parameters = new Vector();
    parameters.addElement(govNum);
    parameters.addElement(areaCode);
    parameters.addElement(trxType);
    Timestamp trxDateTime = (Timestamp) session.executeQuery(query, parameters);
    Thanks

    In your call to call.addNamedOutputArgument("P_TRX_DT"); , you haven't specified the OUT type of of the arguement "P_TRX_DT". If you dont specify the type, it defaults to java.lang.String. you call should be something along the lines of
    Timestamp P_TRX_DT = null;
    call.addNamedOutputArgument("P_TRX_DT",  // parameter name in stored procedure i.e. the stored procedure should have an OUT parameter name that is exactly
                                                                    // same as P_TRX_DT
                                               "P_TRX_DT",  //arguement name (variable name represesenting the OUT value in java code i.e. declararion from above)
                                               java.sql.Timestamp // Java type that maps to the SQL type returned by the proc i.e. the OUT type map to java type
    //without the comments it should look like this
    call.addNamedOutputArgument("P_TRX_DT","P_TRX_DT",java.sql.Timestamp); Can you post your stored function as well. Also you may want to have a look @ http://www.oracle.com/technology/products/ias/toplink/doc/1013/MAIN/_html/qrybas004.htm. See how DatabaseRecord is used to capture the returned value

  • How to Include Warnings/Error messages in Return Service Data Object

    Hello All,
    I am using Jdeveloper 11.1.1.3.0, ADF BC. and want to publish Service-Enabled application modules, specifically I want to publish a custome method in the application module as a web service.
    While going through Enable support for Service Interface wizard as explained in developer guide, in step 7 I read this
    >
    7. To expose service information messages such as warnings and exceptions for a custom method or warnings for process operation methods, select Include Warnings in Return Service Data Object. For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    If Include Warnings is not selected, no informational messages will be returned with the service response. This option is only enabled when the method does not return a view row or a list
    of view rows. When the method returns view rows, the underlying view object determines whether the method supports warnings, as described Section 11.2.4, "How to Service-Enable Individual View Objects." The informational messages (and warnings) are reported as part of the return object. JDeveloper generates appropriate wrappers as the return objects, and the wrappers contain the actual method return and the informational messages.
    >
    I am interested in this part: For example, you might want display an informational message when a method returns the total employee compensation and the total is outside of the desired range.
    To do this, I write a method in the application module
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
           return first!=null ? first.getSalary() : null;
    }and I selected the Include Warnings in Return Service Data Object check box. but how and where can I expose the error or warning message?
    Note:
    I tried to throw an exception in the method
    public Number getEmpSal(Number empId){
            EmployeesViewImpl employeesView1 = this.getEmployeesView1();
            //this is the bind variable setter
            employeesView1.setEmpId(empId);
            employeesView1.executeQuery();
            EmployeesViewRowImpl first = (EmployeesViewRowImpl)employeesView1.first();
            if(first!=null && (first.getSalary()!=null || first.getSalary().compareTo(1000)==1))
                throw new JboException("out of range salary");
             return first!=null ? first.getSalary() : null;
    }and when I test the web service for some employee I get this response:
    <env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/">
    <env:Header/>
         <env:Body>
              <env:Fault>
                   <faultcode>env:Server</faultcode>
                   <faultstring>out of range salary</faultstring>
                   <detail><tns:ServiceErrorMessage xmlns:tns="http://xmlns.oracle.com/adf/svc/errors/" xmlns:xsi=      "http://www.w3.org/2001/XMLSchema-instance"><tns:code/><tns:message>out of range  salary</tns:message><tns:severity>SEVERITY_ERROR</tns:severity><tns:exceptionClassName>oracle.jbo.JboException</tns:exceptionClassName></tns:ServiceErrorMessage>
                   </detail>
              </env:Fault>
         </env:Body>
    </env:Envelope>but is this the right approach or there is another place to show error/warning messages?
    Edited by: Mohammad Jabr on Apr 16, 2012 1:17 PM

    This is fine if you raise exception from your code. It will be raised as a server fault only.

  • JSObject returns wrong date. How can I extract correct date from digital signature?

    I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and minute are correct, but only day is incorrect.
    Here is my code. I'm using Acrobat 8.1.3.
    Please tell me what's wrong with this code and how I can extract correct date from digital signatures.
    Public Sub sbTest()
    Dim oApp As Acrobat.acroApp
    Dim oPDDoc As Acrobat.AcroPDDoc
    Dim jso As Object
    Dim f As Object
    Dim sig As Object
    Dim strFileName As String
    Set oApp = CreateObject("AcroExch.App")
    Set oPDDoc = CreateObject("AcroExch.PDDoc")
    strFileName = "C:\Test.pdf"
    If (oPDDoc.Open(strFileName)) Then
    Set jso = oPDDoc.GetJSObject
    Set f = jso.getField("Signature1.0")
    Set sig = f.signatureInfo()
    Debug.Print sig.Name
    Debug.Print sig.Date
    End If
    Call oPDDoc.Close
    Call oApp.Exit
    End Sub

    Hi
    You can use TDMS file format to save the data. I have attached a reference Vi.
    On button click you can log the data or remove the case structure and continuous log the complete acquisition data.
    Thanks and Regards
    Himanshu Goyal
    Thanks and Regards
    Himanshu Goyal | LabVIEW Engineer- Power System Automation
    Values that steer us ahead: Passion | Innovation | Ambition | Diligence | Teamwork
    It Only gets BETTER!!!
    Attachments:
    Data Save in File.vi ‏35 KB

Maybe you are looking for