How to set these variables for ksoap2?

by amishera » Sat, 20 Sep 2008 01:26:49 GMT


Sponsored Links
 Hi,
I have this web service using apache cxf:

http://localhost:9000/helloWorld

with method

sayHi

Now I am using ksoap2 on client side in android. But I am not sure how
I should set the following variables:

    private static final String SOAP_ACTION = "...";
    private static final String METHOD_NAME = "...";
    private static final String NAMESPACE = "...";
    private static final String URL = "...";

as used in the code:

SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
SoapSerializationEnvelope envelope = new
SoapSerializationEnvelope(SoapEnvelope.VER11);
envelope.setOutputSoapObject(request);
HttpTransportSE androidHttpTransport = new HttpTransportSE
(URL);
androidHttpTransport.call(SOAP_ACTION, envelope);

Please help.

Thanks in advance.

--~--~---------~--~----~------------~-------~--~----~



Other Threads

1. What phone to develop on?

Hi all,

I want to purchase an Android phone for development ? what do you recommend
?

Is there any mobile more updated than Nexus one ?

-- 
tarek

-- 

2. Calling startActivity() from outside of an Activity context requires the FLAG_ACTIVITY_NEW_TASK flag ?

Hi all,

I tried to create a edittextbox, and button next to it, in the status
bar. !!
I created it  and tried to launch the browser activity, when somebody
enters a URL in the textbox & click that button.

I get runtime exception as below.Can anyone please help what is the
issue with this exception ?
I know that Status bar is not a seperate activity. It is part of
'PhoneWindow'. But then i couldnt figure out what is the issue ?
Framework experts coud you pls help here...!!

E/AndroidRuntime(   70): *** FATAL EXCEPTION IN SYSTEM PROCESS:
android.server.ServerThread
E/AndroidRuntime(   70): android.util.AndroidRuntimeException: Calling
startActivity() from outside of an Activity  context requires the
FLAG_ACTIVITY_NEW_TASK flag. Is this really what you want?
E/AndroidRuntime(   70):        at
android.app.ContextImpl.startActivity(ContextImpl.java:617)
E/AndroidRuntime(   70):        at com.android.server.status.StatusBarService
$1.onClick(StatusBarService.java:289)
E/AndroidRuntime(   70):        at android.view.View.performClick(View.java:
2408)
E/AndroidRuntime(   70):        at android.view.View
$PerformClick.run(View.java:8816)
E/AndroidRuntime(   70):        at
android.os.Handler.handleCallback(Handler.java:587)
E/AndroidRuntime(   70):        at
android.os.Handler.dispatchMessage(Handler.java:92)
E/AndroidRuntime(   70):        at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(   70):        at
com.android.server.ServerThread.run(SystemServer.java:506)

 private void makeStatusBarView(Context context) {
----------------------------
----------------------------
        urlTextbox = (EditText)sb.findViewById(R.id.urltextbox);
        Button  mButton = (Button) sb.findViewById(R.id.Go);
        mButton.setOnClickListener(new Button.OnClickListener(){
                    public void onClick(View v) {
                                System.out.println("Status Bar - Onclick of 
GO");
                             String url = urlTextbox.getText().toString();
                             Intent browserIntent = new
Intent("android.intent.action.VIEW", Uri.parse(url));
                             mContext.startActivity(browserIntent);
                    }
                });

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

}

/frameworks/base/services/java/com/android/server/status/
StatusBarService.java --> I was trying to implement it like this.

status_bar.xml:
------------------------

<com.android.server.status.StatusBarView xmlns:android="http://
schemas.android.com/apk/res/android"
    android:background="@drawable/statusbar_background"
    android:orientation="vertical"
    android:focusable="true"
    android:descendantFocusability="afterDescendants"
    >

    <LinearLayout android:id="@+id/icons"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:orientation="horizontal">

        <com.android.server.status.IconMerger android:id="@+id/
notificationIcons"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="match_parent"
            android:layout_alignParentLeft="true"
            android:paddingLeft="6dip"
            android:gravity="center_vertical"
            android:orientation="horizontal"/>

         <EditText android:id="@+id/urltextbox"
                android:hint="eg. www.google.com, "
                android:layout_width="150dip"
                android:layout_height="wrap_content"
                android:maxLines="1"/>

        <Button android:id="@+id/Go"
        android:layout_width="50dip"
        android:layout_height="wrap_content"
        android:text="@string/go"/>

        <LinearLayout android:id="@+id/statusIcons"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_alignParentRight="true"
            android:paddingRight="6dip"
            android:gravity="center_vertical"
            android:orientation="horizontal"/>
    </LinearLayout>

    <LinearLayout android:id="@+id/ticker"
        android:layout_width="match_parent"
        android:layout_height="match_parent"
        android:paddingLeft="6dip"
        android:animationCache="false"
        android:orientation="horizontal" >
        <ImageSwitcher android:id="@+id/tickerIcon"
            android:layout_width="wrap_content"
            android:layout_height="match_parent"
            android:layout_marginRight="8dip"
            >
            <com.android.server.status.AnimatedImageView
                android:layout_width="25dip"
                android:layout_height="25dip"
                />
            <com.android.server.status.AnimatedImageView
                android:layout_width="25dip"
                android:layout_height="25dip"
                />
        </ImageSwitcher>
        <com.android.server.status.TickerView android:id="@+id/
tickerText"
            android:layout_width="0dip"
            android:layout_weight="1"
            android:layout_height="wrap_content"
            android:paddingTop="2dip"
            android:paddingRight="10dip">
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textColor="#ff000000" />
            <TextView
                android:layout_width="match_parent"
                android:layout_height="wrap_content"
                android:singleLine="true"
                android:textColor="#ff000000" />
        </com.android.server.status.TickerView>
    </LinearLayout>

    <com.android.server.status.DateView android:id="@+id/date"
        android:layout_width="wrap_content"
        android:layout_height="match_parent"
        android:singleLine="true"
        android:textSize="16sp"
        android:textStyle="bold"
        android:gravity="center_vertical|left"
        android:paddingLeft="6px"
        android:paddingRight="6px"
        android:textColor="?android:attr/textColorPrimaryInverse"
        android:background="@drawable/statusbar_background"
        />
</com.android.server.status.StatusBarView>

-- 

3. Connection without ConnectivityManager

4. install apk files programatically

5. Any way to display a TIFF image?

6. Horizontal scroll with paging like iPad home screen

7. Recycle Message object