kb:ws:edi_uploaddocument

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
kb:ws:edi_uploaddocument [2013/12/16 13:56] – created milanokb:ws:edi_uploaddocument [2022/09/21 14:18] (current) milano
Line 1: Line 1:
 ====== UploadDocument() metod ====== ====== UploadDocument() metod ======
- 
  
 ===== Akcija ===== ===== Akcija =====
- 
  
 Metod omogućava slanje dokumenata (trenutno samo u OAGIS formatu) na procesiranje u Balans EDI procesor. Procesor će omogućiti da primljeni dokument bude preveden u odgovarajući Balans ERP zapis i prosleđen na dalju obradu kroz Balans ERP informacioni sistem. Metod omogućava slanje dokumenata (trenutno samo u OAGIS formatu) na procesiranje u Balans EDI procesor. Procesor će omogućiti da primljeni dokument bude preveden u odgovarajući Balans ERP zapis i prosleđen na dalju obradu kroz Balans ERP informacioni sistem.
- 
  
 ===== Sintaksa ===== ===== Sintaksa =====
  
 +UploadDocument(docMessage, xmlFmt)
  
-UploadDocument(msgDoc, xmlFmt) +===== Rezultat =====
  
 +**String** msgRes; Niz karaktera koji označavaju stanje u kom se nalazi sistem po prijemu dokumenta. Neposredno nakon prijema dokument prolazi osnovne provere:
  
-===== Rezultat =====+   * ispravnost XML-a 
 +  * dupliranje zahteva
  
 +Mogući su sledeći rezultati provere:
  
-**String** msgRes; Niz karaktera koji označavaju stanje u kom se nalazi sistem po prijemu dokumenta. Neposredno nakon prijema dokument prolazi osnovne provere:+^Rezultat^Vrednost^Opis| 
 +|BEDI_STDRES_OK|"0"|Označava da je dokument primljen bez grešaka.| 
 +|BEDI_STDRES_DUPLICATE|"1"|Označava da je dokument već primljen i da je pošiljka duplikat postojećeg dokumenta.
 +|BEDI_STDRES_INVALID_FMT|"1000"|Označava da je dokument pogrešnog formata|
  
 +**Napomena: **  Rezultati provere od "1" do "999" su benigni i mogu se ignorisati. Rezultati od "1000" do "9999" su opasni i ne bi se smeli ignorisati.
  
-    * ispravnost XML-a +===== Parametri =====
-    * dupliranje zahteva+
  
 +^Naziv^Vrsta^Opis|
 +|docMessage|String|Elektronski dokument, u XML zapisu određenog formata.|
 +|xmlFmt|String|Format zapisa XML fajla. \\ Podrazumevana vrednost je "XML_FMT_OAGIS". \\  \\ **Moguće vrednosti:** \\  \\ "XML_FMT_OAGIS"; Fajl je u OAGIS formatu.|
  
-Mogući su sledeći rezultati provere:+==== Primer funkcije (SOAP request) ====
  
 +Header
 +<code>
  
-^Rezultat ^Vrednost ^Opis | +POST https://<url>:<port>/<putanja> HTTP/1.1 
-|BEDI_STDRES_OK |"0|Označava da je dokument primljen bez grešaka| +Accept-Encoding: gzip,deflate 
-|BEDI_STDRES_DUPLICATE |"1" |Označava da je dokument već primljen i da je pošiljka duplikat postojećeg dokumenta+Content-Type: text/xml;charset=UTF-8 
-|BEDI_STDRES_INVALID_FMT |"1000" |Označava da je dokument pogrešnog formata |+SOAPAction: "" 
 +Content-Length: 15877 
 +Host: ws.melany.rs:8191 
 +Connection: Keep-Alive 
 +User-Agent: Apache-HttpClient/4.1.1 (java 1.5)
  
 +</code>
  
