I am having an issue trying to unmarshal some SOAP data from an XML file.  So far I have created a mapping file and I have set the setIgnoreExtraElements to true.  I am getting the following error: "The class for the root element 'Envelope' could not be found."
 
Here is the xml:
 
<?xml version="1.0"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
<SOAP-ENV:Header/>
<SOAP-ENV:Body>
<GET__CompIntfc__RC_CASE_SW_CIResponse xmlns="http://psfttemp.org">
<MARKET_0>GBL</MARKET_0>
<EXTENSION/>
<RC_BU_DESCR>Enterprise Resource Planning</RC_BU_DESCR>
<BO_ID>100063040</BO_ID>
<ROLE_TYPE_ID>8</ROLE_TYPE_ID>
</GET__CompIntfc__RC_CASE_SW_CIResponse>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
 
My mapping file looks like:
 
<?xml version="1.0" encoding="UTF-8"?>
<mapping>
    <class name="net.usi.oasis.crm.Case.USiPeopleSoftCase" auto-complete="true">
        <description>Default mapping for class net.usi.oasis.crm.Case.USiPeopleSoftCase</description>
        <map-to xml="USiPeopleSoftCase"/>
        <field name="caseID" type="integer" required="true"
            direct="false" transient="false">
            <bind-xml name="BO_ID" node="element" reference="false"/>
        </field>
        <field name="customerRoleTypeID" type="integer" required="true"
            direct="false" transient="false">
            <bind-xml name="ROLE_TYPE_ID" node="element" reference="false"/>
        </field>
    </class>
</mapping>
 
and my code is as follows:
 
              mapping.loadMapping( "C:/development/java/USiMaven/ps_case/src/main/java/net/usi/oasis/crm/USiPeopleSoftMap.xml" );
 
              Unmarshaller unmar = new Unmarshaller(mapping);
              unmar.setIgnoreExtraElements(true);
              unmar.setValidation(false);
              retCase = (IntCase)unmar.unmarshal(new InputSource(element.asXML()));
I am not sure why I am getting this error.  Any help would be greatly appreciated....
 
Jay Stuart


Reply via email to