You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Dino Chiesa <di...@microsoft.com> on 2005/02/28 20:11:02 UTC
Why Castor + AXIS?
What's the typical reason for using Castor with AXIS?
- AXIS is missing features that Castor has?
- Castor is already in use and the org wants to add webservices
capability
- something else?
-Dino
-----Original Message-----
From: Kenneth Stephen [mailto:marvin.the.paranoid@gmail.com]
Sent: Monday, February 28, 2005 12:33 PM
To: axis-user@ws.apache.org
Subject: Fault code not being reported when CastorSerializer throws
exception
Hi,
I am seeing a validation failure in my response (which is an
application failure that I will correct), but the associated fault code
isnt being reported back to the client. Here is the exception that I see
in the application server logs :
[2/28/05 11:19:34:782 CST] 35205df6 SystemOut U - Exception:
AxisFault
faultCode:
{http://schemas.xmlsoap.org/soap/envelope/}Server.userException
faultSubcode:
faultString: java.io.IOException: Message doesn't comply with the
associated XML schema :The following exception occured while validating
field: _items of class:
services.ice.catalog.details.DetailResponseType
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace:java.io.IOException:
Message doesn't comply with the associated XML schema :The following
exception occured while validating field: _items of class:
services.ice.catalog.details.DetailResponseType
at
org.apache.axis.encoding.ser.castor.CastorSerializer.serialize(CastorSer
ializer.java:120)
at
org.apache.axis.encoding.SerializationContext.serializeActual(Serializat
ionContext.java:1353)
at
org.apache.axis.encoding.SerializationContext.serialize(SerializationCon
text.java:880)
at org.apache.axis.message.RPCParam.serialize(RPCParam.java:177)
But on the client side, I get an empty response with an HTTP status
code of 200. Has anyone seen this behaviour? Any known fixes? I am using
1.2RC2 on WebSphere v4.
Thanks,
Kenneth
Re: Why Castor + AXIS?
Posted by Kenneth Stephen <ma...@gmail.com>.
Dino,
In my case, it is primarily the first reason you mention. Castor
has better coverage of XML schema features. Plus it also allows
validation. Another minor thing : the Axis generated code serializes
null object references using xsi:nil, whereas, wilth Castor, the XML
element itself doesnt get produced. This, IMHO, is cleaner XML, though
both forms are correct.
Regards,
Kenneth
On Mon, 28 Feb 2005 11:11:02 -0800, Dino Chiesa <di...@microsoft.com> wrote:
> What's the typical reason for using Castor with AXIS?
> - AXIS is missing features that Castor has?
> - Castor is already in use and the org wants to add webservices
> capability
>
> - something else?