Greetings everyone!
I'm working on a small project where the following needs to be done:
1) Create a script which can receive/generate and send data as XML.
i) The script should generate an xml(when a new trouble ticket is created) from the database
and POST it to a URL (this URL exists on the client side, something like /call/client/newTAC ).
A sample xml is given below (the format is the same while receiving/sending)
<?xml version="1.0" endocing="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefa
+ult="qualified">
<xs:element name="Incident">
<xs:complexType>
<xs:sequence>
<xs:element ref="Header"/>
<xs:element ref="ProviderID"/>
<xs:element ref="ProviderClientOrg"/>
<xs:element ref="ProviderTicketType"/>
</xs:sequence>
</xs:complexType>
<xs:element>
<xs:element name="Transaction">
<xs:complexType>
<xs:sequence>
<xs:element ref="TransactionType"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Metrics">
<xs:complexType>
<xs:sequence>
<xs:element ref="ServiceRestoredDate"/>
<xs:element ref="TicketOpenedDate"/>
<xs:element ref="TicketClosedDate"/>
<xs:element ref="TicketOwner"/>
</xs:sequence>
</xs:complexType>
</xs:element>
:
:
:
</xs:schema>
Can anyone has any idea how to proceed with this. I suppose my script should be in daemon mode for receiving the data.
Is it possible to generate the xml from the database as shown above or should it be done programatically. Can you also let me know how can my script receive/send data (pseudo code).
Thank you one and all in advance.
Edit by BazB: change pre to code tags.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.