Announcement Announcement Module
Collapse
No announcement yet.
JMS XML (OAGIS) to Database Help Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JMS XML (OAGIS) to Database Help

    I am currently working on a project where I need to translate xml (OAGIS format) coming from a JMS queue into an Oracle database table. (I will also need to send messages in a similar format) The interface will use MVC to show and manage the results.

    So far I have managed to create a MVC interface which lists the data from the database table (manually entered) and even send and receive messages (just simple text) from a JMS queue, but I do not know how to translate the xml data into the Oracle database tables.

    Below is an example of what I am receiving... Any one point me to an examples of how to do this. Any JMS examples that I have found do not seem to show this type of message and what to do with it.

    Thanks

    <?xml version="1.0" encoding="UTF-8"?>
    <ShowProjectSchedule releaseID="9.5.1"
    xmlns:oa="http://www.openapplications.org/oagis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <oa:ApplicationArea>
    <oa:Sender>
    <LogicalID>MIB</LogicalID>
    <TaskID>GetProjectSchedule</TaskID>
    <ReferenceID/>
    <AuthorizationID/>
    </oa:Sender>
    <oa:Receiver>
    <LogicalID/>
    </oa:Receiver>
    <oa:CreationDateTime>2012-11-05T13:42:38</oa:CreationDateTime>
    <BODID>d00dfed7-575b-44ba-a53d-7170af96d874</BODID>
    <oa:UserArea>
    <ServiceContext>
    <ServiceName>ShowProjectSchedule</ServiceName>
    <ServiceVersion>1.0</ServiceVersion>
    <MessageType>ProjectSchedule</MessageType>
    </ServiceContext>
    <AuthorizationContext/>
    </oa:UserArea>
    </oa:ApplicationArea>
    <DataArea>
    <ProjectSchedule>
    <DocumentID>
    <ID>PC-TEST-01</ID>
    </DocumentID>
    <Description>Phil Cranna Test File</Description>
    <Status>
    <Code>A</Code>
    </Status>
    <CreationDateTime>2012-10-31T03:40:23</CreationDateTime>
    <CreatorID>C16808</CreatorID>
    <ProjectScheduleActivity type="JE">
    <DocumentID>
    <ID/>
    </DocumentID>
    <Description>Header Project</Description>
    <DocumentReference type="jobestimate">
    <DocumentID>
    <ID>000000001002</ID>
    <RevisionID/>
    </DocumentID>
    <LineNumber/>
    <Status>
    <Code>IN</Code>
    </Status>
    </DocumentReference>
    <DocumentReference type="workrequest">
    <DocumentID>
    <ID>000000001001</ID>
    </DocumentID>
    </DocumentReference>
    <ParentActivityID/>
    <LastModificationDateTime>2012-10-31T15:40:24</LastModificationDateTime>
    <LastModID/>
    <PlannedTimePeriod/>
    <EstimatedResourceRequirements>
    <LabourAllocation>
    <RequiredDuration>0</RequiredDuration>
    <TotalCostAmount>0</TotalCostAmount>
    </LabourAllocation>
    <InventoryAllocation>
    <TotalCostAmount>0</TotalCostAmount>
    </InventoryAllocation>
    <MachineAllocation>
    <TotalCostAmount>0</TotalCostAmount>
    </MachineAllocation>
    <Allocation>
    <TotalCostAmount>0</TotalCostAmount>
    <RequiredDuration>0</RequiredDuration>
    </Allocation>
    <Other>
    <OtherCostAmount>0</OtherCostAmount>
    </Other>
    </EstimatedResourceRequirements>
    </ProjectScheduleActivity>
    ....

  • #2
    Hi!

    H-m-m...
    Do you know XPath and JDBC?
    Of course you can unmarshal your XML into some POJO, but in the end if you don't use any ORM you should use JDBC Insert directly with setParameter on Statement.

    Is it what are you looking for?

    Take care,
    Artem

    Comment

    Working...
    X