Re: Setting HTTP headers

2009-01-09 Thread Subra Aswathanarayanan
Thanks Dinesh. I will try ur suggestion and let you know the result.

On Fri, Jan 9, 2009 at 1:32 PM, Dinesh Premalal  wrote:

> Hi, Subra,
>
> "Subra Aswathanarayanan"  writes:
>
> > I just wanted to clarify my question. In a axis2c webservice, when
> responding
> > to the client with a soap response, is there a way one can set a standard
> http
> > header too?
>
> AFAIK, there is no decent method for doing this. I think, in SOAP engine
> point
> of view this is something out of its scope. It would rather a job of
> transport. However you could figure out a way for setting http
> headers. Here is something I did while ago for client side [1]. Hope It
> would work for server side too. I never try it on the server side though.
>
> 
> axis2_http_header_t *axis2_header;
> axutil_property_t *header_property;
> const char *header = (char *) wsclient_options->value;
>
> axis2_header = axis2_http_header_create_by_str (env, header);
> axutil_array_list_add (header_list, env, (void *)axis2_header);
> header_property = axutil_property_create(env);
> if (header_property && header_list)
> {
>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);
> }
> 
>
>
> 1.
> https://wso2.org/svn/browse/wso2/trunk/wsf/c/wsclient/src/stub.c?view=markup
>


Re: Setting HTTP headers

2009-01-09 Thread Dinesh Premalal
Hi, Subra,

"Subra Aswathanarayanan"  writes:

> I just wanted to clarify my question. In a axis2c webservice, when responding
> to the client with a soap response, is there a way one can set a standard http
> header too?

AFAIK, there is no decent method for doing this. I think, in SOAP engine point
of view this is something out of its scope. It would rather a job of
transport. However you could figure out a way for setting http
headers. Here is something I did while ago for client side [1]. Hope It
would work for server side too. I never try it on the server side though.


axis2_http_header_t *axis2_header;
axutil_property_t *header_property;
const char *header = (char *) wsclient_options->value;

axis2_header = axis2_http_header_create_by_str (env, header);
axutil_array_list_add (header_list, env, (void *)axis2_header);
header_property = axutil_property_create(env);
if (header_property && header_list)
{
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);
}



1.https://wso2.org/svn/browse/wso2/trunk/wsf/c/wsclient/src/stub.c?view=markup


Re: Setting HTTP headers

2009-01-09 Thread Subra Aswathanarayanan
I just wanted to clarify my question. In a axis2c webservice, when
responding to the client with a soap response, is there a way one can set a
standard http header too?
I searched in the archive but wasn't able to find any definitive answer.

On Thu, Jan 8, 2009 at 5:16 PM, Subra Aswathanarayanan
wrote:

> Hello,
> Is there a way to set standard http header ('Server' for e.g.) in the
> response.
>
> Subra
>


Re: Setting HTTP Headers

2008-07-08 Thread Manjula Peiris
Andy,

First try after commenting the HTTP-Authentication part from the
axis2.xml. If that is the case then it is a bug.

-Manjula. 

