IOException zero while making the SOAP request using ksoap2 library.

Hi I am trying to implement the SOAP request using ksoap2 library, but I'm on it running on the Torch 9810, IOException zero

httpTransport.call (SOAP_ACTION, soapEnvelope); exception.


Code is:

private String NAMESPACE="samplenamespace";
    private String url="webserviceurl";
    private String METHODNAME="getrecords";
    private String SOAP_ACTION=NAMESPACE+"/"+METHODNAME;

    private void sendSoapRequest(String email, String startDate, String enddDate) {
        SoapSerializationEnvelope soapEnvelope = new SoapSerializationEnvelope(
                SoapEnvelope.VER11);
        soapEnvelope.implicitTypes = true;
        soapEnvelope.dotNet = true;
        SoapObject soapReqObject = new SoapObject(
                NAMESPACE, METHODNAME);

        soapEnvelope.headerOut = new Element[1];
        soapEnvelope.headerOut[0] = buildAuthHeader();
        soapReqObject.addProperty("email", email);
        soapReqObject.addProperty("startdate", startDate);
        soapReqObject.addProperty("enddate", endDate);

        soapEnvelope.setOutputSoapObject(soapReqObject);
        HttpTransport httpTransport = new HttpTransport(url
                + ";deviceSide=true;interface=wifi");
        httpTransport.debug=true;
        try {
            httpTransport.call(SOAP_ACTION,
                    soapEnvelope);
        } catch (final IOException e) {
            e.printStackTrace();
            UiApplication.getUiApplication().invokeLater(new Runnable() {

                public void run() {
                    Dialog.alert("IOException " + e.getMessage());

                }
            });

        } catch (final XmlPullParserException e) {
            e.printStackTrace();
            UiApplication.getUiApplication().invokeLater(new Runnable() {

                public void run() {
                    Dialog.alert("XmlPullParserException " + e.getMessage());

                }
            });
        } catch (final Exception e) {
            e.printStackTrace();
            UiApplication.getUiApplication().invokeLater(new Runnable() {

                public void run() {
                    Dialog.alert("Exception " + e.getMessage());

                }
            });
        }
    }

    private Element buildAuthHeader() {
        Element h = new Element().createElement(NAMESPACE, "headername");
        Element username = new Element()
                .createElement(NAMESPACE, "username");
        username.addChild(Node.TEXT, "usernametext");
        h.addChild(Node.ELEMENT, username);
        Element pass = new Element().createElement(NAMESPACE, "password");
        pass.addChild(Node.TEXT, "passwordtext");
        h.addChild(Node.ELEMENT, pass);
        return h;
    }

I did tried to check a large number of post on KSOAP2 supportforum. Also made changes, but none of them succeeded.

Any help?

Solved

problem was passing parameters (incorrect parameters format)

Tags: BlackBerry Developers