-**Napomena: ** Rezultati provere od "1" do "999" su benigni i mogu se ignorisati. Rezultati od "1000" do "9999" su opasni i ne bi se smeli ignorisati.+Body
  
 +<code>
 + <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ser="http://services.balansedi.com/">
 +    <soapenv:Header/>
 +    <soapenv:Body>
 +        <ser:UploadDocument>
 +            <!--Optional:-->
 +            <docMessage>
 +                <![CDATA[<ProcessPurchaseOrder revision="8.0" environment="Production" xsi:schemaLocation="http://www.openapplications.org/oagis http://b2bdocs.agrokor.hr/schemas/oagis/8.0/BODs/ShowShipment.xsd http://agrokor.hr/agr http://b2bdocs.agrokor.hr/schemas/agr/oagis/8.0/UserArea/ShowShipment_UserArea.xsd" xmlns="http://www.openapplications.org/oagis" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:agr="http://agrokor.hr/agr" xmlns:mel="https://www.melany.rs/mel">
 +  <ApplicationArea>
 +      <CreationDateTime>2017-04-08T11:25:42Z</CreationDateTime>
 +      <Sender>
 +          <LogicalId>1111</LogicalId>
 +      </Sender>
 +      <UserArea>
 +          <agr:Receiver>
 +              <agr:LogicalId>2020202</agr:LogicalId>
 +          </agr:Receiver>
 +      </UserArea>
 +  </ApplicationArea>
 +  <DataArea>
 +      <Process Acknowledge="Never"/>
 +      <PurchaseOrder>
 +          <Header>
 +              <DocumentIds>
 +                  <CustomerDocumentId>
 +                      <Id>NPJ76/RC</Id>
 +                      <Revision>1</Revision>
 +                  </CustomerDocumentId>
 +                  <SupplierDocumentId>
 +                      <Id/>
 +                  </SupplierDocumentId>
 +              </DocumentIds>
 +              <LastModificationDateTime>2017-04-08T11:25:42Z</LastModificationDateTime>
 +              <DocumentDateTime>2017-04-08T11:25:42Z</DocumentDateTime>
 +              <Description>6 / 17</Description>
 +              <Priority/>
 +              <ReasonCode/>
 +              <NeedDeliveryDate>2017-04-09T11:25:42Z</NeedDeliveryDate>
 +              <PaymentTerms>
 +                  <TermId/>
 +                  <Description/>
 +              </PaymentTerms>
 +              <UserArea>
 +                  <agr:Comment/>
 +                  <agr:OrderType/>
 +              </UserArea>
 +              <Parties>
 +                  <BillToParty>
 +                      <PartyId>
 +                          <Id>1111</Id>
 +                          <DUNS/>
 +                      </PartyId>
 +                      <Name/>
 +                  </BillToParty>
 +                  <ShipFromParty>
 +                      <PartyId>
 +                          <Id>1134</Id>
 +                          <DUNS/>
 +                      </PartyId>
 +                      <Name>VP</Name>
 +                      <Business>
 +                          <Id/>
 +                          <Name/>
 +                      </Business>
 +                  </ShipFromParty>
 +                  <ShipToParty>
 +                      <PartyId>
 +                          <Id>408</Id>
 +                          <DUNS/>
 +                      </PartyId>
 +                      <Name>Centar</Name>
 +                      <UserArea>
 +                          <agr:WarehouseGate>
 +                              <agr:Id>408</agr:Id>
 +                              <agr:DUNS/>
 +                          </agr:WarehouseGate>
 +                      </UserArea>
 +                  </ShipToParty>
 +                  <SoldToParty>
 +                      <PartyId>
 +                          <Id/>
 +                          <DUNS/>
 +                      </PartyId>
 +                      <Name/>
 +                  </SoldToParty>
 +                  <RemitToParty>
 +                      <PartyId>
 +                          <Id/>
 +                      </PartyId>
 +                      <Name/>
 +                      <Addresses>
 +                          <AddressLine>
 +                              <City/>
 +                              <Country/>
 +                              <PostalCode/>
 +                          </AddressLine>
 +                      </Addresses>
 +                  </RemitToParty>
 +                  <SupplierParty>
 +                      <PartyId>
 +                          <Id/>
 +                          <DUNS/>
 +                      </PartyId>
 +                      <Name/>
 +                  </SupplierParty>
 +              </Parties>
 +          </Header>
 +      </PurchaseOrder>
 +      <Line>
 +          <LineNumber>1</LineNumber>
 +          <OrderItem>
 +              <ItemIds>
 +                  <ItemId>
 +                      <EANUCC13>3838089592836</EANUCC13>
 +                      <Id mel:delimiter="~">19203~~crn</Id>
 +                  </ItemId>
 +              </ItemIds>
 +              <Description>Artikal 1</Description>
 +              <FeatureValue>
 +                  <EffectivePeriod>
 +                      <To>2017-04-09T11:25:42Z</To>
 +                  </EffectivePeriod>
 +                  <UOM/>
 +              </FeatureValue>
 +          </OrderItem>
 +          <OrderQuantity uom="KOM">1</OrderQuantity>
 +          <UnitPrice>
 +              <Amount uom="KOM" currency="RSD">243.4</Amount>
 +          </UnitPrice>
 +          <UserArea>
 +              <agr:TotalVolume uom="M3"/>
 +              <agr:TotalNetWeight uom="KGM"/>
 +              <agr:TotalGrossWeight uom="KGM"/>
 +              <agr:ShippedQuantity uom="KOM"/>
 +          </UserArea>
 +      </Line>
 +      <Line>
 +          <LineNumber>2</LineNumber>
 +          <OrderItem>
 +              <ItemIds>
 +                  <ItemId>
 +                      <EANUCC13>3838080571978</EANUCC13>
 +                      <Id mel:delimiter="~">A1204</Id>
 +                  </ItemId>
 +              </ItemIds>
 +              <Description>Artikal 2</Description>
 +              <FeatureValue>
 +                  <EffectivePeriod>
 +                      <To>2019-04-09T11:25:42Z</To>
 +                  </EffectivePeriod>
 +                  <UOM/>
 +              </FeatureValue>
 +          </OrderItem>
 +          <OrderQuantity uom="KOM">2</OrderQuantity>
 +          <UnitPrice>
 +              <Amount uom="KOM" currency="RSD">113.2</Amount>
 +          </UnitPrice>
 +          <UserArea>
 +              <agr:TotalVolume uom="M3"/>
 +              <agr:TotalNetWeight uom="KGM"/>
 +              <agr:TotalGrossWeight uom="KGM"/>
 +              <agr:ShippedQuantity uom="KOM"/>
 +          </UserArea>
 +      </Line>
 +  </DataArea>
 +</ProcessPurchaseOrder> ]]>
 +            </docMessage>
 +            <!--Optional:-->
 +            <xmlFmt>?</xmlFmt>
 +        </ser:UploadDocument>
 +    </soapenv:Body>
 +</soapenv:Envelope>
  
-===== Parametri ===== +</code>
  
-^Naziv ^Vrsta ^Opis | 
-|msgDoc |String |Elektronski dokument  | 
-|xmlFmt |String |čč | 
  
  
-\\ 
  
  • kb/ws/edi_uploaddocument.1387202182.txt.gz
  • Last modified: 2013/12/16 13:56
  • by milano