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.

Reply via email to