Code Monkey home page Code Monkey logo

Comments (24)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024

Original comment by [email protected] on 12 Oct 2010 at 6:58

  • Changed state: Started

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024

Original comment by [email protected] on 21 Oct 2010 at 4:47

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
Issue 42 has been merged into this issue.

Original comment by [email protected] on 7 Dec 2010 at 4:44

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024

Original comment by [email protected] on 15 Feb 2011 at 6:17

  • Changed state: Verified

from ksoap2-android.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 3, 2024
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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.