Castor XML mapping problems

I am using Castor to bind XML to Java objects. I am using a mapping file.
My XML file consists of a lot of namespaces.
How can i specify these namespaces in the mapping file?
Thanks in advance

Please do not reply to this post as it has been repeated. Actually yesterday I was clicking on 'post' button many times yet the page didnt get redirected to the list. So I felt that the topic has to be posted today.
Sorry for the undue trouble

Similar Messages

  • Problem with castor xml mapping

    Hi,
    we have following problem with castor xml mapping.
    How to use references in the collections(Hashmap or vector)?
    WE have a method called getAttribute map which will return a hashmap consist different type of objects. We want to keep only the
    references of objects if that object occurs more than once,instead of keeping the whole object
    Following is the the xml mapping file.
    <mapping>
    <class name="com.opvista.ndtool.core.mos.ManagedObject" identity="Id" auto-complete="false" verify-constructable="false">
    <map-to xml="ManagedObject"/>
    <field name="Id" get-method="getId" set-method="setId" type="string">
    <bind-xml name="Id" node="attribute"/>
    </field>
    <field name="AttributeMap" type="org.exolab.castor.mapping.MapItem" collection="map" get-method="getAttributeMap">
    <bind-xml name="AttributeMap" node="element">
         <class name="org.exolab.castor.mapping.MapItem">
    <field name="key" type="java.lang.Object">
         <bind-xml name="key" node="attribute"/>
    </field>
    <field name="value" type="java.lang.Object">
         <bind-xml name="value" node="element" reference="true"/>
         </field>
    </class>
         </bind-xml>
    </field>
    </class>
    </mapping>
    we are using reference=true for the values. But it will throw below exception.
    Unable to resolve ID for instance of class 'java.lang.String' due to the following error: Unable to resolve ClassDescriptor.
         at org.exolab.castor.xml.Marshaller.getObjectID(Marshaller.java:1988)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1628)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1831)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1814)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:1825)
         at org.exolab.castor.xml.Marshaller.marshal(Marshaller.java:821)
    Please help us to overcome from this problem?
    Thanks,
    Dileep

    for your ref here is what i think the basic mapping file would look like
    <class name="Person">
    <map-to xml="person"/>
    <field name="name" type="string">
    <bind-xml name="name" node="attribute" />
    </field>
    <field name="age" type="string">
    <bind-xml name="age" node="attribute" />
    </field>
    </class>
    <class name="MetaPerson">
    <map-to xml="person"/>
    <field name="dependents" type="string">
    <bind-xml name="dependents" node="attribute" />
    </field>
    <field name="presentAdd" type="string">
    <bind-xml name="present_add " node="attribute" />
    </field>
    <field name="permanentAdd" type="string">
    <bind-xml name="permanent_add " node="attribute" />
    </field>
    </class>
    however i am still not clear as to how i can use the metaperson object in the person class as well as in the mapping file.
    hope this gives a better idea abt my problem statement.
    Please help me out

  • Castor XML mapping

    I am using and XML and trying to map to a class. I do not want to fit all the fields in XML to fields in java class.
    For example: I have fields field1, field2, field3 in XML. But my java class wants only field1 and field2 and NOT field3. How do I do it. I want to ignore field3.
    Mapping map = new Mapping();
    map.loadMapping("mapping.xml");
    Reader reader = new FileReader("abc.xml");
    Unmarshaller unmarshaller = new Unmarshaller(map);
    ABCClass read = (ABCClass)unmarshaller.unmarshal(reader);
    System.out.println(read);
    Getting error: unable to find FieldDescriptor for field3' in ClassDescriptor of ABC-Class
    Above error looks very logical. I don't want to check java class for all the tags/fields in XML doc,
    I guess this is a general requirement in many cases and simple to solve.
    Thanks

    hi, I'm also having an error message stated like this
    unable to find FieldDescriptor for 'ope-act-code' in ClassDescriptor of tireoperation-bean{file: [not available]; line: 1; column: 6551}
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:707)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.importWareFile(ImportWareFileManagementProcess.java:57)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.getImpWareRefBean(ImportWareFileManagementProcess.java:104)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.processImpWareRef(ImportWareFileManagementProcess.java:94)
         at com.michelin.npc.rcp.shipment.actions.ShipmentImportFileAction.executeAction(ShipmentImportFileAction.java:34)
         at com.michelin.xnet.rcp.actions.XnetAction.run(XnetAction.java:54)
         at com.michelin.xnet.rcp.actions.XnetAction.run(XnetAction.java:46)
         at com.michelin.npc.rcp.shipment.wizards.ShipmentImportFileWizard$1.run(ShipmentImportFileWizard.java:35)
         at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
         at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
         at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851)
         at com.michelin.npc.rcp.shipment.wizards.ShipmentImportFileWizard.performFinish(ShipmentImportFileWizard.java:26)
         at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
         at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
         at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at com.michelin.xrcp.desktop.internal.Application.run(Application.java:40)
         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
         at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
         at org.eclipse.core.launcher.Main.run(Main.java:977)
         at org.eclipse.core.launcher.Main.main(Main.java:952)
    Caused by: org.xml.sax.SAXException: unable to find FieldDescriptor for 'ope-act-code' in ClassDescriptor of tireoperation-bean
         at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1933)
         at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1375)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:693)
         ... 37 more
    Caused by: org.xml.sax.SAXException: unable to find FieldDescriptor for 'ope-act-code' in ClassDescriptor of tireoperation-bean
         at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1933)
         at org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1375)
         at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl$FragmentContentDispatcher.dispatch(Unknown Source)
         at org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source)
         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.DTDConfiguration.parse(Unknown Source)
         at org.apache.xerces.parsers.XMLParser.parse(Unknown Source)
         at org.apache.xerces.parsers.AbstractSAXParser.parse(Unknown Source)
         at org.exolab.castor.xml.Unmarshaller.unmarshal(Unmarshaller.java:693)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.importWareFile(ImportWareFileManagementProcess.java:57)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.getImpWareRefBean(ImportWareFileManagementProcess.java:104)
         at com.michelin.npc.shipment.bp.ImportWareFileManagementProcess.processImpWareRef(ImportWareFileManagementProcess.java:94)
         at com.michelin.npc.rcp.shipment.actions.ShipmentImportFileAction.executeAction(ShipmentImportFileAction.java:34)
         at com.michelin.xnet.rcp.actions.XnetAction.run(XnetAction.java:54)
         at com.michelin.xnet.rcp.actions.XnetAction.run(XnetAction.java:46)
         at com.michelin.npc.rcp.shipment.wizards.ShipmentImportFileWizard$1.run(ShipmentImportFileWizard.java:35)
         at org.eclipse.jface.operation.ModalContext.runInCurrentThread(ModalContext.java:369)
         at org.eclipse.jface.operation.ModalContext.run(ModalContext.java:313)
         at org.eclipse.jface.wizard.WizardDialog.run(WizardDialog.java:851)
         at com.michelin.npc.rcp.shipment.wizards.ShipmentImportFileWizard.performFinish(ShipmentImportFileWizard.java:26)
         at org.eclipse.jface.wizard.WizardDialog.finishPressed(WizardDialog.java:680)
         at org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDialog.java:355)
         at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.java:660)
         at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:90)
         at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
         at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:928)
         at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3348)
         at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:2968)
         at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:1914)
         at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
         at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:419)
         at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
         at com.michelin.xrcp.desktop.internal.Application.run(Application.java:40)
         at org.eclipse.core.internal.runtime.PlatformActivator$1.run(PlatformActivator.java:78)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:92)
         at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:68)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:400)
         at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:177)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336)
         at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
         at org.eclipse.core.launcher.Main.run(Main.java:977)
         at org.eclipse.core.launcher.Main.main(Main.java:952)
    and my mapping xml is like this.
    <?xml version="1.0"?>
    <!DOCTYPE mapping PUBLIC "-//EXOLAB/Castor Object Mapping DTD Version 1.0//EN" "http://castor.exolab.org/mapping.dtd">
    <mapping>
         <!-- MAIN start -->
    <class name="com.michelin.npc.shipment.bo.ImpWareFileBean">
         <map-to xml="EXPORT_WAREHOUSE"/>      
         <field name="impWareReferential"
    type="com.michelin.npc.shipment.bo.ImpWareFileReferentialBean">
    <bind-xml name="REFERENTIAL"/>
    </field>
    <field name="impWareShipment"
    type="com.michelin.npc.shipment.bo.ImpWareFileShipmentBean">
    <bind-xml name="SHIPMENT"/>
    </field>
    </class>
    <!-- MAIN end -->
    <!-- REFERENTIAL begin -->
    <class name="com.michelin.npc.shipment.bo.ImpWareFileReferentialBean">
         <field name="tireStates"
    type="com.michelin.npc.tirestate.bo.TirestateBean"
    collection="collection">
    <bind-xml name="TB_REF_TIRESTATE"/>
    </field>
         <field name="tireFittings"
    type="com.michelin.npc.tirefitting.bo.TirefittingBean"
    collection="collection">
    <bind-xml name="TB_REF_TIREFITTING"/>
    </field>
         <field name="tireOperations"
    type="com.michelin.npc.tireoperation.bo.TireoperationBean"
    collection="collection">
    <bind-xml name="TB_REF_TIREOPERATION"/>
    </field>
         <field name="places"
    type="com.michelin.npc.place.bo.PlaceBean"
    collection="collection">
    <bind-xml name="TB_REF_PLACE"/>
    </field>
         <field name="dtoCategories"
    type="com.michelin.npc.dtocategory.bo.DtocategoryBean"
    collection="collection">
    <bind-xml name="TB_REF_DTOCATEGORY"/>
    </field>
         <field name="dtoFamilies"
    type="com.michelin.npc.dtofamily.bo.DtofamilyBean"
    collection="collection">
    <bind-xml name="TB_REF_DTOFAMILY"/>
    </field>
         <field name="groups"
    type="com.michelin.npc.group.bo.GroupBean"
    collection="collection">
    <bind-xml name="TB_REF_GROUP"/>
    </field>
         <field name="activities"
    type="com.michelin.npc.activity.bo.ActivityBean"
    collection="collection">
    <bind-xml name="TB_REF_ACTIVITY"/>
    </field>
         <field name="parameters"
    type="com.michelin.npc.parameter.bo.ParameterBean"
    collection="collection">
    <bind-xml name="TB_REF_PARAMETER"/>
    </field>
    </class>
         <class name="com.michelin.npc.tirestate.bo.TirestateBean">
              <field name="actCode" type="java.lang.String" >
                   <bind-xml name="STATE_ACT_CODE" node="attribute" />
              </field>
              <field name="stateCode" type="java.lang.String" >
                   <bind-xml name="STATE_CODE" node="attribute" />
              </field>
              <field name="stateName" type="java.lang.String" >
                   <bind-xml name="STATE_NAME" type="varchar" />
              </field>
              <field name="stateLlStock" type="java.lang.String" >
                   <bind-xml name="STATE_LL_STOCK" type="varchar" />
              </field>
              <field name="stateConsup" type="java.lang.String" >
                   <bind-xml name="STATE_CONSUP" type="varchar" />
              </field>
              <field name="stateStockShown" type="java.lang.String" >
                   <bind-xml name="STATE_STOCK_SHOWN" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.tirefitting.bo.TirefittingBean">
              <field name="actCode" type="java.lang.String" >
                   <bind-xml name="FIT_ACT_CODE" node="attribute" />
              </field>
              <field name="fitCode" type="java.lang.String" >
                   <bind-xml name="FIT_CODE" type="varchar" />
              </field>
              <field name="fitName" type="java.lang.String" >
                   <bind-xml name="FIT_NAME" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.tireoperation.bo.TireoperationBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="OPE_ACT_CODE" node="attribute" />
              </field>
              <field name="opeCode" type="java.lang.String" >
                   <sql name="OPE_CODE" type="varchar" />
              </field>
              <field name="opeName" type="java.lang.String" >
                   <sql name="OPE_NAME" type="varchar" />
              </field>
         </class>     
         <class name="com.michelin.npc.place.bo.PlaceBean">
              <field name="plCode" type="java.lang.String" >
                   <sql name="PL_CODE" node="attribute" />
              </field>
              <field name="plName" type="java.lang.String" >
                   <sql name="PL_NAME" type="varchar" />
              </field>
              <field name="plWareh" type="java.lang.String" >
                   <sql name="PL_WAREH" type="varchar" />
              </field>
              <field name="plInvoice" type="java.lang.String" >
                   <sql name="PL_INVOICE" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.dtocategory.bo.DtocategoryBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="CAT_ACT_CODE" node="attribute" />
              </field>
              <field name="catCode" type="java.lang.String" >
                   <sql name="CAT_CODE" type="varchar" />
              </field>
              <field name="catName" type="java.lang.String" >
                   <sql name="CAT_NAME" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.dtofamily.bo.DtofamilyBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="FAM_ACT_CODE" node="attribute"/>
              </field>
              <field name="famCode" type="java.lang.String" >
                   <sql name="FAM_CODE" type="varchar" />
              </field>
              <field name="famName" type="java.lang.String" >
                   <sql name="FAM_NAME" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.group.bo.GroupBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="GR_ACT_NUM" node="attribute" />
              </field>
              <field name="grNum" type="java.math.BigDecimal" >
                   <sql name="GR_NUM" type="decimal" />
              </field>
              <field name="grQtyMax" type="java.math.BigDecimal" >
                   <sql name="GR_QTY_MAX" type="decimal" />
              </field>
              <field name="grDtoMax" type="java.math.BigDecimal" >
                   <sql name="GR_DTO_MAX" type="decimal" />
              </field>
              <field name="grComment" type="java.lang.String" >
                   <sql name="GR_COMMENT" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.activity.bo.ActivityBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="ACT_CODE" node="attribute"/>
              </field>
              <field name="actName" type="java.lang.String" >
                   <sql name="ACT_NAME" type="varchar" />
              </field>
              <field name="actUnity" type="java.lang.String" >
                   <sql name="ACT_UNITY" type="varchar" />
              </field>
              <field name="actInvoicing" type="java.lang.String" >
                   <sql name="ACT_INVOICING" type="varchar" />
              </field>
              <field name="actWallpaper" type="java.lang.String" >
                   <sql name="ACT_WALLPAPER" type="varchar" />
              </field>
              <field name="actLogo" type="java.lang.String" >
                   <sql name="ACT_LOGO" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.parameter.bo.ParameterBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="PAR_ACT_CODE" node="attribute"/>
              </field>
              <field name="parCode" type="java.lang.String" >
                   <sql name="PAR_CODE" type="varchar" />
              </field>
              <field name="parValue" type="java.lang.String" >
                   <sql name="PAR_VALUE" type="varchar" />
              </field>
              <field name="parName" type="java.lang.String" >
                   <sql name="PAR_NAME" type="varchar" />
              </field>
         </class>
         <!-- REFERENTIAL end -->
    <!-- SHIPMENT begin -->     
    <class name="com.michelin.npc.shipment.bo.ImpWareFileShipmentBean">
         <field name="shipment"
    type="com.michelin.npc.shipment.bo.ShipmentBean">
    <bind-xml name="TB_TRN_SHIPMENT"/>
    </field>
         <field name="grMakes"
    type="com.michelin.npc.grmake.bo.GrMakeBean"
    collection="collection">
    <bind-xml name="TB_TRN_GR_MAKE"/>
    </field>
         <field name="packingList"
    type="com.michelin.npc.packinglist.bo.PackinglistBean"
    collection="collection">
    <bind-xml name="TB_TRN_PACKINGLIST"/>
    </field>
         <field name="tires"
    type="com.michelin.npc.tire.bo.TireBean"
    collection="collection">
    <bind-xml name="TB_TRN_TIRE"/>
    </field>
         <field name="dtos"
    type="com.michelin.npc.dto.bo.DtoBean"
    collection="collection">
    <bind-xml name="TB_TRN_DTO"/>
    </field>
         <field name="cqs"
    type="com.michelin.npc.cq.bo.CqBean"
    collection="collection">
    <bind-xml name="TB_TRN_CQ"/>
    </field>
         <field name="traceability"
    type="com.michelin.npc.traceability.bo.TraceabilityBean"
    collection="collection">
    <bind-xml name="TB_TRN_TRACEABILITY"/>
    </field>
    </class>
         <class name="com.michelin.npc.shipment.bo.ShipmentBean" >
              <field name="shipAutoNum" type="java.math.BigDecimal" >
                   <bind-xml name="SHIP_AUTO_NUM" node="attribute" />
              </field>
              <field name="actCode" type="java.lang.String" >
                   <bind-xml name="SHIP_ACT_CODE" type="varchar" />
              </field>
              <field name="plCodeShipper" type="java.lang.String" >
                   <bind-xml name="SHIP_PL_CODE_SHIPPER" type="varchar" />
              </field>
              <field name="plCodeDest" type="java.lang.String" >
                   <bind-xml name="SHIP_PL_CODE_DEST" type="varchar" />
              </field>
              <field name="shipEventDate" type="java.util.Date" >
                   <bind-xml name="SHIP_EVENT_DATE" type="timestamp" />
              </field>
              <field name="shipName" type="java.lang.String" >
                   <bind-xml name="SHIP_NAME" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.grmake.bo.GrMakeBean">
              <field name="grNum" type="java.math.BigDecimal" >
                   <sql name="GRM_GR_NUM" type="decimal" />
              </field>
              <field name="actCode" type="java.lang.String" >
                   <sql name="GRM_ACT_CODE" type="varchar" />
              </field>
              <field name="shipAutoNum" type="java.math.BigDecimal" >
                   <sql name="GRM_SHIP_NUM" type="decimal" />
              </field>
         </class>
         <class name="com.michelin.npc.packinglist.bo.PackinglistBean">
              <field name="shipAutoNum" type="java.math.BigDecimal" >
                   <sql name="PL_SHIP_NUM" type="decimal" />
              </field>
              <field name="plAutoNum" type="java.math.BigDecimal" >
                   <sql name="PL_AUTO_NUM" type="decimal" />
              </field>
              <field name="plName" type="java.lang.String" >
                   <sql name="PL_NAME" type="varchar" />
              </field>
              <field name="plDate" type="java.util.Date" >
                   <sql name="PL_DATE" type="timestamp" />
              </field>
              <field name="plCarrier" type="java.lang.String" >
                   <sql name="PL_CARRIER" type="varchar" />
              </field>
              <field name="plVehicle" type="java.lang.String" >
                   <sql name="PL_VEHICLE" type="varchar" />
              </field>
              <field name="plSent" type="java.lang.String" >
                   <sql name="PL_SENT" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.tire.bo.TireBean">
              <field name="actCode" type="java.lang.String" >
                   <sql name="TIRE_ACT_CODE" type="varchar" />
              </field>
              <field name="grNum" type="java.math.BigDecimal" >
                   <sql name="TIRE_GR_NUM" type="decimal" />
              </field>
              <field name="plCodeConsup" type="java.lang.String" >
                   <sql name="TIRE_PLA_CODE_CONSUP" type="varchar" />
              </field>
              <field name="plCode" type="java.lang.String" >
                   <sql name="TIRE_PL_CODE" type="varchar" />
              </field>
              <field name="fitCodeConsup" type="java.lang.String" >
                   <sql name="TIRE_FIT_CODE_CONSUP" type="varchar" />
              </field>
              <field name="fitCode" type="java.lang.String" >
                   <sql name="TIRE_FIT_CODE" type="varchar" />
              </field>
              <field name="opeCode" type="java.lang.String" >
                   <sql name="TIRE_OPE_CODE" type="varchar" />
              </field>
              <field name="stateCode" type="java.lang.String" >
                   <sql name="TIRE_STATE_CODE" type="varchar" />
              </field>
              <field name="boxNum" type="java.lang.String" >
                   <sql name="TIRE_BOX_CODE" type="varchar" />
              </field>
              <field name="dtoNumOrig" type="java.lang.String" >
                   <sql name="TIRE_DTO_NUM_ORIGIN" type="varchar" />
              </field>
              <field name="dtoNum" type="java.lang.String" >
                   <sql name="TIRE_DTO_NUM" type="varchar" />
              </field>
              <field name="llAutoNum" type="java.math.BigDecimal" >
                   <sql name="TIRE_LL_NUM" type="decimal" />
              </field>
              <field name="plAutoNum" type="java.math.BigDecimal" >
                   <sql name="TIRE_PL_NUM" type="decimal" />
              </field>
              <field name="shipAutoNum" type="java.math.BigDecimal" >
                   <sql name="TIRE_SHIP_NUM" type="decimal" />
              </field>
              <field name="tireCab" type="java.lang.String" >
                   <sql name="TIRE_CAB" type="varchar" />
              </field>
              <field name="tireMat" type="java.lang.String" >
                   <sql name="TIRE_MAT" type="varchar" />
              </field>
              <field name="tireFia" type="java.lang.String" >
                   <sql name="TIRE_FIA" type="varchar" />
              </field>
              <field name="tireSituation" type="java.lang.String" >
                   <sql name="TIRE_SITUATION" type="varchar" />
              </field>
              <field name="tireWeight" type="java.math.BigDecimal" >
                   <sql name="TIRE_WEIGHT" type="decimal" />
              </field>
              <field name="tireDateManu" type="java.util.Date" >
                   <sql name="TIRE_DATE_MANU" type="timestamp" />
              </field>
              <field name="tireLastUpdate" type="java.util.Date" >
                   <sql name="TIRE_LAST_UPDATE" type="timestamp" />
              </field>
              <field name="tireNbFitting" type="java.math.BigDecimal" >
                   <sql name="TIRE_NB_FITTING" type="decimal" />
              </field>
              <field name="tireDateConsup" type="java.util.Date" >
                   <sql name="TIRE_DATE_CONSUP" type="timestamp" />
              </field>
         </class>
         <class name="com.michelin.npc.dto.bo.DtoBean">
              <field name="caiCode" type="java.lang.String" >
                   <sql name="DTO_CAI_CODE" type="varchar" />
              </field>
              <field name="catCode" type="java.lang.String" >
                   <sql name="DTO_CAT_CODE" type="varchar" />
              </field>
              <field name="actCode" type="java.lang.String" >
                   <sql name="DTO_ACT_CODE" type="varchar" />
              </field>
              <field name="famCode" type="java.lang.String" >
                   <sql name="DTO_FAM_CODE" type="varchar" />
              </field>
              <field name="dtoNum" type="java.lang.String" >
                   <sql name="DTO_NUM" type="varchar" />
              </field>
              <field name="dtoDimension" type="java.lang.String" >
                   <sql name="DTO_DIMENSION" type="varchar" />
              </field>
              <field name="dtoFR" type="java.lang.String" >
                   <sql name="DTO_F_R" type="varchar" />
              </field>
              <field name="dtoLR" type="java.lang.String" >
                   <sql name="DTO_L_R" type="varchar" />
              </field>
              <field name="dtoCb" type="java.lang.String" >
                   <sql name="DTO_CB" type="varchar" />
              </field>
              <field name="dtoCbl" type="java.lang.String" >
                   <sql name="DTO_CBL" type="varchar" />
              </field>
              <field name="dtoLpc" type="java.lang.String" >
                   <sql name="DTO_LPC" type="varchar" />
              </field>
              <field name="dtoLimitedProd" type="java.lang.String" >
                   <sql name="DTO_LIMITED_PROD" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.cq.bo.CqBean">
              <field name="tireCab" type="java.lang.String" >
                   <sql name="CQ_CAB" type="varchar" />
              </field>
              <field name="cqCode" type="java.lang.String" >
                   <sql name="CQ_CODE" type="varchar" />
              </field>
              <field name="cqDate" type="java.util.Date" >
                   <sql name="CQ_DATE" type="timestamp" />
              </field>
              <field name="cqClassification" type="java.lang.String" >
                   <sql name="CQ_CLASSIFICATION" type="varchar" />
              </field>
              <field name="cqCote" type="java.lang.String" >
                   <sql name="CQ_COTE" type="varchar" />
              </field>
         </class>
         <class name="com.michelin.npc.traceability.bo.TraceabilityBean">
              <field name="tireCab" type="java.lang.String" >
                   <sql name="TRA_CAB" type="varchar" />
              </field>
              <field name="traDate" type="java.util.Date" >
                   <sql name="TRA_DATE" type="timestamp" />
              </field>
              <field name="traCode" type="java.lang.String" >
                   <sql name="TRA_CODE" type="varchar" />
              </field>
              <field name="traMat" type="java.lang.String" >
                   <sql name="TRA_MAT" type="varchar" />
              </field>
              <field name="traFia" type="java.lang.String" >
                   <sql name="TRA_FIA" type="varchar" />
              </field>
              <field name="traDtoNum" type="java.lang.String" >
                   <sql name="TRA_DTO_NUM" type="varchar" />
              </field>
              <field name="traPlCode" type="java.lang.String" >
                   <sql name="TRA_PL_CODE" type="varchar" />
              </field>
              <field name="traValue" type="java.lang.String" >
                   <sql name="TRA_VALUE" type="varchar" />
              </field>
              <field name="traGrNum" type="java.math.BigDecimal" >
                   <sql name="TRA_GR_NUM" type="decimal" />
              </field>
              <field name="traPlNum" type="java.math.BigDecimal" >
                   <sql name="TRA_PL_NUM" type="decimal" />
              </field>
              <field name="traLlNum" type="java.math.BigDecimal" >
                   <sql name="TRA_LL_NUM" type="decimal" />
              </field>
              <field name="traShipDate" type="java.util.Date" >
                   <sql name="TRA_SHIP_DATE" type="timestamp" />
              </field>
              <field name="traShipPlCodeDest" type="java.lang.String" >
                   <sql name="TRA_SHIP_PL_CODE_DEST" type="varchar" />
              </field>
              <field name="traUsrIdent" type="java.lang.String" >
                   <sql name="TRA_USR_IDENT" type="varchar" />
              </field>
              <field name="traActCode" type="java.lang.String" >
                   <sql name="TRA_ACT_CODE" type="varchar" />
              </field>
         </class>
    <!-- SHIPMENT end -->               
    </mapping>
    could anyone help me out here.

  • Excel XML map problem with Greek characters.

    Hi,
    I created a dashboard with XML map connetion. My embeded spreadsheet is linked to an xml file which contains my TOP 50 Customers.
    Customers names are in Greek so my xml Header is like:
    <?xml version="1.0" encoding="ISO-8859-7"?>
    ISO-8859-7 is the Greek encoding for xml.
    After embeding the spreadsheet into the dashboard i add a list component to present my TOP 50 Customers.
    So far so good.
    Then i add a refresh conection button to update my TOP 50 list. In preview mode everythinng works fine. But when i try to update my data by clicking the refresh button my list is updated but the customers names is turned to unidentified characters.
    Is there any encoding problem or this is Xcelsius issue?
    I use Xcelsius 2008 sp3 fp 3.2

    You are right.
    I opened the XML file with notepad and saved it with utf-8 encode, also changed the xml tag to <?xml version="1.0" encoding="UTF-8"?> and it worked fine.
    I map it in Excel Spreadsheet without problems and after refreshing in Xcelsius the characters are diplayed normaly.
    So, correct me if i am wrong, the problem is the file encoding, no the xml encoding.
    Both, file and xml encoding should be UTF-8.
    As i mentioned before my xml files are Crystal Report 2008 reports which are exported as text files with .xml extension, so i have to look for answers in other forum.
    thank you

  • Excel XML map problem with numbers.

    Hi Xcelsius gurus,
    Once again i need your help.
    I use Excel XML maps to get data into my embedded spreadsheet, my data are current year sales per month like below:
    115.450,36
    220.336,20
    189.222,56
    200.005,48
    just numbers.
    After inserting the xml data i am not able to use them. No chart, No list, No gause can present my data. Like there is no data.
    I realised that after mapping the XML, spreadsheet's cells showing an error, when i click on error icon there is an option to convert data to number, that fix the problem.
    What could i do to solve this issue? Is there any problem with my XML file?
    Pease help me with this one, i am confused.

    Hi:
       what is your xml file format?
       you can try some ordinary xml format instead, here is a example:
       <?xml version="1.0" encoding="ISO-8859-1"?>
    <bookstore>
    <book catalog="Programming">
    <title lang="en">C++ Programming Language</title>
    <author>Bjarne Stroustrup</author>
    <year>998</year>
    <price>198.0</price>
    </book>
    <book catalog="Networking">
    <title lang="en">TCP/IP Illustrated</title>
    <author>Richard Stevens</author>
    <year>1996</year>
    <price>156.0</price>
    </book>
    </bookstore>

  • Excel XML Maps Problem

    When I import a Excel 2003 XLS file with a Excel 2003 XML map defined I can see the data update if I use the refresh buttom on the spreadsheet pane of Xcelsius 2008 but nothing happens when I export the file as a SWF no matter what I set the refresh properties to?
    Also when I bring up the Data > Connections Menu and try to ADD <Excel XML Maps> I do not get a dialog box on the right?  The <Excel XML Maps> shows as an Existing Connection but does no show any information in the right panel?
    Hope someone can help!
    Tom Ebert

    Thanks guys for your responces.
    Here is what I learned.  Xcelsius 2008 does indeed supports Web Services.  When I was exporting my Excel spreadsheets as XML and trying to refer to it in my SWF file it seems that the Excel XML file does not have the required mapping / schema.
    Soooooooo I'm going to work with a friend who actuall understands Web Services and XML.
    Thanks again for your reply...te

  • Flat File to XML mapping Problem

    I am facing some issues in mapping from flat file to XML. I have not reached to the stage of actually executing the scenario and the problem has not advanced beyond mapping tests.
    Following are structures of inbound flat file (as specified in content conversion parameters of sender adapter)
    Document Name     &#61664;     MMADealerStatementInbound_MT
    Recordset Name     &#61664;     MMADealerStmtInbound_Type
    Recordset Structure &#61664;
    BatchHeader,1,DealerHeader1,,DealerHeader2,,DealerDetail,,DealerAgeing,,Trailer,1
    Recordset Sequence &#61664;          Ascending
    Key Field Name     &#61664;     RecordType
    Key Field Type          &#61664;     String (Case Sensitive)
    Following are structures of Outbound XML file needed
    All DealerDetail nodes are lumped together in first DealerStmt nodes. They need to be distributed across many DealerStmt nodes.
    Company          CompanyName                    25
    Company          CompanyAddress          StreetAddress     Company Street Address     50
    Company          CompanyAddress          City     Company City     40
    Company          CompanyAddress          State     Company State     3
    Company          CompanyAddress          ZIP     Company ZIP     10
    Company          CompanyAddress          Country     Company Country     3
    Company          RunParams          RunDate     Statement Run date     8
    Company          RunParams          StmtPeriod     Statement Period     20
    DealerStmt     0-unbounded     DealerNumber                    10
    DealerStmt     0-unbounded     DealerName                    35
    DealerStmt     0-unbounded     DealerAddress          StreetAddress     Dealer Street Address     50
    DealerStmt     0-unbounded     DealerAddress          City     Dealer City     40
    DealerStmt     0-unbounded     DealerAddress          State     Dealer State     3
    DealerStmt     0-unbounded     DealerAddress          ZIP     Dealer ZIP     10
    DealerStmt     0-unbounded     DealerAddress          Region     Dealer Region     4
    DealerStmt     0-unbounded     DealerRemitToAddress          CompanyName     Company Name     50
    DealerStmt     0-unbounded     DealerRemitToAddress          StreetAddress1     Street Address 1     50
    DealerStmt     0-unbounded     DealerRemitToAddress          StreetAddress2     Street Address 2     50
    DealerStmt     0-unbounded     DealerRemitToAddress          StreetAddress3     Street Address 3     50
    DealerStmt     0-unbounded     DealerDetail     0-unbounded     DocDate     Document Date     8
    DealerStmt     0-unbounded     DealerDetail     0-unbounded     InvoiceNumber     Invoice Number     10
    DealerStmt     0-unbounded     DealerDetail     0-unbounded     TransDescription     Transaction Description     50
    DealerStmt     0-unbounded     DealerDetail     0-unbounded     TransAmount     Transaction Amount     16
    DealerStmt     0-unbounded     DealerDetail     0-unbounded     AmountSign     Amount Sign     1
    DealerStmt     0-unbounded     DealerAgeing          CurrentBal     Current Balance     15
    DealerStmt     0-unbounded     DealerAgeing          Bal1to31days     Balance 1 to 31 Days     15
    DealerStmt     0-unbounded     DealerAgeing          BalOver31     Over 31 days Old     15
    DealerStmt     0-unbounded     DealerAgeing          BalOver61     Over 61 days Old     15
    DealerStmt     0-unbounded     DealerAgeing          BalOver92     Over 92 days Old     15
    DealerStmt     0-unbounded     DealerAgeing          BalOver123     Over 123 days Old     15
    Trailer          DealersCount                    5
    Trailer          TransCount                    10
    Trailer          TotalAmount                    20
    Here is the mapping I used for this node.
    /ns0:MMADealerStatementOutbound_MT/MMADealerStmtOutbound_Type/DealerStmt/DealerDetail=ifWithoutElse(stringEquals(/ns0:MMADealerStatementInbound_MT/MMADealerStmtInbound_Type/DealerDetail/RecordType=, const()), SplitByValue(/ns0:MMADealerStatementInbound_MT/MMADealerStmtInbound_Type/DealerDetail=))
    My email address is [email protected] and i can send some screen shots to understand better.
    I need help of XI mapping Gurus.
    Thanks
    Rajesh

    HI,
    Possible mention the source Message/Data Type and Target Data Type and Mapping Rules reuired. Then I think it may be useful to give some hints.
    btw , What is the error in Mapping ?
    Regards,
    Moorthy

  • JPA - orm.xml mapping problem.

    Hi folks,
    I am trying to give entity mappings in orm .xml
    Sequence generation tag is not working fine for me.
    its giving me a xml parsing error.
    can some body give me a right combination .
    I want to give automatic generation for a database field which is not the primary key.
    My orm.xml file is given below....
    some body pls help me....
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
              xsi:schemaLocation="http://java.sun.com/xml/ns/persistence/orm orm_1_0.xsd">
    <entity class="com.git.oms.common.entity.ORDReply" name="ORDReply" metadata-complete="false">
         <table name="ORDReply"/>
         <attributes>     
         <basic name="serialNo">
              <column name="SerialNo"/>
              <generated-value generator="ORDREPLY_SEQ" strategy="SEQUENCE"/>
              <sequence-generator name="ORDREPLY_SEQ" sequence-name="ORDREPLY_SEQ" allocation-size="1"/>
         </basic>      
         </attributes>
    </entity-mappings>

    Hi folks,
    I am trying to give entity mappings in orm .xml
    Sequence generation tag is not working fine for me.
    its giving me a xml parsing error.
    can some body give me a right combination .
    I want to give automatic generation for a database
    field which is not the primary key.
    My orm.xml file is given below....
    some body pls help me....
    <?xml version="1.0" encoding="UTF-8"?>
    <entity-mappings version="1.0" xmlns="http://java.sun.com/xml/ns/persistence/orm"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persist
    ence/orm orm_1_0.xsd">
    <entity class="com.git.oms.common.entity.ORDReply" name="ORDReply" metadata-complete="false">
    <table name="ORDReply"/>
    <attributes>
    <basic name="serialNo">
    <column name="SerialNo"/>
    <generated-value generator="ORDREPLY_SEQ" strategy="SEQUENCE"/>
    <sequence-generator name="ORDREPLY_SEQ" sequence-name="ORDREPLY_SEQ" allocation-size="1"/>
    </basic>
    </attributes>
    </entity-mappings>I am not able to configure a sequence for a Id coloumn also.
    Getting some xml parsing error. Some one please help me by giving some sample.
    I am also using same kind of orm.xml and sequence-generator

  • ExcelXML mapping---problem with XML maps in Excel sheet

    Hi Friends,
    I have one issue with ExcelXML mapping in Xcelsius.
    The problem is I have designed one dashboard using ExcelXML mapping and everything is working fine but I was afraid that  I could not able to find the mappings which were embedded in Excel.It happened many times.What I was doing is everytime Im re-mapping.I could be a big problem for me to do this procedire for everytime.How to recover my XML maps into excel sheet.Can anyone please provide the solution to achieve this.

    Shouldnt it be equivalent ? I mean, as far as I know the ns0: shouldnt be a problem
    when you have a namespace in the message then you need to associate it with some prefix....since ns0 (or any other prefix) is not present you are getting the error....having the namespace but not ns0 is the problem.
    XMLAnonymizer bean may help you to add the namespace prefix...

  • Org.exolab.castor.xml.MarshalException:Unable to instantiate java.util.List

    Hi,
    I am using castor to unmarshal an xml into a java object.
    This object has member variables as collections (List).
    Even though in the mapping file I used collections attribute of <field> tag and has set it to arraylist, it is still throwing this exception.
    After doing a bit of research on this,I found that since UnmarshalHandler uses reflection to create object from xml, it is trying to invoke java.util.List.newInstance() which is causing this problem.
    The class which I am trying to unmarshal is an already existing class and I cannot change the type of the member variables to ArrayList from List.
    How can it be resolved?

    The exception trace is as below :
    Caused by: java.lang.InstantiationException: java.util.List() method not
    found
    at
    org.exolab.castor.xml.UnmarshalHandler.createInstance(UnmarshalHandler.java:2584)
    at
    org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:2348)
    at
    org.exolab.castor.xml.UnmarshalHandler.startElement(UnmarshalHandler.java:1436)
    at org.apache.xerces.parsers.AbstractSAXParser.startElement(Unknown
    Source)
    at
    org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown
    Source)

  • List View Bound to XML Map Data

    HI Have a list view that is bound to xml mapped data.  It seems that on connection refresh that new data is not being updated into the SWF.  My Binding is directly onto the cell ranges that are mapped into excel, so on updates the size of the maped table changes/rewrites over the old data.
    When I refresh I am not picking up the newest data in the list view.  Any thoughts on this on how I can fix.
    Regards,
    Mark

    Thank you Ganesh, but I am not on Enterprise edition.  I am successfully bringing in live xml data, however mapping more than one Query result from one xml file is giving my project some problems.  Refreshing a list View I think is causing this issue.  From within my project in design view I can Refresh the data.
    When I publish the file to html/SWF when I refresh other components are refreshing but the list view and one other is not refreshing.....

  • Question about XML mapping to ABAP internal table

    Hi experts.
    I'm trying to XML mapping. But it doesn't work well. Assume there are XML file as below.
    <HEADER>
      <ITEM>
        <FOO>123</FOO>
        <BAR>ABC</BAR>
      </ITEM>
      <ITEM>
        <FOO>456</FOO>
        <BAR>DEF</BAR>
      </ITEM>
    <HEADER>
    and I want to trasformation it as below.
    ITAB
    FOO       |      BAR
    123         |  ABC
    456         | DEF
    How could I trasformation using "call transformation"?
    Regards.

    Hi,
    REPORT  zind_xml_to_sap NO STANDARD PAGE HEADING.
    Data Declaration                                                    *
    DATA: client      TYPE REF TO if_http_client, "Interface
          host        TYPE string,
          port        TYPE string,
          proxy_host  TYPE string,
          proxy_port  TYPE string,
          path        TYPE string,
          scheme      TYPE i,
          xml         TYPE xstring,
          response    TYPE string.
    DATA: t_xml       TYPE smum_xmltb OCCURS 0 WITH HEADER LINE.  "XML Table structure used
                                                                  "for retreive and output XML doc
    DATA: g_stream_factory TYPE REF TO if_ixml_stream_factory.    "Interface
    DATA : return  LIKE  bapiret2 OCCURS 0 WITH HEADER LINE.      "XML Table structure used for retreive
                                                                  "and output XML doc
    Parameters                                                          *
    PARAMETER : p_add TYPE string LOWER CASE ,
                p_dfile   LIKE rlgrap-filename.
    AT Selection-Screen on value-request for file                       *
    AT SELECTION-SCREEN ON VALUE-REQUEST FOR p_dfile.
    Get file
      PERFORM 100_get_file.
    Start-of-Selection                                                  *
    START-OF-SELECTION.
    Perform to upload xml data from URL to SAP internal table
      PERFORM 200_xml_upload.
      IF t_xml[] IS NOT INITIAL.
      Perform to Download data from Internal Table to a text file in local drive
        PERFORM 300_download.
        write : / 'Data Uploaded to Internal Table Successfully'.
        write : / 'XML Data Downloaded to Local path', p_dfile.
      else.
        write : / 'No Data for upload'.
      ENDIF.
    *if t_xml[] is INITIAL.
    WRITE : address, 'Given URl cannot be Converted' .
    else.
    LOOP AT t_xml .
       WRITE:  t_xml-cname, t_xml-cvalue.
    ENDLOOP.
    endif.
    *&      Form  get_file
          Get File
    FORM 100_get_file .
      CALL FUNCTION 'F4_FILENAME'
      EXPORTING
        PROGRAM_NAME        = SYST-CPROG
        DYNPRO_NUMBER       = SYST-DYNNR
        FIELD_NAME          = ' '
       IMPORTING
         file_name           = p_dfile
    ENDFORM.                    " 100_get_file
    *&      Form  200_xml_upload
          form to upload xml data from URL to SAP internal table
    FORM 200_xml_upload .
    *Check HTTP:// and concatenate
      IF p_add NS 'http://' OR p_add NS 'HTTP://'.
        CONCATENATE 'http://' p_add
                    INTO p_add.
      ENDIF.
    Fetching the address of the URL
      CALL METHOD cl_http_client=>create_by_url
        EXPORTING
          url    = p_add
        IMPORTING
          client = client.
    *Structure of HTTP Connection and Dispatch of Data
      client->send( ).
    *Receipt of HTTP Response
      CALL METHOD client->receive
        EXCEPTIONS
          http_communication_failure = 1
          http_invalid_state         = 2
          http_processing_failed     = 3
          OTHERS                     = 4.
      IF sy-subrc <> 0.
        IF sy-subrc = 1.
          MESSAGE 'HTTP COMMUNICATION FAILURE' TYPE 'I' DISPLAY LIKE 'E'.
          EXIT.
        ELSEIF sy-subrc = 2.
          MESSAGE 'HTTP INVALID STATE' TYPE 'I' DISPLAY LIKE 'E'.
          EXIT.
        ELSEIF sy-subrc = 3.
          MESSAGE 'HTTP PROCESSING FAILED' TYPE 'I' DISPLAY LIKE 'E'.
          EXIT.
        ELSE.
          MESSAGE 'Problem in HTTP Request' TYPE 'I' DISPLAY LIKE 'E'.
          EXIT.
        ENDIF.
      ENDIF.
    Get data of the xml to Response
      response = client->response->get_cdata( ).
    *FM converting the XML format to abap
      CALL FUNCTION 'SCMS_STRING_TO_XSTRING'
        EXPORTING
          text   = response
        IMPORTING
          buffer = xml.
    *FM converting XMl to readable format to a internal table.
      CALL FUNCTION 'SMUM_XML_PARSE'
        EXPORTING
          xml_input = xml
        TABLES
          xml_table = t_xml
          return    = return.
    ENDFORM.                    " 200_xml_upload
    *&      Form  300_download
    *form to Download data from Internal Table to a text file in local drive
    FORM 300_download .
      DATA filename TYPE string.
      filename = p_dfile.
      CALL FUNCTION 'GUI_DOWNLOAD'
      EXPORTING
        filename                        = filename
        WRITE_FIELD_SEPARATOR           = 'X'
      TABLES
        data_tab                        = t_xml
    EXCEPTIONS
       FILE_WRITE_ERROR                = 1
       NO_BATCH                        = 2
       GUI_REFUSE_FILETRANSFER         = 3
       INVALID_TYPE                    = 4
       NO_AUTHORITY                    = 5
       UNKNOWN_ERROR                   = 6
       HEADER_NOT_ALLOWED              = 7
       SEPARATOR_NOT_ALLOWED           = 8
       FILESIZE_NOT_ALLOWED            = 9
       HEADER_TOO_LONG                 = 10
       DP_ERROR_CREATE                 = 11
       DP_ERROR_SEND                   = 12
       DP_ERROR_WRITE                  = 13
       UNKNOWN_DP_ERROR                = 14
       ACCESS_DENIED                   = 15
       DP_OUT_OF_MEMORY                = 16
       DISK_FULL                       = 17
       DP_TIMEOUT                      = 18
       FILE_NOT_FOUND                  = 19
       DATAPROVIDER_EXCEPTION          = 20
       CONTROL_FLUSH_ERROR             = 21
       OTHERS                          = 22
      IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.

  • Weird dreamweaver keyboard mapping problem

    weird dreamweaver keyboard mapping problem:
    Hope this solution helps someone out. If you have q's, ask
    and I will try to help.
    I was having a weird problem in dreamweaver... Whenever I was
    in code view and typed "shift+i" to make a capital "I", instead it
    would paste from the clipboard.
    I finally figured out what was happening. I compared the
    menu.xml in my app support folder in the user library to the
    original menu.xml file that was in the application folder. I went
    through until I came across the diff:
    menu.xml in my library/app support folder:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    orig menu.xml file:
    <!-- Windows Navigation Shortcuts -->
    <shortcut key="Cmd+Ins" name="Copy2" platform=""
    command="if (dw.canClipCopy()) { dw.clipCopy() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Copy2" />
    <shortcut key="Shift+Ins" name="Paste2" platform=""
    command="if (dw.canClipPaste()) { dw.clipPaste() }"
    domRequired="FALSE" id="DWShortcuts_HTMLSource_Paste2" />
    <shortcut key="Shift+Del" name="Cut2" platform=""
    command="if (dw.canClipCut()) { dw.clipCut() }" domRequired="FALSE"
    id="DWShortcuts_HTMLSource_Cut2" />
    There was a diff in the "platform=" tags. The orig stated
    [platform="win"], my config stated [platform=""] (nothing in
    between the ""'s). So, I reset the platform tag to be
    [platform="win"] in my settings and then relaunched dreamweaver. It
    fixed the problem.
    Not sure how this occurred, but it works now.

  • JDBC- XI- File Mapping Problem

    Hi everyone,
    I have the mapping problem.  atried a lot of possibilities, but unfortunately nothing helps... JDBC adapter returns (in my case - I'm just selecting SYSDATE from dual) this structure
    <resultset>
    <row>
       <SYSDATE>....</SYSDATE>
    </row>
    </resultset>
    I'm using 2 datatypes:
    a, row (it is called so) which is complextype and consists of subelement SYSDATE, which is string
    Exastly: row->SYSDATE
    b, resultset (it is called so) is complex type which consists of subelement of type row(type a - see above) (and this subelement is also called row) ...and it has of course subelement SYSDATE, which is String (see the data type a above)
    Exactly: resultset->row->SYSDATE
    The data type b is used for the outbound interface in the message coming from the JDBC Adapter, the type a is used for message type sent into the File Adapter
    (exactly: Message1String is the ResutSet Type(b), Message1String2 is the Row(a) type)
    Can somebody help me, what is wrong? I do always get mapping error... :O(
    Thanx, Peter

    So your message type has a different name?
    Take the name of your message type and link this to "document name" of your JDBC adapter configuration.
    Compare the xml output of the JDBC adapter (take this from the SXMB_MONI payload) with the default structure of the mapping (go to the mapping tool, test mode, create a new test and view the xml structure)
    Regards
    Stefan

  • Mapping Problem using hibernate and annotations

    Hi,
    i am German student and new to hibernate. I established a mn conetction between to entities using hbm.xml mapping files. now I try to create the same connection applying annotations. unfortunately it does not work and I do not now why. First my error message followed by my classes and xml's:
    Initial SessionFactory creation failed.org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    Exception in thread "main" java.lang.ExceptionInInitializerError
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:39)
    at services.HibernateUtil.getSessionFactory(HibernateUtil.java:20)
    at test.Test.main(Test.java:20)
    Caused by: org.hibernate.AnnotationException: mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    at org.hibernate.cfg.annotations.CollectionBinder.bindStarToManySecondPass(CollectionBinder.java:552)
    at org.hibernate.cfg.annotations.CollectionBinder$1.secondPass(CollectionBinder.java:517)
    at org.hibernate.cfg.CollectionSecondPass.doSecondPass(CollectionSecondPass.java:43)
    at org.hibernate.cfg.Configuration.secondPassCompile(Configuration.java:1130)
    at org.hibernate.cfg.AnnotationConfiguration.secondPassCompile(AnnotationConfiguration.java:316)
    at org.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:1286)
    at org.hibernate.cfg.AnnotationConfiguration.buildSessionFactory(AnnotationConfiguration.java:915)
    at services.HibernateUtil.sessionFactory(HibernateUtil.java:36)
    ... 2 more
    package domain;
    import java.util.LinkedList;
    import java.util.List;
    import domain.Termin;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "PERSON")
    public class Person {
       private long id;
       private String vorname;
       private String nachname;
       private List<Termin> termine=new LinkedList<Termin>();
       public Person() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getNachname() {
          return nachname;
       public void setNachname(String nachname) {
          this.nachname = nachname;
       public String getVorname() {
          return vorname;
       public void setVorname(String vorname) {
          this.vorname = vorname;
       public void addTermin(Termin termin){
          termine.add(termin);
       @ManyToMany(mappedBy="person")
       public List<Termin> getTermine() {
          return termine;
       public void setTermine(List<Termin> termine) {
          this.termine = termine;
    package domain;
    import java.util.ArrayList;
    import java.util.List;
    import javax.persistence.Entity;
    import javax.persistence.GeneratedValue;
    import javax.persistence.GenerationType;
    import javax.persistence.Id;
    import javax.persistence.ManyToMany;
    import javax.persistence.Table;
    @Entity
    @Table(name = "TERMIN")
    public class Termin {
       private long id;
       private String titel;
       private Person eigentuemer;
       private List<Person> teilnehmer= new ArrayList<Person>();
       public void addTeilnehmer(Person person){
          teilnehmer.add(person);
       @ManyToMany
       public List<Person> getTeilnehmer() {
          return teilnehmer;
       public void setTeilnehmer(List<Person> teilnehmer) {
          this.teilnehmer = teilnehmer;
       public Termin() {
       @Id @GeneratedValue(strategy=GenerationType.AUTO)
       public long getId() {
          return id;
       public void setId(long id) {
          this.id = id;
       public String getTitel() {
          return titel;
       public void setTitel(String titel) {
          this.titel = titel;
       public Person getEigentuemer() {
          return eigentuemer;
       public void setEigentuemer(Person eigentuemer) {
          this.eigentuemer = eigentuemer;
    package test;
    import org.hibernate.Session;
    import org.hibernate.SessionFactory;
    import org.hibernate.Transaction;
    import org.hibernate.cfg.Configuration;
    import org.hibernate.tool.hbm2ddl.SchemaExport;
    import services.HibernateUtil;
    import domain.Person;
    import domain.Termin;
    public class Test {
       public static void main(String[] args) {
          Session session = null;
          HibernateUtil.setRecreateDB(true);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          /*      Person person1 =new Person();
          person1.setNachname("P1");
          Transaction transaction = session.beginTransaction();
          session.save(person1);
          transaction.commit();
          Person person2 =new Person();
          person2.setNachname("P2");
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(person2);
          transaction.commit();
          Termin termin1 =new Termin();
          termin1.setTitel("T1");
          termin1.setEigentuemer(person1);
          termin1.addTeilnehmer(person1);
          termin1.addTeilnehmer(person2);
          session = HibernateUtil.getSessionFactory().getCurrentSession();
          transaction = session.beginTransaction();
          session.save(termin1);
          transaction.commit();
       Termin termin2 =new Termin();
          termin2.setTitel("t2");
          termin2.setEigentuemer(person1);
          termin2.addTeilnehmer(person1);
          termin2.addTeilnehmer(person2);
          transaction = session.beginTransaction();
          session.save(termin2);
          transaction.commit();
          session.close();
    package services;
    import org.hibernate.SessionFactory;
    import org.hibernate.cfg.AnnotationConfiguration;
    import domain.Person;
    import domain.Termin;
    public class HibernateUtil {
       private static boolean recreateDB = false;
       public static void setRecreateDB(boolean recreateDB) {
          HibernateUtil.recreateDB = recreateDB;
       public static SessionFactory getSessionFactory() {
          if (sessionFactory == null) {
             sessionFactory = sessionFactory("hibernate.cfg.xml");
          return sessionFactory;
       private static SessionFactory sessionFactory = null;
       private static SessionFactory sessionFactory(String configurationFileName) {
          try {
             AnnotationConfiguration annotationConfiguration =
                new AnnotationConfiguration()
                .addAnnotatedClass(Person.class)
                .addAnnotatedClass(Termin.class);
             if (recreateDB) annotationConfiguration.setProperty("hibernate.hbm2ddl.auto", "create");
             annotationConfiguration.configure();
             return annotationConfiguration.buildSessionFactory();
          } catch (Throwable ex){
             System.err.println("Initial SessionFactory creation failed." + ex);
             throw new ExceptionInInitializerError(ex);
    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE hibernate-configuration
        PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
        "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
    <hibernate-configuration>
        <session-factory >
          <property name="hibernate.connection.driver_class">org.gjt.mm.mysql.Driver</property>
            <property name="hibernate.connection.password">application</property>
            <property name="hibernate.connection.url">jdbc:mysql://localhost/test</property>
            <property name="hibernate.connection.username">application</property>
            <property name="hibernate.dialect">org.hibernate.dialect.MySQLDialect</property>
           <property name="current_session_context_class">thread</property>
          <property name="hibernate.show_sql">true</property>
        </session-factory>
    </hibernate-configuration>

    The error message is pretty much telling you the problem:
    mappedBy reference an unknown target entity property: domain.Termin.person in domain.Person.termine
    This tells you that there's a mappedBy setting on the Person class's termine property annotation, and that the property it's referring to (the person property of the Termin class) doesn't exist.
    @ManyToMany(mappedBy="person")
    public List<Termin> getTermine() {
       return termine;
    }If we have a look at the Termin class, indeed it has the following properties:
    id
    teilnehmer
    titel
    eigentuemerAnd no person property. Remember, a property is defined by the existence of a get/set pair for the name. It's unrelated to the types returned by them and the private variables implementing them.
    mappedBy has the equivalent effect to the inverse property in a hbm.xml mapping file - it defines which entity's property will cause the foreign key value to be updated (persisting the relationship to the database). From the context of your code, I'm guessing you really want the annotation to read:
    @ManyToMany(mappedBy="teilnehmer")

Maybe you are looking for