You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org> on 2008/10/10 23:49:44 UTC

[jira] Created: (AXIS2C-1271) adb generated code doesn't handle empty elements

adb generated code doesn't handle empty elements
------------------------------------------------

                 Key: AXIS2C-1271
                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
             Project: Axis2-C
          Issue Type: Bug
          Components: code generation
    Affects Versions: Current (Nightly)
            Reporter: Eric Haszlakiewicz
         Attachments: CADBBeanTemplate.diff

The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Haszlakiewicz updated AXIS2C-1271:
---------------------------------------

    Attachment: CADBBeanTemplate.diff2

Updated patch, with support for nil'd elements.

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff, CADBBeanTemplate.diff2
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


Re: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5

Posted by Dimuthu Gamage <di...@gmail.com>.
Hi Gelle,

This looks like a bug in recent Axis2/C in the client request (it ignores
url parameters). Can you please raise a jira on this.

Thanks
Dimuthu

On Thu, Feb 5, 2009 at 5:00 AM, Gelle, Sreenivasulu <
sreenivasulu.gelle@sap.com> wrote:

>
>
>
>  ------------------------------
>
> *From:* Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com]
> *Sent:* Wednesday, February 04, 2009 2:33 PM
> *To:* Apache AXIS C Developers List
> *Subject:* [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when
> upgrading Axis2/c from 1.3 to 1.5
>
>
>
> Hi All,
>
>
>
> Now I narrowed down the problem. The fact that the response I got has left
> out the root node is because the axis2/c does not send over the query String
> properly (in a different way?) in http request, the web server (built using
> AXIS-J 1.4, a bit old I know) actually gets a different request and send
> back a different response accordingly.
>
>
>
> Here is my situation, the client send the request to the following end
> point:
>
>
>
>             *http://host:8080/products/servlet/webservices?ver=2.0*
>
> * *
>
> When I use axis2/c 1.3, it seems that all the information is sent over so
> that the server side can get the query string ver=2.0 using the following
> call:
>
>
>
>            String queryString = request.getQueryString();
>
>
>
> In which request is an HttpServletRequest. But in Axis2/c 1.5, I got a null
> value for the queryString.
>
>
>
> Is this a known issue or the query parameter is sent over differently and I
> should use a different method to get it?
>
>
>
> Thanks!
>
> Srini
>
>
>  ------------------------------
>
> *From:* Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com]
> *Sent:* Tuesday, February 03, 2009 5:11 PM
> *To:* Apache AXIS C Developers List
> *Cc:* Yuin, Maria
> *Subject:* [LIKELY JUNK]encountering problem when upgrading Axis2/c from
> 1.3 to 1.5
>
>
>
> Hi All,
>
>
>
> I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5.
> Basically, I noticed that in 1.5 the response always leaves out the root
> node in the soap message. I have the following simplified code snippet:
>
>
>
> ===================================
>
> axiom_node_t * responseNode =
> axis2_svc_client_send_receive(_wsf_service_client, _env, payload);
>
>
>
> xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE, 0,
> AXIS2_XML_PARSER_TYPE_BUFFER);
>
>
>
> om_output = axiom_output_create(_env, xml_writer);
>
>
>
> //add xsi namespace definition, this seems to be a bug in axiom.
>
> axiom_namespace_t* ns_xsi =  axiom_namespace_create(_env, "
> http://www.w3.org/2001/XMLSchema-instance", "xsi");
>
>
>
> axiom_element_t* node_ele  = (axiom_element_t*)
> axiom_node_get_data_element(responseNode, _env);
>
>
>
> axiom_element_declare_namespace_assume_param_ownership(node_ele, _env,
> ns_xsi);
>
>
>
> axiom_node_serialize_sub_tree(node, _env, om_output);
>
>
>
> xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);
>
>
>
>
>
> In Axis2/c 1.3, I used to have a response (xmlreply) like this:
>
>
>
> <localtypes:pingVersion xmlns:localtypes="
> http://www.xxx.com/yyy/ServerXXX.xsd"
>
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product
> version 12.2.0.0</version></localtypes:pingVersion>
>
>
>
> But in 1.5, I ONLY got the following:
>
>
>
>  <version>Product version 12.2.0.0</version>
>
>
>
> That is, the root node <localtypes:pingVersion> is somehow missing.
>
>
>
> Is there anything I am missing, or the interface changed and I need to call
> a different method to serialize?
>
>
>
> Thanks much!
>
> Srini
>
>
>



-- 
Thanks,
Dimuthu Gamage

http://www.dimuthu.org
http://www.wso2.org

Re: encountering problem when upgrading Axis2/c from 1.3 to 1.5 - this seems to be a critical bug

Posted by Vivian Wang <vi...@yahoo.com>.
This seems to be a critical bug, can we get it fixed as soon as possible? I am sure I will need this very shortly.
�Thanks!
V.




________________________________
From: "Gelle, Sreenivasulu" <sr...@sap.com>
To: Apache AXIS C Developers List <ax...@ws.apache.org>; axis-c-user@ws.apache.org
Sent: Wednesday, February 4, 2009 3:30:09 PM
Subject: RE: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5


�
�

________________________________

From:Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Wednesday, February 04, 2009 2:33 PM
To: Apache AXIS C Developers List
Subject: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5 
�
Hi All,
�
Now I narrowed down the problem. The fact that the response I got has left out the root node is because the axis2/c does not send over the query String properly (in a different way?) in http request, the web server (built using AXIS-J 1.4, a bit old I know) actually gets a different request and send back a different response accordingly. 
�
Here is my situation, the client send the request to the following end point:
�
����������� http://host:8080/products/servlet/webservices?ver=2.0
�
When I use axis2/c 1.3, it seems that all the information is sent over so that the server side can get the query string ver=2.0 using the following call:
�
��� �������String queryString = request.getQueryString();
�
In which request is an HttpServletRequest. But in Axis2/c 1.5, I got a null value for the queryString.
�
Is this a known issue or the query parameter is sent over differently and I should use a different method to get it?
�
Thanks!
Srini
�

________________________________

From:Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Tuesday, February 03, 2009 5:11 PM
To: Apache AXIS C Developers List
Cc: Yuin, Maria
Subject: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5
�
Hi All,
�
I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5. Basically, I noticed that in 1.5 the response always leaves out the root node in the soap message. I have the following simplified code snippet:
�
===================================
axiom_node_t * responseNode = axis2_svc_client_send_receive(_wsf_service_client, _env, payload);
�
xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE, 0, AXIS2_XML_PARSER_TYPE_BUFFER);
�
om_output = axiom_output_create(_env, xml_writer);
�
//add xsi namespace definition, this seems to be a bug in axiom.
axiom_namespace_t* ns_xsi =� axiom_namespace_create(_env, "http://www.w3.org/2001/XMLSchema-instance", "xsi");
�
axiom_element_t* node_ele� = (axiom_element_t*) axiom_node_get_data_element(responseNode, _env);
����� ����� 
axiom_element_declare_namespace_assume_param_ownership(node_ele, _env, ns_xsi);
�
axiom_node_serialize_sub_tree(node, _env, om_output);
�
xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);
�
�
In Axis2/c 1.3, I used to have a response (xmlreply) like this:
�
<localtypes:pingVersion xmlns:localtypes="http://www.xxx.com/yyy/ServerXXX.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product version 12.2.0.0</version></localtypes:pingVersion>
�
But in 1.5, I ONLY got the following:
�
�<version>Product version 12.2.0.0</version>
�
That is, the root node <localtypes:pingVersion> is somehow missing. 
�
Is there anything I am missing, or the interface changed and I need to call a different method to serialize?
�
Thanks much!
Srini


      

RE: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5

Posted by "Gelle, Sreenivasulu" <sr...@sap.com>.
 

 

________________________________

From: Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Wednesday, February 04, 2009 2:33 PM
To: Apache AXIS C Developers List
Subject: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when
upgrading Axis2/c from 1.3 to 1.5 

 

Hi All,

 

Now I narrowed down the problem. The fact that the response I got has
left out the root node is because the axis2/c does not send over the
query String properly (in a different way?) in http request, the web
server (built using AXIS-J 1.4, a bit old I know) actually gets a
different request and send back a different response accordingly. 

 

