Code Comments
Programming Forum and web based access to our favorite programming groups.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!
Post Follow-up to this message"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)
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread
Powered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.