You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by deepika vadapalli <de...@gmail.com> on 2009/11/11 21:29:05 UTC
Unmarshalling error while processing soap fault.
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(UnmarshallingContext.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.reportUnexpectedChildElement(Loader.java:116)
at
com.sun.xml.bind.v2.runtime.unmarshaller.Loader.childElement(Loader.java:101)
at
com.sun.xml.bind.v2.runtime.unmarshaller.StructureLoader.childElement(StructureLoader.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(InterningXmlVisitor.java:71)
at
com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXConnector.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(UnmarshallerImpl.java:314)
at
com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(UnmarshallerImpl.java:293)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:643)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.java:533)
at org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:113)
at
org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(ClientFaultConverter.java:131)
at
org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaultConverter.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.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(PhaseInterceptorChain.java:236)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2131)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2014)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1939)
at
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.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$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.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
Re: Unmarshalling error while processing soap fault.
Posted by deepika vadapalli <de...@gmail.com>.
Thank You very much!!
It worked.
Thanks,
Deepika
On Thu, Nov 12, 2009 at 1:41 PM, Daniel Kulp <dk...@apache.org> wrote:
>
> I believe your schema says elementFormDefault=qualified. However, that
> soap
> message has the elements unqualified. You can update your schema to say
> something like:
>
> <xs:element name="code" type="xs:int" elementForm="unqualified"/>
> just for those elements if you don't want the entire schema to be be
> unqualified.
>
> Dan
>
>
> On Thu November 12 2009 11:34:03 am deepika vadapalli wrote:
> > But this time error is slightly different.
> >
> > Unmarshalling Error: unexpected element (uri:"", local:"code"). Expected
> > elements are <{http://faults.valueobject.application.wdw.com/}message
> >,<{
> > http://faults.valueobject.application.wdw.com/}node>,<{
> > http://faults.valueobject.application.wdw.com/}detailedMessage>,<{
> > http://faults.valueobject.application.wdw.com/}systemOfRecord>,<{
> > http://faults.valueobject.application.wdw.com/}code>,<{
> > http://faults.valueobject.application.wdw.com/}additionalInfo>,<{
> > http://faults.valueobject.application.wdw.com/}severity>
> >
> > Can you help me out...
> >
> >
> > Thanks,
> > Deepika
> > On Thu, Nov 12, 2009 at 11:25 AM, deepika vadapalli <
> >
> > deepikavadapalli@gmail.com> wrote:
> > > Thanks for the response.
> > >
> > > But I get the same exception even if I change my schema from atrributes
> > > to elements.
> > > Please see my schema below for that exception object.
> > >
> > > <
> > > xs:complexType name=*"DataNotFoundServiceException"*>
> > >
> > > <xs:sequence>
> > >
> > > <xs:element name=*"code"* type=*"xs:int"*/>
> > >
> > > <xs:element name=*"message"* type=*"xs:string"*/>
> > >
> > > <xs:element name=*"systemOfRecord"* type=*"xs:string"*/>
> > >
> > > <xs:element name=*"node"* type=*"xs:string"*/>
> > >
> > > <xs:element name=*"detailedMessage"* type=*"xs:string"*/>
> > >
> > > <xs:element name=*"severity"* type=*"xs:string"*/>
> > >
> > > <xs:element name=*"additionalInfo"* type=*"xs:string"*/>
> > >
> > > </xs:sequence>
> > >
> > > </xs:complexType>
> > >
> > > On Wed, Nov 11, 2009 at 4:07 PM, Daniel Kulp <dk...@apache.org>
> wrote:
> > >> OK. The soap message isn't valid according to that schema. In the
> > >> schema,
> > >> they are all <xs:attribute> and thus should be attributes, not child
> > >> elements.
> > >>
> > >> Dan
> > >>
> > >> On Wed November 11 2009 4:02:30 pm deepika vadapalli wrote:
> > >> > 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/XMLSchem
> > >>
> > >> > a-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/XMLSchem
> > >>
> > >> > a-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/XMLSchem
> > >>
> > >> > a-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/XMLSchem
> > >>
> > >> > a-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/XMLSchem
> > >>
> > >> > a-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/XMLSchem
> > >>
> > >> > a-instance%22/>
> > >> >
> > >> > </ns1:DataNotFoundServiceException>
> > >> > </detail>
> > >> > </soap:Fault>
> > >> > </soap:Body>
> > >> > </soap:Envelope>
> > >> >
> > >> > On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <dk...@apache.org>
> 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.handleEven
> > >>t
> > >>
> > >> > >(U
> > >> > >
> > >> > > > nmarshallingContext.java:616) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:
> > >>2
> > >>
> > >> > >44
> > >> > >
> > >> > > > ) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:
> > >>2
> > >>
> > >> > >39
> > >> > >
> > >> > > > ) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildEle
> > >>m
> > >>
> > >> > >en
> > >> > >
> > >> > > > 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(St
> > >>r
> > >>
> > >> > >uc
> > >> > >
> > >> > > > tureLoader.java:245) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElem
> > >>e
> > >>
> > >> > >nt
> > >> > >
> > >> > > > (UnmarshallingContext.java:452) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEleme
> > >>n
> > >>
> > >> > >t(
> > >> > >
> > >> > > > UnmarshallingContext.java:433) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElemen
> > >>t
> > >>
> > >> > >(I
> > >> > >
> > >> > > > nterningXmlVisitor.java:71) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXCo
> > >>n
> > >>
> > >> > >ne
> > >> > >
> > >> > > > 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(Unm
> > >>a
> > >>
> > >> > >rs
> > >> > >
> > >> > > > hallerImpl.java:314) at
> > >>
> > >>
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unma
> > >>r
> > >>
> > >> > >sh
> > >> > >
> > >> > > > allerImpl.java:293) at
> > >>
> > >>
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> > >>a
> > >>
> > >> > >:6
> > >> > >:
> > >> > > > 43) at
> > >>
> > >>
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> > >>a
> > >>
> > >> > >:5
> > >> > >:
> > >> > > > 33) at
> > >> > >
> > >> > >
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:113)
> > >> > >
> > >> > > > at
> > >>
> > >>
> org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(Clien
> > >>t
> > >>
> > >> > >Fa
> > >> > >
> > >> > > > ultConverter.java:131) at
> > >>
> > >>
> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaul
> > >>t
> > >>
> > >> > >Co
> > >> > >
> > >> > > > nverter.java:74) at
> > >>
> > >>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > >>h
> > >>
> > >> > >ai
> > >> > >
> > >> > > > n.java:236) at
> > >>
> > >>
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> > >>(
> > >>
> > >> > >Ab
> > >> > >
> > >> > > > stractFaultChainInitiatorObserver.java:96) at
> > >>
> > >>
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> > >>a
> > >>
> > >> > >ge
> > >> > >
> > >> > > > (CheckFaultInterceptor.java:69) at
> > >>
> > >>
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> > >>a
> > >>
> > >> > >ge
> > >> > >
> > >> > > > (CheckFaultInterceptor.java:34) at
> > >>
> > >>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > >>h
> > >>
> > >> > >ai
> > >> > >
> > >> > > > n.java:236) at
> > >> > > >
> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
> > >>
> > >> at
> > >>
> > >>
> > >>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> > >>o
> > >>
> > >> > >ns
> > >> > >
> > >> > > > eInternal(HTTPConduit.java:2131) at
> > >>
> > >>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> > >>o
> > >>
> > >> > >ns
> > >> > >
> > >> > > > e(HTTPConduit.java:2014) at
> > >>
> > >>
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
> > >>C
> > >>
> > >> > >on
> > >> > >
> > >> > > > duit.java:1939) at
> > >>
> > >>
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutpu
> > >>t
> > >>
> > >> > >St
> > >> > >
> > >> > > > 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$MessageSenderEndingI
> > >>n
> > >>
> > >> > >te
> > >> > >
> > >> > > > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> > >>
> > >>
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> > >>h
> > >>
> > >> > >ai
> > >> > >
> > >> > > > 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
> > >> > > dkulp@apache.org
> > >> > > http://www.dankulp.com/blog
> > >>
> > >> --
> > >> Daniel Kulp
> > >> dkulp@apache.org
> > >> http://www.dankulp.com/blog
> >
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: Unmarshalling error while processing soap fault.
Posted by Daniel Kulp <dk...@apache.org>.
I believe your schema says elementFormDefault=qualified. However, that soap
message has the elements unqualified. You can update your schema to say
something like:
<xs:element name="code" type="xs:int" elementForm="unqualified"/>
just for those elements if you don't want the entire schema to be be
unqualified.
Dan
On Thu November 12 2009 11:34:03 am deepika vadapalli wrote:
> But this time error is slightly different.
>
> Unmarshalling Error: unexpected element (uri:"", local:"code"). Expected
> elements are <{http://faults.valueobject.application.wdw.com/}message>,<{
> http://faults.valueobject.application.wdw.com/}node>,<{
> http://faults.valueobject.application.wdw.com/}detailedMessage>,<{
> http://faults.valueobject.application.wdw.com/}systemOfRecord>,<{
> http://faults.valueobject.application.wdw.com/}code>,<{
> http://faults.valueobject.application.wdw.com/}additionalInfo>,<{
> http://faults.valueobject.application.wdw.com/}severity>
>
> Can you help me out...
>
>
> Thanks,
> Deepika
> On Thu, Nov 12, 2009 at 11:25 AM, deepika vadapalli <
>
> deepikavadapalli@gmail.com> wrote:
> > Thanks for the response.
> >
> > But I get the same exception even if I change my schema from atrributes
> > to elements.
> > Please see my schema below for that exception object.
> >
> > <
> > xs:complexType name=*"DataNotFoundServiceException"*>
> >
> > <xs:sequence>
> >
> > <xs:element name=*"code"* type=*"xs:int"*/>
> >
> > <xs:element name=*"message"* type=*"xs:string"*/>
> >
> > <xs:element name=*"systemOfRecord"* type=*"xs:string"*/>
> >
> > <xs:element name=*"node"* type=*"xs:string"*/>
> >
> > <xs:element name=*"detailedMessage"* type=*"xs:string"*/>
> >
> > <xs:element name=*"severity"* type=*"xs:string"*/>
> >
> > <xs:element name=*"additionalInfo"* type=*"xs:string"*/>
> >
> > </xs:sequence>
> >
> > </xs:complexType>
> >
> > On Wed, Nov 11, 2009 at 4:07 PM, Daniel Kulp <dk...@apache.org> wrote:
> >> OK. The soap message isn't valid according to that schema. In the
> >> schema,
> >> they are all <xs:attribute> and thus should be attributes, not child
> >> elements.
> >>
> >> Dan
> >>
> >> On Wed November 11 2009 4:02:30 pm deepika vadapalli wrote:
> >> > 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/XMLSchem
> >>
> >> > a-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/XMLSchem
> >>
> >> > a-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/XMLSchem
> >>
> >> > a-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/XMLSchem
> >>
> >> > a-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/XMLSchem
> >>
> >> > a-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/XMLSchem
> >>
> >> > a-instance%22/>
> >> >
> >> > </ns1:DataNotFoundServiceException>
> >> > </detail>
> >> > </soap:Fault>
> >> > </soap:Body>
> >> > </soap:Envelope>
> >> >
> >> > On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <dk...@apache.org> 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.handleEven
> >>t
> >>
> >> > >(U
> >> > >
> >> > > > nmarshallingContext.java:616) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:
> >>2
> >>
> >> > >44
> >> > >
> >> > > > ) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:
> >>2
> >>
> >> > >39
> >> > >
> >> > > > ) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildEle
> >>m
> >>
> >> > >en
> >> > >
> >> > > > 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(St
> >>r
> >>
> >> > >uc
> >> > >
> >> > > > tureLoader.java:245) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startElem
> >>e
> >>
> >> > >nt
> >> > >
> >> > > > (UnmarshallingContext.java:452) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startEleme
> >>n
> >>
> >> > >t(
> >> > >
> >> > > > UnmarshallingContext.java:433) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.InterningXmlVisitor.startElemen
> >>t
> >>
> >> > >(I
> >> > >
> >> > > > nterningXmlVisitor.java:71) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.SAXConnector.startElement(SAXCo
> >>n
> >>
> >> > >ne
> >> > >
> >> > > > 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(Unm
> >>a
> >>
> >> > >rs
> >> > >
> >> > > > hallerImpl.java:314) at
> >>
> >> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unma
> >>r
> >>
> >> > >sh
> >> > >
> >> > > > allerImpl.java:293) at
> >>
> >> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> >>a
> >>
> >> > >:6
> >> > >:
> >> > > > 43) at
> >>
> >> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
> >>a
> >>
> >> > >:5
> >> > >:
> >> > > > 33) at
> >> > >
> >> > > org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:113)
> >> > >
> >> > > > at
> >>
> >> org.apache.cxf.interceptor.ClientFaultConverter.processFaultDetail(Clien
> >>t
> >>
> >> > >Fa
> >> > >
> >> > > > ultConverter.java:131) at
> >>
> >> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFaul
> >>t
> >>
> >> > >Co
> >> > >
> >> > > > nverter.java:74) at
> >>
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >>h
> >>
> >> > >ai
> >> > >
> >> > > > n.java:236) at
> >>
> >> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
> >>(
> >>
> >> > >Ab
> >> > >
> >> > > > stractFaultChainInitiatorObserver.java:96) at
> >>
> >> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> >>a
> >>
> >> > >ge
> >> > >
> >> > > > (CheckFaultInterceptor.java:69) at
> >>
> >> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMess
> >>a
> >>
> >> > >ge
> >> > >
> >> > > > (CheckFaultInterceptor.java:34) at
> >>
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >>h
> >>
> >> > >ai
> >> > >
> >> > > > n.java:236) at
> >> > > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
> >>
> >> at
> >>
> >>
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> >>o
> >>
> >> > >ns
> >> > >
> >> > > > eInternal(HTTPConduit.java:2131) at
> >>
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
> >>o
> >>
> >> > >ns
> >> > >
> >> > > > e(HTTPConduit.java:2014) at
> >>
> >> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
> >>C
> >>
> >> > >on
> >> > >
> >> > > > duit.java:1939) at
> >>
> >> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutpu
> >>t
> >>
> >> > >St
> >> > >
> >> > > > 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$MessageSenderEndingI
> >>n
> >>
> >> > >te
> >> > >
> >> > > > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >>
> >> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
> >>h
> >>
> >> > >ai
> >> > >
> >> > > > 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
> >> > > dkulp@apache.org
> >> > > http://www.dankulp.com/blog
> >>
> >> --
> >> Daniel Kulp
> >> dkulp@apache.org
> >> http://www.dankulp.com/blog
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Unmarshalling error while processing soap fault.
Posted by deepika vadapalli <de...@gmail.com>.
But this time error is slightly different.
Unmarshalling Error: unexpected element (uri:"", local:"code"). Expected
elements are <{http://faults.valueobject.application.wdw.com/}message>,<{
http://faults.valueobject.application.wdw.com/}node>,<{
http://faults.valueobject.application.wdw.com/}detailedMessage>,<{
http://faults.valueobject.application.wdw.com/}systemOfRecord>,<{
http://faults.valueobject.application.wdw.com/}code>,<{
http://faults.valueobject.application.wdw.com/}additionalInfo>,<{
http://faults.valueobject.application.wdw.com/}severity>
Can you help me out...
Thanks,
Deepika
On Thu, Nov 12, 2009 at 11:25 AM, deepika vadapalli <
deepikavadapalli@gmail.com> wrote:
> Thanks for the response.
>
> But I get the same exception even if I change my schema from atrributes to
> elements.
> Please see my schema below for that exception object.
>
> <
> xs:complexType name=*"DataNotFoundServiceException"*>
>
> <xs:sequence>
>
> <xs:element name=*"code"* type=*"xs:int"*/>
>
> <xs:element name=*"message"* type=*"xs:string"*/>
>
> <xs:element name=*"systemOfRecord"* type=*"xs:string"*/>
>
> <xs:element name=*"node"* type=*"xs:string"*/>
>
> <xs:element name=*"detailedMessage"* type=*"xs:string"*/>
>
> <xs:element name=*"severity"* type=*"xs:string"*/>
>
> <xs:element name=*"additionalInfo"* type=*"xs:string"*/>
>
> </xs:sequence>
>
> </xs:complexType>
> On Wed, Nov 11, 2009 at 4:07 PM, Daniel Kulp <dk...@apache.org> wrote:
>
>>
>>
>> OK. The soap message isn't valid according to that schema. In the
>> schema,
>> they are all <xs:attribute> and thus should be attributes, not child
>> elements.
>>
>> Dan
>>
>>
>> On Wed November 11 2009 4:02:30 pm deepika vadapalli wrote:
>> > 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/XMLSchem
>> > a-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/XMLSchem
>> > a-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/XMLSchem
>> > a-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/XMLSchem
>> > a-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/XMLSchem
>> > a-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/XMLSchem
>> > a-instance%22/>
>> >
>> > </ns1:DataNotFoundServiceException>
>> > </detail>
>> > </soap:Fault>
>> > </soap:Body>
>> > </soap:Envelope>
>> >
>> > On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <dk...@apache.org> 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:2
>> > >44
>> > >
>> > > > ) at
>> > >
>> > >
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:2
>> > >39
>> > >
>> > > > ) at
>> > >
>> > >
>> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElem
>> > >en
>> > >
>> > > > 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(Str
>> > >uc
>> > >
>> > > > tureLoader.java:245) at
>> > >
>> > >
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startEleme
>> > >nt
>> > >
>> > > > (UnmarshallingContext.java:452) at
>> > >
>> > >
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElemen
>> > >t(
>> > >
>> > > > 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(SAXCon
>> > >ne
>> > >
>> > > > 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(Unma
>> > >rs
>> > >
>> > > > hallerImpl.java:314) at
>> > >
>> > >
>> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmar
>> > >sh
>> > >
>> > > > 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(Client
>> > >Fa
>> > >
>> > > > ultConverter.java:131) at
>> > >
>> > >
>> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFault
>> > >Co
>> > >
>> > > > nverter.java:74) at
>> > >
>> > >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
>> > >ai
>> > >
>> > > > n.java:236) at
>> > >
>> > >
>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
>> > >Ab
>> > >
>> > > > stractFaultChainInitiatorObserver.java:96) at
>> > >
>> > >
>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
>> > >ge
>> > >
>> > > > (CheckFaultInterceptor.java:69) at
>> > >
>> > >
>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
>> > >ge
>> > >
>> > > > (CheckFaultInterceptor.java:34) at
>> > >
>> > >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
>> > >ai
>> > >
>> > > > n.java:236) at
>> > > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664)
>> at
>> > >
>> > >
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
>> > >ns
>> > >
>> > > > eInternal(HTTPConduit.java:2131) at
>> > >
>> > >
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
>> > >ns
>> > >
>> > > > e(HTTPConduit.java:2014) at
>> > >
>> > >
>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPC
>> > >on
>> > >
>> > > > duit.java:1939) at
>> > >
>> > >
>> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutput
>> > >St
>> > >
>> > > > 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$MessageSenderEndingIn
>> > >te
>> > >
>> > > > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
>> > >
>> > >
>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
>> > >ai
>> > >
>> > > > 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
>> > > dkulp@apache.org
>> > > http://www.dankulp.com/blog
>> >
>>
>> --
>> Daniel Kulp
>> dkulp@apache.org
>> http://www.dankulp.com/blog
>>
>
>
Re: Unmarshalling error while processing soap fault.
Posted by deepika vadapalli <de...@gmail.com>.
Thanks for the response.
But I get the same exception even if I change my schema from atrributes to
elements.
Please see my schema below for that exception object.
<xs:complexType name=*"DataNotFoundServiceException"*>
<xs:sequence>
<xs:element name=*"code"* type=*"xs:int"*/>
<xs:element name=*"message"* type=*"xs:string"*/>
<xs:element name=*"systemOfRecord"* type=*"xs:string"*/>
<xs:element name=*"node"* type=*"xs:string"*/>
<xs:element name=*"detailedMessage"* type=*"xs:string"*/>
<xs:element name=*"severity"* type=*"xs:string"*/>
<xs:element name=*"additionalInfo"* type=*"xs:string"*/>
</xs:sequence>
</xs:complexType>
On Wed, Nov 11, 2009 at 4:07 PM, Daniel Kulp <dk...@apache.org> wrote:
>
>
> OK. The soap message isn't valid according to that schema. In the
> schema,
> they are all <xs:attribute> and thus should be attributes, not child
> elements.
>
> Dan
>
>
> On Wed November 11 2009 4:02:30 pm deepika vadapalli wrote:
> > 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/XMLSchem
> > a-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/XMLSchem
> > a-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/XMLSchem
> > a-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/XMLSchem
> > a-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/XMLSchem
> > a-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/XMLSchem
> > a-instance%22/>
> >
> > </ns1:DataNotFoundServiceException>
> > </detail>
> > </soap:Fault>
> > </soap:Body>
> > </soap:Envelope>
> >
> > On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <dk...@apache.org> 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:2
> > >44
> > >
> > > > ) at
> > >
> > >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:2
> > >39
> > >
> > > > ) at
> > >
> > >
> com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElem
> > >en
> > >
> > > > 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(Str
> > >uc
> > >
> > > > tureLoader.java:245) at
> > >
> > >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startEleme
> > >nt
> > >
> > > > (UnmarshallingContext.java:452) at
> > >
> > >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElemen
> > >t(
> > >
> > > > 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(SAXCon
> > >ne
> > >
> > > > 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(Unma
> > >rs
> > >
> > > > hallerImpl.java:314) at
> > >
> > >
> com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmar
> > >sh
> > >
> > > > 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(Client
> > >Fa
> > >
> > > > ultConverter.java:131) at
> > >
> > >
> org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFault
> > >Co
> > >
> > > > nverter.java:74) at
> > >
> > >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> > >ai
> > >
> > > > n.java:236) at
> > >
> > >
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
> > >Ab
> > >
> > > > stractFaultChainInitiatorObserver.java:96) at
> > >
> > >
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
> > >ge
> > >
> > > > (CheckFaultInterceptor.java:69) at
> > >
> > >
> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
> > >ge
> > >
> > > > (CheckFaultInterceptor.java:34) at
> > >
> > >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> > >ai
> > >
> > > > n.java:236) at
> > > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664) at
> > >
> > >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
> > >ns
> > >
> > > > eInternal(HTTPConduit.java:2131) at
> > >
> > >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
> > >ns
> > >
> > > > e(HTTPConduit.java:2014) at
> > >
> > >
> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPC
> > >on
> > >
> > > > duit.java:1939) at
> > >
> > >
> org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutput
> > >St
> > >
> > > > 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$MessageSenderEndingIn
> > >te
> > >
> > > > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> > >
> > >
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> > >ai
> > >
> > > > 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
> > > dkulp@apache.org
> > > http://www.dankulp.com/blog
> >
>
> --
> Daniel Kulp
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: Unmarshalling error while processing soap fault.
Posted by Daniel Kulp <dk...@apache.org>.
OK. The soap message isn't valid according to that schema. In the schema,
they are all <xs:attribute> and thus should be attributes, not child elements.
Dan
On Wed November 11 2009 4:02:30 pm deepika vadapalli wrote:
> 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/XMLSchem
> a-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/XMLSchem
> a-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/XMLSchem
> a-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/XMLSchem
> a-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/XMLSchem
> a-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/XMLSchem
> a-instance%22/>
>
> </ns1:DataNotFoundServiceException>
> </detail>
> </soap:Fault>
> </soap:Body>
> </soap:Envelope>
>
> On Wed, Nov 11, 2009 at 3:54 PM, Daniel Kulp <dk...@apache.org> 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:2
> >44
> >
> > > ) at
> >
> > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportError(Loader.java:2
> >39
> >
> > > ) at
> >
> > com.sun.xml.bind.v2.runtime.unmarshaller.Loader.reportUnexpectedChildElem
> >en
> >
> > > 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(Str
> >uc
> >
> > > tureLoader.java:245) at
> >
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext._startEleme
> >nt
> >
> > > (UnmarshallingContext.java:452) at
> >
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallingContext.startElemen
> >t(
> >
> > > 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(SAXCon
> >ne
> >
> > > 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(Unma
> >rs
> >
> > > hallerImpl.java:314) at
> >
> > com.sun.xml.bind.v2.runtime.unmarshaller.UnmarshallerImpl.unmarshal(Unmar
> >sh
> >
> > > 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(Client
> >Fa
> >
> > > ultConverter.java:131) at
> >
> > org.apache.cxf.interceptor.ClientFaultConverter.handleMessage(ClientFault
> >Co
> >
> > > nverter.java:74) at
> >
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> >ai
> >
> > > n.java:236) at
> >
> > org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(
> >Ab
> >
> > > stractFaultChainInitiatorObserver.java:96) at
> >
> > org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
> >ge
> >
> > > (CheckFaultInterceptor.java:69) at
> >
> > org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessa
> >ge
> >
> > > (CheckFaultInterceptor.java:34) at
> >
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> >ai
> >
> > > n.java:236) at
> > > org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:664) at
> >
> > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
> >ns
> >
> > > eInternal(HTTPConduit.java:2131) at
> >
> > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleRespo
> >ns
> >
> > > e(HTTPConduit.java:2014) at
> >
> > org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPC
> >on
> >
> > > duit.java:1939) at
> >
> > org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutput
> >St
> >
> > > 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$MessageSenderEndingIn
> >te
> >
> > > rceptor.handleMessage(MessageSenderInterceptor.java:62) at
> >
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorCh
> >ai
> >
> > > 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
> > dkulp@apache.org
> > http://www.dankulp.com/blog
>
--
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog
Re: Unmarshalling error while processing soap fault.
Posted by deepika vadapalli <de...@gmail.com>.
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 <dk...@apache.org> 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
> dkulp@apache.org
> http://www.dankulp.com/blog
>
Re: Unmarshalling error while processing soap fault.
Posted by Daniel Kulp <dk...@apache.org>.
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
dkulp@apache.org
http://www.dankulp.com/blog