Similar Questions

  • How to define soap headers in the soap request using qtsoap?

    Hi all!

    I need to add a soap from the soap request header. I use qtsoap to post the soap request. It comes to my complete application. How can I add headers in the code...!

    
    http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      
        http://tempuri.org/">
          string
          string
        
      
      
        http://tempuri.org/">
          string
        
      
    
    

    I tried like this:

    QtSoapMessage request;
    
        QtSoapStruct soap_struct(QtSoapQName("SecureSoapHeader", "http://tempuri.org/"));
    soap_struct.insert(new QtSoapSimpleType(QtSoapQName("Platform"), "BlackBerry"));
        soap_struct.insert(new QtSoapSimpleType(QtSoapQName("AuthToken"), "4A2EDCDA-E5A9-4E77-B41A-F1C1FF15A645"));
    
        request.addHeaderItem(&soap_struct);
    
        request.setMethod("GetCitiesByCountryCode", "http://tempuri.org/");
    
        request.addMethodArgument("countryCode", "", "IN");
        http.setHost("dev4.winitsoftware.com");
        http.setAction("http://tempuri.org/GetCitiesByCountryCode");
        http.submitRequest(request, "/EzeegoMiddleware/Services/HotelService.asmx");
    

    After the specification of it, the application closes...

    If anyone has tried it, help me please!

    Thank you.

    -Rezé

    Hello! I haven't used this API but I guess submitRequest is asynchronous.

    You create soap_struct on the stack (so it's a local variable).

    After the method submitRequest will end the service and all local variables will be destroyed, so the address passed to addHeaderItem will become invalid.

    Try to create soap_struct on the job:

    QtSoapStruct *soap_struct = new QtSoapStruct(...)
    soap_struct->insert(...);
    request.addHeaderItem(soap_struct);
    
  • Add the SOAP request envelope?

    Hello

    I am trying to invoke a SOAP request for a customer and the error by the web service response is:

    " < = xmlns:soapenv soapenv:Envelope ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < soapenv:Body >

    < soapenv:Fault >

    < faultcode > server < / faultcode >

    < faultstring > org.apache.xmlbeans.XmlException: envelope SOAP missing/invalid, expecting [{http://schemas.xmlsoap.org/soap/envelope/} envelope] < / faultstring >

    < / soapenv:Fault >

    < / soapenv:Body >

    < / soapenv:Envelope >

    With the help of the SOAPInterceptor I can view the query sent to the server. If I take this exit, add manually the code below and send it to the web service using SoapUI receives the correct answer:

    " < envelope soap: xmlns:soap = ' http://schemas.xmlsoap.org/SOAP/envelope/ ">

    < soap: Body >

    .. generated .vCO request XML...

    < / soap: Body >

    < / envelope soap: >

    How can I add the SOAP envelope to the request? The code used in the Orchestrator workflow is the standard code generated by him "generate a new workflow to a SOAP operation', with the SOAPInterceptor added.

    Thank you

    Sam

    OK, I was wrong on several levels, in order to avoid misleading anyone:

    If you use the SOAPInterceptor class and the output XML body, is THAT the body you see - so of course, I do not see the envelope and have to add manually in SoapUI - this is not a fault but mine vCO!

    This was solved by logging into the web page of vCO admin and by setting the level of record to 'DEBUG' - it issued a much more usable error message, which leads me to the real problem. The WSDL returned a short name for the host that is running the web service - unit vCO which serves as endpoint and could not resolve the host name, so the script has failed. Change the web service to respond with its IP address meant orchestrator could communicate properly.

  • Relationships as a result of the soap request

    Apart from the test cases, we use the SOAP INTERFACE for test modules.
    The answer is to have the result of style as "record of decision". This allowed the entire evaluation to return the size in bytes of response was large enough, so we went to 'single value' end-style.

    In one of the rules, we have alleged instances and relationships are created dynamically. These relationships are not rendered in the case of the "single value" style result. They are visible only to the "record of decision".

    Can I get the relations at the end of the report 'value only' for a soap request.

    Thanks for your contributions, Ben, I read through the silent and invisible operators.

    During this time, if we have relationships out in the user interface for SOAP.

    ++
    ++
    ++
    +
    +
    +
    +

  • The ID of the simultaneous request using

    Hi all

    I want to use the concurrent request ID, the competing application submit my report.

    I'll call a PL/SQL trigger dform procedure after in my report that inserts data into a custom table. I need to insert the id of the request as well. I tried using the p_conc_request_id parameter, but failed.

    To use this setting I just set this parameter in the USER SETTINGS and tried to pass the value to the PL/SQL procedure.

    Help, please!

    I don't think that you are on the correct forum.

    Many people want to call an Oracle procedure, but it is not the purpose of this
    software.

    You are in the Oracle Business Intelligence Enterprise Edition forum.
    http://www.Oracle.com/AppServer/business-intelligence/Enterprise-Edition.html

    See you soon
    Nico

  • Help me remove the zeros and add the decimal point using Expression GREP

    Hello, I have a few numbers... A few thousand to be exact I need to drop some zeros and add a dollar sign and the decimal representing the cents, how can I do it using GREP Expression. An example of the number would be: 000000000396465 or 000000000044813, it will be always 15 characters, I would like that to be converted to this:

    $3964,65

    $448,13

    Thank you

    Use Adobe CS5 on Mac

    Great, it worked! You just saved me weeks of work.

    Thank you

  • get the 0x400110020000100b error code while making the recovery of the system for windows vista 32 bit.

    I tried to do a system restore on my laptop using the included recovery disks and had this error 0x400110020000100B. The drive looked pretty beaten last week so I ordered a new series. Now, when I got to put disc 2 in (to 80% full) I get the same error.  I called customer service and he took me through the process of F9, nothing works and I also tried the F11 approach that made me not the case.  I'm frustrated because I don't really have the money for a new laptop computer.

    Laptop is a HP Pavilion DV6700.

    Any help would appreciated more than you know.

    The system is Windows Vista 32 bit

    The guy on the phone said ' well, you know it's a pretty old computer... Thank you gee...

    Hello:

    See if you can make your own Vista installation disc if you can read the product key 25 character on the bottom of your laptop.

    Here's how:

    If you are in a fault light but rewarding you can do yourself if you can read your product key of Vista on the PC of 25 characters.

    You just download the 3 files you need on the link below and read all the instructions to create a Setup bootable DVD disk using imageburn.

    Do not take into account the part of the text in the first screen shot about "extract the files in the folder of Vista."

    The files were extracted already in this folder when you ran the X14.exe file by reading the text on top of the first screenshot.

    The other thing I noticed is on the 4th page, where it shows Developer ID Microsoft Corporation. I had to type Microsoft Corporation in me, and then other codes already filled in.

    When I went to compile the ISO file, ImageBurn gave a message on a WIM file, file and ISO, and if I wanted to burn it in a different format.

    I selected no, make the ISO file.

    It was not so hard to do. I burned both the disk of 64-bit and 32-bit disk in case I ever need them.

    I tested both of them one my hp dc7100 CMT desktop PC, worked flawlessly.

    When you enter the product key, he knows which version of Vista you have.

    http://en.community.Dell.com/support-forums/software-OS/w/microsoft_os/3317.2-3-Microsoft-Windows-v...

    After you install Vista successfully, you can then install the drivers for your PC and driver page support.

    Paul

  • Computer target hung and RDP held while making the Office remotely in Windows XP Professional

    Hello

    I have problems with Remote Desktop for Windows XP Pro SP3. The scenario is as follows

    1. Target computer is Windows XP Pro SP3
    2. Client PC also has the same OS
    3. With the RDP Client, computer target hung. On the client, it is show as trying to connect and continues for a long time
    4. On the target pc, even keyboards and mice do not work
    5. Any application working on the target computer is also get hanged
    6. The only way to normalize the target computer is restart

    Under Remote Desktop, we have already given all the required permissions. Please note that

    • The firewall on the target computer is OFF
    • Symantec antivirus is installed
    • RAM is more than 2 GB
    Can someone advise me on this?
    Thank you.
    Kind regards
    Feraud

    Hi Feraud,

    Thanks for posting your query in the Microsoft Community Forums.

    According to the description of the problem, it seems that the remote desktop connection is blocked on the target computer.

    I will certainly help you with this issue.

    Here are some methods that you can try in order to solve the problem.

    Method 1: Temporarily disable the antivirus from Symantec and check.

    Warning: Antivirus software can help protect your computer against viruses and other security threats. In most cases, you should not disable your antivirus software. If you do not disable temporarily to install other software, you must reactivate as soon as you are finished. If you are connected to the Internet or a network during the time that your antivirus software is disabled, your computer is vulnerable to attacks.

    Method 2: Change the listening port for remote desktop and check.

    http://support.Microsoft.com/kb/306759

    Registry warning

    To do: Important This section, method, or task contains steps that tell you how to modify the registry. However, serious problems can occur if you modify the registry incorrectly. Therefore, make sure that you proceed with caution. For added protection, back up the registry before you edit it. Then you can restore the registry if a problem occurs. For more information about how to back up and restore the registry, click on the number below to view the article in the Microsoft Knowledge Base:

    322756 (http://support.microsoft.com/kb/322756/)

    How to back up and restore the registry in Windows

    For more information, see the links.

    The problems of desktop remotely

    Note: Applies to Windows XP

    How to use the Windows XP Professional Remote Desktop feature

    If the problem persists or you have any other questions about the remote desktop connection, do not hesitate to let us know. We will be happy to help you.

  • How to maintain direct links in Acrobat while making the rest of the non editable PDF?

    I want to convert Word docx to PDF and to maintain hyperlinks while not allowing people NOT edit images and other text.
    Is this possible to do with Acrobat?

    I can't find a way to do it.

    Thank you.

    Of course, you can apply a security policy that prevents the installation, allowing links to be clickable (in fact, you can not disable it).

  • Premiere Pro freezes mac while making the fast color corrector &amp; Rgb curves

    I'm having a problem that affects our business. We make ads that we of the object color correction using curves of fast color corrector and RGB. When these effects are added to the video sequence, the Mac Pro performance slows down considerably.

    Then when we make the project so that we can see the effects in real time, the computer crashes completely. The program usually informs us that it must close due to a serious error. I tried to reboot the computer, clean etc. permissions for this problem, but nothing helps. Why would this happen? Any ideas on how to solve it?

    Here are the specs:

    First Pro CC 7.2.1 using (4)

    Mac Pro: 3.2 Ghz Quad-Core Intel Xeon

    Memory: 24 GB

    ATI Radeon HD 5770, (1024 MB)

    OS: 10.8.5

    After tracking down technical support adobe, the issue is the video card. Our mac (2012 series) comes with a map of MB ATI Radeon HD 5770 1024 which Adobe Premiere pro interacts with when you perform the color correction. We have solved this problem by following these steps:

    In first Pro CC

    Go to FILE > PROJECT SETTINGS > GENERAL > under Renderer choose Mercury Playback Engine Software only

    This increase spectacular performance.

    The final fix will change our video card.

  • Strange behavior while making the table operation DOUBLE... !

    Hello

    Can we do DML/DDL operation on table DOUBLE?

    To know the answer, I have done below the operation and found a strange behavior...

    -run 5 times...
    INSERT INTO DOUBLE
    VALUES ('P');

    commit;

    Select * twice;
    o/p-
    MODEL
    1 P
    2 P
    3 P
    4 P
    5 P

    ---------------------------------
    updated double
    MODEL of value = "K";
    commit;

    Select * twice;
    o/p-
    MODEL
    2 h
    2 P
    3 P
    4 P
    5 P

    Odd: 1 single line update... Why? I was updating all the lines.

    If I run new update of command like below...

    updated double
    set MODEL = 'K', where dummy = "P";
    commit;

    Select * twice;
    o/p-
    MODEL
    2 h
    1 h
    3 P
    4 P
    5 P

    STRANGE: Now next updated record with 'K'... like that, if I run 5 times this o/p is as below...

    MODEL
    2 h
    1 h
    6.
    4 K
    6: 00
    -------------------------------------
    REMOVE double; -This also has data of delting 1 by 1 row... Why?

    Can anyone tell me about this operation of behaivor?

    Please provide any information about the DML/DDl operation on DUAl

    Rgds,
    PC

    http://asktom.Oracle.com/pls/asktom/f?p=100:11:7955478831730544:P11_QUESTION_ID:1562813956388

    Tom says:

    Let me start by saying:-DOUBLE is owned by SYS. SYS is the owner of the data dictionary,
    so DOUBLE fits in the data dictionary. You must not modify the data dictionary
    through SQL ever - weird things can and will happen - you are just a few of
    them. We can do a lot of strange things happen in Oracle by updating the data dictionary.
    It is recommended, supported or a very good idea.

    Double is just a convienence table. You do not need to use it, you can use anything you
    Here you are. The advantage to double is the optimizer includes double is a special line, a
    column table - when it is used in queries, it uses this knowledge during the development of the
    plan.
    ...
    the optimizer includes double is a special, magical table 1 row... It's just the way it works. If all goes well
    you reset double back to 1 row after your tests, or you've just totally broken your database!
    .. .dual = magic. Dual is a table of a line but with more than 1 or less is
    dangerous. You update the data dictionary. You should expect naturally very bad
    things are happening.

  • Serving images while making the project After Effects with Media Encoder?

    SOOOOO.

    I went with SPECIFIC anti-aliasing on vector files.

    This causes rendering to crash if I do not purge every image.

    IF

    I want to make in the background using Media Encoder,

    PEUT

    I get to purge all images too?

    Does it not follow the project settings?

    Or is it a different preference in Media Encoder?

    Thank you

    TRIS

    As a process dynamic link, rendering SOUL does not allow for such deceptions. Eitehr it works or it's not. Only AErender and AE itself obey this setting particular pref. If you are simply interested in the rendering of BG, consider buying the BGRender of AEScripts script.

    Mylenium

  • How to make the SOAP request with the complex data types?

    Hi all

    I want to apply soap like that, how I can do this,


            string
            string


            dateTime
            dateTime

    string

    Thanks in advance.

    Any help?

  • How can you dowgrade from iTunes to iTunes 12.1 12.3 while keeping the same update by iTunes library 12.3?

    iTunes 12.3 is not correctly synced the Notes field in Microsoft Office Outlook Contacts (but it's sync correctly the addresses and phone numbers). Apple support told me that iTunes 12.1 was the last version supporting a correct sync and sent me a link with iTunes 12.1. When installing iTunes 12.1, it woul does not open because the library containing the media, appsm and info was generated, over time, by iTunes 12.3. Thus, version 12.1 has been installed, but not working. The library, seems, is not backward compatible.

    Someone has an idea? Thank you very much!

    Use the method in the empty/corrupted after upgrade/crash iTunes library to restore an older version of your library compatible with the older version of iTunes.

    TT2

  • Exception with the participation of soap.request

    I am trying to build a SOAP request in a form in Acrobat ms, but I can't get the input for the SOAP request parameter to work.

    I use the examples on the site of the Acrobat SDK kit, and this is my code.  The debugger survey an exception to the line indicated, but did not say why.

    "cURL var ="http://mysite/_layouts/AppNumberService/NumberService.asmx?WSDL"
    var oParam = "AppName";

    var response = Net.SOAP.request)
    {
    cURL: cURL,.
    oRequest: {}
    'http://tempuri.org/:IncrementandFetchNumber': {}
    application: oParam < < Exception here
    }
    }
    });

    var result = response ['http://tempuri.org/:IncrementandFetchNumber '] [' IncrementandFetchNumberResult"];

    The SOAP request using a SOAP service on our SharePoint site. This is the format of request and response sample displayed when I go to the page for this service asmx.

    Request:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < soap envelope: xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container ="http://www.w3.org/2001/XMLSchema" xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > '.
    < soap: Body >
    "< IncrementandFetchNumber xmlns ="http://tempuri.org/">".
    < application > string < / application >
    < / IncrementandFetchNumber >
    < / soap: Body >
    < / envelope soap: >

    ANSWER:

    <? XML version = "1.0" encoding = "utf-8"? >
    "" < soap envelope: xmlns: xsi = "http://www.w3.org/2001/XMLSchema-instance" container ="http://www.w3.org/2001/XMLSchema" xmlns:soap = 'http://schemas.xmlsoap.org/soap/envelope/' > '.
    < soap: Body >
    "< IncrementandFetchNumberResponse xmlns ="http://tempuri.org/">".
    string of < IncrementandFetchNumberResult > < / IncrementandFetchNumberResult >
    < / IncrementandFetchNumberResponse >
    < / soap: Body >
    < / envelope soap: >

    The SOAP service works from other applications (for example, InfoPath) and use the following code in Acrobat, it lists the SOAP services.

    var service = Net.SOAP.connect (cURL);

    for (var i in service) console.println (i);

    So I don't know what I'm doing wrong. Any ideas?

    I found a solution. I think that SharePoint web services have some features that require the use of XML to generate demand. This code worked. This is partially based on this site.

    "cURL var ="http://mysite/_layouts/AppNumberService/NumberService.asmx?WSDL"

    var oParam = "myApp";

    var oAuthenticator = {UsePlatformAuth: 'true'};

    var ver = SOAPVersion.version_1_2;

    var oRequest = {}

    ' soapValue: '' + '.

    "" + oParam + "" +.

    ""};

    cAction var = "http://tempuri.org/IncrementandFetchNumber";

    var response = SOAP.request)

    {

    cURL: cURL,.

    oRequest: oRequest,.

    cAction: cAction,.

    oAuthenticate:oAuthenticator,

    bEncoded:false,

    cVersion:ver

    });

    var result = response ['http://tempuri.org/IncrementandFetchNumberResponse '] [' http://tempuri.org/IncrementandFetch NumberResult' "'];

    Console.println (result);

Maybe you are looking for