axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Melgar" <dmel...@us.ibm.com>
Subject SOAPBodyElement serialization bug
Date Tue, 04 Dec 2001 16:16:43 GMT
Updated testcase that still fails. Attribute name ends up as null.

import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import org.w3c.dom.Element;

import org.apache.axis.message.SOAPBodyElement;

public class Testcase1 {
   public static void main (String args[]) {
      try {
         DocumentBuilder docBuilder = DocumentBuilderFactory.newInstance
().newDocumentBuilder();
         Element base = docBuilder.newDocument().createElement("tmp");
         base.setAttribute("attrib", "foo");
         SOAPBodyElement body = new SOAPBodyElement(base);
         System.out.println("Body:" + body);
      } catch (Exception e) {
         e.printStackTrace();
      }
   }
}

Example: should be
<tmp attrib="foo"/>

ends up as
<tmp null="foo"/>

David Melgar
Web Services Toolkit Development
Emerging Technologies
dmelgar@us.ibm.com

>
> Davanum Srinivas <dims@yahoo.com> on 12/04/2001 08:51:32 AM
>
> Please respond to dims@yahoo.com
>
> To:   David Melgar/Raleigh/IBM@IBMUS, Sam Ruby/Raleigh/IBM@IBMUS
> cc:
> Subject:  Re: UDDI4J & Axis
>
>
>
> David,
> Fixed this bug, please try latest Axis from CVS. I also added a test case
> for this problem.
>
> Please let me know when you update UDDI4J cvs. We will test things after
> that.
>
> Thanks,
> dims
>
> --- David Melgar <dmelgar@us.ibm.com> wrote:
> > I've committed the changes that allow UDDI4J to work with the latest
> > version of Axis. The release has not been updated.
> >
> > There's a hack in the code due to the bug reported below. This still
> fails
> > for me. Seems like a pretty basic bug. Would be nice if someone could
fix
> > this before alpha3 although not critical. Would it get more response if
I
> > open a bug report?
> >
> > David Melgar
> > Web Services Toolkit Development
> > Emerging Technologies
> > dmelgar@us.ibm.com
> > ---------------------- Forwarded by David Melgar/Raleigh/IBM on
> 12/03/2001
> > 09:02 PM ---------------------------
> >
> > David Melgar/Raleigh/IBM@IBMUS on 11/02/2001 02:48:14 PM
> >
> > Please respond to axis-dev@xml.apache.org
> >
> > To:   axis-dev@xml.apache.org
> > cc:
> > Subject:  SOAPBodyElement serialization bug
> >
> >
> >
> > I am writing a client that works with DOM elements. This was working
with
> > alpha 2. It is no longer working. The problem I'm running into is when
a
> > SOAPBodyElement is created from a DOM element, then serialized to a
> string,
> > the element names all end up as null.
> >
> > The testcase below is very simple illustration of the problem.
> > SOAPBodyElement converted to a string shows up as "<null/>".
> >
> >
> > import javax.xml.parsers.DocumentBuilder;
> > import javax.xml.parsers.DocumentBuilderFactory;
> > import org.w3c.dom.Element;
> > import org.apache.axis.message.SOAPBodyElement;
> >
> > public class Testcase1 {
> >    public static void main (String args[]) {
> >       try {
> >          DocumentBuilder docBuilder =
DocumentBuilderFactory.newInstance
> > ().newDocumentBuilder();
> >          Element base = docBuilder.newDocument().createElement("tmp");
> >          SOAPBodyElement body = new SOAPBodyElement(base);
> >          System.out.println("Body:" + body);
> >       } catch (Exception e) {
> >          e.printStackTrace();
> >       }
> >    }
> > }
> >
> > David Melgar
> > Web Services Toolkit Development
> > Emerging Technologies
> > dmelgar@us.ibm.com
> >
> >
> >
>
>
> =====
> Davanum Srinivas - http://jguru.com/dims/
>
> __________________________________________________
> Do You Yahoo!?
> Buy the perfect holiday gifts at Yahoo! Shopping.
> http://shopping.yahoo.com
>
>


=====
Davanum Srinivas - http://jguru.com/dims/

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com







Mime
View raw message