Java - Axis2: How to get an error code / error message from the Javascript via SOAP

Hi
In our Java applicsation we call a Javascript in a Indesign CS Server using the following code:
--- SNIP BEGIN ---
// calls the remote service on the indesign server
try {
// create service
ServiceStub oIndsgnSrvStub = new
ServiceStub(sIndesignServer);
// create service parameter
ServiceStub.RunScriptParameters
oIndsgnSrvRSParams = new ServiceStub.RunScriptParameters();
// create arguments with source- and target-file for parameter
ServiceStub.IDSPScriptArg[] oIndsgnSrvSArgs = new ServiceStub.IDSPScriptArg[2];
oIndsgnSrvSArgs[0] = new
ServiceStub.IDSPScriptArg();
oIndsgnSrvSArgs[0].setName("xml-input");
oIndsgnSrvSArgs[0].setValue(sSourceFile);
oIndsgnSrvSArgs[1] = new
ServiceStub.IDSPScriptArg();
oIndsgnSrvSArgs[1].setName("output-file");
oIndsgnSrvSArgs[1].setValue(sTargetFile);
// define service parameter
oIndsgnSrvRSParams.setScriptArgs(oIndsgnSrvSArgs);
oIndsgnSrvRSParams.setScriptFile(sScriptFile);
oIndsgnSrvRSParams.setScriptLanguage("javascript");
oIndsgnSrvRSParams.setScriptText("");
// create runscript
ServiceStub.RunScript oIndsgnSrvRS = new ServiceStub.RunScript();
// set parameter
oIndsgnSrvRS.setRunScriptParameters(oIndsgnSrvRSParams);
//$$$ there should be an answer returned by the InddSrvr
// execute SOAP call
ServiceStub.RunScriptResult oIndsgnSrvRes = oIndsgnSrvStub.RunScript(oIndsgnSrvRS);
if(oIndsgnSrvRes.getErrorNumber() == 0) {
oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_SUCCESS);
bOK = true;
} else {
oServerProdJob.setProdState(CBP_Constant.REMOTEPRODUCTIONSTATE_FAILURE);
bOK = false;
//$$$ should be set, if there is something returned by inddsrvr
//oServerProdJob.setErrorMsg(sErrorMsg);
} catch(Exception e) {
sError += e.getMessage() + "\n";
bOK = false;
--- SNIP END -----
The problem is that we don't get the error code and/or the error message from the Javascript in oIndsgnSrvRes. The error code is always 0 if I set an Integer value as return in the Javascript. If I set a String, there is an Exception in the Java application.
Here is the Java script we use:
--- SNIP BEGIN ---
main();
main()
var sError = "";
var sXMLInput = "";
var sLayoutPath = "";
// get the SDKCodeSnippetRunner object
var cbpAdapter = app.cbpCbpadapterObject
if (cbpAdapter) {
sXMLInput=app.scriptArgs.get("xml-input");
sLayoutOutputFile=app.scriptArgs.get("output-file");
sError = cbpAdapter.doProcess(sXMLInput, sLayoutOutputFile);
return sError; // This give an Exception; if I return an Integer the ScriptResult is always 0
--- SNIP END -----
If I try this with the test application from Adobe I get the error code correctly. But in the Java application, using SOAP, I can't get the error code.
What could be wrong?
Any ideas?
Thanks a lot for the support.
Kind regards
Hans

user11340104 wrote:
Hello -
i am calling sqlplus from a bash shell script. If the sql statement generates an error, how can I return that error code (unsuccessful) back to the bash shell?
Well, let google be your friend,
http://www.google.co.in/search?rlz=1C1GGLS_enIN327IN327&sourceid=chrome&ie=UTF-8&q=sqlplus+error+codes
There are many threads I guess talking about the same issue.
HTH
Aman....

Similar Messages

  • Getting error code -251723766 returned from the "EthernetIP Open Session.vi" while trying to talk to a PLC

    I have created a LabVIEW application using LabVIEW 2012 (64 bit) that attempts to communicate with a PLC. I do not actually have the PLC here at the Rockwell Collins facility in Cedar Rapids, Iowa.
    I have sent this application to my co-worker, who is located at a different Rockwell Collins facility in Tustin, California, where the PLC is actually located.
    My coworker in California is reporting that when he starts up my application under WIN7 he gets an error code of "-251723766" when the S/W performs the "Open Session" function during initialization.
    I looked at the online help and the value "-251723766" is not defined.
    When I run the same application under WIN7 here in Cedar Rapids I do NOT get the runtime error code of "-251723766" during initialization.
    Do you have any ideas for what is causing this problem?

    Hello
      I never really understood what the session parameter was all about.
      The documentation says that the session parameter is optional.
      Based on your advice I have deleted the code from my block diagram that was doing an Open Session.
      Are there any example LabVIEW programs that I can study that actully use the Ethernet/IP S/W to connect to a PLC?
      I have attached 2 screen captures that show how my LabVIEW VI's are accepting the session parameter.
      Do you think I should delete the input and output parameters for session?
      Please let me know.
      Thank you
      Todd J. Miller
      319-295-8689
    Attachments:
    OpenSessionProblem#4.jpg ‏107 KB
    OpenSessionProblem#5.jpg ‏189 KB

  • How to get status of a sub process from the parent process.

    Hi,
    I want to get the status of a subprocess from the parent process (i.e. success or failure).
    How can I get this.
    Thanks in advance.
    Bye

    have a look at the workflow built-in vars:
    WF_ACTION_ERROR and WF_ACTION_RESULT or WF_CASE_RESULT
    WilfredS

  • How to get a voice mail or recording (from the microphone) to repeat?

    I want tp know how to get a voice mail to repeat, once I have listened to it.  Same question for something I have recorded with the microphone.

    Tap the voice mail or recording you want to repeat.  It should start playing from the begining again.

  • How to get cumulative decreasing values by substracting from the previous row.... in a dynamic added

    I have pdf table like this:-
    Header 1
    Header 2
    Header 3
    Header 4
    Header 5
    Header 6
    Header 7
    From
    To
    No. of Days
    Balance
    Date
    1
    2
    <ADD Button> / <Del Button>
    3
    4
    5
    This
    Row
    is
    730
    to
    be
    hidden
    DateFieldFrom
    DateFieldTo
    DateFieldTo-DateFieldFrom(Some No1.)
    Remaining1=uppervalue(730)-Some No1.
    Now when i click the <add  rows button>  rows are to be added and i have to get the valuesof Remaining2(Remaining1- Some No.2 )in the Added Balance Row
    how will i do this?

    Hi Luis,
    According to your description, you have a report with different dynamic columns. Now what you want is show your user percentage growth in your matrix report after your user select two of those columns (I think you may use parameter to achieve your “checkbox”
    function). Is my understanding correct?
    In Reporting Service, we can’t calculate dynamic columns with our build-in arrogation functions. So we need to add custom code into our report, and call those functions which defined in custom code in our expression. We have tested your scenario in our local
    environment. Here are steps and screenshots for your reference.
    Go to your Report Properties, add the custom code below into your report:
    Dim Shared Num1 As Double
    Dim shared Num2 As Double
    Public Function GetCalification(Calification as Double,Type as String,Type2 as String) 
    If Type = Type2 Then
       Num1=Calification
    Else
       Num2=Calification
    End If 
    Return Calification 
    End Function
    Public Function GetPec()
    Return (Num2-Num1)/Num1
    End function
    Create a matrix. Put PilarName into Row field, put Period into Column field. In Data field, put the expression below into the textbox:
    =Code.GetCalification(Fields!Calification.Value,Fields!Period.Value,Parameters!Period.Value(0))
    In our sample report, we created a parameter (named Period) for selecting two columns. You can replace “Parameters!Period.Value(0)” with your own parameter.
    Add an outside column at right (%Growth), put the expression below into the textbox:
    =Code.GetPec()
    Save and preview. The matrix and result looks like below:
    Reference:
    Custom Code and Assembly References in Expressions in Report Designer (SSRS)
    If you have any question, please feel free to ask.
    Best Regards,
    Simon Hou

  • How to get a data element's value from the data file while bursting

    For faxing bursted data into rightafx, I need to first burst my invoice data file into numerous pdf files in the filesystem, and then use the rightfax function of the delivery manager to send those files to different faxes. Integration with rightfax is not available in the bursting engine.
    While bursting the xml data file based on invoice number, I need to get the fax number that is different for each invoice in a java variable so that I can use it to pass fax number information to rightfax. Is it possible?
    Thanks.

    Can any one help?
    Edited by: MTW on Apr 16, 2010 6:58 AM

  • Have just reloaded a replacemen​t Palm from the company. I have downloaded Activesync 4.5 but when synchroniz​ing I am getting a support code 80072f7d message and the sync stops. What do I need to do now?

    null
    Post relates to: Treo 750 (Cingular)

    Go here Start > Settings > System > USB to PC uncheck the box. Let me know if this does not work
    Post relates to: Palm Z22

  • How to keep a back up of messages from the JMS queues?

    Hi,
    I need to keep a back up of messages which are coming in the JMS queue before they get consumed. This is for recovery purpose.
    I checked file store option but it doesnt have any time stamp on messages so dont know how to trace back messges if needed from file store.
    Please let me know if you guys have any idea to handle this.
    Thanks in advance
    Bips

    No. Not with Time Machine at least.
    If you tell Time Machine to backup the external then you will have it.
    Or you can manually copy it to another disk for storage outside of Time Capsule/TimeMachine.
    Allan

  • How do I restore my deleted text messages from the iCloud?

    Is there any way to restore text messages that have accidentally been deleted?

    You would have to restore from a backup made while your messages were still on your phone (described here: http://support.apple.com/kb/ht1766).  This will revert all data and settings to those contained in the backup, not just messages.  Before doing this be sure to import all photos and videos to your computer (http://support.apple.com/kb/HT4083) and back up your contacts (such as by syncing them with iCloud: Settings>iCloud>Contacts>On) as sometimes these get lost when restoring from a backup.

  • ProductException: (error code = 200; message="Java error"; exception = [jav

    hello
    Take me if you have the power to fa is that I have a good time trying to install the demo of sap, but I fail to do so últimamemente follows all the steps but in the end I get the following error java:
    productException: (error code = 200; message="Java error"; exception = java.lang.Exception)
    at com.sap.installshield.sdcstepswrapper.StepWrapperI nstallFiles.execute(StepWrapperInstallFiles.java:2 54)
    at com.sap.installshield.sdcstepswrapper.StepWrapperI nstallFiles.executeAllSteps(StepWrapperInstallFile s.java:224)
    at com.sap.installshield.sdcstepswrapper.StepWrapperI nstallFiles.executeAllInstallationSteps(StepWrappe rInstallFiles.java:177)
    at java.lang.Thread.run(Unknown Source)
    may be that the Java Virtual Machine? what virtual machine
    it is recomd
    i don´t know how to correct them
    thank you very much
    bye

    Hello,
    This looks like a known issue error code: 200
    check this document:
    https://www.sdn.sap.com/irj/sdn/downloaditem?rid=/library/uuid/6055f523-df6e-2910-f0bf-acccbb0a7d37
    Also, please make sure the service SAPNSP_00 @ OS level is running. If not, start the service manually and proceed with the installation.
    Hope it helps,
    Regards,
    Satish.
    Edited by: Satish Arram on Oct 10, 2008 6:30 PM

  • (error code = 200; message="Java error"; exception = [java.lang.Exception])

    Hi, I have several times tried to install ABAP Trial, but failed.
    So I need your help.
    As soon as I set up XP, I download and install the newest Java, then started installation of ABAP Trial.
    But at the end I just get an error message as belows.
    I hope you will guide me correct direction.
    Thanks for reading & Have a good day!
    (Jul 11, 2008 7:38:06 AM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, An error occurred and product installation failed.  Look at the log file C:\SAP\NSP\log.txt for details.
    (Jul 11, 2008 7:38:06 AM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
    STACK_TRACE: 15
    ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.execute(StepWrapperInstallFiles.java:254)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllSteps(StepWrapperInstallFiles.java:224)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllInstallationSteps(StepWrapperInstallFiles.java:177)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.install(StepWrapperInstallFiles.java:268)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.installProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.getResultForProductAction(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)
    (Jul 11, 2008 7:43:08 AM), Install, com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct, err, An error occurred and product uninstallation failed.  Look at the log file C:\SAP\NSP\log.txt for details.
    (Jul 11, 2008 7:43:08 AM), Install, com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles, err, ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
    STACK_TRACE: 15
    ProductException: (error code = 200; message="Java error"; exception = [java.lang.Exception])
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.execute(StepWrapperInstallFiles.java:254)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllSteps(StepWrapperInstallFiles.java:224)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.executeAllUninstallationSteps(StepWrapperInstallFiles.java:192)
         at com.sap.installshield.sdcstepswrapper.StepWrapperInstallFiles.uninstall(StepWrapperInstallFiles.java:313)
         at com.installshield.product.service.product.PureJavaProductServiceImpl.uninstallProductAction(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.processActionsFailed(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitComponent(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitInstallableComponents(Unknown Source)
         at com.installshield.product.service.product.InstallableObjectVisitor.visitProductBeans(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$InstallProduct.install(Unknown Source)
         at com.installshield.product.service.product.PureJavaProductServiceImpl$Installer.execute(Unknown Source)
         at com.installshield.wizard.service.AsynchronousOperation.run(Unknown Source)
         at java.lang.Thread.run(Unknown Source)

    Hi YUN SEOK,
    I got the same error than you when I tried to install SAP NetWeaver ABAP Trial Version. 
    Could you help me in giving exactly the link you wrote.
    https://www.sdn.sap.com/irj
    Where is located exactly the answer ?
    I looked at this link but I did not find the answer.
    So could you give me exactly the location in this link ?
    Thanks in advance.
    STD,

  • TS3694 I cant get my ipad 2 out of recovery. The apple icon stays on and nothing happens. I tried restoring it through Itunes but it comes up with a 3194 error code. I have the latest Itunes being 10.6.1.7 and the latest windows update.Can someone please

    I cant get my ipad 2 out of recovery. The apple icon stays on and nothing happens. I tried restoring it through Itunes but it comes up with a 3194 error code. I have the latest Itunes being 10.6.1.7 and the latest windows update.Can someone please help?

    Recovery Mode
    1. Disconnect the USB cable from the device, but leave the other end of the cable connected to your computer's USB port.
    2. Turn off the device: Press and hold the Sleep/Wake button for a few seconds until the red slider appears, then slide the slider. Wait for the device to turn off.
    3.While pressing and holding the Home button, reconnect the USB cable to the device. The device should turn on.
    4. Continue holding the Home button until you see the "Connect to iTunes" screen. When this screen appears, release the Home button. iTunes should alert you that it has detected a device in recovery mode. Click OK, and then click Restore to restore the device.
    Note: Data will be lost. You may have to repeat the above many times.

  • My Mountain Lion app failed while downloading, and now I can't download it without repaying for it.  How can I get my access code to work/download the app?

    My Mountain Lion app failed while downloading, and now I can't download it without repaying for it.  How can I get my access code to work/download the app?

    Welcome to Apple Support Communities
    Open App Store, select Account in Quick Links and press Show hidden purchases. If OS X isn't there, http://www.apple.com/support/mac/app-store/contact

  • Just tried to import CD in my iTunes music library, but get this error code "error occurred while converting file. You do not have the privilege to make changes"....any thoughts? Have not tried to change anything- only import CD ??

    Just tried to import a new CD into my iTunes music library, but get this error code "error occurred while converting file. You do not have the privilege to make changes"....any thoughts? Have not tried to change anything- only import CD ??

    Do you have read& write permissions to your iTunes library?
    See this thread: Re: "Error has occurred... You do not have the privilege to make changes."

  • I have recently restored everything on my iMac after getting a new hard drive. When i try to use Elements, i get the following error code   ERROR  150:30. Any ideas?

    I have recently restored everything on my iMac after getting a new hard drive. When i try to use Elements, i get the following error code   ERROR  150:30. Any ideas?

    Did you use migration assistant to copy over programs, documents, and settings? You can't do that with PSE. Elements is not a tidy package in accordance with the apple developer guidelines. The installer strews stuff all of your hard drive in place the migration assistant isn't programmed to look and you can never hope to find all h the bits. You must always install PSE from scratch on a new machine. By attempting to copy it you have made a lot of trouble for yourself.
    You will need to download and run this:
    Use the CC Cleaner Tool to solve installation problems | CC, CS3-CS6
    and then you can go around and manually remove what you can reach. Look in applications, your hard drive>library>application support>adobe, your username>library>preferences. In the user library also delete any saved application states for PSE.
    Then you can reinstall from scratch.

Maybe you are looking for

  • How do you use downloaded fonts in flash 8???

    i have downloaded several fonts from www.flashkit.com and would like instructions on how to make it apear in the font selection menu, is there a specific place i have to save it??? somewhere where i can import it??? please help me

  • RoboHelp won't output AIR Help

    I'm making my first forays into outputting an Adobe AIR help application.The problem is... I can't figure out how to actually output it! I'm attempting to output from RH8, and when I attempt to output, I get a rather unhelpful message: "Adobe AIR Out

  • Advice on splitting an application amongst projects; please.

    Advice on splitting an application amongst projects; please. Hi jDev Team. Please advise on how you envisioned a developer (or developer team) to split up a large scale enterprise application amongst projects. For example, a typical accounting system

  • Problem with af:Poll

    We are using the ADF polling component to execute/monitor a long running job of generating 2,600 reports on the server. The component needs to do about 260 iterations at the interval of 20 secs, in each interval it generates 10 reports. It does about

  • TS4256 How to open .RAF files from Fuji camera?

    How to open .RAF files from Fuji camera in Aperture 3?