Thread View: pl.comp.xml
1 messages
1 total messages
Started by Dark
Tue, 16 Oct 2007 10:42
ksoap i wywoływanie web service z argumentami - problem
Author: Dark
Date: Tue, 16 Oct 2007 10:42
Date: Tue, 16 Oct 2007 10:42
28 lines
1870 bytes
1870 bytes
Usiłuje użyc ksoap (wersja1).
Udaje mi się dostać do web service jeżeli nie ma ono argumentów.
W przykłądzie web serwice z jednym argumentem typu string, zwraca to co się
do niego wysłało.
Jeżeli chce przekazać argument dostaje wyjątek e.
Ktos sobie z tym poradził ?
import org.ksoap.*;
import org.ksoap.transport.*;
try {
String tekst = new String("komunikat");
SoapObject client = new SoapObject("","HelloWorld1");
client.addProperty("tekst",tekst);
HttpTransport tx = new
HttpTransport("http://1.2.3.4/service.asmx","http://asd/HelloWorld1");
Dialog.alert(tx.call( client ).toString());
}
catch(SoapFault sf)
{Dialog.alert(sf.faultstring);
}
catch (Exception e)
{Dialog.alert(e.getMessage());}
}
Dark
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads