🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: pl.comp.lang.java
Article #153895

Re: Android - eWUŚ

#153895
From: Eugeniusz Rink
Date: Tue, 01 Oct 2013 18:45
44 lines
2553 bytes
W dniu 01.10.2013 13:34, Piotr S. pisze:
> W dniu 2013-10-01 13:27, Piotr S. pisze:
>
>>
>> Może nie na Anroidzie, ale w moim oprogramowaniu w Javie to wygląda tak:
>>
>>> SOAPConnection soapConnection =
>>> SOAPConnectionFactory.newInstance().createConnection();
>>> SOAPMessage message = convertXmlToSoapMessage(xml);
>>> SOAPHeader header = message.getSOAPHeader();
>>> SOAPEnvelope envelope = message.getSOAPPart().getEnvelope();
>  >> Iterator it = header.getChildElements();
>>> SOAPElement sessionHeader = (SOAPElement)it.next();
>>> SOAPElement authTokenHeader = (SOAPElement)it.next();
>>> sessionHeader.addAttribute(envelope.createName("id"),this.user.getSessionId());
>>>
>>> //id sesji
>>> authTokenHeader.addAttribute(envelope.createName("id"),this.user.getAuthTokenId());
>>>
>>> //token sesji
>>>
>>> message.saveChanges();
>>>
>>> URL endpoint = new URL(BROKER_SERVER);
>>>
>>> SOAPMessage reply = soapConnection.call(message, endpoint);
>>  > ...
>
> To się tyczy tylko komunikatu z właściwym zapytaniem oczywiście (id
> sesji i token muszą być już znane), czyli po wysłaniu komunikatu o
> zalogowanie.
>
> (wcięło mi jedną linijkę w poście wyżej - zmienna 'it').
>
> Pozdrawiam
> P.S.

Niestety, na Androida to nie idzie...

Chyba trzeba iść w stronę wysyłania XMLa...

Pozdrawiam

Eugeniusz Rink
Technical Details
Message-ID: <524b184e$0$2200$65785112@news.neostrada.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
References: <5249e592$0$2185$65785112@news.neostrada.pl> <524ab192$0$2207$65785112@news.neostrada.pl> <524ab323$0$2179$65785112@news.neostrada.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!agh.edu.pl!news.agh.edu.pl!news.cyf-kr.edu.pl!news.nask.pl!news.nask.org.pl!news.unit0.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!nx02.iad01.newshosting.com!newshosting.com!newsfeed.neostrada.pl!unt-exc-02.news.neostrada.pl!unt-spo-b-01.news.neostrada.pl!news.neostrada.pl.POSTED!not-for-mail
Date: Tue, 01 Oct 2013 20:45:34 +0200
From: Eugeniusz Rink <slot@slot-it.pl>
Reply-To: slot@slot-it.pl
Organization: SLOT
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0
MIME-Version: 1.0
Newsgroups: pl.comp.lang.java
Subject: Re: Android - eWUŚ
References: <5249e592$0$2185$65785112@news.neostrada.pl> <524ab192$0$2207$65785112@news.neostrada.pl> <524ab323$0$2179$65785112@news.neostrada.pl>
In-Reply-To: <524ab323$0$2179$65785112@news.neostrada.pl>
Lines: 46
Message-ID: <524b184e$0$2200$65785112@news.neostrada.pl>
NNTP-Posting-Host: 77-252-41-19.ip.netia.com.pl
X-Trace: 1380653134 unt-rea-b-01.news.neostrada.pl 2200 77.252.41.19:12419
X-Complaints-To: abuse@news.neostrada.pl
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit