MARX#38779: API/KOVRA testpagina voor de (Potentiele) Premium Aannemer
svn path=/Website/branches/v2016.2/; revision=32002
This commit is contained in:
@@ -6,27 +6,72 @@
|
||||
var http_request = window.ActiveXObject ? new ActiveXObject("Microsoft.XMLHTTP") : new XMLHttpRequest();
|
||||
SXH_PROXY_SET_PROXY = 2
|
||||
//http_request.setProxy(SXH_PROXY_SET_PROXY, "127.0.0.1:8888"); // Fiddler
|
||||
var url = document.getElementById("url").value;
|
||||
http_request.open("POST", url, false);
|
||||
var body = document.getElementById("xml").value;
|
||||
http_request.setRequestHeader("Content-Type", "text/xml; charset=utf-8")
|
||||
var l_url = document.getElementById("url").value;
|
||||
var l_apiname = document.getElementById("apiname").value;
|
||||
var l_apikey = document.getElementById("apikey").value;
|
||||
var post2url = l_url + "?API=" + l_apiname + "&APIKEY=" + l_apikey;
|
||||
|
||||
http_request.open("POST", post2url, false);
|
||||
var body = document.getElementById("sendxml").value;
|
||||
http_request.setRequestHeader("Content-Type", "text/xml; charset=utf-8");
|
||||
http_request.send(body);
|
||||
|
||||
|
||||
document.getElementById("sendoke").innerText = "Bericht is verstuurd naar URL: " + post2url;
|
||||
document.getElementById("send_info").innerText = "Zie hieronder eventuele terugmeldingen, en bekijk het resultaat in de testomgeving Mareon.";
|
||||
|
||||
document.getElementById("Status").innerText = http_request.status;
|
||||
document.getElementById("StatusText").innerText = http_request.statusText;
|
||||
document.getElementById("Result").innerText = http_request.responseText;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
function getXMLexample1()
|
||||
{
|
||||
var l_ex_xml = document.getElementById("ex_xml_status").value;
|
||||
var l_xmlsend = document.getElementById("sendxml").value = l_ex_xml;
|
||||
|
||||
}
|
||||
function getXMLexample2()
|
||||
{
|
||||
var l_ex_xml = document.getElementById("ex_xml_factuur").value;
|
||||
var l_xmlsend = document.getElementById("sendxml").value = l_ex_xml;
|
||||
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body style='background-color:#c0c0c0'>
|
||||
<form method="post"
|
||||
target="uitvoer">
|
||||
<input id="url" type="text" style="width:800px"
|
||||
value="https://marx-a.mareon.nl/?API=XXX&APIKEY=YYY">
|
||||
<br/>
|
||||
Vul hieronder de XML in die gepost gaat worden, zoals b.v.:
|
||||
|
||||
<img height="40px" valign="middle" src="./../images/mareon.jpg"/>
|
||||
<span style="font-size:24pt;"><b>TESTPAGINA - KOVRA/KETENSTANDAARD</b></span>
|
||||
<br/>
|
||||
<textarea id="xml" style="height:400px;width:800px">
|
||||
|
||||
<hr style="border-style: dashed;"/>
|
||||
|
||||
<span style="font-size:16pt">A.</span>
|
||||
<span>Deze pagina biedt u een basis om een (voorbeeld) KOVRA-bericht te sturen naar de <u>acceptatietest</u> omgeving van Mareon: </span><input id="url" type="text" style="width:200px"
|
||||
value="https://marx-a.facilitor.nl/" readonly><br/>
|
||||
<span style="font-size:16pt">B.</span>
|
||||
<span>U kunt 2 type berichten sturen:
|
||||
<select id="apiname">
|
||||
<option value="MLD_OPDR_SIDB">1. Opdrachtstatus bericht</option>
|
||||
<option value="FIN_FACTUUR_SIDB">2. Factuurbericht</option>
|
||||
</select></span><span style="font-size:9pt"> (Maak uw keuze)</span>
|
||||
<br/>
|
||||
<span style="font-size:16pt">C.</span>
|
||||
<span>Vul het wachtwoord in: <input id="apikey" type="text" style="width:600px"
|
||||
value=""></span><span style="font-size:9pt"> Dit is de APIkey van de testomgeving die u van de Mareon Helpdesk hebt ontvangen (of indien nog niet ontvangen <a href="mailto:helpdesk@facilitor.nl">hier</a> kunt opvragen)</span>
|
||||
<br/>
|
||||
<span style="font-size:16pt">D.</span>Vul of plak hieronder de XML in die gepost gaat worden, voorbeelden ziet u aan de rechterzijde:
|
||||
<br/>
|
||||
<table>
|
||||
<tr><td height="400px" rowspan='2'>
|
||||
<textarea id="sendxml" style="height:500px;width:800px">
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MaintenanceStatus>
|
||||
<MessageNumber>143</MessageNumber>
|
||||
@@ -50,13 +95,216 @@
|
||||
</InstructionData>
|
||||
</MaintenanceStatus>
|
||||
</textarea>
|
||||
<input type="button" onclick="doSubmit()" value="Verstuur">
|
||||
</td>
|
||||
<td height="200" valign="middle">
|
||||
<input type="button" onclick="getXMLexample1()" value="<<">
|
||||
</td>
|
||||
<td>
|
||||
<span>Voorbeeld van een statusbericht</span><br/>
|
||||
<textarea id="ex_xml_status" style="height:200px;width:800px" readonly>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<MaintenanceStatus>
|
||||
<MessageNumber>143</MessageNumber>
|
||||
<MessageDate>2016-10-20</MessageDate>
|
||||
<MessageTime>13:07:30</MessageTime>
|
||||
<InstructionData>
|
||||
<InstructionNumber>MARxxx/y</InstructionNumber>
|
||||
<Status>GER</Status>
|
||||
<StatusDescription>Gereedmelding</StatusDescription>
|
||||
<DateReady>2016-10-20</DateReady>
|
||||
<AppointmentDateTimeInformation>
|
||||
<RequiredDeliveryDate>2016-10-18</RequiredDeliveryDate>
|
||||
<RequiredDeliveryTime>00:00:00</RequiredDeliveryTime>
|
||||
<DeliveryTimeFrame>
|
||||
<DeliveryDateEarliest>2016-10-01</DeliveryDateEarliest>
|
||||
<DeliveryTimeEarliest>00:00:00</DeliveryTimeEarliest>
|
||||
<DeliveryDateLatest>2016-10-30</DeliveryDateLatest>
|
||||
<DeliveryTimeLatest>00:00:00</DeliveryTimeLatest>
|
||||
</DeliveryTimeFrame>
|
||||
</AppointmentDateTimeInformation>
|
||||
</InstructionData>
|
||||
</MaintenanceStatus> </textarea>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td valign="middle">
|
||||
<input type="button" onclick="getXMLexample2()" value="<<">
|
||||
</td>
|
||||
<td>
|
||||
<span>Voorbeeld van een factuurbericht</span><br/>
|
||||
<textarea id="ex_xml_factuur" style="height:200px;width:800px" readonly>
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Invoice>
|
||||
<InvoiceType>380</InvoiceType>
|
||||
<InvoiceNumber>1601501</InvoiceNumber>
|
||||
<InvoiceDate>2016-11-17</InvoiceDate>
|
||||
<ExpirationDate>2016-12-17</ExpirationDate>
|
||||
<Currency>EUR</Currency>
|
||||
<Attachment>
|
||||
<AttachedData/>
|
||||
<DocumentType/>
|
||||
<FileType/>
|
||||
<FileName/>
|
||||
</Attachment>
|
||||
<DespatchAdviceNumber>20161117162107509</DespatchAdviceNumber>
|
||||
<BuyersOrderNumber>MAR1293/1</BuyersOrderNumber>
|
||||
<Buyer>
|
||||
<Name>Opdrachtgever</Name>
|
||||
<StreetAndNumber>Kalverstraat 1</StreetAndNumber>
|
||||
<City>Amsterdam</City>
|
||||
<PostalCode>1234 AB</PostalCode>
|
||||
<Country>NL</Country>
|
||||
<VATRegistrationNumber>NL001234567890</VATRegistrationNumber>
|
||||
</Buyer>
|
||||
<Supplier>
|
||||
<Name>Opdrachtnemer</Name>
|
||||
<StreetAndNumber>Kalverstraat 2</StreetAndNumber>
|
||||
<City>Amsterdam</City>
|
||||
<PostalCode>1234 AB</PostalCode>
|
||||
<Country>NL</Country>
|
||||
<ChamberOfCommerceNumber>1234567</ChamberOfCommerceNumber>
|
||||
<AccountInformation>
|
||||
<IBAN>NL99INGB1234567890</IBAN>
|
||||
</AccountInformation>
|
||||
</Supplier>
|
||||
<Invoicee/>
|
||||
<Invoicer/>
|
||||
<DeliveryParty>
|
||||
<StreetAndNumber>Kalverstraat 3</StreetAndNumber>
|
||||
<City>Amsterdam</City>
|
||||
<PostalCode>1234 AB</PostalCode>
|
||||
</DeliveryParty>
|
||||
<InvoiceLine>
|
||||
<LineNumber>1</LineNumber>
|
||||
<DeliveredQuantity>1</DeliveredQuantity>
|
||||
<DeliveredQuantityMeasureUnitCode>PCE</DeliveredQuantityMeasureUnitCode>
|
||||
<NumberOfInvoicingUnits>1</NumberOfInvoicingUnits>
|
||||
<NetLineAmount>32.66</NetLineAmount>
|
||||
<TradeItemIdentification>
|
||||
<AdditionalItemIdentification>
|
||||
<TradeItemDescription>Tochtborstel vervangen</TradeItemDescription>
|
||||
<PhysicalDimensions/>
|
||||
</AdditionalItemIdentification>
|
||||
</TradeItemIdentification>
|
||||
<PriceInformation>
|
||||
<Price>39.5186</Price>
|
||||
<PriceBase>
|
||||
<NumberOfUnitsInPriceBasis>1</NumberOfUnitsInPriceBasis>
|
||||
<MeasureUnitPriceBasis>PCE</MeasureUnitPriceBasis>
|
||||
</PriceBase>
|
||||
</PriceInformation>
|
||||
<VATInformation>
|
||||
<VATRate>S</VATRate>
|
||||
<VATPercentage>21</VATPercentage>
|
||||
</VATInformation>
|
||||
</InvoiceLine>
|
||||
<InvoiceLine>
|
||||
<LineNumber>2</LineNumber>
|
||||
<DeliveredQuantity>1</DeliveredQuantity>
|
||||
<DeliveredQuantityMeasureUnitCode>HUR</DeliveredQuantityMeasureUnitCode>
|
||||
<NumberOfInvoicingUnits>1</NumberOfInvoicingUnits>
|
||||
<NetLineAmount>75</NetLineAmount>
|
||||
<TradeItemIdentification>
|
||||
<AdditionalItemIdentification>
|
||||
<TradeItemDescription>Opname uitgevoerd</TradeItemDescription>
|
||||
<PhysicalDimensions/>
|
||||
</AdditionalItemIdentification>
|
||||
</TradeItemIdentification>
|
||||
<PriceInformation>
|
||||
<Price>90.75</Price>
|
||||
<PriceBase>
|
||||
<NumberOfUnitsInPriceBasis>1</NumberOfUnitsInPriceBasis>
|
||||
<MeasureUnitPriceBasis>HUR</MeasureUnitPriceBasis>
|
||||
</PriceBase>
|
||||
</PriceInformation>
|
||||
<VATInformation>
|
||||
<VATRate>S</VATRate>
|
||||
<VATPercentage>21</VATPercentage>
|
||||
</VATInformation>
|
||||
</InvoiceLine>
|
||||
<InvoiceLine>
|
||||
<LineNumber>3</LineNumber>
|
||||
<DeliveredQuantity>1</DeliveredQuantity>
|
||||
<DeliveredQuantityMeasureUnitCode>PCE</DeliveredQuantityMeasureUnitCode>
|
||||
<NumberOfInvoicingUnits>1</NumberOfInvoicingUnits>
|
||||
<NetLineAmount>29</NetLineAmount>
|
||||
<TradeItemIdentification>
|
||||
<AdditionalItemIdentification>
|
||||
<TradeItemDescription>aanbrengen syphonkap</TradeItemDescription>
|
||||
<PhysicalDimensions/>
|
||||
</AdditionalItemIdentification>
|
||||
</TradeItemIdentification>
|
||||
<PriceInformation>
|
||||
<Price>35.09</Price>
|
||||
<PriceBase>
|
||||
<NumberOfUnitsInPriceBasis>1</NumberOfUnitsInPriceBasis>
|
||||
<MeasureUnitPriceBasis>PCE</MeasureUnitPriceBasis>
|
||||
</PriceBase>
|
||||
</PriceInformation>
|
||||
<VATInformation>
|
||||
<VATRate>S</VATRate>
|
||||
<VATPercentage>21</VATPercentage>
|
||||
</VATInformation>
|
||||
</InvoiceLine>
|
||||
<InvoiceLine>
|
||||
<LineNumber>4</LineNumber>
|
||||
<DeliveredQuantity>1</DeliveredQuantity>
|
||||
<DeliveredQuantityMeasureUnitCode>MTK</DeliveredQuantityMeasureUnitCode>
|
||||
<NumberOfInvoicingUnits>1</NumberOfInvoicingUnits>
|
||||
<NetLineAmount>50</NetLineAmount>
|
||||
<TradeItemIdentification>
|
||||
<AdditionalItemIdentification>
|
||||
<TradeItemDescription>behang verwijderen en nieuw aanbrengen</TradeItemDescription>
|
||||
<PhysicalDimensions/>
|
||||
</AdditionalItemIdentification>
|
||||
</TradeItemIdentification>
|
||||
<PriceInformation>
|
||||
<Price>53</Price>
|
||||
<PriceBase>
|
||||
<NumberOfUnitsInPriceBasis>1</NumberOfUnitsInPriceBasis>
|
||||
<MeasureUnitPriceBasis>MTK</MeasureUnitPriceBasis>
|
||||
</PriceBase>
|
||||
</PriceInformation>
|
||||
<VATInformation>
|
||||
<VATRate>S</VATRate>
|
||||
<VATPercentage>6</VATPercentage>
|
||||
</VATInformation>
|
||||
</InvoiceLine>
|
||||
<InvoiceTotals>
|
||||
<TotalInvoiceAmount>53</TotalInvoiceAmount>
|
||||
<TotalNetLineAmount>186.66</TotalNetLineAmount>
|
||||
<TotalVATAmount>3</TotalVATAmount>
|
||||
</InvoiceTotals>
|
||||
<VATSubTotal>
|
||||
<VATAmount>3</VATAmount>
|
||||
<VATInformation>
|
||||
<VATRate>S</VATRate>
|
||||
<VATpercentage>6</VATpercentage>
|
||||
<VATBaseAmount>50</VATBaseAmount>
|
||||
</VATInformation>
|
||||
</VATSubTotal>
|
||||
</Invoice></textarea>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<span style="font-size:16pt">E.</span>Verstuur uw bericht via deze knop: </span>
|
||||
<input type="button" onclick="doSubmit()" value="Verstuur"> <span style="font-size:9pt;color:red"><b>Tip: Om een korrekte test met de API key te doen, log dan eerst uit Mareon via de knop 'Afmelden' in de header van het portaal (bent u nog ingelogd dan wordt APIkey in deze test niet meegenomen)</b></span>
|
||||
<br/>
|
||||
<hr style="border-style: dashed;"/>
|
||||
<span id="sendoke"></span>
|
||||
<span style="color:red" id="send_not_oke"></span>
|
||||
<br/>
|
||||
<span id="send_info"></span>
|
||||
|
||||
<hr style="border-style: dashed;"/>
|
||||
|
||||
</form>
|
||||
<table>
|
||||
<tr><td>Status:</td><td><span id="Status"></span></td>
|
||||
<tr><td>StatusText:</td><td><span id="StatusText"></span></td>
|
||||
<tr><td>Result:</td><td style='border:1px solid blue;font-size:0.8em;'><xmp id="Result"></xmp></td>
|
||||
</table>
|
||||
<hr style="border-style: dashed;"/>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user