Bestand übermitteln (Transaktion B2BStock, Operation: StockTransmitB2B)

Ein Bestand soll übermittelt werden. Hierzu werden an die Adresse https://b2b.beispielserver.com/ mittels der POST-Methode des HTTP-Protokolls folgende Daten vom Medientyp application/xml übertragen:

 

<?xml version="1.0" encoding="utf-8"?> <StockTransmitB2BRequest xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:veloconnect:stock-B2B-1.4"> <BuyersID xmlns="urn:veloconnect:transaction-1.0">B127645</BuyersID> <Credential xmlns="urn:veloconnect:transaction-1.0"> <Password>secret</Password> </Credential> <IsTest xmlns="urn:veloconnect:transaction-1.0">true</IsTest> <CreateDate>2021-04-28T10:40:42.3168812+02:00</CreateDate> <Frequence>Complete</Frequence> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>1</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">10</Quantity> <Availability>Available</Availability> </StockTransmitB2BLine> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>42213526600</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">20</Quantity> <Availability>LimitedAvailable</Availability> </StockTransmitB2BLine> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>3</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">30</Quantity> <Availability>NotAvailable</Availability> </StockTransmitB2BLine> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>4</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">40</Quantity> <Availability>NotAvailable</Availability> </StockTransmitB2BLine> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>5</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">50</Quantity> <Availability>NotAvailable</Availability> </StockTransmitB2BLine> <StockTransmitB2BLine> <SellersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>6</ID> </SellersItemIdentification> <BuyersItemIdentification xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0"> <ID>111</ID> </BuyersItemIdentification> <Quantity quantityUnitCode="EA" xmlns="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0">60</Quantity> <Availability>NotAvailable</Availability> </StockTransmitB2BLine> </StockTransmitB2BRequest>

Die Antwort des Servers sieht beispielsweise so aus:

<?xml version="1.0" encoding="utf-8"?> <StockTransmitB2BResponse xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:veloconnect:stock-B2B-1.4"> <BuyersID xmlns="urn:veloconnect:transaction-1.0">B127645</BuyersID> <ResponseCode xmlns="urn:veloconnect:transaction-1.0">200</ResponseCode> <TransactionID xmlns="urn:veloconnect:transaction-1.0">44f80ce3-05c1-4a28-b981-8b4a0794a7a4</TransactionID> <StatusCode xmlns="urn:veloconnect:transaction-1.0">84</StatusCode> <IsTest xmlns="urn:veloconnect:transaction-1.0">true</IsTest> </StockTransmitB2BResponse>

Hieran ist folgendes zu erkennen:

  • Die erzeugte Transaktionsinstanz hat die TransactionID 44f80ce3-05c1-4a28-b981-8b4a0794a7a4.

  • Die Transaktion befindet sich im Zustand 84, d.h. der Import läuft.

Related pages