Dan,

I am sorry. Actual for that call, I get DataNotFoundServiceException.
Schema is like this:

<xs:element name="DataNotFoundServiceException">

<xs:complexType>

*<xs:sequence>
*

*</xs:sequence>
*

<xs:attribute name="code" type="xs:int" use="required"/>

<xs:attribute name="message" type="xs:string" use="required"/>

<xs:attribute name="systemOfRecord" type="xs:string" use="required"/>

<xs:attribute name="node" type="xs:string" use="required"/>

<xs:attribute name="detailedMessage" type="xs:string" use="required"/>

<xs:attribute name="severity" type="xs:string" use="required"/>

<xs:attribute name="additionalInfo" type="xs:string" use="required"/>

</xs:complexType>

*</xs:element>
*
I have getters and setters .

@XmlAccessorType(XmlAccessType.*FIELD*)

@XmlType(name = "")

@XmlRootElement(name = "DataNotFoundServiceException")
*

public* *class* DataNotFoundServiceException

*implements* Serializable

{

*private* *final* *static* *long* *serialVersionUID* = -1L;

@XmlAttribute(required = *true*)

@XmlJavaTypeAdapter(IntegerAdapter.*class*)

@XmlSchemaType(name = "int")

*protected* Integer code;

@XmlAttribute(required = *true*)

*protected* String message;

@XmlAttribute(required = *true*)

*protected* String systemOfRecord;

@XmlAttribute(required = *true*)

*protected* String node;

@XmlAttribute(required = *true*)

*protected* String detailedMessage;

@XmlAttribute(required = *true*)

*protected* String severity;

@XmlAttribute(required = *true*)

*protected* String additionalInfo;

 *public* Integer getCode() {

*return* code;

}

*void* setCode(Integer value) {

*this*.code = value;

}

*public* *boolean* isSetCode() {

*return* (*this*.code!= *null*);

}
 Below is the soap response.

I have gettes and setters.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
   <soap:Body>
      <soap:Fault>
         <faultcode>soap:Server</faultcode>
         <faultstring>No Policies could be found for productID=53825,
productChannelID=null, facilityID=90002241, policyType=,
includeMessage=true, includeSchedule=false,
effectiveDate=[null]</faultstring>
         <detail>
            <ns1:DataNotFoundServiceException xmlns:ns1="
http://faults.valueobject.application.wdw.com";>
               <code xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
               <message xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/";>No<http://chargeitems.valueobject.application.wdw.com/%22%3ENo>Policies
could be found for productID=53825, productChannelID=null,
facilityID=90002241, policyType=, includeMessage=true,
includeSchedule=false, effectiveDate=[null]</message>
               <systemOfRecord xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
               <node xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
               <detailedMessage xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
               <severity xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
               <additionalInfo xsi:nil="true" xmlns:ns2="
http://packaging.valueobject.application.wdw.com/"; xmlns:ns3="
http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns4="
http://pricing.valueobject.application.wdw.com/"; xmlns:ns5="
http://chargeitems.valueobject.application.wdw.com/"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance"/<http://www.w3.org/2001/XMLSchema-instance%22/>
>
            </ns1:DataNotFoundServiceException>
         </detail>
      </soap:Fault>
   </soap:Body>
</soap:Envelope>

On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <[email protected]> wrote:

>
> What does your ValidationServiceException bean look like?   Does it have
> proper getter/setters for the code attribute?
>
>
> What does the schema for the service look like?  Particularly for that
> exception type.
>
> Dan
>
>
> On Wed November 11 2009 3:29:05 pm deepika vadapalli wrote:
> > Hi All,
> >
> > I use CXF 2.1.7.
> > I have a soap message which generates valid fault. I am able to
> unmarshall
> > faults from other services properly.
> > When I call this particular  service, in my client code, I get
> Unmarshlling
> > exception.
> > When I check, the object has all the attributes, the fault messgae has
> >  sent. Can you please help me out.
> > Caused by: javax.xml.bind.UnmarshalException: unexpected element (uri:"",
> > local:"code"). Expected elements are (none)
> >  at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.handleEvent(U
> > nmarshallingContext.java:616) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:244
> > ) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:239
> > ) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElemen
> > t(Loader.java:116) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:10
> > 1) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(Struc
> > tureLoader.java:245) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElement
> > (UnmarshallingContext.java:452) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElement(
> > UnmarshallingContext.java:433) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElement(I
> > nterningXmlVisitor.java:71) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConne
> > ctor.java:137) at
> >  com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:240) at
> >  com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:277) at
> >  com.sun.xml.bind.unmarshaller.DOMScanner.visit(DOMScanner.java:246) at
> >  com.sun.xml.bind.unmarshaller.DOMScanner.scan(DOMScanner.java:123) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal0(Unmars
> > hallerImpl.java:314) at
> >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmarsh
> > allerImpl.java:293) at
> >
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:6
> > 43) at
> >
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:5
> > 33) at
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:113)
>  >  at
> >
> org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientFa
> > ultConverter.java:131) at
> >
> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultCo
> > nverter.java:74) at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> > n.java:236) at
> >
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(Ab
> > stractFaultChainInitiatorObserver.java:96) at
> >
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage
> > (CheckFaultInterceptor.java:69) at
> >
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage
> > (CheckFaultInterceptor.java:34) at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> > n.java:236) at
> >  org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > eInternal(HTTPConduit.java:2131) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespons
> > e(HTTPConduit.java:2014) at
> >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPCon
> > duit.java:1939) at
> >
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputSt
> > ream.java:47) at
> >  org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:188)
> at
> >  org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
> at
> >  org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627) at
> >
> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInte
> > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChai
> > n.java:236) at
> >  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:478) at
> >  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:308) at
> >  org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:260) at
> >  org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) at
> >  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:127)
> >  ... 56 more
> >
> > here is the example response:
> >
> > <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";>
> >    <soap:Body>
> >       <soap:Fault>
> >          <faultcode>soap:Server</faultcode>
> >          <faultstring>Discount policy ID is required when a specific
> >  Product Channel is requested for the priceComponents()
> >  service.</faultstring> <detail>
> >             <ns1:ValidationServiceException xmlns:ns1="
> > http://faults.valueobject.application.wdw.com";>
> >                <additionalInfo xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <code xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <systemOfRecord xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <node xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <detailedMessage xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <severity xsi:nil="true" xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/"; xmlns:xsi="
> > http://www.w3.org/2001/XMLSchema-instance"/>
> >                <message xmlns:ns2="
> > http://packaging.valuetransferobject.application.wdw.com/"; xmlns:ns3="
> > http://pricing.valueobject.application.wdw.com/"; xmlns:ns4="
> > http://packaging.valueobject.application.wdw.com/"; xmlns:ns5="
> > http://chargeitems.valueobject.application.wdw.com/"; xmlns:ns6="
> > http://faults.valueobject.application.wdw.com/";>Discount policy ID is
> > required when a specific Product Channel is requested for the
> > priceComponents() service.</message>
> >             </ns1:ValidationServiceException>
> >          </detail>
> >       </soap:Fault>
> >    </soap:Body>
> > </soap:Envelope>
> >
> >
> >
> > Thnaks,
> > Deepika
> >
>
> --
> Daniel Kulp
> [email protected]
> http://www.dankulp.com/blog
>

Reply via email to