Here is my situation, the client send the request to the following end
point:

 

            http://host:8080/products/servlet/webservices?ver=2.0

 

When I use axis2/c 1.3, it seems that all the information is sent over
so that the server side can get the query string ver=2.0 using the
following call:

 

           String queryString = request.getQueryString();

 

In which request is an HttpServletRequest. But in Axis2/c 1.5, I got a
null value for the queryString.

 

Is this a known issue or the query parameter is sent over differently
and I should use a different method to get it?

 

Thanks!

Srini

 

________________________________

From: Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Tuesday, February 03, 2009 5:11 PM
To: Apache AXIS C Developers List
Cc: Yuin, Maria
Subject: [LIKELY JUNK]encountering problem when upgrading Axis2/c from
1.3 to 1.5

 

Hi All,

 

I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5.
Basically, I noticed that in 1.5 the response always leaves out the root
node in the soap message. I have the following simplified code snippet:

 

===================================

axiom_node_t * responseNode =
axis2_svc_client_send_receive(_wsf_service_client, _env, payload);

 

xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE,
0, AXIS2_XML_PARSER_TYPE_BUFFER);

 

om_output = axiom_output_create(_env, xml_writer);

 

//add xsi namespace definition, this seems to be a bug in axiom.

axiom_namespace_t* ns_xsi =  axiom_namespace_create(_env,
"http://www.w3.org/2001/XMLSchema-instance", "xsi");

 

axiom_element_t* node_ele  = (axiom_element_t*)
axiom_node_get_data_element(responseNode, _env);

            

axiom_element_declare_namespace_assume_param_ownership(node_ele, _env,
ns_xsi);

 

axiom_node_serialize_sub_tree(node, _env, om_output);

 

xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);

 

 

In Axis2/c 1.3, I used to have a response (xmlreply) like this:

 

<localtypes:pingVersion
xmlns:localtypes="http://www.xxx.com/yyy/ServerXXX.xsd"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product
version 12.2.0.0</version></localtypes:pingVersion>

 

But in 1.5, I ONLY got the following:

 

 <version>Product version 12.2.0.0</version>

 

That is, the root node <localtypes:pingVersion> is somehow missing. 

 

Is there anything I am missing, or the interface changed and I need to
call a different method to serialize?

 

Thanks much!

Srini

 


RE: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5

Posted by "Gelle, Sreenivasulu" <sr...@sap.com>.
 

 

________________________________

From: Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Wednesday, February 04, 2009 2:33 PM
To: Apache AXIS C Developers List
Subject: [LIKELY JUNK]RE: [LIKELY JUNK]encountering problem when
upgrading Axis2/c from 1.3 to 1.5 

 

Hi All,

 

Now I narrowed down the problem. The fact that the response I got has
left out the root node is because the axis2/c does not send over the
query String properly (in a different way?) in http request, the web
server (built using AXIS-J 1.4, a bit old I know) actually gets a
different request and send back a different response accordingly. 

 

Here is my situation, the client send the request to the following end
point:

 

            http://host:8080/products/servlet/webservices?ver=2.0

 

When I use axis2/c 1.3, it seems that all the information is sent over
so that the server side can get the query string ver=2.0 using the
following call:

 

           String queryString = request.getQueryString();

 

In which request is an HttpServletRequest. But in Axis2/c 1.5, I got a
null value for the queryString.

 

Is this a known issue or the query parameter is sent over differently
and I should use a different method to get it?

 

Thanks!

Srini

 

________________________________

From: Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Tuesday, February 03, 2009 5:11 PM
To: Apache AXIS C Developers List
Cc: Yuin, Maria
Subject: [LIKELY JUNK]encountering problem when upgrading Axis2/c from
1.3 to 1.5

 

Hi All,

 

I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5.
Basically, I noticed that in 1.5 the response always leaves out the root
node in the soap message. I have the following simplified code snippet:

 

===================================

axiom_node_t * responseNode =
axis2_svc_client_send_receive(_wsf_service_client, _env, payload);

 

xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE,
0, AXIS2_XML_PARSER_TYPE_BUFFER);

 

om_output = axiom_output_create(_env, xml_writer);

 

//add xsi namespace definition, this seems to be a bug in axiom.

