I guess that's the part I'm missing. What API do I use to attach the options to the request? I don't see anything that will let me do that.
-- Doug Price Research Director | Presagis T. +1 972 943.2400 X2433 F. +1 469 467.4564 C. +1 469 867.8399 DISCLAIMER: This e-mail message is for the sole use of the intended recipient(s) and may contain confidential and/or proprietary information. Do not read, copy, or disseminate this message unless you are the addressee. Any unauthorized review, use, disclosure or distribution is strictly prohibited. If you have received this message in error, please contact the sender by reply e-mail and delete the original and any copies from your system. -----Original Message----- From: Damitha Kumarage [mailto:dami...@wso2.com] Sent: Thursday, June 17, 2010 1:50 AM To: Apache AXIS C User List Subject: Re: http cookies Doug Price wrote: > Thanks for the information. I tried to add this to an functioning Axis2c web > service client, but when I examine the incoming packing on the server using > network monitor I don't see the cookie information. I assume I'm probably > just missing a step. Can you see anything wrong w/ the code below? > > axutil_array_list_t *header_list = axutil_array_list_create(env, 2); > axis2_char_t *header_str = "Cookie: > ASP.NET_SessionId=40a3mv55xoaj5055ltjo0h45; > .ASPXAUTH=C1B9F50A916D98A80730C38C3F0FF65269D8AE7E8766288EB640DD5C01F6E929D6C0EF76AD6CA3083C6D92B086520204F22F1F843AC7206C4EBADA25C023BA8F81AD355F741F1B552BFBACD3BFBA0148D2AE3798701A7A4E975D94619C322F9CDBFC"; > axis2_http_header_t *header = axis2_http_header_create_by_str(env, > header_str); > axutil_array_list_add(header_list, env, (void *)header); > axutil_property_t *header_property = axutil_property_create(env); > axis2_options_t *options = axis2_options_create(env); > axutil_property_set_value(header_property, env, header_list); > axutil_property_set_free_func(header_property, env, > axutil_array_list_free_void_arg); > axis2_options_set_property(options, env, AXIS2_TRANSPORT_HEADER_PROPERTY, > header_property); > > adb_resourceRequest_t *request = adb_resourceRequest_create(env); > adb_resourceResponse_t *response = axis2_stub_op_test_resource(stub, env, > request); > They way you try head a header is OK. But it seems you don't use your created options struct for request. Thanks, Damitha > > -- > Doug Price > Research Director | Presagis > > T. +1 972 943.2400 X2433 F. +1 469 467.4564 C. +1 469 867.8399 > > DISCLAIMER: This e-mail message is for the sole use of the intended > recipient(s) and may contain confidential and/or proprietary information. Do > not read, copy, or disseminate this message unless you are the addressee. Any > unauthorized review, use, disclosure or distribution is strictly prohibited. > If you have received this message in error, please contact the sender by > reply e-mail and delete the original and any copies from your system. > > -----Original Message----- > > From: Damitha Kumarage [mailto:dami...@wso2.com] > Sent: Tuesday, June 15, 2010 8:59 AM > To: Apache AXIS C User List > Subject: Re: http cookies > > Doug Price wrote: > >> I'm using the Axis2c utility WSDL2C to create a client for an existing >> web service. That works fine. However, for authentication purposes, I >> now need to set cookies in the HTTP header of the SOAP message. It >> would appear there are ways to do this using the underlying Axis2c >> functions, but I don't see a way that I can use them with the stub >> structs generated by WSDL2C. Ideally, I'd like to create my request >> struct and set the cookie information on it (or some other related >> struct) before passing it to the underlying Axis2c code so that I can >> continue to use WSDL2C as the web service interface changes. Is this >> possible? If not, what's the easiest way to set cookies on the HTTP >> header? >> >> > Axis2/c client handles cookies set by server at transport level. > However if you need to create a cookie in your client you need to add it > as a http header. The way to add a http header is, > first create the header using axis2_http_header_create_by_str and then > add this header as a property in the options struct. > Thanks, > Damitha > >> -- >> *Doug Price* >> Research Director | *Presagis* >> >> *T.* +1 972 943.2400 X2433 *F.* +1 469 467.4564 *C.* +1 469 867.8399 >> >> >> DISCLAIMER: This e-mail message is for the sole use of the intended >> recipient(s) and may contain confidential and/or proprietary >> information. Do not read, copy, or disseminate this message unless you >> are the addressee. Any unauthorized review, use, disclosure or >> distribution is strictly prohibited. If you have received this message >> in error, please contact the sender by reply e-mail and delete the >> original and any copies from your system. >> >> >> > > > -- > __________________________________________________________________ > > Damitha Kumarage > Technical Lead; WSO2 Inc. > "Oxygenating the Web Service Platform; " http://www.wso2.com/ > > blog: " http://damithakumarage.wordpress.com/ > __________________________________________________________________ > > --------------------------------------------------------------------- > To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org > For additional commands, e-mail: c-user-h...@axis.apache.org > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org > For additional commands, e-mail: c-user-h...@axis.apache.org > > > -- __________________________________________________________________ Damitha Kumarage Technical Lead; WSO2 Inc. "Oxygenating the Web Service Platform; " http://www.wso2.com/ blog: " http://damithakumarage.wordpress.com/ __________________________________________________________________ --------------------------------------------------------------------- To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org For additional commands, e-mail: c-user-h...@axis.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: c-user-unsubscr...@axis.apache.org For additional commands, e-mail: c-user-h...@axis.apache.org