Proxy doesn't contain return value

Hi,
i have the following scenario: R/3(proxy) -> XI -> Webserivce(all interfaces are sync.)
i can see in the monitoring of XI that the webservice returns a value but this value is not passed to the proxy output parameter. The configuration is XI seems to be correct.
This is mijn code(i am not a abap person ):
The report should display a program name when the user submit a program code.
REPORT  Z_HATP_WOS.
PARAMETERS: code type Z_HATP_PROGRAMCODE.
DATA: proxy TYPE REF TO ZES_CO_MI_PROGRAM_INFO_OUT_SY.
DATA: request type ZES_MT_REQ_PROGRAM_INFO.
DATA: inputParams type ZES_DT_REQ_PROGRAM_INFO.
DATA: response type ZES_MT_RES_PROGRAM_INFO.
DATA: outputParams type ZES_DT_RES_PROGRAM_INFO.
inputParams-CODE = code.
request-MT_REQ_PROGRAM_INFO = inputParams.
TRY.
CREATE OBJECT PROXY
EXPORTING
   LOGICAL_PORT_NAME  =
CATCH CX_AI_SYSTEM_FAULT .
ENDTRY.
*TRY.
CALL METHOD PROXY->MI_PROGRAM_INFO_OUT_SY
  EXPORTING
    INPUT  = request
  IMPORTING
    OUTPUT = response.
CATCH CX_AI_SYSTEM_FAULT .
CATCH CX_AI_APPLICATION_FAULT .
*ENDTRY.
outputParams = response-MT_RES_PROGRAM_INFO.
write outputParams-title.
thanks very much,
Peter Ha

Hi Peter,
extend ur programm.
DATA: l_sys_exception    TYPE REF TO cx_ai_system_fault.
*...proxy call
catch CATCH CX_AI_SYSTEM_FAULT into l_sys_exception.
write: l_sys_exception->errortext.
to see the error.
Regards,
Udo