axiom_namespace_t* ns_xsi =  axiom_namespace_create(_env,
"http://www.w3.org/2001/XMLSchema-instance", "xsi");

 

axiom_element_t* node_ele  = (axiom_element_t*)
axiom_node_get_data_element(responseNode, _env);

            

axiom_element_declare_namespace_assume_param_ownership(node_ele, _env,
ns_xsi);

 

axiom_node_serialize_sub_tree(node, _env, om_output);

 

xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);

 

 

In Axis2/c 1.3, I used to have a response (xmlreply) like this:

 

<localtypes:pingVersion
xmlns:localtypes="http://www.xxx.com/yyy/ServerXXX.xsd"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product
version 12.2.0.0</version></localtypes:pingVersion>

 

But in 1.5, I ONLY got the following:

 

 <version>Product version 12.2.0.0</version>

 

That is, the root node <localtypes:pingVersion> is somehow missing. 

 

Is there anything I am missing, or the interface changed and I need to
call a different method to serialize?

 

Thanks much!

Srini

 


RE: [LIKELY JUNK]encountering problem when upgrading Axis2/c from 1.3 to 1.5

Posted by "Gelle, Sreenivasulu" <sr...@sap.com>.
Hi All,

 

Now I narrowed down the problem. The fact that the response I got has
left out the root node is because the axis2/c does not send over the
query String properly (in a different way?) in http request, the web
server (built using AXIS-J 1.4, a bit old I know) actually gets a
different request and send back a different response accordingly. 

 

Here is my situation, the client send the request to the following end
point:

 

            http://host:8080/products/servlet/webservices?ver=2.0

 

When I use axis2/c 1.3, it seems that all the information is sent over
so that the server side can get the query string ver=2.0 using the
following call:

 

           String queryString = request.getQueryString();

 

In which request is an HttpServletRequest. But in Axis2/c 1.5, I got a
null value for the queryString.

 

Is this a known issue or the query parameter is sent over differently
and I should use a different method to get it?

 

Thanks!

Srini

 

________________________________

From: Gelle, Sreenivasulu [mailto:sreenivasulu.gelle@sap.com] 
Sent: Tuesday, February 03, 2009 5:11 PM
To: Apache AXIS C Developers List
Cc: Yuin, Maria
Subject: [LIKELY JUNK]encountering problem when upgrading Axis2/c from
1.3 to 1.5

 

Hi All,

 

I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5.
Basically, I noticed that in 1.5 the response always leaves out the root
node in the soap message. I have the following simplified code snippet:

 

===================================

axiom_node_t * responseNode =
axis2_svc_client_send_receive(_wsf_service_client, _env, payload);

 

xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE,
0, AXIS2_XML_PARSER_TYPE_BUFFER);

 

om_output = axiom_output_create(_env, xml_writer);

 

//add xsi namespace definition, this seems to be a bug in axiom.

axiom_namespace_t* ns_xsi =  axiom_namespace_create(_env,
"http://www.w3.org/2001/XMLSchema-instance", "xsi");

 

axiom_element_t* node_ele  = (axiom_element_t*)
axiom_node_get_data_element(responseNode, _env);

            

axiom_element_declare_namespace_assume_param_ownership(node_ele, _env,
ns_xsi);

 

axiom_node_serialize_sub_tree(node, _env, om_output);

 

xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);

 

 

In Axis2/c 1.3, I used to have a response (xmlreply) like this:

 

<localtypes:pingVersion
xmlns:localtypes="http://www.xxx.com/yyy/ServerXXX.xsd"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product
version 12.2.0.0</version></localtypes:pingVersion>

 

But in 1.5, I ONLY got the following:

 

 <version>Product version 12.2.0.0</version>

 

That is, the root node <localtypes:pingVersion> is somehow missing. 

 

Is there anything I am missing, or the interface changed and I need to
call a different method to serialize?

 

Thanks much!

Srini

 


encountering problem when upgrading Axis2/c from 1.3 to 1.5

Posted by "Gelle, Sreenivasulu" <sr...@sap.com>.
Hi All,

 

I am encountering a serious problem upgrading axis2/c from 1.3 to 1.5.
Basically, I noticed that in 1.5 the response always leaves out the root
node in the soap message. I have the following simplified code snippet:

 

