Code Comments

Programming Forum and web based access to our favorite programming groups.
For Programmers: Free Programming Magazines | New: Database administration forum
Registration is free! Edit your profileCalendarFind other membersFrequently Asked QuestionsSearch -> 
Post New Thread











Thread
Author

Web Service stubs and cookies
Hello All, and sorry for cross-posting! Not sure where this fits in...

I've generated some web service client stubs from a WSDL using
jwsdp-1.5 (jax-rpc). So far so good. However, the server application
that I'm calling, uses a cookie to identify which "session" a
particular web service call refers to.

The nice people at the Big Server Company have written a VB.NET
example that shows how to set the cookie in the HTTP POST that is the
result of a call to one of the stub functions. They do something like
this:

myStubClassObject.CookieContainer.SetCookies(uri, cookie)

I would like to do this in Java, but I can't find anything in Sun's
base classes that comes even close to this.

If this is not possible in Sun Java, how can I work around it? I guess
I would have to create my own HttpURLConnection and generate the web
service call myself... but that kind of defeats the idea of a stub
class, doesn't it?

Any ideas appreciated!

Report this thread to moderator Post Follow-up to this message
Old Post
Mikael Thorsson
12-07-04 09:02 PM


Re: Web Service stubs and cookies
"Mikael Thorsson" <thorsson_mikael@hotmail.com> wrote in message
news:b0438d39.0412070607.3ca3df8a@posting.google.com...
| Hello All, and sorry for cross-posting! Not sure where this fits in...
|
| I've generated some web service client stubs from a WSDL using
| jwsdp-1.5 (jax-rpc). So far so good. However, the server application
| that I'm calling, uses a cookie to identify which "session" a
| particular web service call refers to.
|
| The nice people at the Big Server Company have written a VB.NET
| example that shows how to set the cookie in the HTTP POST that is the
| result of a call to one of the stub functions. They do something like
| this:
|
| myStubClassObject.CookieContainer.SetCookies(uri, cookie)
|
| I would like to do this in Java, but I can't find anything in Sun's
| base classes that comes even close to this.
|
| If this is not possible in Sun Java, how can I work around it? I guess
| I would have to create my own HttpURLConnection and generate the web
| service call myself... but that kind of defeats the idea of a stub
| class, doesn't it?
|
| Any ideas appreciated!

Have you thought about using Axis instead of jwsdp? You can definitely do
this kind of thing with Axis (using SOAPHTTPConnection I think)
http://ws.apache.org/axis/

Good luck
--
-P
"Programs that are hard to read are hard to modify.
Programs that have duplicated logic are hard to modify.
Programs with complex conditional logic are hard to modify"

( Kent Beck)



Report this thread to moderator Post Follow-up to this message
Old Post
PerfectDayToChaseTornados
12-07-04 09:02 PM


Sponsored Links




Last Thread Next Thread Next
Search this forum -> 
Post New Thread

Java Beans archive

Show a Printable Version Send to friend Email This Page to Someone! subscribe to this thread Receive updates to this thread
Computer Consultants
Programming Jobs
Visual Basic Controls
SQL Server Programming
Webservices
Java Security
Visual Studio
C# Programming
Visual J++
Software engineering
Open source Software
Perl Programming
PHP Programming
ASP Programming
ASP .NET Programming
Visual Basic Programming
Windows Scripting Host
Java Programming
Java Help
Java Beans
VBScript
Cobol
MAC Applications
Unix Programming
Forum Jump:
All times are GMT. The time now is 07:30 AM.

 
Free MCSE Braindumps | Real Estate Topics

Programming forum archive

Copyrights CodeComments.com 2004 - 2006

Powered by vBulletin Copyright 2000-2006 Jelsoft Enterprises Limited.