Encrypt xml bean object

Hi Folks,
can we encrypt and decrypt a xml bean object .
i have a xml bean encoded file which contains all questions and now user need to take a exam ,problem here is user can see that xml file in text editor in readble format.
Now how can i encrypt xml file and decrypt it back when application starts.
Thanks in Advance

lakshmiindia wrote:
Hi Folks,
can we encrypt and decrypt a xml bean object .
i have a xml bean encoded file which contains all questions and now user need to take a exam ,problem here is user can see that xml file in text editor in readble format.
Now how can i encrypt xml file and decrypt it back when application starts.
You can't do this securely since any decryption key needed by the application must be available to the application and therefore easy to get at by a knowledgeable attacker. On this basis and since you have a fairly big learning curve to implement any encryption, why not simple Base64 encode the whole file. Easy for anyone in the know to decode but it might be good enough for a school/college/university project.

Similar Messages

  • Nullpointer exception while multiple users reading from XML DOM object

    We are getting a null pointer exception when we are trying to read from a Static XML DOM object . We are getting the exception in weblogic 7.1 very rarely but started getting the exception in weblogic 9.2 more frequently. When multiple users are trying to access the Static variable we are getting null pointer exception. I think it is a memory related issue. Making the whole method synchronized is resolving the issue. But that is not the right thing to do. Can any one know what might be the issue here?
    I am giving the code and the XML. I have tried to give the latest Xerces parser from the Apache site but got the same exception. Please help me in this regard.
    The XML is also provided below along with the code.
    package com.test;
    import java.beans.BeanInfo;
    import java.beans.Introspector;
    import java.util.ArrayList;
    import javax.xml.parsers.DocumentBuilder;
    import javax.xml.parsers.DocumentBuilderFactory;
    //import org.apache.xml.serialize.XMLSerializer;
    import org.w3c.dom.Document;
    import org.w3c.dom.Node;
    import org.w3c.dom.NodeList;
    public class ObjectPersistanceXMLParser {
         public static volatile Document configXML;
         * @param objectName
         * @param attributeName
         * @return
         * @throws Throwable
         public static ArrayList getData(String objectName,String attributeName) throws Exception
              Node ndDoc = getXMLDoc();
              Node ndRoot = ndDoc.getFirstChild();
              NodeList ndFirstList = ndRoot.getChildNodes();
              BeanInfo bi = Introspector.getBeanInfo(ndFirstList.getClass());
              System.out.println("****** "+bi.getBeanDescriptor().getBeanClass().getName());
              System.out.println("This is the number of child nodes present:"+ndFirstList.getLength()+":::"+ndFirstList.item(0).getNodeValue());
              ArrayList returnResult = null;
              String strReturnResult = null;
              for(int i=0;i<ndFirstList.getLength();i++)
                   if(ndFirstList.item(i).getNodeName().equals("ObjectDBMapping"))
                        NodeList ndObjectList = ndFirstList.item(i).getChildNodes();
                        for(int j=0;j<ndObjectList.getLength();j++)
                             if(ndObjectList.item(j).getNodeName().equals("Object"))
                                  if(ndObjectList.item(j).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(objectName))
                                       NodeList ndFieldList = ndObjectList.item(j).getChildNodes();
                                       for(int k=0;k<ndFieldList.getLength();k++)
                                            if(ndFieldList.item(k).getNodeName().equals("field"))
                                                 if(ndFieldList.item(k).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(attributeName))
                                                      returnResult = new ArrayList();
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_TABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_COLUMN").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("TYPE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PERSIST").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("DEFAULT_VALUE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PRIMARY_KEY").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("VERSIONABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PRECISION").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("FOREIGN_KEY").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PARENT_TABLE").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("PARENT_COLUMN").getNodeValue());
                                                      returnResult.add(ndFieldList.item(k).getAttributes().getNamedItem("LEVEL").getNodeValue());
                                                      //return returnResult;
              if(strReturnResult == null){
                   System.out.println("This is the current state of dom: ");
                   //printDom((Document)ndDoc);
                   if(!attributeName.trim().equalsIgnoreCase("class") &&
                        !attributeName.trim().equalsIgnoreCase("operationFlag")&&
                        !attributeName.trim().equalsIgnoreCase("primaryKeyColumnName")&&
                        !attributeName.trim().equalsIgnoreCase("tableName"))               
                        System.out.println("No DB Mapping found for Object "+objectName+" and attribute "+attributeName);
              return returnResult;
         * @param objectName
         * @param tableName
         * @return
         * @throws Throwable
         public static int getMaxFields(String objectName,String tableName) throws Throwable
              Node ndDoc = getXMLDoc();
              Node ndRoot = ndDoc.getFirstChild();
              NodeList ndFirstList = ndRoot.getChildNodes();
              int returnResult = 0;
              for(int i=0;i<ndFirstList.getLength();i++)
                   if(ndFirstList.item(i).getNodeName().equals("ObjectDBMapping"))
                        NodeList ndObjectList = ndFirstList.item(i).getChildNodes();
                        for(int j=0;j<ndObjectList.getLength();j++)
                             if(ndObjectList.item(j).getNodeName().equals("Object"))
                                  if(ndObjectList.item(j).getAttributes().getNamedItem("NAME").getNodeValue().equalsIgnoreCase(objectName))
                                       NodeList ndFieldList = ndObjectList.item(j).getChildNodes();
                                       for(int k=0;k<ndFieldList.getLength();k++)
                                            if(ndFieldList.item(k).getNodeName().equals("field"))
                                                 if(ndFieldList.item(k).getAttributes().getNamedItem("SOURCE_TABLE").getNodeValue().equalsIgnoreCase(tableName) &&
                                                           ndFieldList.item(k).getAttributes().getNamedItem("PERSIST").getNodeValue().equalsIgnoreCase("Y"))
                                                      returnResult++;
              return returnResult;
         /*This method returns a Document Object of the ObjectConfig.xml file. This method is separated
         * out from the calling method to keep an option OPEN in case it is later decided to read XML
         * from memory instead of physical location.*/
         public static Document getXMLDoc() throws Exception
              if(configXML == null)
                   synchronized (ObjectPersistanceXMLParser.class)
                        if(configXML == null)
                             if(System.getProperty("OBJECT-CONFIG-XML") == null){
                                  System.out.println("System Property OBJECT-CONFIG-XML not found");
                             String filePath = System.getProperty("OBJECT-CONFIG-XML");
                             System.out.println("Reading CONFIG Xml from file - "+filePath);
                             DocumentBuilderFactory docBuilderFactory = DocumentBuilderFactory.newInstance();
                             BeanInfo bi = Introspector.getBeanInfo(docBuilderFactory.getClass());
                             System.out.println("****** "+bi.getBeanDescriptor().getBeanClass().getName());
                             try
                        DocumentBuilder docBuilder = docBuilderFactory.newDocumentBuilder();
                        configXML = docBuilder.parse(filePath);
                   }catch(Throwable t)
                        int errorCode = 111;
                        String errorMsg = "Problem in parsing OBJECT-CONFIG-XML file";
                        System.out.println(errorMsg);
              else
                   System.out.println("Config XML Loaded from memory.....new");
    return configXML;
         public static void main(String args[]) throws Throwable
         /*public synchronized static void printDom(Document doc){
              XMLSerializer ser = new XMLSerializer(System.out, null);
              try {
                   ser.serialize(doc);
              } catch (Throwable e) {
                   e.printStackTrace();
              System.out.flush();
    <?xml version="1.0"?><root>
         <ObjectDBMapping>
              <Object NAME="com.los.common.entity.LoanTask">
                   <field NAME="loanTaskId" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="LOAN_TASK_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="N" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskId" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UWM_TASK_MASTER" PARENT_COLUMN="TASK_ID">
                   </field>
                   <field NAME="taskName" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskStatus" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskCreationDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CREATION_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskClosureDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CLOSURE_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="taskClosedBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="TASK_CLOSED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="UPDATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="UPDATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdDate" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="CREATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdBy" SOURCE_TABLE="UW_LOAN_TASKS"
                        SOURCE_COLUMN="CREATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              </Object>
              <Object NAME="com.los.common.entity.LOSUnderwritingRules">
                   <field NAME="undwRunRuleId" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDW_RUN_RULE_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="underwritingRunNo" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDERWRITING_RUN_NO" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="underwritingRunId" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UNDERWRITING_RUN_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="ruleGroup" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="RULE_GROUP" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="ruleName" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="RULE_NAME" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageCode" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_CODE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageText" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_TEXT" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="passFail" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="PASS_FAIL" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideAuthorityLevel" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_AUTHORITY_LEVEL" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideYN" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_Y_N" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideOn" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_ON" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="CREATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedBy" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UPDATED_BY" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="createdDate" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="CREATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="updatedDate" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="UPDATED_DATE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="processName" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="PROCESS_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="overrideReason" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="OVERRIDE_REASON" TYPE="VARCHAR2" LENGTH="1000"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="messageModule" SOURCE_TABLE="UW_UNDERWRITING_RULES"
                        SOURCE_COLUMN="MESSAGE_MODULE" TYPE="VARCHAR2" LENGTH="30"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              </Object>
              <Object NAME="com.los.common.entity.Applicant">
                   <field NAME="applicantId" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="registrationNumber" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="REGISTRATION_NUMBER" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="cifNumber" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CIF_NUMBER" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                        </field>
              <field NAME="customerStatus" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CUSTOMER_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="customerType" SOURCE_TABLE="UW_APPLICANT_MASTER"
                        SOURCE_COLUMN="CUSTOMER_TYPE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="N" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="applicantLastName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                        SOURCE_COLUMN="APPLICANT_LAST_NAME" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
              <field NAME="applicantFirstName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_FIRST_NAME" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="applicantMiddleName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_MIDDLE_NAME" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="applicantNameSuffix" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_NAME_SUFFIX" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="nationality" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="NATIONALITY" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="age" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="AGE" TYPE="NUMBER" LENGTH="5"
                   PRECISION="2" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="dateOfBirth" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="DATE_OF_BIRTH" TYPE="DATE" LENGTH=""
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType1" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE1" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType2" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE2" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationType" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_TYPE" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber1" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER1" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber2" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER2" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="identificationNumber" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="IDENTIFICATION_NUMBER" TYPE="VARCHAR2" LENGTH="100"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="guarantorIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="GUARANTOR_INDICATOR" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="separateCobDisclosureRequir" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="SEPARATE_COB_DISCLOSURE_REQUIR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="domesticRisk" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="DOMESTIC_RISK" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="crossBorderRisk" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="CROSS_BORDER_RISK" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="title" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="TITLE" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="previousSurname" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="PREVIOUS_SURNAME" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="legalName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="LEGAL_NAME" TYPE="VARCHAR2" LENGTH="200"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="preferredName" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="PREFERRED_NAME" TYPE="VARCHAR2" LENGTH="50"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="gender" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="GENDER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="seniorCitizenStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="SENIOR_CITIZEN_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="staffIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="STAFF_INDICATOR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="warVeteranIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="WAR_VETERAN_INDICATOR" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="noOfDependants" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="NO_OF_DEPENDANTS" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="maritalStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="MARITAL_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="educationStatus" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="EDUCATION_STATUS" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="detApplicantId" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UW_APPLICANT_MASTER" PARENT_COLUMN="APPLICANT_ID">
              </field>
              <field NAME="detApplicantDetailId" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="APPLICANT_DETAIL_ID" TYPE="NUMBER" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="usResidentIndicator" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="US_RESIDENT_INDICATOR" TYPE="VARCHAR2" LENGTH="1"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="employeeNumber" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="EMPLOYEE_NUMBER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              <field NAME="isdefaulter" SOURCE_TABLE="UW_APPLICANT_DETAILS"
                   SOURCE_COLUMN="ISDEFAULTER" TYPE="VARCHAR2" LENGTH="20"
                   PRECISION="" PERSIST="Y" LEVEL="2" DEFAULT_VALUE="" PRIMARY_KEY="N"
                   VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
              </field>
              </Object>
              <Object NAME="com.los.common.entity.ApplicantContact">
                   <field NAME="applicantId" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="Y" PARENT_TABLE="UW_APPLICANT_MASTER" PARENT_COLUMN="APPLICANT_ID">
                   </field>
                   <field NAME="contactId" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="CONTACT_ID" TYPE="NUMBER" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="Y"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="addressType" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="ADDRESS_TYPE" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine1" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_1" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine2" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_2" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine3" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_3" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantAddressLine4" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="APPLICANT_ADDRESS_LINE_4" TYPE="VARCHAR2" LENGTH="100"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="residingSince" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="RESIDING_SINCE" TYPE="DATE" LENGTH=""
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="residentialStatus" SOURCE_TABLE="UW_APPLICANT_CONTACT_INFO"
                        SOURCE_COLUMN="RESIDENTIAL_STATUS" TYPE="VARCHAR2" LENGTH="20"
                        PRECISION="" PERSIST="Y" LEVEL="1" DEFAULT_VALUE="" PRIMARY_KEY="N"
                        VERSIONABLE="Y" FOREIGN_KEY="" PARENT_TABLE="" PARENT_COLUMN="">
                   </field>
                   <field NAME="applicantEMa

    Could you please provide the stack trace?

  • Use Sign.xml and Encrypt.xml for both request AND response within WSDL?

    Hi,
    ALSB: 2.6
    I was wandering if it's possible to use abstract outof the box WS-Policy file within WSDL file to specify encryption
    (Encrypt.xml) and digital signature(Sign.xml) with X509 for both request and response???
    So far, it only works for either request or response BUT not both. i.e. within WSDL file
    <!-- following WSDL works for encrypting and signing request with X509 in test console -->.....
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                               <!-- WS-Policy file applied here -->
                             <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
               Or
    <!-- following WSDL works for encrypting and signing response with X509 in test console -->
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                       <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
    But not both
    <!-- following WSDL doesn't work for encrypting and signing both response and request with X509 in test console -->
    <wsdl:binding name="DexService2Soap" type="tns:DexService2Soap">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
        <wsdl:operation name="Message">
                <soap:operation soapAction="urn:moe:dex:dexservice:2.0.0/Message" style="document" />
                              <wsdl:input>
                                        <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                     <soap:body use="literal" />
                               </wsdl:input>
                             <wsdl:output>
                                       <!-- WS-Policy file applied here -->
                                       <wsp:Policy>
                                            <wsp:PolicyReference URI="policy:Sign.xml"/>
                                            <wsp:PolicyReference URI="policy:Encrypt.xml"/>
                                       </wsp:Policy>
                                  <soap:body use="literal" />
                               </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
    ...      Instead, I got error message like
    <15/01/2008 10:15:04 AM NZDT> <Error> <ALSB Security> <BEA-387023> <An error ocurred during web service security inbound response processing [error-code: Fault
    , message-id: 3917705281899426819-4368b1eb.117762cff6e.-7fdb, proxy: DexServiceX509-Stub/Proxy Services/DexServiceX509-ProxyService, operation: Message]
    --- Error message:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><soapenv:Fault><faultcode>soapenv:Server</faultcode>
    <faultstring>Failed to get token for tokenType: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3</faultstring></soapenv:Fa
    ult></soapenv:Body></soapenv:Envelope>
    weblogic.xml.crypto.wss.WSSecurityException: Failed to get token for tokenType: http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#
    X509v3
    at weblogic.xml.crypto.wss.SecurityBuilderImpl.addEncryption(SecurityBuilderImpl.java:308)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processConfidentiality(SecurityPolicyDriver.java:280)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:75)
    at weblogic.wsee.security.wss.SecurityPolicyDriver.processOutbound(SecurityPolicyDriver.java:64)
    at weblogic.wsee.security.WssServerHandler.processOutbound(WssServerHandler.java:86)
    Truncated. see log file for complete stacktrace
    >
    <15/01/2008 10:15:24 AM NZDT> <Error> <com.bea.weblogic.kernel> <000000> <Failed to build CertPath
    java.security.cert.CertPathBuilderException: [Security:090603]The certificate chain is invalid because it could not be completed. The trusted CAs did not inclu
    de CN=x509,OU=x509,O=x509,L=Wellington,ST=Wellington,C=NZ.
    at weblogic.security.providers.pk.WebLogicCertPathProviderRuntimeImpl$JDKCertPathBuilder.engineBuild(WebLogicCertPathProviderRuntimeImpl.java:669)
    at java.security.cert.CertPathBuilder.build(CertPathBuilder.java:194)
    at com.bea.common.security.internal.legacy.service.CertPathBuilderImpl$CertPathBuilderProviderImpl.build(CertPathBuilderImpl.java:67)
    at com.bea.common.security.internal.service.CertPathBuilderServiceImpl.build(CertPathBuilderServiceImpl.java:86)
    at jrockit.reflect.VirtualNativeMethodInvoker.invoke(Ljava.lang.Object;[Ljava.lang.Object;)Ljava.lang.Object;(Unknown Source)
            Truncated. see log file for complete stacktrace
    >
    <15/01/2008 10:15:24 AM NZDT> <Error> <ALSB Security> <BEA-387022> <An error ocurred during web service security inbound request processing [error-code: Fault,
    message-id: 3917705281899426819-4368b1eb.117762cff6e.-7fd8, proxy: DexServiceX509-Stub/Proxy Services/DexServiceX509-ProxyService, operation: null]
    --- Error message:
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"><soapenv:Header/><soapenv:Body><soapenv:Fault xmlns:wsse="http://docs.oasis-open.or
    g/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"><faultcode>wsse:InvalidSecurityToken</faultcode><faultstring>Security token failed to validate. weblo
    gic.xml.crypto.wss.SecurityTokenValidateResult@3c5347b[status: false][msg [
      Version: V1
      Subject: CN=x509, OU=x509, O=x509, L=Wellington, ST=Wellington, C=NZ
      Signature Algorithm: MD5withRSA, OID = 1.2.840.113549.1.1.4
      Key:  Sun RSA public key, 1024 bits
      modulus: 13052787793731294943682394984664645854838424340012907077330623....
      The 'System Error Handler' from 'Invocation Trace' in ALSB test console is something like
    [pre]     
    $fault:
    <con:fault xmlns:con="http://www.bea.com/wli/sb/context">
         <con:errorCode>BEA-386201</con:errorCode>
         <con:reason>
              A web service security fault
              occurred[{http://schemas.xmlsoap.org/soap/envelope/}Server][Failed
              to get token for tokenType:
              http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3]
         </con:reason>
         <con:details>
              <err:WebServiceSecurityFault
                   xmlns:err="http://www.bea.com/wli/sb/errors">
                   <err:faultcode
                        xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
                        soapenv:Server
                   </err:faultcode>
                   <err:faultstring>
                        Failed to get token for tokenType:
                        http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-x509-token-profile-1.0#X509v3
                   </err:faultstring>
              </err:WebServiceSecurityFault>
         </con:details>
         <con:location>
              <con:path>response-pipeline</con:path>
         </con:location>
    </con:fault>
    So is this a feature not supported in ALSB 2.6 yet or am I missing something dead simple?
    Thanks in advance
    Sam

    Instead of specifying policies for input and output separately you could place the policy reference only once in the operation element. Maybe will this solve your problem...
    http://e-docs.bea.com/alsb/docs26/security/ws_policy.html#wp1061166

  • Query on XML Beans replacing Castor Java -XML Bindings

    Hello,
    We use Castor XML Framework for today Java - XML bindings and were looking for XML Beans replacement.
    One of the key problems we face in using XML (maybe a flawed design) is we create XSD for our applications and run Castor to generate Java Classes as Libraries (XMLFramework.jar).
    Applications are compiled with these Java libraries and Castor is used to Marshal the Java Object as XML Document when invoking a remote API and at the receiving side it is used to unmarshal back the XML document to Java Object.
    Major issues we have seen is that if any XSD (that defines application ICD) changes, we need to re-generate Castor Java classes (new XMLFramework.jar) and re-compile applications that were using these classes with new JAR files..... Thus for small XSD changes the impact is in lot of applications (where an application is an EAR deployed on WLS)
    Does XMLBeans help here that I can change XSD without changing all the end-points that use Classes generated out of these XSDs (when additing mandatory or optinal elements) ?
    Or there is a flaw in which we have used the Java-XML binding framework like Castor and XMLBeans do not help much ?

    Can someone please suggest on how I can go about
    converting an XML file into word format using Java
    ?How about POI?

  • Error converting j2EE-Specific ejb xml to object representation

    I am trying to webservice using Sun one. I got four entity beans and two sessions. I exposed the business of the session beans as webservice function.
    I tested the individual sesion beans they are working fine.
    When I created a webservice, and when I am trying to deploy the web service the follwing error occured.
    I tried to run the verrfier tool, but is not loading the file...it s getting stucked up.
    Here,
    BSApp -- J2ee application in which webservice is included
    BSManagerContrl --- is one of the two session bean which i created
    Book -- is the entity bean
    I also checked the module of the session bean to verify whether i included the Book enity bean or not. Other wise I would i successfully tested the session bean.
    Thank you
    [b][b]Deployment Error -- Error while running ejbc -- Fatal Error from EJB Compiler -- Failed to load
    deployment descriptot for BSApp
    Cause: Error converting j2EE-Specific ejb xml to object representation
    BSManagerContrl_EJBModule.jar
    app_BSApp BSManagerContrl_EJBModule
    Referencing error: This bundle has no bean of name [Book]
    <ejb><ejb-name>Book</ejb-name><jndi-name>ejb/Book</jndi-name><pass-by-refernece>false</pass-by-reference><cmp><mapping-properties>

    Hi parsuram,
    Its not coming up anymore. All i did was re-map the table under Sun AS Mappings under properties for the EJBModule. Its really strange. Thanks a lot for your concern. I really appreciate it.

  • Using an XML Bean in a WS Client app

    We're experience problems trying to use a XML Bean returned to a Java application from a WebLogic Workshop Web Service. As a test case we decided to write a Java application that would use the CustomerDB_XMLBeanClient Web Service supported in the SamplesApp application. This Web Service supports a getAllCustomerNames method which returns an XCustomerDocument object generated from an XML Bean. Invoking this method from the WS test page returns three (3) names. We then created a Java Proxy for this WS to import into our client application. This proxy has different method signatures than the WS. The equivalent getAllCustomerNames method returns an XCustomer object. The return object only has one name, the last one. The java proxy jar file does not have any of the XML Bean classes associated with this Web Service, nor can we find any methods that allow us to iterate through the multiple rows returned in an XCustomer object. So far all of the Java client examples that we've looked at utilize an XML Bean's Document Factory class to instantiate an XML Bean. Do we need to import the XML Bean classes in addition to the Java proxy jar? Can anyone provide us with a working example of a Java client application that receives an XML Bean return object from a Web Service? Thanks.

    The answer:
    emoticons.put("<3", ClassLoader.getSystemClassLoader().getResource("images"+File.separator+"heart.gif").toString());// <3The above solution worked for me when i put the images folder in the default package.
    And to present the file in an image on JEditorPane:
    if(msg.contains("<3")){ // alternately iterate key elements in map
         msg.replaceAll("<3","<img src=\""+emoticons.get("<3")+"\">");
    }This was the only problem I had and it has now been solved!
    If you have any problems with the same thing, post a message and we'll figure it out.

  • Have XML data in a string, can't extract it to the XML bean class

    Hi All, I have a string that contains XML data, for example,
    string str has "<one>1<\one><two>2<\two>". i have the XML beans classes,
    but i am unable to get this data out of the string and add it to the xml bean
    classes.
    I anybody has a clue as to how to code this, please help ASAP.
    Thanks,
    kuneev

    Hi Kunnev,
    Lets say I have an xsd
    <?xml version="1.0"?>
    <xs:schema
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:bea="http://www.bea.com/xmlbeans/Sample.xsd"
         targetNamespace="http://www.bea.com/xmlbeans/Sample.xsd"
         elementFormDefault="qualified"
         attributeFormDefault="unqualified">
    <xs:element name="Person">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="FirstName" type="xs:string" />
    <xs:element name="LastName" type="xs:string" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    Now after I compile this I would get XMLBean classes
    Like Person is a xmlBean class. The code snippet below shows how I can convert
    a string into a xmlbean of type Person.
    XmlOptions xopt = new XmlOptions();
    xopt.setDocumentType(Person.type);
    Person x0 = (Person) XmlObject.Factory.parse(
    "<xml-fragment>" +
    "<FirstName>desc---1</FirstName>" +
    "<LastName>desc---2</LastName>" +
    "</xml-fragment>", xopt);
    Person pp = (Person)x0;
    Now pp is a XMLBean object which can be added to the tree.
    Let me know if you have any questions.
    Thanks a lot,
    Vimala
    "kuneev" <[email protected]> wrote:
    >
    Hi All, I have a string that contains XML data, for example,
    string str has "<one>1<\one><two>2<\two>". i have the XML beans classes,
    but i am unable to get this data out of the string and add it to the
    xml bean
    classes.
    I anybody has a clue as to how to code this, please help ASAP.
    Thanks,
    kuneev

  • Xml beans deployement

    I have generated xml beans jar file y=using scomp command. When i compile my code -which uses this jar file - it is compiling nicely.
    However as soon as i try to run it I got java.lang.NoClassDefFoundError:.
    Is there any method to deploy this jar or simply putting it in classpath will do?
    please help,
    regards,
    --Pankaj                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

    I have also facing the same problem.
    I have many modules those are developed by using EJB 2.0 and many new modules developed by using ejb 3.0. Instead of modifying( migrating) the EJB 2.0 code to ejb 3.o I wanted to integrate all the modules in a single EAR file.
    My Screens those used EJB 3.0 works fine and for EJB 2.0 it says javax.naming.NameNotFoundException: Bean not bound
    from the defined 2.0 JNDI name it is not able to get the object. Is the declaration for JNDI and bean mapping is useless?
    Please provide the solution for this.
    Thanks and Regards,
    Pravu Mishra.

  • Walk XML Beans Generically

    Im working on a project with xmlBeans. I want to be able to walk what I call the bean tree or in other terms the current instantiated bean hiearchy. With xmlBeans, the DOM object used to walk the tree but I want to not use the DOM object because I want to not rely on XML specific objects in the event that the project could move to a database.
    Does anyone know of a project that could take a path in the form of something like "/Building/Floors/Cubes/...." and be able to return the appropriate BeanObject reference

    I am looking for the similar implementation. Did u find any solution?

  • Java Bean object

    hi..
    Can we create a java bean object in workbench and set properties in it through process? If yes, please provide, pointers to it.
    Thanks and Regards
    Ambika Mittal

    To get one of your own objects into a LiveCycle process (so you can create a process variable of your type) you will need to create a custom component.  Custom components allow you to create both services and java objects that can be accessed by LiveCycle.
    In this case you would wrap your java object in a jar file that includes a component.xml file (this tells LC how to use your code).  If you include a <data-type> entry for your objects then you will be able to create variables of your objects type.
    I wrote a couple of articles on creating custom components that may help: http://www.adobe.com/devnet/livecycle/articles/dsc_development_pt2.html

  • Encrypt XML with X509 certificate

    I encrypt XML document with X509 certificate, I use this example http://msdn.microsoft.com/en-us/library/ms229744.aspx
    <EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes256-cbc"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <EncryptedKey xmlns="http://www.w3.org/2001/04/xmlenc#">
    <EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5"/>
    <KeyInfo xmlns="http://www.w3.org/2000/09/xmldsig#">
    <X509Data>
    <X509Certificate>
    MIIDrTCCApWgAwIBAgIKYezy3wACAAAAKDANBgkqhkiG9w0BAQUFADAPMQ0wCwYDVQQDEwRKYW5vMB4XDTA5MDkyNjExMjkzMloXDTEwMDkyNjExMzkzMlowFjEUMBIGA1UEAxMLSnVyYWogRHVkYWswgZ8wDQYJKoZIhvcNAQEBBQADgY0AMIGJAoGBAKwgdaszEg+7OusxZ3zzZRE5rCbgCsKSDXXoJyaN59mkVlO85q8E2G4AScIJodZSwWsmJfGMfXD7uG7bV6GFBywbh5gwkULx4q0+BrZv5B7rNeFIk53kUnHc6yq2noV/lC4vuglNo7JTHnkChl3A76cgjJjeNWMEEWGvLiXtL3jLAgMBAAGjggGGMIIBgjAOBgNVHQ8BAf8EBAMCBPAwRAYJKoZIhvcNAQkPBDcwNTAOBggqhkiG9w0DAgICAIAwDgYIKoZIhvcNAwQCAgCAMAcGBSsOAwIHMAoGCCqGSIb3DQMHMB0GA1UdDgQWBBQeo685XNPPCk6vDCY+L2Ax1fKcfTATBgNVHSUEDDAKBggrBgEFBQcDAjAfBgNVHSMEGDAWgBSXDAdY3AYa2WptwUfBKCVxaP3E+DBZBgNVHR8EUjBQME6gTKBKhiJodHRwOi8vamFuby9DZXJ0RW5yb2xsL0phbm8oMikuY3JshiRmaWxlOi8vXFxqYW5vXENlcnRFbnJvbGxcSmFubygyKS5jcmwwegYIKwYBBQUHAQEEbjBsMDMGCCsGAQUFBzAChidodHRwOi8vamFuby9DZXJ0RW5yb2xsL2phbm9fSmFubygyKS5jcnQwNQYIKwYBBQUHMAKGKWZpbGU6Ly9cXGphbm9cQ2VydEVucm9sbFxqYW5vX0phbm8oMikuY3J0MA0GCSqGSIb3DQEBBQUAA4IBAQCZreG1z+1EqNMgvOzJT+Dqa0VbnXYybOL98nwMi6kB+xGXTpdUvguJsUwsU2XAPAvGdny6fVEriI9LHMpWBC90/ptVWAnGO1/Lqu+S1/bllfDxh+1yJVkLtIsO1H+IbqT7pcimtiJpnTba9044qDGsBqI4Up2E18aaeMQxgurD8Jwgxm9ysaLzF4c9BfBSEGlMrOED32x2ZoqJgAhUZYL3ra1RxRfGGZjUT7oTrj443xjyIaMpwvFfqZyyO+KM1LWWtxK/H6trSQ6kXZYzCVtKQREakH5jO2p9Hirkt2/K3SmsUkCqJUqncFycynwe966LEwoV8RWG3bGJzMmt9evS
    </X509Certificate>
    </X509Data>
    </KeyInfo>
    <CipherData>
    <CipherValue>
    </CipherValue>
    </CipherData>
    </EncryptedKey>
    </KeyInfo>
    <CipherData>
    <CipherValue>
    </CipherValue>
    </CipherData>
    </EncryptedData>
    The encrypt XML consit element <X509Certificate>, I don't know what kind of cert info is in this element. In <X509Certificate> are public key, private key or what certificate info?
    Because if I want decrypt I use :
    // Create a new EncryptedXml object.
    EncryptedXml exml = new EncryptedXml(Doc);
    // Decrypt the XML document.
    exml.DecryptDocument();
    I don't must specify X509 certificate to decrypt XML file. How can work method  DecryptDocument()?

    I wonder if the problem here is that <X509Data><X509Certificate> ... </X509Certificate><X509Data> includes a binary copy of the certificate WITHOUT the private key. (It wouldn't make any sense to include the private key...anyone could
    decode it.) The Decrypt method is looking at the enclosed certificate and not finding a private key.
    I think somehow Encrypt has to create an X509ThumbprintKeyIdentifierClause instead, but I haven't figured out how yet.

  • Xml-bean-xml

    hi,
    i'm looking for a tool/technology that can build an xml document/schema, representing a java bean, and visa versa can load a data from an xml document into a java bean object .
    there is always an option to build something like this, but i guess there are well designed ready applications that can save my time and efforts.
    thanks for your help.

    Hi,
    Try this tool: Liquid XML Studio 2008 freeware version. I used it to create a XML file and XML schema from the data of a bean. Just try it.
    To Parse data from XML to a bean take a look at JAXP or JDOM parsers (depending on your requirements you will have to use one or another, but the latter is easier to use).
    regards,

  • Using XML-based object structures to represent data in code/at run-time

    Hello,
    I have quite a "high level" question which has be bothering me for some time, and I haven't found the subject tackled in any books. I believe J2SE/J2EE is not an important divide here.
    Lets say I want to develop a J2SE game application with two programs: a "level designer", and a "level viewer", and I want to store the level files in an XML format.
    My question, and I use this example only to try and illustrate it, is:
    when coding the level designer or viewer, is it reasonable to use an XML-based object hierarchy for representing a level in code/at run-time, i.e. using the standard Java DOM APIs? Or should one (as I would have done before XML came along) develop a set of classes much closer to modelling the real form of a level, and then add a means to convert those objects to/from to XML format?
    This second option of course I would use/would have used if I wasn't thinking about XML, but isn't it sometimes easier to just read in an XML file into a DOM representation and just use the data straight out of that structure, rather than go through the bother of parsing the XML into a set of unrelated objects defined by a different family of classes? What shapes your decision here? And if the second option is best, what is the easiest way of converting to/from the XML?
    Thank you for any advice.
    Greg

    Hi Christian,
    Can I ask: what about if your domain was quite 'close' to an object/DOM representation of XML?
    For instance, what if a game operated by acting out a theatrical script, a spoken conversation, between two characters, perhaps somehow influenced at points by the user, and a particular level was just a different script for the characters.
    One could imagine that the object representation of this would in the end be quite similar to how you'd represent XML, i.e. like a tree of nodes, where each node was a line from the script, and some nodes were a decision point where different nodes could be chosen from.
    Would you still want to avoid using XML-based classes to represent the underlying 'game', or is there a point where you would 'give it' to the similarity and use existing XML structures directly?
    Thank you for any advice
    Greg

  • Not able to get the pagebutton bar bean object in the extended controller

    Hi All,
    I am not able to get the button bean object in my page. But, am not able to get the handle of buttonbar itself. any idea?
    Page Structure is:
    PageLayout - not having controller
    ----buttonbar
    ---button1
    ---submitbutton2
    ----regiion1(stack layout)-controller assigned(seededCO)
    I am extending the seededCO and I am trying to get the handle of button1 bean with the following code.
    OAPageButtonBarBean pbb=(OAPageButtonBarBean)webBean.findIndexedChildRecursive("buttonBar");
    if(pbb!=null)
    System.out.println("pbb"+pbb);
    bb= (OAButtonBean)pbb.findIndexedChildRecursive("button1");
    }

    Hi,
    Try like this,
    import oracle.apps.fnd.framework.webui.beans.nav.OAPageButtonBarBean;
    import oracle.apps.fnd.framework.webui.beans.nav.OAButtonBean;
    OAPageButtonBarBean pBar =
    (OAPageButtonBarBean)pageContext.getPageLayoutBean().getPageButtons();
    OAButtonBean ctButton =
    (OAButtonBean)pBar.findIndexedChildRecursive("YourRequiredButtonName");
    Thanks,
    With regards,
    Kali.
    OSSi.

  • How to rebind a bean object programmatically in EJB 3.0

    hi,
    There is a bean object (EJB 3.0) which i want to rebind. How can I do it through another application running under same netweaver server.
    For eg, 
          one session bean object is bound to "java:comp/env/Converter" jndi name by one application. Here, i need to modify this object and rebind to the same jndi name. so i used as follows,
       context.rebind("java:comp/env/converter", beanobj );
       //'beanobj' is the modified bean (modified attribute's value)
    it was bound successfully, but when i look up the bean object, i got the ClassCastException,
    like "java.lang.ClassCastException : $Proxy5_1001 at ......"
    can anybody help me?
    regards,
    Panneer.

    @Vladimir Pavlov
    I did not understand what you are trying to convey...
    Whenever an attribute of this bean is modified we want to access that latest value.... Is there any way to know, when the attribute is modified? Just with get/set we can not know, when it is modified... am i right?
    We want to achieve this without modifying the existing source code of the EJB....
    @ Ivo Simeonov
    As of my knowledge, to use interceptors we need to modify the EJB source code, but we do not want to touch the source code....
    All this has to be achieved dynamically when the application is deployed in the production.... is it possible???

Maybe you are looking for