I am having a problem trying to send a custom faultCode using Jibx data binding.
I create a custom exception similar to how Bill Burton described in the 'How to
return an error' thread (see his message dated 2006-11-27 20:29:51 GMT). My
MSOOrderResendException exception extends XFireFault & the constructors set a
QName with the faultCode that I want. Unfortuantely, the JibxType expects a
Jibx binding for the exception; which I don't have & really don't want to
include in my Jibx binding as this fault is not really part of the business
message & I'm not sure how I would map it.
I think I can get around this by making my exception extend RuntimeException
and have a custom fault handler that sets the fault code as I want; but this
seems rather 'clunky' to me. Does anyone have a better idea?
Below is the relavent part of the stack trace:
org.codehaus.xfire.XFireRuntimeException: Error initializing fault for method
public abstract csg.cxpng.caresvc.g2b.mso.type.MSOOrderResponse
csg.cxpng.caresvc.g2b.mso.endpoint.MSOOrderEndpoint.service
(csg.cxpng.caresvc.g2b.mso.type.MSOOrder) throws
csg.cxpng.caresvc.g2b.mso.service.exception.MSOOrderResendException: Unable to
access binding information for class
csg.cxpng.caresvc.g2b.mso.service.exception.MSOOrderResendException
Make sure the binding has been compiled
at java.lang.Throwable.<init>(Throwable.java)
at java.lang.Throwable.<init>(Throwable.java)
at org.codehaus.xfire.XFireRuntimeException.<init>
(XFireRuntimeException.java:25)
at org.codehaus.xfire.jibx.JibxType.<init>(JibxType.java:74)
at org.codehaus.xfire.jibx.JibxTypeCreator.createDefaultType
(JibxTypeCreator.java:15)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createTypeForClass
(AbstractTypeCreator.java:102)
at org.codehaus.xfire.aegis.type.AbstractTypeCreator.createType
(AbstractTypeCreator.java:374)
at org.codehaus.xfire.aegis.AegisBindingProvider.getParameterType
(AegisBindingProvider.java)
at org.codehaus.xfire.aegis.AegisBindingProvider.initializeMessage
(AegisBindingProvider.java:136)
at org.codehaus.xfire.service.binding.AbstractBindingProvider.initialize
(AbstractBindingProvider.java:54)
at org.codehaus.xfire.aegis.AegisBindingProvider.initialize
(AegisBindingProvider.java:124)
at org.codehaus.xfire.service.binding.ObjectServiceFactory.create
(ObjectServiceFactory.java)
at org.codehaus.xfire.spring.ServiceBean.afterPropertiesSet
(ServiceBean.java:176)
at org.codehaus.xfire.spring.remoting.XFireExporter.afterPropertiesSet
(XFireExporter.java:30)
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email