Problem TestLogon Ksoap.

Hello everyone. I'm newbie e.

I installed Ksoap library correctly and a simple helloworld work very well, but my task is to the identification of Pentecost username and password. My source code is as follows:

package KsoapTestLogin;

import net.rim.device.api.ui.*;
import net.rim.device.api.ui.component.*;
import net.rim.device.api.ui.container.*;

import org.ksoap2.SoapEnvelope;
import org.ksoap2.SoapFault;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.HttpTransport;

public class TestLogon extends UiApplication
{

    public static void main(String args[])
    {
        TestLogon kst = new TestLogon();
        kst.enterEventDispatcher();
    }

    public TestLogon()
    {
        pushScreen(new kScreen());
    }
} 

class kScreen extends MainScreen
{
    public LabelField lf_title;
    public RichTextField rf_results;
    public String results;

    public String Username = "Larry.Enderson";
    public String Password = "Password123";

    public MenuItem mi_runtest = new MenuItem("Hello World!",4390,10)
        {
            public void run()
            {
                RunTest();
            }
        };
       public MenuItem testlogon = new MenuItem("Logon",4390,10)
           {
            public void run()
            {
                TestLogon();

            }
        };

    protected void makeMenu(Menu menu,int instance)
        {
            menu.add(mi_runtest);
            super.makeMenu(menu,0);

            menu.add(testlogon);
            super.makeMenu(menu,0);
        }

    public kScreen()
    {
        super();
        LabelField title = new LabelField ("McKinneyRogers", LabelField.HCENTER| LabelField.USE_ALL_WIDTH);
        setTitle(title);
        lf_title = new LabelField("ACME");
        add(lf_title);

        rf_results = new RichTextField("Welcome");
        add(rf_results);

        results = "";        

    }        

    public void RunTest() {

        String serviceURL = "https://www2.missionleadership.com/mlv4developmentmastek/WS/Blackberry.asmx;deviceside=true";
        String serviceNamespace = "http://www2.missionleadership.com/";
        String serviceMethod = "HelloWorld";
        String SoapAction = "http://www.missionleadership.com/HelloWorld";
        SoapObject SoapObj = new SoapObject(serviceNamespace,serviceMethod);
          SoapObj.newInstance ();
          SoapObj.addProperty ("a", "5");
          SoapObj.addProperty ("b", "6");

          SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
          envelope.bodyOut = SoapObj;
          envelope.dotNet = true;
          envelope.implicitTypes = true;
          envelope.encodingStyle = "utf-8";
          envelope.enc = SoapSerializationEnvelope.ENC2001;
          envelope.xsd = SoapEnvelope.XSD;
          envelope.xsi = SoapEnvelope.XSI;

          //Build connection
          HttpTransport ht = new HttpTransport(serviceURL);

          //Initiate Connection
          Object response = null;

          try
          {
            ht.debug = true;
            ht.call (SoapAction, envelope);
            //response = envelope.getResponse().toString();
            response = envelope.getResponse();
            //response =(envelope.getResponse()).toString();

            System.out.println (envelope.bodyIn);
          }
          catch(SoapFault sfe)
          {
              sfe.printStackTrace();
          }
          catch (Exception e)
          {
            System.out.println (e);
            response = e.toString();
          }

          rf_results.setText(response.toString());
    }

    public void TestLogon()
    {
        String serviceURL = "https://www2.missionleadership.com/mlv4developmentmastek/WS/Blackberry.asmx;deviceside=true";
        String serviceNamespace = "http://www2.missionleadership.com/";
        String serviceMethod = "TestLogon";
        String SoapAction = "http://www.missionleadership.com/TestLogon";
        SoapObject SoapObj = new SoapObject(serviceNamespace,serviceMethod);
        //SoapObject SoapObj = new SoapObject ("urn:iControl:LocalLB/VirtualServer", "get_list");
        SoapObj.newInstance ();
        SoapObj.addProperty("Username", Username);
        SoapObj.addProperty("Password", Password); 

        SoapSerializationEnvelope envelope = new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.bodyOut = SoapObj;
        envelope.dotNet = true;
        envelope.implicitTypes = true;
        envelope.encodingStyle = "utf-8";
        envelope.enc = SoapSerializationEnvelope.ENC2001;
        envelope.xsd = SoapEnvelope.XSD;
        envelope.xsi = SoapEnvelope.XSI;

        //Build connection
        HttpTransport ht = new HttpTransport(serviceURL);

        ht.setXmlVersionTag("");
        //Initiate Connection
        Object response = "nope";

        try
            {
                ht.debug = true;
                ht.call (SoapAction, envelope);
                //response = envelope.getResponse().toString();
                response = envelope.getResponse();
                //response =(envelope.getResponse()).toString();
                System.out.println (envelope.bodyIn);
            }
        catch(SoapFault sfe)
            {
                sfe.printStackTrace();
            }
        catch (NullPointerException e)
            {
                System.out.println (e);
                response = e.toString();
            }
        catch (Exception e)
            {
                System.out.println (e);
                response = e.toString();
            }

    rf_results.setText(response.toString());

    }

}

This correctly program to connect to the server, but the site response cannot be the answer.

Sorry pals. I fix my problem. The problem coming up with space names wrong... I have wrong address on namespace and the PPA exploded...

Tags: BlackBerry Developers

Similar Questions

  • KSOAP problem!

    Hello.. in my application, I need to connect to a web of dot net service... so I tried to follow even in this link...

    http://www.craigagreen.com/index.php?/blog/BlackBerry-and-NET-WebService-tutorial-part-1.html

    but they gave tat tat

    # Open the properties of the project to KSoapLibrary. Go the "BlackBerry Project Properties" and click on the "Application" tab The Type of project in the dropdown select Library (Figure 4). Click OK.

    where, as in my project I have strength find such option itself... Like this

    What is wrong?

    Dude please stick to one thread with all of your relevant questions about KSoap2. Here is my answer which should sort:

    Right-click on the project

    Click on properties

    Click the Blackberry project

    Click Application Describer

    Once opens then choose library from the drop-down "type of application".

    Otherwise, you should have the Describer application in the package Explorer you project.

  • KSOAP... Once again

    I have read several posts on this with similar problems, but I am not able to solve. I'll try to be as clear as I can with my setup in the hope that someone will see my problem.

    Environment:

    BlackBerry JRE 4.5.0

    Eclipse 3.7.0

    I try to include ksoap2 in my application. My application consists of 2 projects and libraries 1 app project.

    -Depends of Lib1 lib2 (my lib ksoap)

    -MyApp depends on Lib1

    -Created my lib Ksoap by adding the ksoap2-j2me-core-prev - 2.1.2.jar in the classpath and that's all that is contained in the project.

    -Lib2 requires that the ksoap classes so I also have to add the ksoap2-j2me-core-prev - 2.1.2.jar to the classpath of the project. I read that I should just add the KSOAP project, but that does not work

    -When I package and sign my application, I have several files but more important I use are:

    MyApp_full.jad

    MyApp.cod

    Lib1_full.jad

    Lib1.cod

    Lib2.jad

    Lib2.cod

     

    -J' I rename '_full' files so that they are called MyApp.jad & Lib1.jad

    -Deploy my application OTA and Simulator: get the same result on both.

    Can not find the module ' ksoap2 j2me core prev - 2.1.2.jar'. Any help is appreciated.

    If anyone has the steps to run out of Eclipse, if you think it will help I'm all ears.

    right click on your project, properties, java build path, order and export, check the box next to your jar ksoap.

  • KSOAP ANALYSIS

    Hey Hi all

    I'm trying my hands with KSOAP for the first time and after trying for a long time, I wrote here to help you.

    I need this post

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

    Here I've stuck with this Tag I do not know how to handle these requests with KSOAP
    Please help me in this.

    This is my Code

    CPP = new SoapObject SoapObject (space of names, MethodName);
    SoapObject CPP = new SoapObject ("", "AuthToken");
    rpc.addProperty ("CorporateId", "CID");
    rpc.addProperty ("Username", "one");
    rpc.addProperty ("Password", "PWD");
    RPC1. AddProperty ("", CPP);
    Envelope SoapSerializationEnvelope = new SoapSerializationEnvelope (SoapEnvelope.VER11);
    envelope.bodyOut = rpc;
    envelope.dotNet = true;
    envelope.encodingStyle = SoapSerializationEnvelope.ENC;

    Ht HttpTransport = new HttpTransport (URL);

    HT. Debug = false;
    ht.setXmlVersionTag(")");
    String result = null;
    Try
    {
    HT. Call (SOAPAction, envelope);
    String s = ht.requestDump;
    s = ht.responseDump;

    result = (envelope.getResponse ()) m:System.NET.SocketAddress.ToString ();
    Body of SoapObject = (SoapObject) envelope.bodyIn;
    result = (String) body.getProperty("verifyLoginResult").toString ();
    System.out.println ("result");
    }
    catch (org.xmlpull.v1.XmlPullParserException x 2)
    {
    Dialog.Inform (EX2.getMessage ());
    }
    catch (Exception ex)
    {
    Dialog.Inform (ex.getMessage ());
    }

    Problem solved

    Thanks for the Suggestions and help

    Concerning

    Deepak

  • net.rim.device.cldc.io.ippp.SocketBaseIOException in the ksoap plug-in

    Hello

    I use ksoap for post user and password to the server for connection module,

    Here is the code for the same,

    SoapObject request =new SoapObject (methodname in the namespace,);

    request.addProperty ("username", "hello");

    request.addProperty ('password', 'Hi');

    Envelope of SoapSerializationEnvelope = SoapSerializationEnvelope (SoapEnvelope.VER11) new;

    envelope. bodyOut = request;

    envelope. dotNet = true;

    HttpTransport ht = HttpTransport (webserviceurl) new;

    HT. debug = true ;

    HT. Call (soapaction, envelope);

    result = envelope.getResponse ((SoapObject));

    I use mds and 4.5 os, however after ht.call (envelope soapaction), ;  I'm special suite

     

    net.rim.device.cldc.io.ippp.SocketBaseIOException: Connection timed out: connect

    Help, please

    Thanks in advance

    You can do this mark as resolved then?  If necessary, especially if it might help someone else, can tell us how you solved the problem?

  • Integrate ksoap jar in my project of BB

    Hello. I have download ksoap jar (ksoap2 j2me core prev - 2.1.2) and put in my build path. However, when I try to run my application I got "error from MyApp:Module ' ksoap2 j2me core prev - 2.1.2' not found" but he is here...! Included in the path of my generation!

    There is special attention for this pot?

    Concerning

    See a few posts below:
    http://supportforums.BlackBerry.com/T5/Java-development/Ksoap2-issue-in-Eclipse/TD-p/1455101

    feel free to look for a problem, often you will find that he had already answered

  • Background thread, kSoap, WAP 2.0 crashing

    My apologies for the title of the topic, I did not know how to phrase my question correctly!

    Background:

    I created an application (partially) work that implements a timer started from a different point of entry.

    The timer calls a thread about every ten seconds. The thread running queries from web services to a remote server and analyzes the responses. This is done using the kSOAP library and and connector MDS on BES, WAP 2.0 so decommissioning the client uses not BES.

    Problem:

    Everything works a treat for the connection of BES and some suppliers of WAP 2.0. The majority of client machines using WAP 2.0 do not work.

    The error returned by the application is IllegalStateException: no instance of the application. It is thrown only with WAP 2.0. The error occurs directly after the execution of the method in the class of kSOAP HttpTransport.

    Ht HttpTransport = new HttpTransport (SERVICE_URL + ";" deviceside = true; ConnectionUID ="+ wapUid());

    HT. Call();

    I tested this thorougly but this is my first BlackBerry application and there is obviously something I am doing wrong.

    Test:

    Here are things I've already tried.

    1. I wrote a separate application that passes the raw XML data to the web server, the response is rendered to the screen. It works on WAP 2.0 and has no problems or interference of the WAP gateways or transcoders.
    2. I wrapped the ht.call inside an executable invokeAndWait () function. I thought that maybe the kSOAP library was interfering with the user interface?

    Please note that the exception does occur in the instance of the application started by another entry point. Web services work very well on all WAP 2.0 providers (that have been tested) in the application of the user interface.

    Thanks in advance.

    James

    invokeandwait is not solution (especially not when he dressed network code, never do this)

    You must catch a Throwable instead of an Exception. The traces are deleted on exceptions for performance reasons (per OS), only throwable objects have them.

    you did not really answer the question of what the other entry point did, I'll try to explain my question.

    you start the application UI about to enter normal.

    start an application when the autostart entry point is called? with xxxapp.enterEventDispatcher?

    If this is not the case, this might solve your problem.

    instead of closing a user interface application, you can use requestBackground. several applications of system use this mechanism. If you select 'Close' in the menu of the browser, for example, the browser is only put in the background.

  • PHP connection with ksoap and nusoap

    I got a problem here.

    I tried a simple code to connect php and java with ksoap and nusoap.

    When I run this program in the Simulator, just loading program and my Simulator cannot click more.

    and that never stopped loading...

    When I am trying to test the nusoap connection. I create phpclient.php and phpserver.php. and when I run phpclient.php, the web is responsible for long time, and finally an error showed...

    error on php:

    Warning: SoapClient:oapClient (http://localhost/phphack/helloworld.php) [soapclient.soapclient]: failed to open stream: a connection attempt failed because the connected party responded properly after a period of time, or an established connection failed because connected host has failed. in C:\xampp\htdocs\phphack\helloclient.php on line 3

    Warning: SoapClient:oapClient() [soapclient.soapclient]: I/O warning: failed to load external entity "http://localhost/phphack/helloworld.php" in C:\xampp\htdocs\phphack\helloclient.php on line 3

    Fatal error: Runtime Maximum of 60 seconds exceeded in C:\xampp\htdocs\phphack\helloclient.php on line 6

    like I said: use a thread separate from your network code.

  • AMD Ksoap Open Tunnel Timeout

    Hello

    I have a problem with the JDE 4.3.  On the Simulator all code is executed according to the plan, but on my 1 2 blackberry phones, I get a "open tunnel - max timeout" when HttpTransport '(soapaction, envelope) ht.call' is called.

    -Phone settings and JDE info-

    JDE 4.3.01r

    On both phones Verizon

    Both phones 8830

    ksoap2-j2me-core - 2.1.2.jar

    1 phone by verizon v4.3.0.127 platform 3.1.0.72 - "signal-90 dBm" running "1XEV" 'battery 100% ' - do not

    2nd phone gps is activated by running 4.5.0.77 platform 3.2.0.51 '-88 dBm signal' "1XEV" - works

    ------------------------------------

    The first phone I can access the page nusoap via opera mini and BB browser. But receive an "open tunnel - max timeout' through my application. The 2nd phone works very well and retrieves the requested data.

    I put all the permissions to allow each phone. Do I need a different version of the ksoap as 2.1.1?

    Thank you for any ideas...

    ksoap2 uses only a httpconnection.

    I suggest to use the network diagnostics tool and check with a normal httpconnection.

  • WAP 2.0 + kSOAP

    Hi BB'rs.

    I am developing an application that uses Web services to communicate with an external server. I would like to as communications to transmit using the WAP 2.0 protocol.

    I use the kSOAP library. What I read in the related forum messages and objects, the HttpTransport object is where connection suffixes are added to ensure that the application passes on WAP 2.0.

    I currently have a problem establishing a connection to the external servers, technical details are below.

    Please note that I am recovering the "WAP2 trans01" since the service book and adding that a variable in the actual code. the result is the same as below.

    HT = new HttpTransport (webserviceUrl + ";" ConnectionUID = WAP2 trans01");

    HT. Call results in an IOException (could not pass).

    HT = new HttpTransport (webserviceUrl + "; DeviceSide = true; ConnectionUID = WAP2 trans01");

    HT. Call translates an InvalidStateException (no instance of the application).

    I use the Blackberry Bold 9700 (OS v5.0.0.545), glancing at my maintenance book, the entrance to WAP2 Transport 01 is shown below:

    Name: WAP2 Transport 01

    UID: WAP2 trans01

    CID: WPTCP

    User ID:-1

    IDDM:

    Gateway IP: //0.0.0.0;0/wap.vodafone.co.uk| GPAK

    Description: WPTCP Trans Vodafone UK (136163)

    Service type: not specified

    Subtype of service: not specified

    What I've read, it should work. If anyone has any experience with kSOAP WAP 2.0, I would appreciate greatly any advice on how to proceed.

    Best,

    James

    Hi Simon,.

    Thanks for your reply, the problem has been resolved, it was because of the traffic of transcoding of Vodafone UK.

    Transcoding resulted in a 500 response of the WAP 2.0 gateway that kSOAP couldn't handle. I've been able to diagnose this using the rim (HIGHLY RECOMMENDED!) network diagnostics tool

    After searching around forums, I found that it was possible to whitelist our domain by email to [email protected].

    A further search revealed that the .mobi domains are automatically in the whitelist of transcoders, no attempts are made to transcode server responses! I feel enlightened!

    We checked the domain .mobi with a number of carriers (Orange, Vodafone, tMobile and O2) using the tool the network diagnostics in BES and WAP 2.0 by using the tool (thanks RiM!) network diagnostics and our application.

    Boo,

    James

  • Unable to Scan to the computer after downloading macOS Sierra. Is this a software problem?

    How can I scan from HP Envy 4500 to computer after downloading macOS Sierra?

    Hello wdemetris,

    Thanks for asking for scanning helps here in the Apple Support communities. I understand how it is important to have access to your scanner and am happy to offer help for this.

    As a precaution, we always recommend that you have backups to make sure that all your data is safe. You can perform a backup using Time Machine and an external hard drive. Use this article to help make a backup of your Mac: use Time Machine to back up or restore your Mac.

    Then, in accordance with article help: printer and scanner for Sierra, El Capitan, Yosemite, and the Mavericks macOS software, the HP Envy 4500 e-all-in-one is supported for printing and scanning. The drivers must be installed, but if not, if it please go to the App Store and check the updates tab to see if there are updates for HP. If there is, please install.

    If you have only general questions about how to get your updated scanner in place or how to scan pictures, please check out these two articles: macOS Sierra: implement a scanner & macOS Sierra: scan images or documents. If everything is configured correctly and you still have problems scanning, please visit this help article: macOS Sierra: scanning troubleshooting.

    Thanks again and have a great rest of your day.

  • My iPhone 6 installed 10.0.2 stops when it gets to 40% of autonomy.  In addition, it seems to pass power WAY to fast with the new software.  Does anyone else have this problem?

    My iPhone 6 installed 10.0.2 stops when it gets to 40% of autonomy.  In addition, it seems to pass power WAY to fast with the new software.  Does anyone else have this problem?

    Hello brooksm549,
    Thank you for using communities of Apple Support.

    I got your message which, since updating your iPhone 6 to iOS 10.0.2 your iPhone stops when it is 40% and the power to empty very quickly. I understand your concern with the iPhone turn off and drains the battery. I recommend you to review the use of the battery to see what app contributes more to the battery drain. The following article will provide you with steps on how to check the use of the battery:

    On the use of the battery on your iPhone, iPad and iPod touch

    When you know about the soft uses more battery, you can change your settings in order to optimize the battery life:

    Maximize the life of the battery and battery life

    Best regards.

  • MacBook Pro display problem

    Hello members of the community.

    As of recently, I have noticed some glitches when feeding on my MacBook or awakened from his sleep.

    The colors are distorted, usually with pink, green, or yellow blobs. Blobs cannot entirely replace the colors, they appear to be contained in a element would normally be. For example. the menu bar will be partially pink and white, but pink does not leave the menu bar in this area, and the Office has green lines on it.

    I tried to take a screenshot, but the problem resolves in about 20 seconds, but it's a recurring problem.

    It happens when I wake up, connection or not. I had also certain powers serious and problems of performance, such that my MagSafe LED would not illuminate when plugged on rare occasions, fan could turn unnecessarily, graphics performance were SUPER slow, and the health of my battery was running out quickly. I actually ran a report on the system at 2 different times and my quality of full load is depleting of 1.2% per charge cycle, which is very worrying. I went from 6281 mAh mAh 6138 maximum capacity after two cycles of load. I'm tracking closely it because at this rate, my battery will survive only at load cycles about 150 instead of the 1000 expected, gives me the idea that this could very well be a bad battery. The computer is also warm to the touch while you sleep, not connected to the power supply. I NAP active but even taking into account should not be hotter my iPhone did the same thing.

    I have reset the SMC, and it solved a couple of problems. The charger works fine now and my performance improved considerably (which made me feel better, either it is a high-performance laptop, a 11-inch MacBook Air should not he surpass), and battery life has improved. I feel even if it uses a lot of power in his sleep. Maybe I need to turn off the NAP and see if that makes a difference. The graphic bug still persists however, and I don't have enough time to see if the max battery is depleting again.

    In regards to the bug, is there something that can be done? Basically, I want to assure you that I took all appropriate measures or if someone else has this problem to see if it can be software related instead of my computer.

    I have the entry level MacBook Pro with the retina, last generation.

    Any constructive contribution welcome!

    See you soon.

    -adreaux

    Hello bernardn753,

    After reviewing your post, it seems that you are having problems with the screen showing strange things on it. Looks like you already have a troubleshooting. I recommend you read this article, as reset NVRAM would be to reset your screen resolution settings that should help.

    How to reset the NVRAM on your Mac.

    Thank you for using communities of Apple Support. Good day.

  • with IOS 10.0.2 - 5s iphone Bluetooth problems

    Since upgrading ISO 10.0.2 my M50 from PLT Plantronics (helmet unique headset) do not reliably connects with my iPhone 5 more. I have to go to the settings, activate bluetooth turned off/turned on, touch the device on the bluetooth page, etc. Once it connects successfully, it will reconnect (if I turn off the headset and turn it back on) for a short period. The next day he does not connect itself but I play with bluetooth on the iPhone again.

    It has always worked perfectly before the 10th of IOS.

    And, as I noticed others mentioning, the volume is much lower with IOS 10. The maximum volume is much lower. I can barely hear it now, more normal background noise, while driving.

    I did:

    Forget this device for the PLT M50 and paired again (several times)

    I did a Reset Network Settings

    I don't know what else to do - but it's a 10.0.2 IOS issue.

    Hello AppleUser2k,

    Please ask questions about your problems of connection between your iPhone and your Plantronics headset since you upgraded to iOS 10. I understand how important it is to have your Bluetooth devices connect with your iPhone with reliability. Here's what I recommend.

    The first thing we want to make sure is that all your data is safe. You can perform a backup in iCloud or iTunes using this article: backing up your iPhone, iPad, and iPod touch.

    Once your data is safe, try the troubleshooting steps in this article to help: get help to connect a Bluetooth accessory with your iPhone, iPad or iPod touch device should also check with the manufacturer that the device has all the drivers and firmware to work with the new version of iOS.

    If you have checked everything and that you have installed the latest firmware or driver and always are problems, please be aware of your surroundings when you encounter these problems. If you can isolate the time or location, you see the problems, you can isolate the cause. You can even see this help article to ensure that you are not affected by outside interference: the potential sources of Wi-Fi and Bluetooth.

    Thanks again and have a great rest of your day.

  • Problem after update 10.0.2 iOS iPhone touchscreen

    After I have updated to iOS 10.0.2, I noticed a problem with the touch screen. Using the position of the image on the right side, near the corner, the toushscreen does not work.
    For example: when you use the keyboard, I can't type the letter 'P', have trouble typing BACKSPACE. Using the Contacts app, I can't scroll through using the alphabet bar.

    Do what idea of the problem?

    Kind regards!

    Hi fabriciorela,

    Thanks for the upgrade to iOS 10! I understand that the right of your screen is unresponsive to the touch. You can try the steps in this link to fix the problem. If the screen of your iPhone, iPad or iPod touch does not respond to touch

    If it does not help the problem, try to restore the device to factory settings. I would like to backup your important data first.

    The backup of your iPhone, iPad and iPod touch

    Use iTunes on your Mac or PC to restore your iPhone, iPad or iPod to factory settings

    Please use the Apple Support communities to post your question. Let us know how it turns out. Have a great day.

Maybe you are looking for