Calling Web services

Please give me exactly code snippet for calling Web services.

Welcome on the support forums.

You can find some samples using the search tool.
There is no 'exact snippet", just a few general samples using ksoap2 or heels.

Tags: BlackBerry Developers

Similar Questions

  • ADF Mobile | call web service from Java. non-reflecting values in the AMX page

    Hi all

    I am using JDEv11124 with ADF Mobile extensions39.62.64.

    My use case is as follows.

    1. my application has 2 Pages a. Login home b.

    2. in the user login Page between user name and click on the "submit" button.

    3. on the homepage I displayed the company they joined.

    4. in the "submit" button is clicked, action defined in the support bean method will be called.

    5. by supporting the action bean method, I'll call the method of the Web Service to validate the entered user name, if the entered user name is valid, that I have to post its company name in the home page.

    6. I am moving back from the web service of datacontrol in Home.amx page

    7. calling web services from Java as follows:

    GenericType = result

    (GenericType) AdfmfJavaUtilities.invokeDataControlMethod ("Comp", null, "getCompany",

    pNames, params,

    PTypes);

    System.out.println ("after the call to the service" + result.getAttributeCount ());

    8. in the Java class, I get the response correctly (as the company designating the username entered as 'SOCIETY'), where when I navigate to the home page, I don't see any results for the method return (name of the company that dropped like OutputText in Home.amx)

    Did I miss something for this. or something more that I need to do to make it work?

    Please suggest.

    Thank you

    Vieira

    Hi all

    I was able to achieve this by executing my method in bean support.

    This code is as follows:

    AdfELContext adfELContext = AdfmfJavaUtilities.getAdfELContext ();

    MethodExpression me =.

    () AdfmfJavaUtilities.getMethodExpression

    "#{bindings.retreiveLocationInformation.execute}".

    (, Object.class, Class [] {}) new;

    me. Invoke (adfELContext, new Object [] {});

    Thanks to Luc Bors WebLog Luc Bors Weblog: ADF Mobile: implementation of "Pull to refresh" model

    Kind regards

    Vieira

  • German characters problem when calling Web Services via UTL_HTTP

    Dear members,

    I try to call the services of SAP CRM Web of Oracle PL/SQL. I used following code which works very well.
    -- call web service using Oracle UTIL_HTTP packages
    DECLARE
      http_req utl_http.req;
         http_resp utl_http.resp;
         lv_request VARCHAR2(32767);
         lc_response CLOB;
         lv_buffer VARCHAR2(32000);
         lv_name          VARCHAR2(256);
         lv_hdr_value     VARCHAR2(1024);     
         l_xml XMLType;          
    BEGIN     
         utl_http.set_persistent_conn_support(true);
         utl_http.set_transfer_timeout(600);
         
         http_req:= utl_http.begin_request
                                       ( url => 'http://xyz3ni92.server.xyz.com:8045/sap/bc/srt/xip/sap/crm_bupa_custid_qr/011/customersbycrmid/http_binding'
                                       , method => 'POST'                              
                                       );
         lv_request := '<?xml version="1.0" encoding="UTF-8"?>'
         ||'<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:glob="http://sap.com/xi/CRM/Global2">'
       ||'<soap:Header/>'
       ||'<soap:Body>'
          ||'<glob:CustomerCRMByIDQuery>'
             ||'<MessageHeader>'
                ||'<ID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ID>'
                ||'<UUID></UUID>'
                ||'<ReferenceID schemeID="?" schemeAgencyID="?" schemeAgencySchemeAgencyID="?"></ReferenceID>'
                ||'<ReferenceUUID></ReferenceUUID>'
             ||'</MessageHeader>'
             ||'<BusinessPartnerSelectionByBusinessPartner>'
                ||'<UUID schemeID="?" schemeAgencyID="?"></UUID>'
                ||'<InternalID>2200117598</InternalID>'
             ||'</BusinessPartnerSelectionByBusinessPartner>'
          ||'</glob:CustomerCRMByIDQuery>'
               ||'</soap:Body>'
         ||'</soap:Envelope>';     
         /*set username and password*/
         utl_http.set_authentication (
                   r => http_req,
                   username => 'WS_USER',
                   password => 'WS_PASSWORD',
                   scheme => 'Basic',
                   for_proxy => false);     
                   
         utl_http.set_header(http_req, 'Content-Type', 'application/soap+xml;charset=UTF-8'); 
         utl_http.set_header(http_req, 'Content-Length', LENGTHB(lv_request));
         utl_http.write_text(http_req, lv_request);
         /*Make HTTP call*/
         http_resp:= utl_http.get_response(http_req);
         
         /*read response text from response*/
         BEGIN
                   LOOP
                             utl_http.read_text(http_resp, lv_buffer);
                             lc_response := lc_response || TO_CLOB(lv_buffer);
                   END LOOP;
         EXCEPTION
                   WHEN OTHERS THEN
                        -- ora-29266 end-of-body reached
                        IF SQLCODE <> -29266 THEN
                                  RAISE;
                        END IF;
         END;
         utl_http.end_response(http_resp);     
         l_xml := XMLType(lc_response);
         /*Log response for testing*/
         DELETE FROM webservice_log;
         INSERT INTO webservice_log (seq_id,xml_response) VALUES (sqe_Webservice_Log.NEXTVAL,l_xml);
    EXCEPTION WHEN OTHERS THEN
              RAISE;
    END;
    However, if there are any German character in SAP, then they are replaced by UNWANTED data when they come to Oracle.

    If I invoke continues the same web service tools like SOAP-UI, then German characters do very well. I've also drawn web service queries and answers of the side SAP, and there response shows fine. When it comes to Oracle, they are themselves corrupt.

    I'm sure it's something to do with the character, but I am not able to find where and what should I fix/change.

    Thank you for your help in advance.

    DB: Oracle Database 11 g Enterprise Edition Release 11.2.0.1.0 - 64 bit Production
    NLS_DATABASE_PARAMETERS
    PARAMETER                      VALUE                                  
    ------------------------------ ----------------------------------------
    NLS_LANGUAGE                   AMERICAN                                 
    NLS_TERRITORY                  AMERICA                                  
    NLS_CURRENCY                   $                                        
    NLS_ISO_CURRENCY               AMERICA                                  
    NLS_NUMERIC_CHARACTERS         .,                                       
    NLS_CHARACTERSET               AL32UTF8                                 
    NLS_CALENDAR                   GREGORIAN                                
    NLS_DATE_FORMAT                DD-MON-RR                                
    NLS_DATE_LANGUAGE              AMERICAN                                 
    NLS_SORT                       BINARY                                   
    NLS_TIME_FORMAT                HH.MI.SSXFF AM                           
    NLS_TIMESTAMP_FORMAT           DD-MON-RR HH.MI.SSXFF AM                 
    NLS_TIME_TZ_FORMAT             HH.MI.SSXFF AM TZR                       
    NLS_TIMESTAMP_TZ_FORMAT        DD-MON-RR HH.MI.SSXFF AM TZR             
    NLS_DUAL_CURRENCY              $                                        
    NLS_COMP                       BINARY                                   
    NLS_LENGTH_SEMANTICS           BYTE                                     
    NLS_NCHAR_CONV_EXCP            FALSE                                    
    NLS_NCHAR_CHARACTERSET         AL16UTF16                                
    NLS_RDBMS_VERSION              11.2.0.1.0   
    Kind regards
    Hari

    added other details by: Hari_639 on April 24, 2013 18:45

    I'm not really experienced with utl_http, but maybe you'll read on SET_BODY_CHARSET in the documentation.
    ISO-8859-1 is the default characterset, until you specify the characters in the attribute content_type and text media.
    But your media type is not text, then perhaps affecting the body charset UTF - 8 can help.

    concerning

  • Error object VO when calling Web Service.

    Hello
    I created a page with 5 field lookup with three buttons and text.

    The features are:

    1. as the page loads I call Web Service to set the values in the fields.
    2. when the user is entering new values or changed the old values and click on the 'save' button, new web service is called for that store values.

    Problem is when changing the value of choice of message. For the choice of the message that I created a VO lookup_code and sense.

    When I click on 'save' button it shows me error
    Attribute set for LookupCode in view object EncryptionModeVO1 failed
     
    Kind regards
    Ajay

    Well, you use certain methods (like setattributevalue, setrendered etc.) in processformrequest that goes against the standards. You must use SPEL approach wherever possible.

    You can hide the exception of developer mode. See thread Re: OAF: masking errors and Exceptions at the top of page OFA for details, but keep in mind that these errors may be valid in some cases.

    Thank you
    Shree

  • BlackBerry, call web services via the SSL protocol

    Hi guys,.

    We are developing an application BlackBerry to OS 4.1 and we test it on the 8330.  This application calls several web services on a remote server via the SSL Protocol (side).  There is a valid certificate from Entrust installed on the remote server - it works properly with all major desktop browsers.  The certificate has not been installed on the BES - is it necessary?  Some BlackBerry devices will be linked to a company BES, others not.

    When the application calls the web service, a window opens with the following message: "you try to open a secure connection, but the server certificate is not approved."  Continue to push works fine, but the window opens again a few moments later.  Pushing view certificate indicates that the certificate is considered invalid ('unverifiable Cert chain').  The same information is given when you navigate to the certificates of the aircraft.  Certificate trust pushing watch a 2nd window asking you the key Store password, which we are not aware of.

    You guys can help us with this?

    Thank you!

    We have solved the problem.  It seems that the BlackBerry device is having a hard time with a certificate signed by the Entrust 2048 bit root certificate.  Give us a new intermediate certificate signed by their 1024-bit root certificate, which we have installed on our Apache server.  While the window 'certificate is not approved' arises at once, pushing "Continue" worked and it never came up again.  To do this, it will probably install the certificate on the BES, something we don't have yet.

    Thank you for taking the time to answer!

  • Call web service from DB - multi language

    Hello

    DB version: 11.2.0.1

    I want to call the web database service, this web service includes several languages, in the case below the web service called successful but not English seem as well, the language is there any property must be added to it?

    DECLARE
          service_                UTL_DBWS.service;
          call_                   UTL_DBWS.call;
          service_qname           UTL_DBWS.qname;
          port_qname              UTL_DBWS.qname;
          xoperation_qname        UTL_DBWS.qname;
          xstring_type_qname      UTL_DBWS.qname;
          response                SYS.XMLTYPE;
          request                 SYS.XMLTYPE;
          code                    VARCHAR2 (1000);
          name                    VARCHAR2 (1000);
        l_str                     LONG;
       
    BEGIN
          service_qname := UTL_DBWS.to_qname (NULL, 'AdhaCpcWsService');
          service_ := UTL_DBWS.create_service (service_qname);
          --
          call_ := UTL_DBWS.create_call (service_);
          --
          UTL_DBWS.set_target_endpoint_address (call_,'http://aaaaa.com/WebServices-ADHA/AdhaCpcWsPort?wsdl');
             
          UTL_DBWS.set_property (call_, 'SOAPACTION_USE', 'TRUE');
          UTL_DBWS.set_property (call_, 'SOAPACTION_URI', 'process');
          UTL_DBWS.set_property (call_, 'OPERATION_STYLE', 'document');
    
          request :=
                sys.xmltype (
                      '<adhaSearch xmlns="http://aaaaa.com/">
                      <cbaNumber>29291619</cbaNumber>
                      </adhaSearch>');    
    
          response := SYS.UTL_DBWS.invoke (call_, request);
       
          DBMS_OUTPUT.put_line (response.getstringval ());
    
    
    End;
    
    
    
    

    He solved by adding this after response

    answer: = XMLType (response.getBlobVal (NLS_CHARSET_ID('CHAR_CS')), NLS_CHARSET_ID ('UTF8'));

  • How to call web services from other applications of E9?

    We have an obligation to look to the top of the account ID of a master data management application (no SFDC). The purpose of doing so is to find the account associated with a perspective on the basis of the corporate name, address, city, State, country... The application can expose a web service in search of account. I can call the web service of E9?

    Not directly.  A solution using Eloqua would create a cloud connector, but the code that connects to Eloqua and other web service live outside these two systems.

    Another approach, I recommend if you use Salesforce and the lead will do, there would be screaming to the webservice from Salesforce and have the info power back to Eloqua through integration of eloqua/crm normal.

  • Call Web Services leave Jdev 11.1.1.5

    Hi experts,


    I followed this tutorial

    https://blogs.Oracle.com/middleware/entry/calling_web_services_using_adf_11g

    To create a Web Service data control and test a simple call to a find method, which returns records in N. My problem is that no data is returned even when the service is in place and a test using Weblogic test Client.

    I get no error message or exception, just 'No Data to display"in the table that needs to print the results.


    Am I missing a step?


    Best regards

    Jose.

    Hello

    Forget about it. The problem has been generated by an error in the web service definition.

    Best regards

    Jose.

  • Call web service from pl/sql

    Dear all,

    I have the web service where I need to take the picture as a binary stream and insert it into the blob.

    What is the best way to call the web service and store a photo as a binary stream (jpg file) into blob?

    Kind regards

    E.

    852611 wrote:
    Thank you very much for helping me to invoke the web service in my database.

    I received the message, now I need to decode an image base64binary. Is it possible to make hollow pl/sql or java should I use?

    PL/SQL. No need for Java.

    An example of how encoding works is in {message identifier: = 10364104}. You simply do the reverse (decoding) that makes the example code (coding).

  • ADF page call Web Service with several params the right way

    Hello

    I use JDev 11.1.1.4.0.

    I have a web of e-mail notification service which takes 4 parameters, to, subject and body. What I need to do, it's at the end of each "commit", calling this web service to send a notification to a group of viewers telling them a new record has been created. Here are the steps of my work to make it work:

    1. creates a data control of web service using WSDL email notification.
    2 drag - move the control of data on page jspx as a parameter in the ADF.
    3 set the Visible of the presentation of the Panel shape to "False" so that the control does not appear.
    4. in a backingbean where is the 'onSave()' method, I put the code to call the web service.
    // in onSave() method after successful commit
          ValueExpression veFrom =
              efactory.createValueExpression(elctx, "#{bindings.from.inputValue}", Object.class);
          veFrom.setValue(elctx, "[email protected]");
    
          ValueExpression veTo =
              efactory.createValueExpression(elctx, "#{bindings.to.inputValue}", Object.class);
          veTo.setValue(elctx, "[email protected]");
    
    // omitted rest of the params for brevity
    
          OperationBinding method = bindings.getOperationBinding("process");
          method.execute();
    This code works, but I don't know if I'm doing things. For some reason, there is a better way to achieve what I need.

    Thank you very much in advance for your comments francs and suggestions.

    Bones Jones

    Published by: Bones Jones on April 29, 2011 06:44

    Check out this blog of Shay - which describes exactly the same scenario:
    http://blogs.Oracle.com/Shay/2009/07/java_class_data_control_and_ad.html

    Instead of setting the visible property of panelFormLayout to false, the author removes the user interface components unwanted on the page in step 7)

    7. deletion of a component of a page JSF without deleting is mandatory

    Thank you
    Nini

  • How to call Web Services in JDeveloper

    Hi friends

    I m new in the ADF, I call the webservices in JDeveloper but I m stuck, suspicion would be very useful. Thanks in advance.


    Thank you
    Pratap

    Hello

    You can create a client for the web service (project right click-> New-> company Tier-> Web-> Web Service Proxy Services),
    or you can create a Web Service data control (project right click-> New-> company-> Web Services-> Web Service level data control).
    In both cases you must provide the URL of the web service.

    Check this for more details http://download.oracle.com/docs/cd/B31017_01/core.1013/b28764/web_services003.htm

    Pedja

  • Calling Web service to orchestration by reader

    Hello

    I have a form where I want to do a search for values that are outputs on a given orchestration.  When I drive extend the form to web service calls, it works fine of Reader 9, but does not work when the player is opened in a browser window.  Is there anything else you need to submit a web request to the browser based player?

    Also - I thought it was possible to make the web service calls of a form without drive to extend too long that your form has been made via the reader in a browser window?

    Thank you

    Jigster

    There is nothing "special" you need to do to make it work from a browser... .it should work. You get errors? Your browser may block the WS call?

    For your second question... You'll always need to drive range for Web Service calls in the player or a browser.

    Paul

  • Calling web services from PL/SQL

    Hello

    We have a requirement where we need to call a WebService from PL/SQL.
    I believe that we have an API of PL/SQL, which allows you to use external web services.

    I was looking for other possible options as to consume the web Service of PL/SQL.

    The one you suggest other options, and what option is best to consume the web service.


    Thank you
    AB

    Hello

    I used the http of the utl package.
    Apart from this you can also use java stored procedure. I haven't used this approach, but I found a blog for the same:

    http://technology.AMIS.nl/Blog/348/consuming-Web-services-from-PLSQL-part-i-using-Java-stored-procedures

    Kind regards

    Ketan

  • Call Web Service via a Java Application and analyze the response

    I have currently developed a service web (http://nycews.datajump.com/ATMUtilities.asmx/GetReverseGeoCode?Lat=42.9790550&Lng=-78.7856140) as returnes an address in xml format. I need to know what is the best way to call this connection and parse the XML to display the address to the user in a popupscreen.

    Here is a corrected version...

       public String getAddress() {
            String myString = "My String";
            byte[] postData = myString.getBytes();
            String myAddress = null; // address to return
            HttpConnection httpConnection;
            DataOutputStream os;
            Document doc;
    
            String myURLString = "http://www.google.com;interface=wifi"; // use a connection method here
    
            try {
                httpConnection = (HttpConnection) Connector.open(myURLString);
                httpConnection.setRequestMethod(HttpConnection.POST);
                httpConnection.setRequestProperty(HttpProtocolConstants.HEADER_CONTENT_TYPE, "application / requestJson");
                os = httpConnection.openDataOutputStream();
                os.write(postData);
                int rc = httpConnection.getResponseCode();
    
                if (rc != HttpConnection.HTTP_OK) {
                    return "";
                }
    
                httpConnection.getResponseCode();
    
        // The following code was taken from http://www.blackberry.com/knowledgecenterpublic/livelink.exe/fetch/2000/348583/800332/800599/How_To_...
                DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory. newInstance();
                DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                docBuilder.isValidating();
                doc = docBuilder.parse(httpConnection.openDataInputStream());
                doc.getDocumentElement ().normalize ();
                NodeList list=doc.getElementsByTagName("*");
                String _node = new String("");
                Node tempNode = null;
    
          //this "for" loop is used to parse through the
          //XML document and extract all elements and their
          //value, so they can be displayed on the device
    
              for (int i=0;i		   
  • Time-out period of application that is often when calling web services

    My request of phonegap webworks get transaction timeout error often. I create a cross-domain application that invokes the webservice to different places through soap and rest services. I assign the 60000ms as a transaction timeout period. Same application I use in the iPhone and android, I get no transaction timeout instead, I get correct answer. What happens when I load the app into the unit. Even it is not reproducible.

    It happened due to

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK,
        function() {
            page_back();
            return false;
        });
    

    I was controlling the back through the above code while connection, this memory leak cause. I just removed from the function of connection and stored in the document.ready. Now timeout is not the case but I am facing app closes at the launch of the application.

Maybe you are looking for