You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by ax...@ws.apache.org on 2004/10/05 16:38:32 UTC

[jira] Created: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Message:

  A new issue has been created in JIRA.

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1589

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1589
    Summary: SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2RC1

   Assignee: 
   Reporter: toby cabot

    Created: Tue, 5 Oct 2004 7:37 AM
    Updated: Tue, 5 Oct 2004 7:37 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
cvs HEAD as of 2004-10-04

Description:
Hi.

I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.

The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.

So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "toby cabot (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=comments#action_55404 ]
     
toby cabot commented on AXIS-1589:
----------------------------------

Hi Tom,  thanks for looking into this!  It looks as if "dims" applied the patch a few days ago so I think that you can close this issue.
Regards, Toby
PS.  it would be cool if the person that attached a file could delete it.  I like to update the patches so they apply cleanly but it gets confusing to have a stack of them attached to the bug.

> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>  Attachments: axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by ax...@ws.apache.org.
The following issue has been updated:

    Updater: toby cabot (mailto:toby@caboteria.org)
       Date: Tue, 5 Oct 2004 7:38 AM
    Changes:
             Attachment changed to axis-no-types-patch.txt
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXIS-1589?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1589

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1589
    Summary: SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2RC1

   Assignee: 
   Reporter: toby cabot

    Created: Tue, 5 Oct 2004 7:37 AM
    Updated: Tue, 5 Oct 2004 7:38 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
cvs HEAD as of 2004-10-04

Description:
Hi.

I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.

The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.

So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=comments#action_55396 ]
     
Tom Jordahl commented on AXIS-1589:
-----------------------------------

Toby,  I deleted the "extra" patches, but I think I deleted the actual Nov 1 patch that was the right one (oops).  Can you re-attach your final patch against the current CVS source.  The one there now is dated October 20, and I don't think it is the right one.

> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>  Attachments: axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Closed: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=history ]
     
Tom Jordahl closed AXIS-1589:
-----------------------------

     Resolution: Fixed
    Fix Version: 1.2RC2

Closing per Toby comment and I verified that the patch was applied.

> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>      Fix For: 1.2RC2
>  Attachments: axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Updated: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "toby cabot (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=history ]

toby cabot updated AXIS-1589:
-----------------------------

    Attachment: axis-no-types-or-nulls-patch-2004-11-01.txt

trying to attach the patch, looks like the first few tries failed after all (they show up in the attachment list but fail when you try to download them).  It would be great if this patch could make it in before Axis 1.2 RC2, per Davanum's email of October 28.


> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>  Attachments: axis-no-types-or-nulls-patch-2004-11-01.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by ax...@ws.apache.org.
The following comment has been added to this issue:

     Author: toby cabot
    Created: Wed, 20 Oct 2004 11:58 AM
       Body:
apologies for attaching the same patch three times - i kept getting scary error messages so i assumed that it wasn't succeeding.  anyway, this patch (axis-no-types-or-nulls-patch.txt) also fixes the SerializationContext.serialize() sendNull parameter so that it works when using the call from outside of Axis to serialize Axis-generated classes.  sendNull had the same bug that sendType had (which I described in an earlier comment on this bug.  The fix is to make sendNull a member variable and modify classes that call serialize() so that they don't hard-code the value but rather use the default.

with this patch I can call serialize() and get documents that don't have xsi:type attributes or elements (with xsi:nil attributes) for null variables.  it passes all-tests.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1589?page=comments#action_54410

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1589

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1589
    Summary: SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2RC1

   Assignee: 
   Reporter: toby cabot

    Created: Tue, 5 Oct 2004 7:37 AM
    Updated: Wed, 20 Oct 2004 11:58 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
cvs HEAD as of 2004-10-04

Description:
Hi.

I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.

The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.

So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "Davanum Srinivas (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=comments#action_54978 ]
     
Davanum Srinivas commented on AXIS-1589:
----------------------------------------

Tom, Glen,

Can one of you please take a look at toby's patch?

thanks,
dims

> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>  Attachments: axis-no-types-or-nulls-patch-2004-11-01.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by "Tom Jordahl (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1589?page=comments#action_55002 ]
     
Tom Jordahl commented on AXIS-1589:
-----------------------------------

>From code inspection, this change looks like a good thing to me.
The worrysome changes for me are to the ArraySerializer, because there are still problems with it in 1.2, but thse changes should be OK.

> SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
> ----------------------------------------------------------------
>
>          Key: AXIS-1589
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1589
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>  Environment: fedora core 2
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
> cvs HEAD as of 2004-10-04
>     Reporter: toby cabot
>  Attachments: axis-no-types-or-nulls-patch-2004-11-01.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-or-nulls-patch.txt, axis-no-types-patch.txt
>
> Hi.
> I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.
> The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.
> So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


[jira] Commented: (AXIS-1589) SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types

Posted by ax...@ws.apache.org.
The following comment has been added to this issue:

     Author: toby cabot
    Created: Tue, 5 Oct 2004 7:39 AM
       Body:
this patch might not apply cleanly without applying the patch to AXIS-1585 first.

---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1589?page=comments#action_53718

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1589

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1589
    Summary: SerializationContext.serialize(*,*,*,*,Boolean.FALSE) adds types
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             Serialization/Deserialization
   Versions:
             1.2RC1

   Assignee: 
   Reporter: toby cabot

    Created: Tue, 5 Oct 2004 7:37 AM
    Updated: Tue, 5 Oct 2004 7:39 AM
Environment: fedora core 2
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
cvs HEAD as of 2004-10-04

Description:
Hi.

I'm working on an application that needs to xml-serialize trees of wsdl2java-generated objects to an XML document so it can e.g. save them to a file.  I'm using the 1-argument constructor and the 5-argument SerializationContext.serialize() method but it seems to ignore the Boolean sendType argument; it adds types to the output whether the value is Boolean.TRUE or Boolean.FALSE.

The problem seems to be that SerializationContext has a flag (sendXSIType) to indicate whether the types should be sent, but serialize() never sets that variable so when it calls specific type serializers (e.g. BeanSerializer) and then they call back to StartElement the caller's argument has been "forgotten" and it adds the type to the output anyway.

So I've added a patch that seems to fix the problem.  It caches the value of sendXSIType, sets it based on the user's preference, and then sets it back before exiting serialize().  It seems to pass all-tests and it respects the value of the caller's sendType argument.



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira