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 "Senaka Fernando (JIRA)" <ji...@apache.org> on 2008/02/03 18:36:10 UTC

[jira] Created: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
-------------------------------------------------------------------------------------

                 Key: AXIS2C-963
                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
             Project: Axis2-C
          Issue Type: Bug
          Components: guththila, xml/parser
            Reporter: Senaka Fernando


Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.

Regards,
Senaka

-- 
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-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568131#action_12568131 ] 

Senaka Fernando commented on AXIS2C-963:
----------------------------------------

Hi Bill,

Your latest fix, as I see in [1] is a much better solution to the $subject. Therefore, I think this would be much better it terms of handling such occurrences.

Discarding comments before the root element is accepted. After all, the whole idea behind the process will be to understand information inside the soap message and not elsewhere. Also, I don't think it is going to cause a great deal of trouble with RESTful invocations. Therefore, I believe we do the right thing.

Thanks for the effort

[1] http://svn.apache.org/viewvc/webservices/axis2/trunk/c/axiom/src/om/om_stax_builder.c?r1=620703&r2=620807&diff_format=h

Regards,
Senaka

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Resolved: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Senaka Fernando resolved AXIS2C-963.
------------------------------------

    Resolution: Fixed
      Assignee: Senaka Fernando

Fixed Issue. Now, Guththila, is similar to libxml2 in behaviour. it also preserves whitespace in the very same manner. Optionally Guththila may be built such that it drops these whitespace, which would help it overcome the side effects that libxml2 has.

Regards,
Senaka

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567964#action_12567964 ] 

Senaka Fernando commented on AXIS2C-963:
----------------------------------------

Hi Bill,

I did try it with this payload.

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header></soapenv:Header><soapenv:Body><ns1:echoString xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope>


And, I didn't see any failures. Good job!

However, can't we take care of this by setting/re-setting a flag? Because, can we be sure that axiom_stax_builder_create_om_text(om_builder, env); returns an error only for this scenario?

Regards,
Senaka

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Resolved: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Senaka Fernando resolved AXIS2C-963.
------------------------------------

    Resolution: Fixed

Hi Bill,

Seems that your fix imposes no threats on the existing implementation. Therefore, I'm +1 for it. I'm resolving this issue.

Regards,
Senaka

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Reopened: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Bill Mitchell reopened AXIS2C-963:
----------------------------------


This change has broken incoming SOAP messages that begin with an xml declaration.  What is happening is that guththila interprets the CR-LF after the <?xml ... > declaration as GUTHTHILA_SPACE (AXIOM_XML_READER_SPACE) to be returned.  But axiom_stax_builder_next_with_token diagnoses an error and returns -1 when the space token cannot be attached as text to the last node (there is no last node) by axiom_stax_builder_create_om_text().  The end result is that the client sees an error number 187, SOAP message does not contain a SOAP envelope element.  

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568125#action_12568125 ] 

Bill Mitchell commented on AXIS2C-963:
--------------------------------------

In rev 620807 I incorporated a change to resolve your concern, Senaka.  

On the original, more global issue of preserving the entire document for formatting and similar purposes, axiom discards XML comments before the root element.  I don't know if preserving this comment is important to anyone.

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Resolved: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Bill Mitchell resolved AXIS2C-963.
----------------------------------

    Resolution: Fixed

I modified om_stax_builder.c in rev 620703 to tolerate no text node being created when white space text is encountered before the root element.   

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Reopened: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Senaka Fernando reopened AXIS2C-963:
------------------------------------


Reopening issue, until we get the changes to om_stax_builder.c sorted out.

Regards,
Senaka

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Posted by "Bill Mitchell (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12568079#action_12568079 ] 

Bill Mitchell commented on AXIS2C-963:
--------------------------------------

Senaka, it's a good question whether a better fix is available.  I considered whether to implement a change down in axiom_stax_builder_create_om_text(), but it doesn't know whether the text is whitespace or not.  And I like the fact that non whitespace text before the root element will be diagnosed as an error.  

To address your concern, one could replicate the test against lastnode in axiom_stax_builder_next_with_token(), before it calls axiom_stax_builder_create_om_text().  Looking at the code again, I actually like that fix better than the one I put in, as it would preserve the ability to detect other errors, and would prevent the error being posted to the environment and then ignored.  

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

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

Dinesh Premalal updated AXIS2C-963:
-----------------------------------

    Fix Version/s: 1.3.0

> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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] Issue Comment Edited: (AXIS2C-963) Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.

Posted by "Senaka Fernando (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/AXIS2C-963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12567964#action_12567964 ] 

senakafdo edited comment on AXIS2C-963 at 2/11/08 9:42 PM:
-----------------------------------------------------------------

Hi Bill,

Good job. However, I'm wondering whether this is needed?

I did try it with this payload.

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header></soapenv:Header><soapenv:Body><ns1:echoString xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope>

And, I didn't see any failures. Well, I didn't do an svn up when I got this, so this is without your fix.

Also, can't we take care of this by setting/re-setting a flag? Because, can we be sure that axiom_stax_builder_create_om_text(om_builder, env); returns an error only for this scenario?

Regards,
Senaka

      was (Author: senakafdo):
    Hi Bill,

I did try it with this payload.

<?xml version="1.0" encoding="UTF-8"?>

<soapenv:Envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope"><soapenv:Header></soapenv:Header><soapenv:Body><ns1:echoString xmlns:ns1="http://ws.apache.org/axis2/services/echo"><text>Hello World!</text></ns1:echoString></soapenv:Body></soapenv:Envelope>


And, I didn't see any failures. Good job!

However, can't we take care of this by setting/re-setting a flag? Because, can we be sure that axiom_stax_builder_create_om_text(om_builder, env); returns an error only for this scenario?

Regards,
Senaka
  
> Guththila neglects spacing and formatting between nodes whereas libxml2 preserves it.
> -------------------------------------------------------------------------------------
>
>                 Key: AXIS2C-963
>                 URL: https://issues.apache.org/jira/browse/AXIS2C-963
>             Project: Axis2-C
>          Issue Type: Bug
>          Components: guththila, xml/parser
>            Reporter: Senaka Fernando
>            Assignee: Senaka Fernando
>             Fix For: 1.3.0
>
>
> Guththila neglects spacing and formatting between nodes. This behavior contradicts to that of libxml2. Thus, If I open a file then deserialize it and build our OM Model, then print it to the terminal, I have lost the formatting in the file. This is because the parser simply filters out the whitespace. This behavior would make our parsing inconsistent.
> Regards,
> Senaka

-- 
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