===================================

axiom_node_t * responseNode =
axis2_svc_client_send_receive(_wsf_service_client, _env, payload);

 

xml_writer = axiom_xml_writer_create_for_memory(_env, NULL, AXIS2_TRUE,
0, AXIS2_XML_PARSER_TYPE_BUFFER);

 

om_output = axiom_output_create(_env, xml_writer);

 

//add xsi namespace definition, this seems to be a bug in axiom.

axiom_namespace_t* ns_xsi =  axiom_namespace_create(_env,
"http://www.w3.org/2001/XMLSchema-instance", "xsi");

 

axiom_element_t* node_ele  = (axiom_element_t*)
axiom_node_get_data_element(responseNode, _env);

            

axiom_element_declare_namespace_assume_param_ownership(node_ele, _env,
ns_xsi);

 

axiom_node_serialize_sub_tree(node, _env, om_output);

 

xmlreply = (axis2_char_t*)axiom_xml_writer_get_xml(xml_writer, _env);

 

 

In Axis2/c 1.3, I used to have a response (xmlreply) like this:

 

<localtypes:pingVersion
xmlns:localtypes="http://www.xxx.com/yyy/ServerXXX.xsd"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><version>Product
version 12.2.0.0</version></localtypes:pingVersion>

 

But in 1.5, I ONLY got the following:

 

 <version>Product version 12.2.0.0</version>

 

That is, the root node <localtypes:pingVersion> is somehow missing. 

 

Is there anything I am missing, or the interface changed and I need to
call a different method to serialize?

 

Thanks much!

Srini

 


[jira] Closed: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Haszlakiewicz closed AXIS2C-1271.
--------------------------------------


Works fine in a recent snapshot build.

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff, CADBBeanTemplate.diff2
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Resolved: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Dimuthu Gamage (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dimuthu Gamage resolved AXIS2C-1271.
------------------------------------

    Resolution: Fixed

Patch is applied from Committed revision 720840.

Thanks Eric Haszlakiewicz for the patch.

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff, CADBBeanTemplate.diff2
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12645031#action_12645031 ] 

Eric Haszlakiewicz commented on AXIS2C-1271:
--------------------------------------------


I just attached an updated patch that includes code to check for a "nil" attribute.  Better?

The reason for renaming (actually, adding) some of the variables is to make it clearer which ones refer to read-only locations (such as string constants) and which are newly allocated buffers.

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff, CADBBeanTemplate.diff2
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Commented: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Dimuthu Gamage (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12644893#action_12644893 ] 

Dimuthu Gamage commented on AXIS2C-1271:
----------------------------------------

Hi,
Thanks for the patch. I agree with your  patches on const strings and the function prototype fix. 

Anyway I think it is not that straightforward to take a value of an empty element as an empty string. We have to check whether it is nil by checking xsi:nil attribute of the element. If so the element have to be treated as a nil text. There are multiple places that it is handled in the templates.

And what are the reasons for renaming some of the variables.

Thanks
DImuthu

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org


[jira] Updated: (AXIS2C-1271) adb generated code doesn't handle empty elements

Posted by "Eric Haszlakiewicz (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2C-1271?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Eric Haszlakiewicz updated AXIS2C-1271:
---------------------------------------

    Attachment: CADBBeanTemplate.diff

This patch was created using sources from nightly build 174.

> adb generated code doesn't handle empty elements
> ------------------------------------------------
>
>                 Key: AXIS2C-1271
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-1271
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: code generation
>    Affects Versions: Current (Nightly)
>            Reporter: Eric Haszlakiewicz
>         Attachments: CADBBeanTemplate.diff
>
>   Original Estimate: 0.08h
>  Remaining Estimate: 0.08h
>
> The deserialize code generated by wsdl2c doesn't correctly handle elements that have no content and treats them as if they weren't present at all.  The attached patch fixes this.  The patch also includes a number of changes to handle const strings more correctly which were needed to deal with the use of the zero length string constant.  Also, it fixes the prototypes of the <foo>_is_particle functions so the code can compile with warnings turned on.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-c-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-c-dev-help@ws.apache.org