On Tue, 2008-07-08 at 10:05 -0400, Andy Karseras wrote:
> Hi,
> 
> I am using release 1.4.0.
> 
> 
> From the axis2.xml (hopefully this is sufficient)...
> 
> 
> 
> 
> 
> HTTP/1.1
> 
> chunked
>  password="abcdefg" locked="true"/>
> 
> 
> 
> The resulting request header...
> 
> POST /services/application HTTP/1.1
> User-Agent: Axis2C/1.4.0
> SOAPAction: ""
> Content-Length: 606
> Content-Type: text/xml;charset=UTF-8
> Host: localhost:7547
> Authorization: Basic YXBwbGljYXRpb246d2x5VmRaWjA1RDg=
> 
> Regards,
> 
> Andy
> 
> 
> On Mon, Jul 7, 2008 at 11:06 PM, Samisa Abeysinghe <[EMAIL PROTECTED]>
> wrote:
> Manjula Peiris wrote:
> On Mon, 2008-07-07 at 17:41 -0400, Andy Karseras
> wrote:
>  
> Hi,
> 
> Is there any way of setting the following
> headers using code ?
> 
> - SOAPAction: "urn:anonOutInOp"
> - Transfer-Encoding: chunked
> 
> I have tried uncommenting the relevant line in
> the axis.xml for
> Transfer-Encoding but this didn't seem to
> work.
>
> 
> AFAIK With Axis2/C 1.4 for normal SOAP samples this is
> working. The
> message can be sent with chunking header , but the
> http body as a one
> chunk. Can you send us the axis2.xml and some details
> on what version of
> Axis2/C are using ?
>  
> 
> 
> Use the latest version of Axis2/C, do not use an old
> version :)
> 
> Samisa...
> 
>  
> Many thanks.
> 
> 
> Andy
>
> 
> 
> 
> -
> To unsubscribe, e-mail:
> [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 
> No virus found in this incoming message.
> Checked by AVG - http://www.avg.com Version: 8.0.138 /
> Virus Database: 270.4.6/1538 - Release Date: 7/7/2008
> 7:40 AM
> 
> 
> 
>  
> 
> 
> 
> -- 
> Samisa Abeysinghe Director, Engineering; WSO2 Inc.
> 
> http://www.wso2.com/ - "The Open Source SOA Company"
> 
> 
> -
> 
> 
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail:
> [EMAIL PROTECTED]
> 
> 
> 


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting HTTP Headers

2008-07-08 Thread Andy Karseras
Hi,

I am using release 1.4.0.


>From the axis2.xml (hopefully this is sufficient)...





HTTP/1.1

chunked




The resulting request header...

POST /services/application HTTP/1.1
User-Agent: Axis2C/1.4.0
SOAPAction: ""
Content-Length: 606
Content-Type: text/xml;charset=UTF-8
Host: localhost:7547
Authorization: Basic YXBwbGljYXRpb246d2x5VmRaWjA1RDg=

Regards,

Andy


On Mon, Jul 7, 2008 at 11:06 PM, Samisa Abeysinghe <[EMAIL PROTECTED]> wrote:

> Manjula Peiris wrote:
>
>> On Mon, 2008-07-07 at 17:41 -0400, Andy Karseras wrote:
>>
>>
>>> Hi,
>>>
>>> Is there any way of setting the following headers using code ?
>>>
>>> - SOAPAction: "urn:anonOutInOp"
>>> - Transfer-Encoding: chunked
>>>
>>> I have tried uncommenting the relevant line in the axis.xml for
>>> Transfer-Encoding but this didn't seem to work.
>>>
>>>
>>
>> AFAIK With Axis2/C 1.4 for normal SOAP samples this is working. The
>> message can be sent with chunking header , but the http body as a one
>> chunk. Can you send us the axis2.xml and some details on what version of
>> Axis2/C are using ?
>>
>>
>
> Use the latest version of Axis2/C, do not use an old version :)
>
> Samisa...
>
>
>>
>>> Many thanks.
>>>
>>>
>>> Andy
>>>
>>>
>>
>>
>> -
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>>
>> No virus found in this incoming message.
>> Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database:
>> 270.4.6/1538 - Release Date: 7/7/2008 7:40 AM
>>
>>
>>
>>
>>
>
>
> --
> Samisa Abeysinghe Director, Engineering; WSO2 Inc.
>
> http://www.wso2.com/ - "The Open Source SOA Company"
>
>
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>


Re: Setting HTTP Headers

2008-07-07 Thread Samisa Abeysinghe

Manjula Peiris wrote:

On Mon, 2008-07-07 at 17:41 -0400, Andy Karseras wrote:
  

Hi,

Is there any way of setting the following headers using code ?

- SOAPAction: "urn:anonOutInOp"
- Transfer-Encoding: chunked

I have tried uncommenting the relevant line in the axis.xml for
Transfer-Encoding but this didn't seem to work.



AFAIK With Axis2/C 1.4 for normal SOAP samples this is working. The
message can be sent with chunking header , but the http body as a one
chunk. Can you send us the axis2.xml and some details on what version of
Axis2/C are using ?
  


Use the latest version of Axis2/C, do not use an old version :)

Samisa...

  

Many thanks.


Andy




-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.4.6/1538 - Release Date: 7/7/2008 7:40 AM




  



--
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.


http://www.wso2.com/ - "The Open Source SOA Company"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting HTTP Headers

2008-07-07 Thread Manjula Peiris

On Mon, 2008-07-07 at 17:41 -0400, Andy Karseras wrote:
> Hi,
> 
> Is there any way of setting the following headers using code ?
> 
> - SOAPAction: "urn:anonOutInOp"
> - Transfer-Encoding: chunked
> 
> I have tried uncommenting the relevant line in the axis.xml for
> Transfer-Encoding but this didn't seem to work.

AFAIK With Axis2/C 1.4 for normal SOAP samples this is working. The
message can be sent with chunking header , but the http body as a one
chunk. Can you send us the axis2.xml and some details on what version of
Axis2/C are using ?

> 
> Many thanks.
> 
> 
> Andy


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Setting HTTP Headers

2008-07-07 Thread Samisa Abeysinghe

Andy Karseras wrote:

Hi,

Is there any way of setting the following headers using code ?

- SOAPAction: "urn:anonOutInOp"


Please have a look into the axis2_svc_client.h header. You can find out 
how to set SOAP action as well as other API info in there.



- Transfer-Encoding: chunked


If you want the transfer to be chunked form client, you have to use 
libcurl client transport.


Thanks,
Samisa...



I have tried uncommenting the relevant line in the axis.xml for 
Transfer-Encoding but this didn't seem to work.


Many thanks.


Andy
No virus found in this incoming message.
Checked by AVG - http://www.avg.com 
Version: 8.0.138 / Virus Database: 270.4.6/1538 - Release Date: 7/7/2008 7:40 AM
  



--
Samisa Abeysinghe 
Director, Engineering; WSO2 Inc.


http://www.wso2.com/ - "The Open Source SOA Company"


-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]