Comments (24)
I'm getting an error in this line :
client.setCookies(connection.getConnection(), cj);
The error is :
The method getConnection() is undefined for the type ServiceConnectionSE
How can i solve this problem ?
Original comment by [email protected]
on 8 Oct 2010 at 8:20
from ksoap2-android.
getConnection you should change source code add get mothod
my change source code see attachments
Original comment by [email protected]
on 9 Oct 2010 at 12:45
Attachments:
from ksoap2-android.
Thanks for the replay, but i dont get it.
What shall i change ?
Can you add an exsample, please ?
Original comment by [email protected]
on 11 Oct 2010 at 1:01
from ksoap2-android.
Please supply a patch against the latest version on github at mosabua or create
clone and pull request.
Original comment by [email protected]
on 12 Oct 2010 at 5:33
from ksoap2-android.
Original comment by [email protected]
on 12 Oct 2010 at 6:58
- Changed state: Started
from ksoap2-android.
Original comment by [email protected]
on 21 Oct 2010 at 4:47
from ksoap2-android.
Markl is currently looking at implementing this for his needs and I will
cooperate with him on it to get it pulled into the project code base and do
another release when its done.
http://groups.google.com/group/ksoap2-android/browse_thread/thread/4eb910ef3f8b8
434
Original comment by [email protected]
on 5 Nov 2010 at 3:04
from ksoap2-android.
I am in the process of implementing a cookie solution. Unfortunately the sonalb
code is buggy and does not appear to be maintained anymore. Furthermore, it
seems rather bloated for the requirements of this project (and I hate that
Client class - why aren't those methods static? Is it that way so they could be
overridden?) It was converted from a C++ project that was published in Dr.
Dobbs but the original source for that does not seem to be available anymore.
This leaves me believing that a more targeted rewrite would be a cleaner way to
implement this functionality.
Original comment by [email protected]
on 8 Nov 2010 at 4:12
from ksoap2-android.
I assume you are talking about jcookie when you mention sonalb. I was not
thinking of adding another library in. I think it would be sufficient to
expose the connection so that you can over ride the creation of the connection
or at least have some sort of method that allows you to supply further header
elements (including cookies) before the connection is established and in the
same manner get out any header once the result was received. Then users can use
jcookie or whatever else to set up their header but they dont have to and we
wont impose that library on the many other users that have no need for cookies
or further header stuff..
Makes sense?
Original comment by [email protected]
on 8 Nov 2010 at 4:48
from ksoap2-android.
I see what you are getting at. I have a working prototype that I am currently
testing. Part of the problem with the cookies is that there are three
specifications all which vary slightly. I didn't want to write code to parse
the cookies or the code to decide if a cookie should be sent to a particular
web site. This seemed highly prone to error so I was looking for something
already built. I discovered that there is a set of Apache classes already
included in Android that seem to address that need. It has a cookie parser and
a "match" function that will establish if the cookie is appropriate for the
target domain and path. See org.apache.http.cookie as a starting point.
My implementation allows one to pass a "cookiejar" to the, for example,
HttpTransportSE class, call method. This will then attach any relevant cookies
to the request and add any received cookies to the jar. One only needs one jar
since it will decide which cookies are relevant. It also handles replacing like
named cookies. The sonalb code attempted something similar but was buggy.
To me, this seemed an intuitive approach. Thoughts?
Original comment by [email protected]
on 15 Nov 2010 at 7:29
from ksoap2-android.
Perfect. Makes sense to me. We just need to ensure that it is properly
documented and maybe has an example on the wiki or somewhere and this should be
good.
Original comment by [email protected]
on 15 Nov 2010 at 8:38
from ksoap2-android.
I have received a first cut of an implementation from markradb and we are
looking at getting it into the project together.
Original comment by [email protected]
on 25 Nov 2010 at 5:58
from ksoap2-android.
Issue 42 has been merged into this issue.
Original comment by [email protected]
on 7 Dec 2010 at 4:44
from ksoap2-android.
Development on this feature is currently ongoing in
https://github.com/markradb/ksoap2-android
Original comment by [email protected]
on 7 Dec 2010 at 4:46
from ksoap2-android.
This has been pulled into the master branch. I am awaiting some content for a
wiki page showing an example for usage and some testing feedback from markradb.
Once that is available I will cut the new 2.5.3 release and close this issue.
Original comment by [email protected]
on 15 Dec 2010 at 6:31
from ksoap2-android.
2.5.4 has been released and contains this fix. Documentation on the wiki would
be great but the release is out for now.
Original comment by [email protected]
on 15 Feb 2011 at 6:16
from ksoap2-android.
Original comment by [email protected]
on 15 Feb 2011 at 6:17
- Changed state: Verified
from ksoap2-android.
Guys, just write code like this.. this will work
//part of the code
ServiceConnection connection = getServiceConnection();
connection.setRequestProperty("User-Agent", "kSOAP/2.0");
// connection.setRequestProperty("User-Agent", "Jakarta Commons-HttpClient/3.1");
connection.setRequestProperty("SOAPAction", soapAction);
connection.setRequestProperty("Content-Type", "text/xml");
connection.setRequestProperty("Connection", "Keep-Alive");
connection.setRequestProperty("Content-Length", "" + requestData.length);
connection.setRequestProperty("Cookie","defaultinst_SAMLart=MDGsMcCYBoEEzZtIBRtVQulSMAfZVva5JH5cSizJPSbht7h9DAUmMmx7");
// use the above statement to set cookies.. this is working fine...
Original comment by [email protected]
on 21 Feb 2011 at 11:25
from ksoap2-android.
feel free to contact me for any questions reg this
Original comment by [email protected]
on 21 Feb 2011 at 11:26
from ksoap2-android.
It seems to be that there is a problem with multiple cookies.
The result of this code is setting only the last cookie =(
connection.setRequestProperty("Cookie","cookie1=foo");
connection.setRequestProperty("Cookie","cookie2=bar");
Any ideas, how to solve this problem?
Original comment by scratchboom
on 21 Feb 2011 at 12:41
from ksoap2-android.
My Apologies for a newbie question here, I am unable to find (built Jars of)
com.sonalb.net.http.cookie.Client;
com.sonalb.net.http.cookie.CookieJar;
would someone have them built that could provide here, if not please provide a
understanding of how to export them from sources in Eclipse?
Original comment by [email protected]
on 4 Apr 2011 at 9:10
from ksoap2-android.
Why do you think you should use those and not javax.servlet.http ..
Original comment by [email protected]
on 4 Apr 2011 at 9:40
- Added labels: Y
from ksoap2-android.
Thank You, I would very much like to use javax.servlet.http would you have any
example implementations with KSoap Sessions? I assume KSOAP2 is still used in
that case. So you are saying use Java.servlet.http.HttpSession to manage
session header Requests and Response still with KSoap2?
Original comment by [email protected]
on 4 Apr 2011 at 10:16
from ksoap2-android.
Sorry.. I have not implementation. Ask on the mailing list.
Original comment by [email protected]
on 4 Apr 2011 at 10:56
from ksoap2-android.
Related Issues (20)
- Basic authentication fails on long username/password combinations.
- Casting Issue from soap object to custom class HOT 1
- BigDecimal does not serialize properly when sending out to as a webrequest. HOT 1
- handling of getPropertyCount get's wrong on classes for send AND receive
- Java version backward compatibility HOT 1
- StreamBody from WSDL via soap
- Option to not produce a SOAP Header on the request HOT 2
- java.io.EOFException : ReadasciiLine
- xmlpullparser not wrok HOT 3
- KPCS12 and Ksoap2
- Calling wcf service with wsHttpBinding thrown an exception when security is enabled in wcf service.
- red demo came on my tablet cant remove it HOT 1
- HttpsTransportSE completely ignores Proxy HOT 2
- envelope headerOut. headerIn function will crash on platform of hTC M8 with lollipop version HOT 10
- Improvement: Explicitly call "disconnect"
- EOF Exception Ksoap2-3.4.0 HOT 1
- NoSuchMethods on Lollipop 5.0.2 HTC
- Is there support to create WSDL stub code ?
- IOException no response no call just IOEXception HOT 2
- Вifferentiate timeout for read response and timeout for connection
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from ksoap2-android.