Hi
thanks for giving response
How to clear that i am not getting this is my code
package org.tuxpan;
import org.ksoap2.SoapEnvelope;
import org.ksoap2.serialization.SoapObject;
import org.ksoap2.serialization.SoapSerializationEnvelope;
import org.ksoap2.transport.AndroidHttpTransport;
import android.app.Activity;
import android.view.View;
import android.os.Bundle;
import android.view.View.OnClickListener;
import android.widget.EditText;
import android.widget.TextView;
public class Adder extends Activity
{
private static final String SOAP_ACTION = "AddIntegers";
private static final String METHOD_NAME = "AddIntegers";
private static final String NAMESPACE = "http://services.o2";
private static final String URL = "
http://wiki.tuxpan.com:8069/axis2/services/Simple";
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle icicle)
{
super.onCreate(icicle);
setContentView(R.layout.main);
findViewById(R.id.cmdCalculate).setOnClickListener(new
OnClickListener() {
public void onClick(View view)
{
((TextView)findViewById(R.id.lblStatus)).setText("...
Invoking Web Service ...");
String stA =
((EditText)findViewById(R.id.numberA)).getText().toString();
String stB =
((EditText)findViewById(R.id.numberB)).getText().toString();
Integer a = null;
Integer b = null;
try {
a = Integer.valueOf(stA);
b = Integer.valueOf(stB);
} catch(Exception e1) {
}
if (a == null || b == null) {
((TextView)findViewById(R.id.lblStatus)).setText("Only
Integer numbers please...");
}
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapObject inAddIntegers = new SoapObject(NAMESPACE,
"InAddIntegers");
inAddIntegers.addProperty("a", a);
inAddIntegers.addProperty("b", b);
request.addProperty("InAddIntegers", inAddIntegers);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
AndroidHttpTransport androidHttpTransport = new
AndroidHttpTransport (URL);
try {
androidHttpTransport.call(SOAP_ACTION, envelope);
Object result = envelope.getResponse();
((TextView)findViewById(R.id.lblStatus)).setText(result.toString());
} catch(Exception E) {
((TextView)findViewById(R.id.lblStatus)).setText("ERROR:" +
E.getClass().getName() + ": " + E.getMessage());
}
}
});
}
}
On Tue, Jun 23, 2009 at 4:42 PM, Urs Grob <[email protected]> wrote:
>
> There's a NullPointerException on line 31 in org.tuxpan.Adder ... in
> the method onCreate. That's the cause for the RuntimeException being
> thrown.
>
> -- Urs
>
> On Tue, Jun 23, 2009 at 12:54 PM, Desu Vinod Kumar<[email protected]>
> wrote:
> >
> >
> > On Tue, Jun 23, 2009 at 4:23 PM, android.vinny <[email protected]>
> wrote:
> >>
> >> HI everyone go through the attachment i have enclosed as attachment i
> >> have captured the error what i git i need solution for this
> >>
> >>
> >> Thanks in advance
> >>
> >
> >
> >
> > --
> > Regards
> > -------------------
> > Desu Vinod Kumar
> > [email protected]
> > 09916009493
> >
> > >
> >
>
> >
>
--
Regards
-------------------
Desu Vinod Kumar
[email protected]
09916009493
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en
-~----------~----~----~----~------~----~------~--~---