You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by contactreji <co...@gmail.com> on 2013/08/26 09:52:29 UTC

Marshalling problem !!

Hey I get the following error. I use WSDL first approach. Please help!
DTCopperRecovery is aautogenerated class stub from the WSDL.!


In My JAVA class I have used the class as follows

try{
			LOGGER.info("Befor calling PI Service");
			
			//Now we make the actal call to the SAP PI service through object of Java
stub
			PIService.siID56CopperRecoveryAsyncOut(recoveryName);
			//We finished making the call to the SAP PI system
			
			endTime=System.currentTimeMillis();
			LOGGER.info("Response from PI  Copper Recovery Percentage");
			
			//Now we will write the status of transfer to SAP PI system
			persistIb("CopperRecovery",recoveryName,"SapPi","Success",new
Long(endTime-startTime).toString());
			
			
			exchng.getOut().setBody("Response from PI Copper Recovery Percentage");
//Sending response to camel route
		}



















Following exception comes out!



[com.sun.istack.SAXException2: unable to marshal type
"outotec.pi.mes.id56.copperrecovery.DTCopperRecovery" as an element because
it is missing an @XmlRootElement annotation]
javax.xml.bind.MarshalException
 - with linked exception:
[com.sun.istack.SAXException2: unable to marshal type
"outotec.pi.mes.id56.copperrecovery.DTCopperRecovery" as an element because
it is missing an @XmlRootElement annotation]
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:318)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
	at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
	at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:95)[:2.0.0.fuse-71-047]
	at
outotec.com.mes.bw.copper_recovery_perc.Pi_CopperRecoveryPerc.persistIb(Pi_CopperRecoveryPerc.java:215)[431:com.outotec.mes-bw-copper_recovery_perc_ssl:1.0.0]
	at
outotec.com.mes.bw.copper_recovery_perc.Pi_CopperRecoveryPerc.process(Pi_CopperRecoveryPerc.java:185)[431:com.outotec.mes-bw-copper_recovery_perc_ssl:1.0.0]
	at
org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
	at
org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]



--
View this message in context: http://camel.465427.n5.nabble.com/Marshalling-problem-tp5737929.html
Sent from the Camel - Users mailing list archive at Nabble.com.

Re: Marshalling problem !!

Posted by Christian Müller <ch...@gmail.com>.
outotec.pi.mes.id56.copperrecovery.DTCopperRecovery it is missing an
@XmlRootElement annotation

Best,
Christian
-----------------

Software Integration Specialist

Apache Camel committer: https://camel.apache.org/team
V.P. Apache Camel: https://www.apache.org/foundation/
Apache Member: https://www.apache.org/foundation/members.html

https://www.linkedin.com/pub/christian-mueller/11/551/642


On Mon, Aug 26, 2013 at 9:52 AM, contactreji <co...@gmail.com> wrote:

> Hey I get the following error. I use WSDL first approach. Please help!
> DTCopperRecovery is aautogenerated class stub from the WSDL.!
>
>
> In My JAVA class I have used the class as follows
>
> try{
>                         LOGGER.info("Befor calling PI Service");
>
>                         //Now we make the actal call to the SAP PI service
> through object of Java
> stub
>
> PIService.siID56CopperRecoveryAsyncOut(recoveryName);
>                         //We finished making the call to the SAP PI system
>
>                         endTime=System.currentTimeMillis();
>                         LOGGER.info("Response from PI  Copper Recovery
> Percentage");
>
>                         //Now we will write the status of transfer to SAP
> PI system
>
> persistIb("CopperRecovery",recoveryName,"SapPi","Success",new
> Long(endTime-startTime).toString());
>
>
>                         exchng.getOut().setBody("Response from PI Copper
> Recovery Percentage");
> //Sending response to camel route
>                 }
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> Following exception comes out!
>
>
>
> [com.sun.istack.SAXException2: unable to marshal type
> "outotec.pi.mes.id56.copperrecovery.DTCopperRecovery" as an element because
> it is missing an @XmlRootElement annotation]
> javax.xml.bind.MarshalException
>  - with linked exception:
> [com.sun.istack.SAXException2: unable to marshal type
> "outotec.pi.mes.id56.copperrecovery.DTCopperRecovery" as an element because
> it is missing an @XmlRootElement annotation]
>         at
>
> com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:318)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
>         at
>
> com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)[158:org.apache.servicemix.bundles.jaxb-impl:2.2.1.1_2]
>         at
>
> javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:95)[:2.0.0.fuse-71-047]
>         at
>
> outotec.com.mes.bw.copper_recovery_perc.Pi_CopperRecoveryPerc.persistIb(Pi_CopperRecoveryPerc.java:215)[431:com.outotec.mes-bw-copper_recovery_perc_ssl:1.0.0]
>         at
>
> outotec.com.mes.bw.copper_recovery_perc.Pi_CopperRecoveryPerc.process(Pi_CopperRecoveryPerc.java:185)[431:com.outotec.mes-bw-copper_recovery_perc_ssl:1.0.0]
>         at
>
> org.apache.camel.impl.ProcessorEndpoint.onExchange(ProcessorEndpoint.java:101)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.impl.ProcessorEndpoint$1.process(ProcessorEndpoint.java:71)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.util.AsyncProcessorConverterHelper$ProcessorToAsyncProcessorBridge.process(AsyncProcessorConverterHelper.java:61)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.processor.SendProcessor$2.doInAsyncProducer(SendProcessor.java:122)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.impl.ProducerCache.doInAsyncProducer(ProducerCache.java:298)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.processor.SendProcessor.process(SendProcessor.java:117)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:73)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>         at
>
> org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:99)[147:org.apache.camel.camel-core:2.10.0.fuse-71-047]
>
>
>
> --
> View this message in context:
> http://camel.465427.n5.nabble.com/Marshalling-problem-tp5737929.html
> Sent from the Camel - Users mailing list archive at Nabble.com.
>