🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.xml
Article #9518

ksoap i wywoływanie web service z argumentami - problem

#9518
From: Dark
Date: Tue, 16 Oct 2007 10:42
28 lines
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 
Technical Details
Message-ID: <ff24pj$43p$1@nemesis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!news.rmf.pl!agh.edu.pl!news.agh.edu.pl!news.onet.pl!newsfeed.tpinternet.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: "Dark" <darkmartin@box43.pl>
Newsgroups: pl.comp.xml
Subject: ksoap i wywoływanie web service z argumentami -
 problem
Date: Tue, 16 Oct 2007 12:42:03 +0200
Organization: tp.internet - http://www.tpi.pl/
Lines: 29
Message-ID: <ff24pj$43p$1@nemesis.news.tpi.pl>
NNTP-Posting-Host: egh122.internetdsl.tpnet.pl
Mime-Version: 1.0
X-Trace: nemesis.news.tpi.pl 1192531571 4217 83.15.11.122 (16 Oct 2007 10:46:11 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Tue, 16 Oct 2007 10:46:11 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.3790.3959
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.4133
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit