Return-Path: X-Original-To: apmail-axis-c-user-archive@www.apache.org Delivered-To: apmail-axis-c-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 82B13E84F for ; Tue, 26 Feb 2013 08:35:49 +0000 (UTC) Received: (qmail 70386 invoked by uid 500); 26 Feb 2013 08:35:49 -0000 Delivered-To: apmail-axis-c-user-archive@axis.apache.org Received: (qmail 70032 invoked by uid 500); 26 Feb 2013 08:35:43 -0000 Mailing-List: contact c-user-help@axis.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache AXIS C User List" Delivered-To: mailing list c-user@axis.apache.org Received: (qmail 69976 invoked by uid 99); 26 Feb 2013 08:35:41 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 08:35:41 +0000 X-ASF-Spam-Status: No, hits=2.2 required=5.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [163.156.213.177] (HELO sphinx17.axa.com) (163.156.213.177) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Feb 2013 08:35:31 +0000 X-IronPort-AV: E=Sophos;i="4.84,739,1355094000"; d="scan'208,217";a="12753556" Received: from i32eip02-d1.medc.services.axa-tech.intraxa ([10.140.32.9]) by ZS31EIP01.medc.services.axa-tech.intraxa with ESMTP; 26 Feb 2013 09:35:07 +0100 X-IronPort-AV: E=Sophos;i="4.84,739,1355094000"; d="scan'208,217";a="6384084" Received: from c005812.chres1.doleni.net ([194.40.60.24]) by I32EIP02-d2.medc.services.axa-tech.intraxa with ESMTP; 26 Feb 2013 09:34:50 +0100 Received: from c005815.chres1.doleni.net ([194.40.60.9]) by c005812.chres1.doleni.net with Microsoft SMTPSVC(6.0.3790.4675); Tue, 26 Feb 2013 09:34:49 +0100 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01CE13FC.2403B89C" Subject: AW: New Axis2c user - Axis2c API returning NULL Date: Tue, 26 Feb 2013 09:34:49 +0100 Message-ID: In-Reply-To: X-MS-Has-Attach: X-MS-TNEF-Correlator: thread-topic: New Axis2c user - Axis2c API returning NULL thread-index: Ac4TipjWC1XCNwDjSWOiA5mW4qJJjAAcLoOw References: From: "Stadelmann Josef" To: "Apache AXIS C User List" X-OriginalArrivalTime: 26 Feb 2013 08:34:49.0959 (UTC) FILETIME=[2427AF70:01CE13FC] X-Virus-Checked: Checked by ClamAV on apache.org ------_=_NextPart_001_01CE13FC.2403B89C Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable I have a question:=20 Are the samples delivered with your axis2C kit running? There are all kind of samples, simple and more complex ones.=20 If you work / debugging through this examples, you learn a lot. Once an example is running, enhance it with your code below: i.e. call to axis2_msg_ctx_get_property =20 But make sure, that at the client side, the client has in fact feed a property into the message context. If the client does not pass a property into the message context for transport to the server, NULL at the=20 server side is normal. Or what else would you expect from the server in this case? =20 Josef =20 Von: Pavani J [mailto:jpavani07@gmail.com]=20 Gesendet: Montag, 25. Februar 2013 20:01 An: c-user@axis.apache.org Betreff: New Axis2c user - Axis2c API returning NULL =20 Hi, =20 I am a new user of Axis2c and I am stuck because of the following: =20 I have WSDL generated C stubs and using axis2c-1.7.0 to deploy web service based on them. I am on server side. =20 Below is my code snippets that I tried to get HTTP header and it is returning NULL. Actually I am trying to get Cookie information from header. I could see the headers with Cookie information when I did a packet capture using wireshark, where Axis2c API is returning NULL for the same. Please let me know if there is anything wrong with the following code. =20 1) First method axutil_property_t* property =3D NULL; axis2_char_t* prop_val =3D NULL; property =3D axis2_msg_ctx_get_property(msg_ctx, env, AXIS2_TRANSPORT_HEADERS); // <--- this is returning NULL if (property =3D=3D NULL) { printf("property is NULL\n\n"); } else { prop_val =3D (axis2_char_t*)axutil_property_get_value(property, env); if (prop_val =3D=3D NULL) { printf(" prop_val is NULL\n\n"); } else { printf("prop_val: %s\n\n", prop_val); } } =20 2) Second Method =20 axutil_hash_t* header =3D NULL; header =3D axis2_msg_ctx_get_transport_headers(msg_ctx, env); // <--- This is returning NULL if (header) { axis2_http_header_t* test =3D NULL; test =3D (axis2_http_header_t*) axutil_hash_get(header, AXIS2_HTTP_HEADER_COOKIE, AXIS2_HASH_KEY_STRING); if (test) { axis2_char_t* val =3D NULL; val =3D axis2_http_header_get_value(test, env); if (val) { printf (" axis2_http_header_get_value, val: %s\n\n", val); } else { printf("axis2_http_header_get_value returned NULL\n\n"); } } else { printf("axutil_hash_get returned NULL\n\n"); } } else { printf("axis2_msg_ctx_get_transport_headers returned NULL\n\n"); } =20 =20 Any help is appreciated. =20 Thanks, Pavani =20 =20 ------_=_NextPart_001_01CE13FC.2403B89C Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable

