camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jipchix <>
Subject Re: Read web service msg and encrypt some data
Date Thu, 03 Jan 2013 18:27:18 GMT
I have a POJO that was generated using wsdl2java - let's call this Person
class. This class was generated 

Then in my Manipulator class, I have an input parameter - (String xml).  I
write this 'xml' to the log and see that it contains some header and the
message body.  In the Manipulator class then I attempt to instantiate
"Person" thinking somehow it would magically contains fields parsed out from
my XML.  There is no link between them I can see.  Here are the snippets
from the 2 classes:
// file
public class MyManipulator {

   public Person Manipulator (String xml) {
   Person p = new Person();
 ...      encryptme(p.ssn);

// file

import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlType;

@XmlType(name = "", propOrder = {
@XmlRootElement(name = "Person")
public class Person {

    @XmlElement(required = true)
    protected String emplID;
    @XmlElement(required = true)
    protected String firstName;
    @XmlElement(required = true)
    protected String lastName;
    @XmlElement(required = true)
    protected String empType;
    @XmlElement(required = true)
    protected String empClass;
    @XmlElement(required = true)
    protected String ssn;
    public String getEmplID() {
        return emplID;
 // Other getters & setters

As mentioned: I could see the message and header in 'xml' var.  However, if
I try to output p.ssn, p.empID, etc., they all showed null.  So I have
message in the 'xml' but I can't get it mapped to "Person" object to
manipulate ssn.



View this message in context:
Sent from the Camel - Users mailing list archive at

View raw message