Similar Messages

  • MB52 doesn't show return quantyties values

    Dear experts
    After sales return, the qty shows under 'Returns'. But in MB51, corrosponding values are not shown under any column. can anybody guide on this issue, where i can see the return qty values? or in sap, return values doesn;t show in MB51?
    Thanks
    Venugopal

    Hi,
    This looks like a bug. A workaround is to set snapInterval=.1 as well as stepSize. Could you please log a bug on https://bugs.adobe.com/flex/?
    Thanks,
    -Kevin

  • Execution flow doesn't wait for return values

    I have created JNI wrappers for existing dlls. However I'm getting weird behavior. My Java function calls a c function which communicates with an old mainframe. If I retrieve one row at a time its fine but if I do a loop the virtual machine crashes. Sometimes, if I add an empty loop for (30000 iterations) then its fine. Its like java is already trying to retrieve the next row while the first row is still being printed on my screen. I've tried adding synchronized in case the dlls where multi-threaded but it has not made a difference. Is there any way to control the execution flow so that it can't go to the next line until the values are truly returned from the c dll.
    thanks
    MA

    There are many function being called on the native side. Since I didn't want to modify the native side
    (because the old dlls are used by another application), I added my own dll as an intermediary between the old c dlls and the java side.
    To fix the problem I am having, I've heard of another project where the native side would write the returned values to a file and only once the file is written can the Java side continue. Is this the only way to control the execution flow?
    Right now I have about 5 empty loops which run to 100000 and things work most of the time. But I would prefer to find a way to say wait until the values are returned correctly.
    Essentially, what I'm doing is
    for (int i=1;i<10; i++){
       test.init(Integer.toString(i),Integer.toString(i),"english desc"+  Integer.toString(i),"french desc"+ Integer.toString(i));
       test.execute(test.ActionAdd);
    }This is supposed to add one row with four fields. I'm just putting junk for the test. If I call the two main lines
    test.init(Integer.toString(i),Integer.toString(i),"english desc"+  Integer.toString(i),"french desc"+ Integer.toString(i));
    test.execute(test.ActionAdd);just once it works fine but if I loop them then it crashes after a few loops. If I put a loop as shown below then it works fine. This is part of the code when I'm adding. Is it being looped 10 times from the code above.
    jsession.scanTable(table,errorlist);
                rtc = table.getRecordCount(errorlist);
                if (rtc > 0)
                publish(rtc+" records found.");
                    for(int i = 1; i <= rtc; ++i)
                        for (int j = 0; j < ElementName.size();j++)
                            publish((String)ElementName.get(j)+ ": " + table.getFieldByName((String)ElementName.get(j),i,errorlist));
                            for (int k = 0; k<100000;k++);
                else
                    publish("No records found.");
                }In the code, when the rows are added, I print them out just to make sure they were added correctly. This is where I got the idea that the Java code was not in synch with the native side because it would crash while writting out a line but it didn't happen every time at the same place.
    This is the function getFieldByName
    public String getFieldByName (String p_FieldName, int p_LineNum, ErrorList p_Errors)
              String retval = "";
              int ret;
              try
                   p_FieldName = prepareFieldName(p_FieldName);
                   retval = new String();
                   ret    = 0;
                   if (this.ptrTableView == NOT_SET)
                        p_Errors.addMessage(p_Errors.SEV_SYSTEM_ERROR(), "Table View Pointer not set");
                        throw (new Exception());
                   // allocating string buffer for value returned
                   StringBuffer m_FieldValue = new StringBuffer();
                   // determining length of value
                   int m_length[] = {0};
                   ret = gti.GetFieldLen(this.ptrTableView, p_FieldName, m_length, eb.getErrorBlockPtr());
                   if (m_length[0] == 0) m_length[0] = 100;
                   m_FieldValue = new StringBuffer(m_length[0]);
                   // get line field          
                   ret = gti.GetLineField(this.ptrTableView, p_FieldName, p_LineNum, m_FieldValue, eb.getErrorBlockPtr());           
                   if (ret != 0)
                          p_Errors.addMessage(p_Errors.SEV_ERROR(), "Error retrieving field value ("+p_FieldName+")");
                   else
                          retval = m_FieldValue.toString();
              catch (Throwable t)
                   p_Errors.addMessage(p_Errors.SEV_ERROR(), "Error retrieving field value ("+p_FieldName+")");
              return retval;
        }The main functions are
    GetFieldLen
    GetLineField
    They go to the native side through my dll which wraps the old dlls.
    Here are is one of the main functions in my dll. I also have the source for the functions they are calling but they are calling other functions which are calling other functions. There is a lot of code . Yes, they use arrays.
    JNIEXPORT jint JNICALL Java_advantagewrapperspk_GtiNative_GtiGetLineField
      (JNIEnv *env, jclass cls, jint p_tableViewPtr, jstring VIEWFIELDNAME, jint VIEWFIELDNUM, jobject VIEWFIELDVALUE, jint iErrBlockPtr)
           //printf("\n\nGtiGetLineField in C:\n");
           jint iResult = 0;
           char *temp1 = (*env)->GetStringUTFChars(env,VIEWFIELDNAME,0);
           char *temp2 = (*env)->GetStringUTFChars(env,VIEWFIELDVALUE,0);
         iResult = GtiGetLineField(p_tableViewPtr,temp1,VIEWFIELDNUM,temp2,iErrBlockPtr);
           //printf("VIEWFIELDNUM %d ",VIEWFIELDNUM);
           //printf("\ntemp1 %s ",temp1);
           //printf("\ntemp2 %s ",temp2);
         (*env)->ReleaseStringUTFChars(env,VIEWFIELDNAME,temp1);
         if (temp2 == 0)      return iResult;
        if (temp2 != NULL)
                cls = (*env)->GetObjectClass(env,VIEWFIELDVALUE);
                jmethodID mid = (*env)->GetMethodID (env,cls,"append","(Ljava/lang/String;)Ljava/lang/StringBuffer;");
                 if (mid == 0) return iResult;
                 jstring sfinal = (*env)->NewStringUTF (env, temp2);
                (*env)->CallObjectMethod(env,VIEWFIELDVALUE,mid,sfinal);
              if (VIEWFIELDVALUE != NULL) (*env)->ReleaseStringUTFChars(env,VIEWFIELDVALUE,temp2);
         //(*env)->ReleaseStringUTFChars(env,VIEWFIELDVALUE,temp2);
         return iResult;
      }This calls
    * Function Name : GtiGetLineField()
    * Description   : Retrieves the value of a line field in a table view
    * Parameters    : pTableViewPtr pTableView--the table view from which to
    *                                           retrieve the value of a line
    *                                           field
    *                 VIEWFIELDNAME szFieldName--the name of the line field
    *                                            whose value is returned
    *                 VIEWLINENUM iLineNum--number of line from which to retrieve
    *                                       field value.  Lines are numbered
    *                                       beginning with 1.
    *                 VIEWFIELDVALUE szFieldValue--returns the value of the
    *                                              line field
    *                 ErrBlockPtr sourceeb--error context info from calling
    *                                       function
    * Return values : int--returns RCT_RETURNOK, RCT_WARNCORECONNECT, or
    *                      RCT_FAILCORECONNECT
    * Modifications : REH - 05/25/93
    int GtiGetLineField ( TableViewPtr pTableView,
                          VIEWFIELDNAME szFieldName,
                          VIEWLINENUM iLineNum,
                          VIEWFIELDVALUE szFieldValue,
                          ErrBlockPtr sourceeb )
       int iRc ;      /* return code */
       ELOG_INIT( sourceeb,
                  "GtiGetLineField",
                  "retrieving the value of a line field in a table view" ) ;
       /* in Gti, we start numbering lines from 1, because that is the way a user
          sees them on the screen.  In Ldm, following C conventions, we start
          numbering lines at 0.  So in LdmSetField, we subtract 1 from iLineNum */
       iRc = LdmGetField( pTableView->pTran,
                          szFieldName,
                          szFieldValue,
                          iLineNum - 1,
                          0,                  /* map occurrence = 1 */
                          ELOG_ERRBLOCK ) ;
       /* in case Ldm returned a warning, indicate so to the calling function */
       iRc = ( iRc == LDM_RETURNOK ) ? RCT_RETURNOK : RCT_WARNCORECONNECT ;
       return( iRc ) ;
       /* if exception was raised, it was due to COREConnect */
       ELOG_END( RCT_FAILCORECONNECT ) ;
    }which calls
    /****************************** API Header *********************************\
    * API Name: LdmGetField
    * This function copies the string value of a specified FIELDNAME into a
    * buffer specified by FIELDVALUE.  The string is NULL terminated.
    * The first OCCUR determines which occurrence of the field in the map.
    * The second OCCUR determines which occurence of the map in the transaction
    * area.  Remember that occurrences are numbered like C arrays: a transaction
    * with ten occurrences of a field will have fields numbered zero through
    * nine.
    * It is assumed that FIELDVALUE has enough space to accommodate the field's
    * value.
    int LdmGetField( HTRAN       htran,
                     FIELDNAME   fieldname,
                     FIELDVALUE  fieldvalue,
                     FIELDOCCUR  fieldoccur,
                     MAPOCCUR    mapoccur,
                     ErrBlockPtr seb )
       ELOG_INIT ( seb, "LdmGetField", "getting transaction field value" ) ;
       if ( htran->Occurrence <= mapoccur ) {
          ElogFail1( LDM_FAILOCCNOTFOUND, htran->TranName ) ;
       }  /* END if. */
       /* Since 'blank' values for field or map occurrences are zero, there
          is no need to set a default. */
       LdmsGetField( htran->Map->CCMap,
                     htran->TranData,
                     fieldname,
                     fieldvalue,
                     fieldoccur,
                     mapoccur,
                     ELOG_ERRBLOCK ) ;
       return( LDM_RETURNOK ) ;
       ELOG_END ( ELOG_ERRBLOCK->Rc ) ;
    }  /* END LdmGetField. */which calls
    /****************************** API Header *********************************\
    * API Name: LdmsGetField
    * Put the value of FIELDNAME into FIELDVALUE.  The field must be an element
    * of the specified map.  The new value will be set in the specified data
    * buffer.  The occurrences refer to the occurrence of the field in the map
    * and the occurrence of the map in the data buffer.
    int LdmsGetField ( CCMapPtr    rcmap,
                       char        *dataarea,
                       FIELDNAME   fieldname,
                       FIELDVALUE  fieldvalue,
                       FIELDOCCUR  fieldoccur,
                       MAPOCCUR    mapoccur,
                       ErrBlockPtr seb )
       ElementPtr element ;
       char       *fieldoffset ;
       ELOG_INIT ( seb, "LdmsGetField", "getting a field of a map" ) ;
       /* Search the transaction definition area (map) for matching
          FIELDNAME. If found, copy FIELDVALUE to defined offset in
          transaction buffer. */
       element = LdmsFindField( rcmap, fieldname, fieldoccur, &localeb ) ;
       /* Copy the value from the transaction data area into FIELDVALUE. */
       fieldoffset = dataarea +
                     ( ( rcmap->BufferLength * mapoccur ) + element->Offset ) ;
       strncpy( fieldvalue, fieldoffset, element->Length ) ;
       fieldvalue[ element->Length ] = '\0' ;
       return( LDM_RETURNOK ) ;
       ELOG_END ( ELOG_ERRBLOCK->Rc ) ;
    }  /* END LdmsGetField. */and on it goes
    I gather from your question about arrays that they might be the source of the problem. Could it be that the pointer to the array is returned while the array is not completed? Any information would help. Thanks.

  • Job scheduling error : The return value was unknown. The process exit code was -1073741819. The step failed.

    I am working in Sqlserver 2008 R2, SSIS 64 bit version
    I am getting the below  error while scheduling the job in the development server  Database. 
    The return value was unknown.  The process exit code was -1073741819.  The step failed.
    The SSIS front end execution runs fine.
    Have anyone  faced this issue before?

    Hi Venkat,
    If you already changed to 64bit and still doesn't work then create proxy account.. 
    To create a proxy account
    In Object Explorer, expand a server.
    Expand SQL Server Agent.
    Right-click Proxies and select New Proxy.
    On the General page of the New Proxy Account dialog, specify the proxy name, credential name, and
    description for the new proxy. Note that you must create a credential first before you create a proxy if one is not already available. For more information about creating a credential, see How
    to: Create a Credential (SQL Server Management Studio) or CREATE CREDENTIAL (Transact-SQL).
    Check the appropriate subsystem for this proxy.
    On the Principals page, add or remove logins or roles to grant or remove access to the proxy account.
    Thanks

  • Trying to write an if statement around the return value of a CANCEL_OPTION

    I am writing a program that takes an input String using JOptionPane. The String can be made of only letters of the A-Z alphabet and the space character. I have written an error-checking loop that will pop another input box up along with an error message if any invalid character is detected. The input box has an 'ok' button and a 'cancel' button. As it is, if you hit cancel, the program crashes and you get a NullPointerException. All I want to do is place an if statement inside of the error-checking loop, immediatly after the code to pop up the second input box, that simply does System.exit() and exits the program correctly(rather than crashing) if 'cancel' is clicked.
    My attempt at such an if statement is visible in the following code(letter is a boolean variable defined earlier, and message is the input String that has already been read in):
                   letter = isValidMessage(message);
              while(!letter)
                   message = JOptionPane.showInputDialog(null, "Message must contain only A-Z, a-z, or space character...");
                            if(JOptionPane.CANCEL_OPTION > 0  //or ==0 or ==1 or ==2, nothing works//)
                                JOptionPane.showMessageDialog(null, "No valid message entered - program will terminate...");
                                System.exit(JOptionPane.CANCEL_OPTION);
                   letter = isValidMessage(message);
                    }The if statement doesn't work correctly. If you click 'cancel' when the input box comes up, the program does terminate as it is supposed to. The problem is that if I type something in the box and click 'ok', it also causes the program to terminate rather than continuing. I've tried changing the > to ==. I've tried changing 0 to 1 to 2 to -1(I really am not sure which int return value of CANCEL_OPTION corresponds to which event). I think once I got to do the exact opposite...that is to say, it would continue on with the program whether I clicked 'cancel' or 'ok'. Which is equally bad. I don't know what I'm doing wrong.
    It's probably something simple that I'm just overlooking.

    Well, here's what CANCEL_OPTION is, according to the JOptionPane class:
    /** Return value from class method if CANCEL is chosen. */
        public static final int         CANCEL_OPTION = 2;However, I believe you're going about this in the wrong way.
    With JOptionPane, whenever you show a dialog, it usually returns whatever OPTION the user chose.
    For instance,
        int choice = JOptionPane.showConfirmDialog(parentComponent, "hello");That will bring up a dialog centered on parentComponent, with a message of "hello".
    It will have the default options (YES_NO_OPTION).
    What it returns is the option the user chose.
    There are 4 possible things it can return:
    YES_OPTION, when user clicks "Yes"
    NO_OPTION, when user clicks "No"
    ERROR_OPTION, when an unforseen error occurs and the dialog closes
    CANCEL_OPTION, when the user clicks "Cancel" (if that OPTION type were being used), or if they close the dialog
    So this is how you would check for CANCEL_OPTION:
        int choice = JOptionPane.showConfirmDialog(parentComponent, "hello");
        if (choice == JOptionPane.CANCEL_OPTION) {
            // User cancelled
        else if (choice == JOptionPane.YES_OPTION) {
            // User chose yes
        // EtcSo you see, going about it like this:
    if(JOptionPane.CANCEL_OPTION > 0  //or ==0 or ==1 or ==2, nothing works//)Is really the wrong way, because you're not checking what the user DID, but just what the constant variable "CANCEL_OPTION" is.
    However, it seems as if you're in a unique situation where you don't want the OPTION chosen by the user, but an input String.
    This is all well and good, but I think this limits how you can interact with the user, as the "showInputDialog" methods return the String the user input- not the OPTION they chose, and you need to use both.
    What I've done in the past is created a simple JPanel with its own JTextField.
    I pass the JPanel in as the "message" parameter of a showConfirmDialog call, and get both the user input and their chosen OPTION based off a getText call to the JTextField and the OPTION constant returned by showConfirmDialog.
    Basically,
    JPanel promptPanel = new JPanel(new BorderLayout());
    JTextField promptField = new JTextField();
    promptPanel.add(promptField, BorderLayout.CENTER);
    int choice = JOptionPane.showConfirmDialog(parentComponent, promptPanel, "Input", JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE);
    if (choice == JOptionPane.OK_OPTION) {
       // User chose OK, see if invalid characters were entered
       String input = promptField.getText();
    else if (choice == JOptionPane.CANCEL_OPTION) {
       // User cancelled
    }Hope that helps.
    (note that I'm unsure if showConfirmDialog can accept OK_CANCEL_OPTION as its OPTION parameter, as it says only YES_NO_OPTION and YES_NO_CANCEL_OPTION can be used, but I seem to remember using it in the past. if OK_CANCEL_OPTION doesn't want to work, then use one of the other two and adjust your if statements accordingly)
    Cheers!
    Edited by: LukeFoss on Oct 9, 2007 10:39 PM

  • Problem with Bapi_po_Getdetail return values

    We have developed a web service in asp.net to get the details of a particular purchase order number calling Bapi_po_Getdetail. The input parameters that we pass are:
    string  ITEMS = “X”
    string PURCHASEORDER= “<purchase order number>”
    But when we debug and check the return values from the bapi, BAPIEKPO Table doesn’t have any data, it is null.
    Could someone help us, please?

    Please initialize the BAPIEKPOTable bedore call. Passing null allways returns null.
    NCo:
    string ITEMS = “X”
    string PURCHASEORDER= “<purchase order number>”
    BAPIEKPOTable result = new BAPIEKPOTable();
    proxy.Bapi_po_Getdetail(ITEMS, PURCHASEORDER, ref result);
    Soap Processor / Web Service Wizard
    string ITEMS = “X”
    string PURCHASEORDER= “<purchase order number>”
    BAPIEKPO[] result = new BAPIEKPO[0];
    proxy.Bapi_po_Getdetail(ITEMS, PURCHASEORDER, ref result);

  • Call C# method from javascript in WebView and retrieve the return value

    The issue I am facing is the following :
    I want to call a C# method from the javascript in my WebView and get the result of this call in my javascript.
    In an WPF Desktop application, it would not be an issue because a WebBrowser
    (the equivalent of a webView) has a property ObjectForScripting to which we can assign a C# object containg the methods we want to call from the javascript.
    In an Windows Store Application, it is slightly different because the WebView
    only contains an event ScriptNotify to which we can subscribe like in the example below :
    void MainPage_Loaded(object sender, RoutedEventArgs e)
    this.webView.ScriptNotify += webView_ScriptNotify;
    When the event ScriptNotify is raised by calling window.external.notify(parameter), the method webView_ScriptNotify is called with the parameter sent by the javascript :
    function CallCSharp() {
    var returnValue;
    window.external.notify(parameter);
    return returnValue;
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = DoSomerthing(parameter);
    The issue is that the javascript only raise the event and doesn't wait for a return value or even for the end of the execution of webView_ScriptNotify().
    A solution to this issue would be call a javascript function from the webView_ScriptNotify() to store the return value in a variable in the javascript and retrieve it after.
    private async void webView_ScriptNotify(object sender, NotifyEventArgs e)
    var parameter = e.Value;
    var result = ReturnResult();
    await this.webView.InvokeScriptAsync("CSharpCallResult", new string[] { result });
    var result;
    function CallCSharp() {
    window.external.notify(parameter);
    return result;
    function CSharpCallResult(parameter){
    result = parameter;
    However this does not work correctly because the call to the CSharpResult function from the C# happens after the javascript has finished to execute the CallCSharp function. Indeed the
    window.external.notify does not wait for the C# to finish to execute.
    Do you have any solution to solve this issue ? It is quite strange that in a Window Store App it is not possible to get the return value of a call to a C# method from the javascript whereas it is not an issue in a WPF application.

    I am not very familiar with the completion pattern and I could not find many things about it on Google, what is the principle? Unfortunately your solution of splitting my JS function does not work in my case. In my example my  CallCSharp
    function is called by another function which provides the parameter and needs the return value to directly use it. This function which called
    CallCSharp will always execute before an InvokeScriptAsync call a second function. Furthermore, the content of my WebView is used in a cross platforms context so actually my
    CallCSharp function more look like the code below.
    function CallCSharp() {
    if (isAndroid()) {
    //mechanism to call C# method from js in Android
    //return the result of call to C# method
    } else if (isWindowsStoreApp()) {
    window.external.notify(parameter);
    // should return the result of call to C# method
    } else {
    In android, the mechanism in the webView allows to return the value of the call to a C# method, in a WPF application also. But I can't figure why for a Windows Store App we don't have this possibility.

  • How to stop SQL Server Agent Job if Stored Procedure returns value 0

    I have SQL Server 2012 SSIS.
    I have 2 SSIS packages.
    I have created SQL Server Agent Job for running packages.
    I have created steps. If first step have run succesfully next step is run.
    I have need to add new logic.
    I have validation stored procedure, which validate DB table values and returns 1 or 0.
    I would like to create logic where first of all this SP is runned. Return value of SP determines if steps are run or not.
    I was thinking to use Execute SQL Task for running SP.
    If value 1 is returned, then run rest of Tasks is run.
    If value 0 is returned, what should I do so that Job is stopped? I need assistance! 
    I want current step to stop never moved to next step.
    Is there any SSIS tasks, which can stop the Job?
    Or should I make Step for running validation SP?
    How to do so that if value 0 is returned stop Job.
    Kenny_I

    Please refer the below link:
    http://technet.microsoft.com/en-us/library/aa260308(v=sql.80).aspx
    Please read Remarks carefully!!!
    Remarks
    If a job is currently executing a step of type CmdExec, the process being run (for example, MyProgram.exe) is forced to end prematurely. Premature ending can result in unpredictable behavior such as files in use by the process being held open. Consequently,
    sp_stop_job should be used only in extreme circumstances if the job contains steps of type CmdExec.
    Permissions
    Execute permissions default to the public role in the
    msdb database. A user who can execute this procedure and is a member of the
    sysadmin fixed role can stop any job. A user who is not a member of the
    sysadmin role can use sp_stop_job to stop only the jobs he/she owns.
    When sp_stop_job is invoked by a user who is a member of the
    sysadmin fixed server role, sp_stop_job will be executed under the security context in which the SQL Server service is running. When the user is not a member of the
    sysadmin group, sp_stop_job will impersonate the SQL Server Agent proxy account, which is specified using
    xp_sqlagent_proxy_account. If the proxy account is not available,
    sp_stop_job will fail. This is only true for Microsoft® Windows® NT 4.0 and Windows 2000. On Windows 9.x, there is no impersonation and
    sp_stop_job is always executed under the security context of the Windows 9.x user who started SQL Server.

  • Scr doesn't contain powerup

    I discovered that my script file doesn't contain the powerup.
    This is my scr file:
    C:\jc22\mydemo>..\bin\scriptgen walletApp.scr com\idt\javacard\samples\wallet\ja
    vacard\wallet.cap
    Java Card 2.2 APDU Script File Builder (version 0.11)
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Header.cap
    0x80 0xB2 0x01 0x00 0x00 0x7F;
    0x80 0xB4 0x01 0x00 0x16 0x01 0x00 0x13 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00
    0x01 0x09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x7F;
    0x80 0xBC 0x01 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Directory.cap
    0x80 0xB2 0x02 0x00 0x00 0x7F;
    0x80 0xB4 0x02 0x00 0x20 0x02 0x00 0x1F 0x00 0x13 0x00 0x1F 0x00 0x0E 0x00 0x0B
    0x00 0x66 0x00 0x12 0x01 0x88 0x00 0x0A 0x00 0x3A 0x00 0x00 0x00 0xDB 0x00 0x00
    0x00 0x00 0x00 0x00 0x01 0x7F;
    0x80 0xB4 0x02 0x00 0x02 0x01 0x00 0x7F;
    0x80 0xBC 0x02 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Import.cap
    0x80 0xB2 0x04 0x00 0x00 0x7F;
    0x80 0xB4 0x04 0x00 0x0E 0x04 0x00 0x0B 0x01 0x01 0x01 0x07 0xA0 0x00 0x00 0x00
    0x62 0x01 0x01 0x7F;
    0x80 0xBC 0x04 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Applet.cap
    0x80 0xB2 0x03 0x00 0x00 0x7F;
    0x80 0xB4 0x03 0x00 0x11 0x03 0x00 0x0E 0x01 0x0A 0xA0 0x00 0x00 0x00 0x62 0x03
    0x01 0x0C 0x06 0x01 0x00 0x01 0x7F;
    0x80 0xBC 0x03 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Class.cap
    0x80 0xB2 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x06 0x00 0x15 0x06 0x00 0x12 0x00 0x80 0x03 0x02 0x00 0x01 0x04 0x04
    0x00 0x00 0x00 0x3A 0xFF 0xFF 0x00 0x2D 0x00 0x42 0x7F;
    0x80 0xBC 0x06 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Method.cap
    0x80 0xB2 0x07 0x00 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x07 0x01 0x88 0x00 0x04 0x30 0x8F 0x00 0x13 0x18 0x1D
    0x1E 0x8C 0x00 0x05 0x7A 0x05 0x40 0x18 0x8C 0x00 0x02 0x18 0x8F 0x00 0x03 0x3D
    0x06 0x10 0x08 0x8C 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x04 0x87 0x00 0xAD 0x00 0x19 0x1E 0x1F 0x8B 0x00 0x06
    0x18 0x8B 0x00 0x07 0x7A 0x01 0x10 0xAD 0x00 0x8B 0x00 0x08 0x61 0x04 0x03 0x78
    0x04 0x78 0x01 0x10 0xAD 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x8B 0x00 0x09 0x7A 0x02 0x21 0x19 0x8B 0x00 0x0A
    0x2D 0x18 0x8B 0x00 0x0B 0x60 0x03 0x7A 0x1A 0x03 0x25 0x10 0xB0 0x6A 0x08 0x11
    0x6E 0x00 0x8D 0x00 0x0C 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x1A 0x04 0x25 0x75 0x00 0x2D 0x00 0x04 0x00 0x20 0x00
    0x27 0x00 0x30 0x00 0x21 0x00 0x40 0x00 0x1B 0x00 0x50 0x00 0x15 0x18 0x19 0x8C
    0x00 0x0D 0x7A 0x18 0x19 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8C 0x00 0x0E 0x7A 0x18 0x19 0x8C 0x00 0x0F 0x7A 0x18
    0x19 0x8C 0x00 0x10 0x7A 0x11 0x6D 0x00 0x8D 0x00 0x0C 0x7A 0x03 0x24 0xAD 0x00
    0x8B 0x00 0x11 0x61 0x08 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x11 0x63 0x01 0x8D 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D
    0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16
    0x04 0x04 0x6A 0x08 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x67 0x00 0x8D 0x00 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16
    0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF
    0x01 0x16 0x05 0x41 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x27 0x10 0x6F 0x08 0x11 0x6A 0x84 0x8D 0x00 0x0C 0x18
    0xAF 0x01 0x16 0x05 0x41 0x89 0x01 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61
    0x08 0x11 0x63 0x01 0x8D 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32
    0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08
    0x11 0x67 0x00 0x8D 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E
    0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x43
    0x63 0x08 0x11 0x6A 0x85 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x43 0x89 0x01
    0x7A 0x03 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x14 0x32 0x19 0x05 0x8B
    0x00 0x15 0x1A 0x03 0xAF 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x01 0x8D 0x00 0x16 0x3B 0x19 0x03 0x05 0x8B 0x00 0x17
    0x7A 0x04 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x12 0x5B 0x32 0xAD 0x00
    0x1A 0x08 0x1F 0x8B 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x0B 0x18 0x03 0x6B 0x08 0x11 0x63 0x00 0x8D 0x00 0x0C 0x7A
    0x7F;
    0x80 0xBC 0x07 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/StaticField.cap
    0x80 0xB2 0x08 0x00 0x00 0x7F;
    0x80 0xB4 0x08 0x00 0x0D 0x08 0x00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    0x00 0x00 0x7F;
    0x80 0xBC 0x08 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/ConstantPool.cap
    0x80 0xB2 0x05 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x66 0x00 0x19 0x02 0x00 0x00 0x00 0x02 0x00
    0x00 0x01 0x06 0x80 0x03 0x00 0x01 0x80 0x09 0x00 0x06 0x80 0x09 0x00 0x06 0x00
    0x00 0x0D 0x03 0x80 0x09 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x08 0x03 0x80 0x03 0x01 0x03 0x80 0x09 0x02 0x03 0x80
    0x09 0x05 0x03 0x80 0x0A 0x01 0x03 0x80 0x03 0x03 0x06 0x80 0x07 0x01 0x06 0x00
    0x01 0x49 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0xF0 0x06 0x00 0x00 0x94 0x06 0x00 0x01 0x69 0x03 0x80
    0x09 0x04 0x03 0x80 0x0A 0x06 0x01 0x00 0x00 0x00 0x03 0x80 0x0A 0x07 0x03 0x80
    0x0A 0x09 0x06 0x80 0x10 0x7F;
    0x80 0xB4 0x05 0x00 0x09 0x06 0x03 0x80 0x0A 0x04 0x03 0x80 0x09 0x01 0x7F;
    0x80 0xBC 0x05 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/RefLocation.cap
    0x80 0xB2 0x09 0x00 0x00 0x7F;
    0x80 0xB4 0x09 0x00 0x20 0x09 0x00 0x3A 0x00 0x0E 0x1F 0x02 0x0F 0x0D 0x5A 0x41
    0x11 0x05 0x05 0x41 0x0E 0x05 0x16 0x1A 0x00 0x28 0x04 0x06 0x07 0x04 0x07 0x0A
    0x04 0x08 0x0D 0x07 0x05 0x7F;
    0x80 0xB4 0x09 0x00 0x1D 0x10 0x1D 0x06 0x06 0x06 0x07 0x08 0x08 0x04 0x09 0x12
    0x15 0x10 0x10 0x08 0x04 0x09 0x12 0x15 0x0D 0x0F 0x05 0x06 0x07 0x07 0x07 0x05
    0x0A 0x09 0x7F;
    0x80 0xBC 0x09 0x00 0x00 0x7F;
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    APDU script file for CAP file download generated.
    I used the scriptgen cmd to generate the scr file called walletApp.src
    But I got the error when running jcwde:
    C:\jc22\mydemo>..\bin\jcwde -p 9025 jcwde.app
    Java Card 2.2 Workstation Development Environment (version 0.18).
    Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    jcwde is listening for T=0 Apdu's on TCP/IP port 9,025.
    java.net.SocketException: Connection reset by peer: JVM_recv in socket input str
    eam read
    jcwde terminating on receipt of SimulationException. See previous messages for
    cause.
    com.sun.javacard.jcwde.SimulationException
    I know somethings wrong with my walletApp.scr,
    may I have your advise,
    Thanx

    Sorry...
    I think I was too careless.
    I managed to open the .scr file already.
    I have added some scripts into it and it works properly.
    The scripts I've added:
    powerup;
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    powerdown;
    But I discovered that my walletApp.scr is totally different with the sample given in the walletdemo directory.
    my walletApp.src:
    powerup;
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Header.cap
    0x80 0xB2 0x01 0x00 0x00 0x7F;
    0x80 0xB4 0x01 0x00 0x16 0x01 0x00 0x13 0xDE 0xCA 0xFF 0xED 0x01 0x02 0x04 0x00 0x01 0x09 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x7F;
    0x80 0xBC 0x01 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Directory.cap
    0x80 0xB2 0x02 0x00 0x00 0x7F;
    0x80 0xB4 0x02 0x00 0x20 0x02 0x00 0x1F 0x00 0x13 0x00 0x1F 0x00 0x0E 0x00 0x0B 0x00 0x66 0x00 0x12 0x01 0x88 0x00 0x0A 0x00 0x3A 0x00 0x00 0x00 0xDB 0x00 0x00 0x00 0x00 0x00 0x00 0x01 0x7F;
    0x80 0xB4 0x02 0x00 0x02 0x01 0x00 0x7F;
    0x80 0xBC 0x02 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Import.cap
    0x80 0xB2 0x04 0x00 0x00 0x7F;
    0x80 0xB4 0x04 0x00 0x0E 0x04 0x00 0x0B 0x01 0x01 0x01 0x07 0xA0 0x00 0x00 0x00 0x62 0x01 0x01 0x7F;
    0x80 0xBC 0x04 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Applet.cap
    0x80 0xB2 0x03 0x00 0x00 0x7F;
    0x80 0xB4 0x03 0x00 0x11 0x03 0x00 0x0E 0x01 0x0A 0xA0 0x00 0x00 0x00 0x62 0x03 0x01 0x0C 0x06 0x01 0x00 0x01 0x7F;
    0x80 0xBC 0x03 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Class.cap
    0x80 0xB2 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x06 0x00 0x15 0x06 0x00 0x12 0x00 0x80 0x03 0x02 0x00 0x01 0x04 0x04 0x00 0x00 0x00 0x3A 0xFF 0xFF 0x00 0x2D 0x00 0x42 0x7F;
    0x80 0xBC 0x06 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/Method.cap
    0x80 0xB2 0x07 0x00 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x07 0x01 0x88 0x00 0x04 0x30 0x8F 0x00 0x13 0x18 0x1D 0x1E 0x8C 0x00 0x05 0x7A 0x05 0x40 0x18 0x8C 0x00 0x02 0x18 0x8F 0x00 0x03 0x3D 0x06 0x10 0x08 0x8C 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x04 0x87 0x00 0xAD 0x00 0x19 0x1E 0x1F 0x8B 0x00 0x06 0x18 0x8B 0x00 0x07 0x7A 0x01 0x10 0xAD 0x00 0x8B 0x00 0x08 0x61 0x04 0x03 0x78 0x04 0x78 0x01 0x10 0xAD 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x8B 0x00 0x09 0x7A 0x02 0x21 0x19 0x8B 0x00 0x0A 0x2D 0x18 0x8B 0x00 0x0B 0x60 0x03 0x7A 0x1A 0x03 0x25 0x10 0xB0 0x6A 0x08 0x11 0x6E 0x00 0x8D 0x00 0x0C 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x1A 0x04 0x25 0x75 0x00 0x2D 0x00 0x04 0x00 0x20 0x00 0x27 0x00 0x30 0x00 0x21 0x00 0x40 0x00 0x1B 0x00 0x50 0x00 0x15 0x18 0x19 0x8C 0x00 0x0D 0x7A 0x18 0x19 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8C 0x00 0x0E 0x7A 0x18 0x19 0x8C 0x00 0x0F 0x7A 0x18 0x19 0x8C 0x00 0x10 0x7A 0x11 0x6D 0x00 0x8D 0x00 0x0C 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61 0x08 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x11 0x63 0x01 0x8D 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x67 0x00 0x8D 0x00 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x41 0x11 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x27 0x10 0x6F 0x08 0x11 0x6A 0x84 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x41 0x89 0x01 0x7A 0x03 0x24 0xAD 0x00 0x8B 0x00 0x11 0x61 0x08 0x11 0x63 0x01 0x8D 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x00 0x0C 0x19 0x8B 0x00 0x0A 0x2D 0x1A 0x07 0x25 0x32 0x19 0x8B 0x00 0x12 0x5B 0x29 0x04 0x1F 0x04 0x6B 0x07 0x16 0x04 0x04 0x6A 0x08 0x11 0x67 0x00 0x8D 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x0C 0x1A 0x08 0x25 0x29 0x05 0x16 0x05 0x10 0x64 0x6E 0x06 0x16 0x05 0x63 0x08 0x11 0x6A 0x83 0x8D 0x00 0x0C 0xAF 0x01 0x16 0x05 0x43 0x63 0x08 0x11 0x6A 0x85 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x8D 0x00 0x0C 0x18 0xAF 0x01 0x16 0x05 0x43 0x89 0x01 0x7A 0x03 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x14 0x32 0x19 0x05 0x8B 0x00 0x15 0x1A 0x03 0xAF 0x7F;
    0x80 0xB4 0x07 0x00 0x20 0x01 0x8D 0x00 0x16 0x3B 0x19 0x03 0x05 0x8B 0x00 0x17 0x7A 0x04 0x22 0x19 0x8B 0x00 0x0A 0x2D 0x19 0x8B 0x00 0x12 0x5B 0x32 0xAD 0x00 0x1A 0x08 0x1F 0x8B 0x00 0x7F;
    0x80 0xB4 0x07 0x00 0x0B 0x18 0x03 0x6B 0x08 0x11 0x63 0x00 0x8D 0x00 0x0C 0x7A 0x7F;
    0x80 0xBC 0x07 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/StaticField.cap
    0x80 0xB2 0x08 0x00 0x00 0x7F;
    0x80 0xB4 0x08 0x00 0x0D 0x08 0x00 0x0A 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x7F;
    0x80 0xBC 0x08 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/ConstantPool.cap
    0x80 0xB2 0x05 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x66 0x00 0x19 0x02 0x00 0x00 0x00 0x02 0x00 0x00 0x01 0x06 0x80 0x03 0x00 0x01 0x80 0x09 0x00 0x06 0x80 0x09 0x00 0x06 0x00 0x00 0x0D 0x03 0x80 0x09 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0x08 0x03 0x80 0x03 0x01 0x03 0x80 0x09 0x02 0x03 0x80 0x09 0x05 0x03 0x80 0x0A 0x01 0x03 0x80 0x03 0x03 0x06 0x80 0x07 0x01 0x06 0x00 0x01 0x49 0x06 0x00 0x00 0x7F;
    0x80 0xB4 0x05 0x00 0x20 0xF0 0x06 0x00 0x00 0x94 0x06 0x00 0x01 0x69 0x03 0x80 0x09 0x04 0x03 0x80 0x0A 0x06 0x01 0x00 0x00 0x00 0x03 0x80 0x0A 0x07 0x03 0x80 0x0A 0x09 0x06 0x80 0x10 0x7F;
    0x80 0xB4 0x05 0x00 0x09 0x06 0x03 0x80 0x0A 0x04 0x03 0x80 0x09 0x01 0x7F;
    0x80 0xBC 0x05 0x00 0x00 0x7F;
    // com/idt/javacard/samples/wallet/javacard/RefLocation.cap
    0x80 0xB2 0x09 0x00 0x00 0x7F;
    0x80 0xB4 0x09 0x00 0x20 0x09 0x00 0x3A 0x00 0x0E 0x1F 0x02 0x0F 0x0D 0x5A 0x41 0x11 0x05 0x05 0x41 0x0E 0x05 0x16 0x1A 0x00 0x28 0x04 0x06 0x07 0x04 0x07 0x0A 0x04 0x08 0x0D 0x07 0x05 0x7F;
    0x80 0xB4 0x09 0x00 0x1D 0x10 0x1D 0x06 0x06 0x06 0x07 0x08 0x08 0x04 0x09 0x12 0x15 0x10 0x10 0x08 0x04 0x09 0x12 0x15 0x0D 0x0F 0x05 0x06 0x07 0x07 0x07 0x05 0x0A 0x09 0x7F;
    0x80 0xBC 0x09 0x00 0x00 0x7F;
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    powerdown;
    The samples given:
    //+
    // Copyright (c) 1999 Sun Microsystems, Inc. All rights reserved.
    // This software is the confidential and proprietary information of Sun
    // Microsystems, Inc. ("Confidential Information"). You shall not
    // disclose such Confidential Information and shall use it only in
    // accordance with the terms of the license agreement you entered into
    // with Sun.
    // SUN MAKES NO REPRESENTATIONS OR WARRANTIES ABOUT THE SUITABILITY OF THE
    // SOFTWARE, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
    // IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
    // PURPOSE, OR NON-INFRINGEMENT. SUN SHALL NOT BE LIABLE FOR ANY DAMAGES
    // SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING
    // THIS SOFTWARE OR ITS DERIVATIVES.
    // This file contains command APDUs for the wallet applet.
    // Comments lines begin with "//".
    // Non-comment lines are C-APDUs represented by hex digits.
    // Beneath each C-APDU is a comment the corresponding R-APDU expected to be returned
    // by the card.
    // Select all installed Applets
    powerup;
    // Select the installer applet
    0x00 0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
    // 90 00 = SW_NO_ERROR
    // begin installer command
    0x80 0xB0 0x00 0x00 0x00 0x7F;
    // instantiate a wallet applet
    // apdu data contain the applet AID followed by the initial owner PIN
    0x80 0xB8 0x00 0x00 0x11 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    // end installer command
    0x80 0xBA 0x00 0x00 0x00 0x7F;
    // Initialize Wallet
    //Select Wallet
    0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x7F;
    // 90 00 = SW_NO_ERROR
    //Verify user pin
    0xB0 0x20 0x00 0x00 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    //90 00 = SW_NO_ERROR
    //Get wallet balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x00 0x00 0x00 0x90 0x00 = Balance = 0 and SW_NO_ERROR
    //Attemp to debit from an empty account
    0xB0 0x40 0x00 0x00 0x01 0x64 0x7F;
    //0x6A85 = SW_NEGATIVE_BALANCE
    //Credit $100 to the empty account
    0xB0 0x30 0x00 0x00 0x01 0x64 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x64 0x9000 = Balance = 100 and SW_NO_ERROR
    //Debit $50 from the account
    0xB0 0x40 0x00 0x00 0x01 0x32 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Credit $128 to the account
    0xB0 0x30 0x00 0x00 0x01 0x80 0x7F;
    //0x6A83 = SW_INVALID_TRANSACTION_AMOUNT
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Debit $51 from the account
    0xB0 0x40 0x00 0x00 0x01 0x33 0x7F;
    //0x6A85 = SW_NEGATIVE_BALANC
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Debit $128 from the account
    0xB0 0x40 0x00 0x00 0x01 0x80 0x7F;
    //0x6A83 = SW_INVALID_TRANSACTION_AMOUNT
    //Get Balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    //Reselect Wallet applet so that userpin is reset
    0x00 0xA4 0x04 0x00 0x0a 0xa0 0x0 0x0 0x0 0x62 0x3 0x1 0xc 0x6 0x1 0x7F;
    // 90 00 = SW_NO_ERROR
    //Credit $127 to the account before pin verification
    0xB0 0x30 0x00 0x00 0x01 0x7F 0x7F;
    //0x6301 = SW_PIN_VERIFICATION_REQUIRED
    //Verify User pin with wrong pin value
    0xB0 0x20 0x00 0x00 0x04 0x01 0x03 0x02 0x66 0x7F;
    //0x6300 = SW_VERIFICATION_FAILED
    //Verify user pin again with correct pin value
    //0xB0 0x20 0x00 0x00 0x08 0xF2 0x34 0x12 0x34 0x56 0x10 0x01 0x01 0x7F;
    0xB0 0x20 0x00 0x00 0x05 0x01 0x02 0x03 0x04 0x05 0x7F;
    //0x9000 = SW_NO_ERROR
    //Get balance with incorrrect LE value
    0xB0 0x50 0x00 0x00 0x00 0x01;
    //0x6700 = ISO7816.SW_WRONG_LENGTH
    //Get balance
    0xB0 0x50 0x00 0x00 0x00 0x02;
    //0x00 0x32 0x9000 = Balance = 50 and SW_NO_ERROR
    // *** SCRIPT END ***
    powerdown;
    I think I followed exactly the sample given but how come the result is different?
    Will it cause any effect?
    Thanx.

  • Multiple return values (Bug-ID 4222792)

    I had exactly the same request for the same 3 reasons: strong type safety and code correctness verification at compile-time, code readability and ease of mantenance, performance.
    Here is what Sun replied to me:
    Autoboxing and varargs are provided as part of
    JSRs 14 and 201
    http://jcp.org/en/jsr/detail?id=14
    http://jcp.org/en/jsr/detail?id=201
    See also:
    http://forum.java.sun.com/forum.jsp?forum=316
    http://developer.java.sun.com/developer/earlyAccess/adding_generics/index.html
    Multiple return values is covered by Bug-ID 4222792
    Typically this is done by returning an array.
    http://developer.java.sun.com/developer/bugParade/bugs/4222792.html
    That's exactly the problem: we dynamically create instances of array objects that would better fit well within the operand stack without stressing the garbage collector with temporary Array object instances (and with their backing store: 2 separate allocations that need to be recycled when it is clearly a pollution that the operand stack would clean up more efficiently)
    If you would like to engage in a discussion with the Java Language developers, the Generics forum would be a better place:
    http://forum.java.sun.com/forum.jsp?forum=316
    I know that (my report was already refering to the JSR for language extension) Generics is not what I was refering to (even if a generic could handle multiple return values, it would still be an allocated Object
    instance to pack them, i.e. just less convenient than using a static class for type safety.
    The most common case of multiple return values involve values that have known static datatypes and that should be checked with strong typesafety.
    The simple case that involves returning two ints then will require at least two object instances and will not solve the garbage collection overhead.
    Using a array of variable objects is exactly similar, except that it requires two instances for the components and one instance for the generic array container. Using extra method parameters with Integer, Byte, ... boxing objects is more efficient, but for now the only practical solution (which causes the least pollution in the VM allocator and garbage collector) is to use a custom class to store the return values in a single instance.
    This is not natural, and needlessly complexifies many interfaces.
    So to avoid this pollution, some solutions are used such as packing two ints into a long and returning a long, depacking the long after return (not quite clean but still much faster at run-time for methods that need to be used with high frequencies within the application. In some case, the only way to cut down the overhead is to inline methods within the caller code, and this does not help code maintenance by splitting the implementation into small methods (something that C++ can do very easily, both because it supports native types parameters by reference, and because it also supports inline methods).
    Finally, suppose we don't want to use tricky code, difficult to maintain, then we'll have to use boxing Object types to allow passing arguments by reference. Shamely boxed native types cannot be allocated on the operand stack as local variables, so we need to instanciate these local variables before call, and we loose the capacity to track the cases where these local variables are not really initialized by an effective call to the method that will assign them. This does not help debugging, and is against the concept of a strongly typed language like Java should be:
    Java makes lots of efforts to track uninitialized variables, but has no way to determine if an already instanciated Object instance refered in a local variable has effectively received an effective assignment because only the instanciation is kept. A typical code will then need to be written like this:
    Integer a = null;
    Integer b = null;
    if (some condition) {
    //call.method(a, b, 0, 1, "dummy input arg");
    // the method is supposed to have assigned a value to a and b,
    // but can't if a and b have not been instanciated, so we perform:
    call.method(a = new Integer(), b = new Integer(), 0, 1, "dummy input
    arg");
    // we must suppose that the method has modified (not initialized!)
    the value
    // of a and b instances.
    now.use(a.value(), b.value())
    // are we sure here that a and b have received a value????
    // the code may be detected at run-time (a null exception)
    // or completely undetected (the method() above was called but it
    // forgot to assign a value to its referenced objects a and b, in which
    // case we are calling in fact: now.use(0, 0); with the default values
    // or a and b, assigned when they were instanciated)
    Very tricky... Hard to debug. It would be much simpler if we just used:
    int a;
    int b;
    if (some condition) {
    (a, b) = call.method(0, 1, "dummy input arg");
    now.use(a, b);
    The compiler would immediately detect the case where a and b are in fact not always initialized (possible use bere initialization), and the first invoked call.method() would not have to check if its arguments are not null, it would not compile if it forgets to return two values in some code path...
    There's no need to provide extra boxing objects in the source as well as at run-time, and there's no stress added to the VM allocator or garbage collector simply because return values are only allocated on the perand stack by the caller, directly instanciated within the callee which MUST (checked at compile-time) create such instances by using the return statement to instanciate them, and the caller now just needs to use directly the variables which were referenced before call (here a and b). Clean and mean. And it allows strong typechecking as well (so this is a real help for programmers.
    Note that the signature of the method() above is:
    class call {
    (int, int) method(int, int, String) { ... }
    id est:
    class "call", member name "method", member type "(IILjava.lang.string;)II"
    This last signature means that the method can only be called by returning the value into a pair of variables of type int, or using the return value as a pair of actual arguments for another method call such as:
    call.method(call.method("dummy input arg"), "other dummy input arg")
    This is strongly typed and convenient to write and debug and very efficient at run-time...

    Can anyone give me some real-world examples where
    multiple return values aren't better captured in a
    class that logically groups those values? I can of
    course give hundreds of examples for why it's better
    to capture method arguments as multiple values instead
    of as one "logical object", but whenever I've hankered
    for multiple return values, I end up rethinking my
    strategy and rewriting my code to be better Object
    Oriented.I'd personally say you're usually right. There's almost always a O-O way of avoiding the situation.
    Sometimes though, you really do just want to return "two ints" from a function. There's no logical object you can think of to put them in. So you end up polluting the namespace:
    public class MyUsefulClass {
    public TwoInts calculateSomething(int a, int b, int c) {
    public static class TwoInts {
        //now, do I use two public int fields here, making it
        //in essence a struct?
       //or do I make my two ints private & final, which
       //requires a constructor & two getters?
      //and while I'm at it, is it worth implementing
      //equals(), how about hashCode()? clone()?
      //readResolve() ?
    }The answer to most of the questions for something as simple as "TwoInts" is usually "no: its not worth implementing those methods", but I still have to think about them.
    More to the point, the TwoInts class looks so ugly polluting the top level namespace like that, MyUsefulClass.TwoInts is public, that I don't think I've ever actually created that class. I always find some way to avoid it, even if the workaround is just as ugly.
    For myself, I'd like to see some simple pass-by-value "Tuple" type. My fear is it'd be abused as a way for lazy programmers to avoid creating objects when they should have a logical type for readability & maintainability.
    Anyone who has maintained code where someone has passed in all their arguments as (mutable!) Maps, Collections and/or Arrays and "returned" values by mutating those structures knows what a nightmare it can be. Which I suppose is an argument that cuts both ways: on the one hand you can say: "why add Tuples which would be another easy thing to abuse", on the other: "why not add Tuples, given Arrays and the Collections framework already allow bad programmers to produce unmainable mush. One more feature isn't going to make a difference either way".
    Ho hum.

  • Help : Complex parameter and return value in WebService?

    Hi guys
       These days, I publish a WebService, in it there is an
    operation like this:
       List search(List para);
       in this operation, parameter "para" is a java.util.List, which contains many elements, every element is an instance of customizing class "MyItem", I made "MyItem" implements java.io.Serializable interface. Strangely, when I call this operations in my java client,
    I found that I could not get out every element from para in server-side, but para.size() is showing it contains 10 elements in it. The same thing happen to the return value of this operation, in client, I got an instance of java.util.List class as the return value, when I try
    System.out.println(result.get(0)); it output "null", but
    result.size() is 10, I don't know how to explain this
       Does anyone who encounter this issue too?
    I guess it has something to with the Serializable issue ,but I have made every List item serializable, why it looks like this??

    Hi Kevin,
    I answered you by mail some days ago, but just to complete the thread, I am posting the hint also here:
    Custom types should be manually added to the Virtual Interface, so that they can be serialized.
    Best regards,
    Alexander

  • How to Change the return value for the parameters

    Hi, Can anyone help me with my problem?
    I have a parameter called "P1_Projects" defined in the HTMLDB page, on the report region, there are 2 buttons, one is "Go" button to submit the report on the screen, so user can preview the report, then another button "Export to PDF" can be clicked to generate the report using Oracle Report Services. The "Export to PDF" button will use the same set of parameters submitted for the "Go" button.
    So, the parameter "P1_Projects" is being used by these 2 buttons. and I have to pass a "%" wild card for "All Projects". To make the "Export to PDF" button work, I have to safe encode the return value for "%" to "%25" in order to pass the URL formula, but now my "Go" button doesn't work with "%25", it only recognize the "%" wild card.
    Is there a way to conditionally change the value depends which button is clicked?
    Any hint or help is highly appreciated!
    Hong

    try creating a plsql process which sets the P1_Projects item as required.
    in the plsql you can do:
    if :REQUEST = 'GO' then
    xxx
    else
    xxxx
    end if;
    set the condition to plsql expression:
    :REQUEST in ('GO', 'EXPORT')
    NB. the request value is usually set to the button name when a page is submitted from a button

  • How to create a display value and a return value for an item

    Hi! I have an item on a form. I want the default value for my item to be :":APP_USER", but the return value, to be the id of my user. I tried to create a PL/SQL Expression for the default item, but it doesn't work. What do I miss?
    It should be something like this, but it's not.
    begin
    select first_name || ',' ||last_name as "Employee",
    id_employee -- display value,return value
    from employees
    where id_employee = :APP_USER;
    end;
    Does anyone know?
    Thanks!
    Vitaly

    Hi VItaly,
    Display value and return value concept applies very well in case of a Combo box if i am correct, I don't know what type of item is your's.
    But any way, you can have a workaround like,
    Create a hidden item such that it's default value should be ID of the user which can be get from db by using :APP_USER.
    Use the this item for your references.
    I think this will meet your requirement.
    Thanks
    Kumaraswamy.

  • How to set the returned value of CFL in a matrix

    dear all,
    I got a matrix binded to a DataSource and two CFLs are in this matrix. The codes for handling AfterChooseFromList is as following.  It works almost fine. But when a docoment containing more than two
    rows in the matrix and I reselect the CFL cell values more than two times, an error occured sometimes, not everytime. The error message is "This entry already exists in the following tables @CYW_PRROW [Message 131-183]"
    I have tried to find out what kind of situation to cause this error, but still in the mud.
    Can anybody give me some suggestion? Thanks.
    Public Sub OnAfterChooseFromList_Matrix(ByVal pVal As SAPbouiCOM.ItemEvent)
            Dim ActionSuccess As Boolean = pVal.ActionSuccess
            Dim oform As SAPbouiCOM.Form = SBO_Application.Forms.Item(pVal.FormUID)
            Dim oitem As SAPbouiCOM.Item = oform.Items.Item("mtx_0")
            Dim omatrix As SAPbouiCOM.Matrix = CType(oitem.Specific, SAPbouiCOM.Matrix)
            Dim oDataTable As SAPbouiCOM.DataTable
            oDataTable = pVal.SelectedObjects
            Dim val As String
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
            omatrix.GetLineData(pVal.Row)
            oform.DataSources.DBDataSources.Item("@CYW_PRROW").Offset = pVal.Row - 1
            If pVal.ColUID = "col_0" Then
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRItemCode", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            Else
                Try
                    oform.DataSources.DBDataSources.Item("@CYW_PRROW").SetValue("U_PRSupp", pVal.Row - 1, CStr(val))
                Catch ex As Exception
                    SBO_Application.MessageBox(ex.Message)
                End Try
            End If
            omatrix.SetLineData(pVal.Row)
            If pVal.FormMode = "1" Then
                oform.Mode = SAPbouiCOM.BoFormMode.fm_UPDATE_MODE
            End If
        End Sub
    Another quesion, can I assign the returned value of CLF directly to the cell?

    Hello  Chao-Yi Wu,
    I don't have a real solution for you - just a few comments:
    1. At
            Try
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    I would add
            Try
                if oDataTable Is Nothing Then Exit Sub ' If the User cancels the CFL
                val = oDataTable.GetValue(0, 0)
            Catch ex As Exception
            End Try
    2. At
       If pVal.ColUID = "col_0" Then
    I would make the branch by the pVal.ChooseFromListUID instead of the ColUID
    and the 2nd not with "Else" but with "Else If ....."
    3. It may work with EditText.String/Value of a cell but I never do that because of performance-reasons.
    I always do it the same way as you in principle - I don't really know what the problem is.
    4. Maybe some unique indexes on your table (although this should give an error at the update and not at CFL when "the unique-law is broken"...)?
    Sorry - that's all for the moment.
    Cheers,
    Roland

  • How to call an Oracle Procedure and get a return value in Php

    Hi Everyone,
    Has anyone tried calling an Oracle procedure from Php using the ora functions and getting the return value ? I need to use the ora funtions (no oci)because of compatibility and oracle 7.x as the database.
    The reason why I post this here is because the ora_exec funtion is returning FALSE but the error code displayes is good. Is this a bug in the ora_exec funtion ?
    My code after the connection call is as follows:
    $cur = ora_open($this->conn);
    ora_commitoff($this->conn);
    $requestid = '144937';
    echo $requestid;
    $rc = ora_parse($cur, "begin p_ins_gsdata2
    (:requestid, :returnval); end;");
    if ($rc == true) {
    echo " Parse was successful ";
    $rc2 = ora_bind ($cur, "requestid", ":requestid", 32, 1);
    if ($rc2 == true) echo " Requestid Bind Successful ";
    $rc3 = ora_bind ($cur, "returnval", ":returnval", 32, 2);
    if ($rc3 == true) echo " Returnval Bind Successful ";
    $returnval = "0";
    $rc4 = ora_exec($cur);
    echo " Result = ".$returnval." ";
    if ($rc4 == false) {
    echo " Exec Returned FALSE ";
    echo " Error = ".ora_error($cur);
    echo " ";
    echo "ErrorCode = ".ora_errorcode($cur);
    echo "Error Executing";
    ora_close ($cur);
    The Oracle procedure has a select count from a table and it returns the number of records in that table. It's defined as:
    CREATE OR REPLACE procedure p_ins_gsdata2 (
    p_requestid IN varchar2 default null,
    p_retcode OUT varchar2)
    as
    BEGIN
    SELECT COUNT (*) INTO p_retcode
    FROM S_GSMRY_DATA_SURVEY
    WHERE request_id = p_requestid ;
    COMMIT;
    RETURN;
    END;
    Nothing much there. I want to do an insert into a table,
    from the procedure later, but I figured that I start with a select count since it's simpler.
    When I ran the Php code, I get the following:
    144937
    Parse was successful
    Requestid Bind Successful
    Returnval Bind Successful
    Result = 0
    Exec Returned FALSE
    Error = ORA-00000: normal, successful completion -- while
    processing OCI function OBNDRA
    ErrorCode = 0
    Error Executing
    I listed the messages on separate lines for clarity. I don't understand why it parses and binds o.k. but the exec returns false.
    Thanks again in advance for your help. Have a great day.
    Regards,
    Rudi

    retcode=`echo $?`is a bit convoluted. Just use:
    retcode=$?I see no EOF line terminating your input. Your flavour of Unix might not like that - it might ignore the command, though I'd be surprised (AIX doesn't).
    replace the EXEC line with :
    select 'hello' from dual;
    and see if you get some output - then you know if sqlplus commands are being called from your script. You didn't mentioned whether you see the banner for sqlplus. Copy/paste the output that you get, it will give us much more of an idea.

Maybe you are looking for

  • How do I use the HP dvd1040 burner with my iBook?

    I am going to Italy tomorrow and want to bring my iBook but need to have the external dvd burner to load all of the pictures I will take because my hard drive is almost completely full. I am using Roxio Toast to try and burn the dvds and the iBook is

  • Data extraction from transctional data source

    Hi all,          In bw 3.5 I am fetching data from r3 , vendor evolution(2LIS_02_S013) is name of that data source it is   transaction type data source at that time  data source(2LIS_02_S013) successfully replicate in bw after it i make infoarea and

  • How use parameters on a html region for report query region

    Hi all. I have created a number of report regions which initially query some data. The requeriment now is to have a date range (initial and final) and use this range as a parameter for report queries. i created a new region containing these two date

  • Help with space...

    Need help, I just bought my nano 2 GB, well, my iPod is totally empty but in the iTunes it appears that I have used 1.30 GB, I don't know why if it is empty, help please...

  • Export Data Sets as jpgs?

    Is there a way to export data sets as jpgs instead of psd? The whole point is fast file creation and having a folder full of new psds which I then have to convert to jpg is kinda a silly step. Am I missing something?