axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Torsten Schlabach <>
Subject Re: SOAPDocumentImpl question
Date Tue, 10 Jan 2006 16:53:08 GMT

just one question that bothers me when reading your mail:

 >> We're using Axis (1.3) with Castor (1.0M1).

Are you using a custom mapping with Castor? My best guess would be this 
is why you use Castor it instead of the BeanSerializer?

I have not found a way yet to pass my custom mappings to the 
CastorSerializer, or did I overlook the obvious?


Any thoughts - including that my approach is misleading - are welcome.


David Lavender schrieb:
> Hi,
> I'm not sure if this is the right place to send this email, but we're a 
> bit stuck and we *think* it might be a bug.
> We're using Axis (1.3) with Castor (1.0M1). When we encode our Java 
> objects back into XML, we get very strange output.  Our tags have no 
> names, but they all have their own namespaces!
> eg.
> < LocationCode="AGP" CodeContext="IATA" xmlns="ArrivalAirport"/>
>  From our point of view, we were expecting:
> <ArrivalAirport LocationCode="AGP" CodeContext="IATA"/>
> We've been debugging through the code and we're struggling to understand 
> this bit of code in the 
> "org.apache.axis.message.SOAPDocumentImpl.createElement" method:
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_ENVELOPE))
>                     new SOAPEnvelope();
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_HEADER))
>                     return new SOAPHeader(soapenv, 
> soapenv.getSOAPConstants());
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_BODY))
>                     return new SOAPBody(soapenv, 
> soapenv.getSOAPConstants());
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT))
>                     return new SOAPEnvelope();
>                 if (tagName.equalsIgnoreCase(Constants.ELEM_FAULT_DETAIL))
>                     return new SOAPFault(new AxisFault(tagName));
>                 else {
> *                    return new MessageElement("", prefix, localname);*
>                 }
> The constructor that this calls is:
>     public MessageElement(String localPart, String prefix, String namespace)
> We're confused because this either points to a bug in SOAPDocumentImpl 
> (are the namespace and localname args the wrong way around?) or 
> SOAPDocumentImpl is deliberately setting the name of the tag to be "" 
> and the namespace to be the tag name!
> Either way we were hoping for some inside info on what this 
> MessageElement is supposed to represent once it's been constructed.
> Out of curiousity, I made a change to SoapDocumentImpl on my machine to 
> swap the empty string and localname args around and this DOES give us 
> the XML we were expecting (apart from spurious xmlns="" in every tag)
> But we don't know if we've fixed a bug, or whether we're doing something 
> wrong elsewhere to have caused this in the first place.
> so any help would be greatly appreciated!
> thanks,
> David

View raw message