I have a question:

Are the samples delivered with your axis2C kit = running?

There are all kind of samples, simple and more complex ones. =

If you work / debugging through this examples, you learn a = lot.

Once an example is running, enhance it with your code below: = i.e.

call to axis2_msg_ctx_get_property

 

But make sure, that at the client side, the client has in fact feed a = property into the message context.

If the client does not pass a property into the message context for = transport to the server, NULL at the

server side is normal. Or what else would you expect from the server in = this case?

 

Josef

 

Von:<= /b> Pavani J = [mailto:jpavani07@gmail.com]
Gesendet: Montag, 25. Februar = 2013 20:01
An: c-user@axis.apache.org
Betreff: New = Axis2c user - Axis2c API returning NULL

 

Hi,

 

I am a new user of Axis2c = and I am stuck because of the following:

 

I have WSDL generated C = stubs and using axis2c-1.7.0 to deploy web service based on them. I am = on server side.

 

Below is my code snippets = that I tried to get HTTP header and it is returning NULL. Actually I am = trying to get Cookie information from header.  I could see the = headers with Cookie information when I did a packet capture using = wireshark, where Axis2c API is returning NULL for the = same.

Please let me know if there is anything = wrong with the following code.

 

1) First = method

    axutil_property_t* = property =3D NULL;

    axis2_char_t* prop_val =3D = NULL;

    property =3D = axis2_msg_ctx_get_property(msg_ctx, env,

AXIS2_TRANSPORT_HEADERS); =  // <--- this is returning NULL

    if = (property =3D=3D NULL)

    {

      =   printf("property is = NULL\n\n");

    }

    = else

    {

      =   prop_val =3D (axis2_char_t*)axutil_property_get_value(property, = env);

        if (prop_val = =3D=3D NULL)

        = {

            = printf(" prop_val is NULL\n\n");

      =   }

        = else

        = {

            = printf("prop_val: %s\n\n", = prop_val);

        = }

    }

 

2) Second = Method

 

    = axutil_hash_t* header =3D NULL;

    header =3D = axis2_msg_ctx_get_transport_headers(msg_ctx, env);   // <--- = This is returning NULL

    if = (header)

    {

      =   axis2_http_header_t* test =3D NULL;

      =   test =3D (axis2_http_header_t*) = axutil_hash_get(header,

AXIS2_HTTP_HEADER_COOKIE, = AXIS2_HASH_KEY_STRING);

        if = (test)

        = {

            = axis2_char_t* val =3D NULL;

      =       val =3D axis2_http_header_get_value(test, = env);

            = if (val)

            = {

            =     printf (" axis2_http_header_get_value, val: = %s\n\n", val);

            = }

            = else

            = {

            =     printf("axis2_http_header_get_value returned = NULL\n\n");

            = }

        = }

        = else

        = {

            = printf("axutil_hash_get returned = NULL\n\n");

        = }

    }

    = else

    {

      =   printf("axis2_msg_ctx_get_transport_headers returned = NULL\n\n");

    }

 

 

Any help is = appreciated.

 

Thanks,

Pavani

 

 

------_=_NextPart_001_01CE13FC.2403B89C--