Web service call using javascript

Hi All,
I am working on web service call using javascript. I used below code while calling web service on click event of button.
var e;
try
     var oListURL = "http://www.webservicex.net/CurrencyConvertor.asmx?WSDL";
     SOAP.wireDump = true;
     var service = SOAP.connect(oListURL);
     xfa.host.messageBox(service.toString());
     if(typeof service != "object")
          xfa.host.messageBox("Couldn't connect to " + oListURL);
     if(!service.ConversionRate(138,56))
          xfa.host.messageBox("The ConversionRate method does not exist on the service at " + oListURL);
     //call the service
     var svcResponse = service.ConversionRate(138,56);
     xfa.host.messageBox(svcResponse.toString());
     if(!svcResponse)
          xfa.host.messageBox("The service returned nothing");
catch(e)
     xfa.host.messageBox("Exception: " + e);
I do not get any response for it. I always get "0" as response.
How do i passed session id to soap header while calling web service in designer??
Is there any other adobe javascript with which i can call web service as well as i may able to provide session id to its soap header.
Request you all to share any information regarding this.
Thanks in advance.
Regards
Abhishek

Hi Abhishek,
This service seems to take the country codes as parameters, not the numerics 138,56, and I have always passed in the parameters as xml.
So I have just tried;
var svcResponse = service.ConversionRate("<FromCurrency>AUD</FromCurrency><ToCurrency>NZD</ToCurrency>");
and got a response
1.2557
Which is about right.
Hope this helps
Bruce

Similar Messages

  • Asynchronous web service call using PL/SQL

    Hi Guys,
    i'm using Apex 4.1.
    Is that possible to invoke a web service asynchronously within PL/SQL code block ? If so,
    How can i access the return value of the service when execution of that web service completes ?

    Bolev wrote:
    We have (Oracle 10g) automated process (ETL) based on internal data. Now there is an offer to incorporate existing web service call (let's say for additional record verification) in this process. Service call (I do not know what type of it yet) is using data from remote database which is not ours.Web service calls from PL/SQL is not that complex. You can use the standard UTL_HTTP package as shown in {message:id=4205205}.
    I never heard anybody goes this way especially for ETL processes.Well, if you push a million rows through the ETL process and the call overhead for the web service call (assuming perfect network and web server response) is 1 sec, that translates into 277+ hours of runtime alone for the validation to be done via web service.
    So yeah - it would seem kind of silly to use something like a web service to validate large volumes ETL data.

  • External Web Service call using WebMethods in Abap

    Hi everyone,
    I have presented with writing an interface, requested by a third party, in SAP ABAP that will call external web services from a java system. What I have been told is that I will be calling these services through webMethods. What I take is that webMethods is an SAP proxy wrapper around the web service. Beyond that I do not know what any of this is. I have asked my long-time ABAP developers and they have not seen any of the web calls through webMethods. Can someone present me with a basic understanding, maybe some code examples too? Also is this a standard function module call or a method in a class modules? How will it look to ABAP?
    Thanks for any info you can provide,
    Steve

    Hello,
    to be a bit more precise, WebMethods (or Business Connector) will register in sm59, and then you can make a function call in ABAP to this remote destination.
    You will have to check what parameters the WebMethods Service needs and pass them from ABAP.
    WebMethods then will take care of the WebService call to the external system and send the result back.
    CSY

  • Javascript web service calls fail after 10.1.5/11.0.01 updates

    * Update #2 - I've confirmed that we are seeing errors because the HTTP request is being made as a POST using 10.1.5/11.0.01 in Chrome/Firefox/Safari.  Accessing the same file in IE, the request is made using a GET.  Using Reader 9.5.0 in Chrome also uses a GET.  Can someone please explain why the HTTP request is being submitted as a POST following the 10.1.5 update?
    * Update - I have found in my web service log that it is failing with a message that the attempted POST method is not allowed. Could the Reader updates be causing this call to be made as a POST when it was previously a GET?
    I am using PDFs with Reader Extensions enabled that make web service calls via javascript.  These calls have been working correctly in multiple environments for months and only began failing with the latest updates.  After the latest Reader updates, these calls fail when using Chrome, Firefox and Safari. 
    Internet Explorer works correctly.  Saving files locally and opening them in Reader also works correctly.  It is only running 10.1.5 or 11.0.01 in these specific browsers where this issue occurs.  10.1.4 and 11.0.0 do not experience this issue in any browsers. 
    I have tried disabling Enhanced Security and updating Trust Manager to allow Internet Access from PDFs.  Neither change corrected the problem.
    Can someone tell me what may have changed in 10.1.5/11.0.01 that would cause these calls to start failing?
    The javascript at issue looks like this:
    var serviceKeyResult.rawValue = Get(serviceKeyUrl)
    The error we get is "Error: Error attempting to read from file: {URL}"

    Thanks for pointing that out.  The javacript was implemented by a third party, so I was not aware that the function wasn't part of the standard APIs.  I'll get more detail on what is happening inside that method.
    For now we have updated our web services to accept both a GET and a POST to avoid this issue.

  • Configuring SSL to make a HTTPS web Service call from XI

    Hi All,
    We are making a <b>https web service call</b> using soap adapter from XI. Looking at the various posts and SAP help links, we are configuring SSL for the same.
    The procedure given in SAP help has been followed to configure SSL but with no luck. If someone had done this could you please give a <b>step by step procedure</b> to configure SSL, we might have missed out on something.
    Also are there are <b>any other settings apart from SSL</b> to be done to make a  https web service call using soap adapter from XI.
    Cheers,
    Chandra

    user13046122 wrote:
    I have an old pl/sql "helper" package, originally written to make SOAP Web Service calls from the database - it uses UTL_HTTP to invoke the target services.
    I now need to make SOAP Web Service calls - from an 8.1.7.4 database
    But the version of UTL_HTTP inside 8.1.7.4 does not contain the functions needed in the helper package
    Can anybody suggest a means of making SOAP Web Service calls from an 8.1.7.4 database ?I think you'll be very lucky to find anyone here who still has access to a version of Oracle that is that old.... I mean... that's like what? 15 years old at least? I'm surprised you've still got hardware that can run that.
    It would probably help if you could post what code you've got and explain which function(s) it's complaining about, as I doubt people will want to guess.

  • Ssl web service call problem

    Hi,
    I have a form that calls a web service on start up in the docReady event.
    This has been working well in one of our development environments where the the web service is on a plain non secure connection.
    However, when we try and make the same web service call using ssl instead, the returned values are not populated in the form. If I run the call twice in a row, it works as usual but this is not an acceptable solution.
    The other web services calls on the form all work as expected. It is just this one being called during the docReady event.
    Has anybody else encountered this problem?
    Thanks,
    Luke

    Hi Luke,
    I had a similar problem and the reason was that the SSL certificate on the server was not valid (without any errors or warnings).
    You might want to first try to access the service from a browser and make sure you don't get any security warnings, if you get any security warnings, Adobe won't be able to call that service.
    Hope this helps.
    Thanks,
    Vikram

  • Primavera Web service call to read project using BPEL

    Hi,
    Please let me know if any sample available in BPEL that invoke primavera web service to read the projects.
    we tried but we are getting error of accessing endpoints.
    please let me know how to fix and available sample
    Thanks

    I have tried couple more things:
    1) I tried using HttpWatch (HTTP sniffer) with no luck (basic version works only on selected websites and premium is not offered on trial basis)
    2) I have implemented and triggered WS call using JavaScript and that has revealed what I was worried about (limitations due to licensing).
    When I am executing WS using reader (regardless if PDF has been Reader Extended or not) I am getting same error message:
    "NotAllowedError: Security settings prevent access to this property or method"
    When I am opening same form in Acrobat Professional I am getting message:
    “InvalidArgsError: Invalid arguments.”
    Latter error does not make much sense since call is failing straight after requesting URL with Web Service (unless WS definition is not correct, which would be weird to say the least since I can import/bind it with no problems inside Adobe Designer).
    I did some more reading about licensing issues/restrictions (see: http://forums.adobe.com/thread/286035?decorator=print&displayFullThread=true) and it seems that I would need to use LiveCycle ES server to enable WS calls for PDF in Adobe Reader which is absolute overkill in my opinion.
    If anyone knows other way to make WS work in Adobe Reader (w/o paying for LC ES license or using server scripts instead) please do share your idea.
    Regards
    Michael

  • How can I use web service call for edit a report with SSRS in Java Struts2 web application

    Hello im new in SSRS technologie and I would like make web service call at my SSRS server. Is sombody can help me ?
    - What API should I import in my project ? I use Maven can I found this API on Maven repository ?
    - I would like have an sample of code which initialize the ReportingService, do the call and process result.
    We use the SQL Server ReportingService 2008 R2 and currently we made HTTP call like this : http://<ssr_server>/ReportServer/Pages/ReportViewer.aspx?%2fSSRS_OMB%2fMyReport&rs:Command=Render&MyParam=<value>
    Regards

    Hi ombinte,
    SQL Server Reporting Services provides access to the full functionality of the report server through the Report Server Web service. Because the Report Server Web service is an XML Web service which uses Simple Object Access Protocol (SOAP) over Hypertext Transfer
    Protocol (HTTP), any SOAP-aware application or development tool can communicate with the SSRS web service.
    There are three primary ways to develop Reporting Services applications based on the Web service, please see:
    Develop applications using Microsoft Visual Studio and the Microsoft .NET Framework SDK.
    Develop applications using the rs utility (RS.exe), the Reporting Services script environment.
    Develop applications using any SOAP-enabled set of development tools.
    For more information about Report Server Web Service, you can refer to the following document:
    http://technet.microsoft.com/en-us/library/ms152787.aspx
    Hope this helps.
    Thanks,
    Katherine Xiong
    Katherine Xiong
    TechNet Community Support

  • ABAP source code to connect to third party systems using web service calls?

    Hi all,
              can any one provide an example ABAP source code to connect to third party systems using web service calls? The base system is CRM.

    Do you want to call a web service in a remote system, or do you want to provide a web service?
    If you want to call a web service you should create a proxy object via SE80. Open your development package, right click on the tree entry and choose: Create -> Enterprise Service / Web Service -> Proxy Object and provide the needed information (including the WSDL description file). You may then use the proxy object to call the web service (if the connection and everything else works right).
    See [http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm|http://help.sap.com/saphelp_nw04/helpdata/en/9b/dad1ae3908ee44a5caf57e10918be9/content.htm]

  • Using Web Dynpro authentication for a Web Service call

    Hi all,
    I want to develop a Web Dynpro that calls a Web Service running on the same Web AS (7.0). The Web Dynpro will be integrated in a Portal. The web service that has to be called is automatically generated when we create a guided procedure :
    http://help.sap.com/saphelp_nw2004s/helpdata/en/44/44c59fd7c72e84e10000000a155369/frameset.htm
    In my Web Dynpro, I imported the WSDL of this WS and created a model.
    The first time I tried to call the WS in my Web Dynpro I got an authentication error :
    Service call exception; nested exception is: com.sap.engine.services.webservices.jaxrpc.exceptions.InvalidResponseCodeException: Invalid Response Code: (401) Unauthorized. The requested URL was:"http://<myHostName>:50100/GPRuntimeFacadeWS/GPProcessExposing?style=document&pid=CA544E9B629A11DB91480017A48D672A&pver=0.5"
    So I hard-coded an HTTP authentication :
         model._setUser("myWASuser");
         model._setPassword("myPassword");
    And the Web Service call now works.
    Now the next step is that the WS call is made by the user that runs the Web Dynpro. So I found this documentation :
    http://help.sap.com/saphelp_nw04/helpdata/en/59/e8e95d1eba48dfa86ae91ad8816f5d/frameset.htm
    It would resolve my authentication problem, AND the transport issue : at the moment the Web Service URL is stored in the Logical Port of the WD model, and at transport time, a rebuild of the WD project will be needed.
    So I applied what is said in the doc : from the point of view of the Web Service consumer, I just had to add :
        model._setHTTPDestinationName("STARTGP");
    (where STARTGP is the name of the destination I created in the Visual Administrator with a "Logon Ticket" authentication.)
    before the execute(), and I removed my hardcoded authentication.
    Unfortunately, nothing changes... I still get a 401 authentication error.
    Does anyone have an idea about this ? Or maybe a workaround ?
    Thanks in advance for any suggestion.
    Regards,
    Julien

    Hello Julien,
    I have a scenario similar to yours. A client webdynpro application accessing a EJB methods exposed as web service. Those EJB's methods calls R3 RFC's. The client requirements' was to allow SSO through all the layers (Webdynpro -> EJB WS -> RFC). The Webdynpro and EJB's are deployed on the same WAS.
    Solution:
    1 - Create a RFC Destination on Visual Administration provide the R3 connection parameters and set the Authentication for "Current User (Logon Ticket)". Save your Destination;
    2 - In your EJB Project open your Web Service Configuration, on the Security page, set:
        Authentication Mechanism: HTTP Authentication
        Basic (username/password)
        Use SAP Logon Ticket
    3 - In your EJB, implement the following code to create JCO Client for the RFC invocations:
    Object obj = ctx.lookup(DestinationService.JNDI_KEY);
        DestinationService dstService = (DestinationService) obj;
        RFCDestination dst = (RFCDestination) dstService.getDestination("RFC", "<YOUR_RFC_DESTINATION_NAME>");
        Properties jcoProperties = dst.getJCoProperties();
        JCO.Client jcoClient = JCO.createClient(jcoProperties);
    4 - In your EAR Project, open your "application-j2ee-engine.xml" and add the References:
         "tc/sec/destinations/service" as Service
         "tc/sec/destinations/interface" as Interface.
    5 - Create your EAR File and Deploy;
    6 - Check if the web service now requires Authentication: go to http://<host>:<port>/index.html and click on Web Services Navigator. Test your Web Service. Your Web Service should requiere you to log in before execute the test;
    7 - Go back to your Visual Administrator and create a HTTP Destination. Provide your WS URL (should be something like "http://<host>:<port>/<WS_NAME>/Config1?style=document"). Choose Authentication: Logon Ticket. Save your Destination;
    8 - Go to your webdynpro project, import your WS Model. (If you have already created it, you have to delete it and import it again, refer to this blog on how to reimport WS Models: /people/bertram.ganz/blog/2005/10/10/how-to-reimport-web-service-models-in-web-dynpro-for-java  How To Reimport Web Service Models in Web Dynpro for Java );
    9 - Open your model's Logical Ports node, go to the Security tab, and choose "Use SAP Logon Ticket";
    10 - In your webdynpro code, before you call the ws invocation (should be something like that: <YOUR_NODE_DEFINITION>.modelObject().execute();), include the following line:
    <YOUR_NODE_DEFINITION>.modelObject()._setHTTPDestinationName("<YOUR_HTTP_DESTINATION_NAME>");
    11 - Save All Metadata and deploy your Webdynpro App. Test your results.
    I hope it helps you, as the documentation on how to implement this scenario is scattered through the SDN and all the SAP help portal.
    Best regards,
    Paulo.

  • What stub code does APEX uses when making a web service call ?

    What stub code does APEX uses when making a web service call (manual web service reference)
    I am using APEX (which was part of the 11g installation).

    Hi Steve,
    Some options for the same issue:
    web service time out
    How to check for Web Srvice Timeout in ABAP Proxy call
    Regards
    Vijaya

  • Out of memory when coverting large files using Web service call

    I'm running into an out of memory error on the LiveCycle server when converting a 50 meg Word document with a Web service call.  I've already tried increasing the heap size, but I'm at the limit for the 32 bit JVM on windows.  I could upgrade to a 64 bit JVM, but it would be a pain and I'm trying to avoid it.  I've tried converted the 50 meg document using the LiveCycle admin and it works fine, the issue only occurs when using a web service call.  I have a test client and the memory spikes when it's generating the web service call taking over a gig of memory.  I assume it takes a similar amount of memory on the receiving end which is why LiveCycle is running out of memory.  Does any one have any insight on why passing over a 50 meg file requires so much memory?   Is there anyway around this?
    -Kelly

    Hi,
    You are correct that a complete 64bit environment would solve this. The problem is that you will get the out of memory error when the file is written to memory on the server. You can solve this by creating an interface which stores large files on the server harddisk instead, which allows you to convert as large files as LC can handle without any memory issue.

  • Calling a web service that uses DIME

    Can ColdFusion interact with a web service that uses DIME? Has anyone worked with that?
    Thanks.

    CF doesn't support DIME "natively", but Apache Axis does, and that's the library that CF uses. So, you'll have to drop to Java to do this.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Asynchronous web service call doesn't work

    Hi,
    I'm trying to convert a synchronous web service call into an asynchronous call. (Folder-level Javascript, Acrobat Professional 8.1, Windows XP).
    Everything works fine when I call Soap.Request as a synchronous call. It calls the web service and gets the expected result. However, when I try to convert Soap.Request into an asynchronous call by adding the OAsync property, as described on pp. 198-199 of "Developing Acrobat Applications Using JavaScript," NONE of the various OAsync functions (i.e. result, response, wait) are ever called. IOW, the Javascript code continues executing after the Soap.Request call and doesn't wait for my web service call to return. Indeed, the web service method on the server doesn't even BEGIN to execute by the time the Javascript code runs to completion. (I can confirm this by watching my ASP.Net code execute in the Visual Studio debugger. In fact, the Javascript code runs to completion even before the Global.asax Session_Start code begins to execute, much less the web service method itself.) So, the problem is not with the web service, which works fine when Soap.Request is called as a synchronous method.
    To reiterate, my Javascript code is identical to the code on pp. 198-199 of "Developing Acrobat Applications Using JavaScript." In troubleshooting this, I've tried calling the OAsync functions (mySync.wait(), mySync.result(), mySync.response()) after calling the Soap.Request, but nothing works.
    Is there something else that I must add to my Javascript code (e.g. an additional Soap.Request property, or something after calling Soap.Request) to force the Javascript to wait until the web service method returns?
    Thanks,
    Bill

    Hi Lukasz,
    you can also define namespace the later in the operation GetOpenOrders itself, e.g.:
    <tem:GetOpenOrders xmlns:tem=u201Dhttp://tempuri.org/u201D>
    It does not need to be part of the Envelope element.
    Best regards
    Bastian

  • Making Web Service calls from a Form in the WorkSpace

    I am getting conflicting information about this, so I hope someone here could clarify it. TIA.
    This is what I want to do:
    after a form is displayed/launched in the WorkSpace,
    when the user Tabs out of a field (Exit event) on the form,
    I want to make a Web Service call from the form,
    get the result from the WebService,
    and use the Result to populate another field on the form.
    I know for certain that this works if I Reader-Extend the form,
    and I set the JavaScript at the Exit event (to execute WebService call)
    as "Run At Client".
    The question is:
    can I make the WebService calls without Reader-Extending the form???
    I have been told that, yes you can,
    but *only if* you let the JavaScript "Run At Server".
    I tried that, but it caused the Reader to crash.
    Some other people told me,
    no you can not,
    even if you "Run At Server", the form still needs to be Reader-Extended,
    when using it in the WorkSpace environment.
    So, what is the truth? can someon tell me?
    Can I make WebServers calls from the Server-side at all?
    Do I really need to Reader-Extend the form even if calling it from server side?
    What exactly is it SUPPOSED to work?
    thanks

    yes, thank you both. I got the fix from Adobe Tech Support last week. It's working.
    The fix I got included a rather complex looking "Submit Service" though. Makes me wonder how a regular user would know that he needs to write such a Submit Service?? and even if he knows that he needs a special Submit Service, would he know how to write it??? I found no documentation for this type of things either.
    Shouldn't this solution be published somewhere in Adobe's website? Dev Lab perhaps?

Maybe you are looking for

  • Os 9 classic install loops

    I bought an Ebay imac g4 "lampshade" running OS 10.4.11 minus OS 9. Attempting installation from an OS 9 CD two icons appear in the dock: "Classic Startup", and "Install Language Kits". They hop for a while until this message appears: "Classic cannot

  • Mini DisplayPort TOO LOW!!!!

    Seriously? This major design flaw is making me so angry... Check it out; http://i36.tinypic.com/1zguolh.jpg I bought a Mini DisplayPort to DVI adapter. I tried to put it in the back of my iMac but noticed after a lot of frustration that the whole por

  • Social networks made totally in Flash

    hello i developed a social network using flash (actionscript 3) , php and mysql and it interest in some fields of science. i would like from you to test it (if you find any mistake please tell me) this's my website: www.foundpen.net Sincerely.

  • Cannot not click on menu that appears when i right click my taskbar, as the right click menu dissapears when i move mouse over to the right click menu

    PROBLEM: RIGHT CLICK CONTEXT MENU DISAPPEARS WHEN TRYING TO LEFT CLICK AN OPTION Hi, Im using Windows 7, and i could always go down to my TaskBar and Right Click Icons, and active icons, which would bring up the standard Right Click Menu list. PROBLE

  • Is it possible to recover a foler that was replaced?

    A problem has occurred and I was wondering if anyone might know how to fix it. This is what happened. -A folder with the same name existed on a computer and an external HD. These folders had different contents though (all image files). -The folder fr