Suche nach Artikeln (Transaktion:TextSearch)

Im Beispiel suchen wir nach allen Artikeln, deren Artikelnummer oder -bezeichnung die Teilzeichenketten stop, emsschuh und dual enthalten. Dazu wird zunächst die Suche mit Hilfe der folgenden Anfrage (URL-Bindung)

1 https://b2b.beispielserver.com/?BuyersID=127654&Password=secret&RequestName=CreateTextSearchRequest&SearchString=stop%20emsschuh%20dual

oder durch den POST der folgenden äquivalenten XML-Datei initialisiert.

1 2 3 4 5 6 7 8 9 10 11 <?xml version="1.0" encoding="utf-8" ?> <CreateTextSearchRequest xmlns="urn:veloconnect:catalog-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:Credential> <vct:Password>secret</vct:Password> </vct:Credential> <SearchString>stop emsschuh dual</SearchString> </CreateTextSearchRequest>

 

Das Suchergebnis wird sieht dann beispielsweise so aus, d.h. es wurden sechs Artikel gefunden.

1 2 3 4 5 6 7 8 9 <?xml version="1.0" encoding="utf-8" ?> <CreateTextSearchResponse xmlns="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>2</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <vct:IsTest>false</vct:IsTest> <TotalCount>6</TotalCount> </CreateTextSearchResponse>

Nun können die Suchergebnisse abgeholt werden.

Die Anfrage

1 https://b2b.beispielserver.com/?BuyersID=127654&Password=secret&RequestName=SearchResultRequest&TransactionID=2&StartIndex=3&Count=2&ResultFormat=ITEM_TYPE

fordert die Treffer mit dem Index 3 und 4 an (also den 4. und den 5. Treffer) und zwar im Format ITEM_TYPE. Äquivalent ist der POST der folgenden XML Datei.

1 2 3 4 5 6 7 8 9 10 11 <?xml version="1.0" encoding="utf-8" ?> <SearchResultRequest xmlns="urn:veloconnect:catalog-1.1" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:vct="urn:veloconnect:transaction-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:Credential> <vct:Password>secret</vct:Password> </vct:Credential> <vct:TransactionID>2</vct:TransactionID> <StartIndex>3</StartIndex> <Count>2</Count> <ResultFormat>ITEM_TYPE</ResultFormat> </SearchResultRequest>

Die Treffer werden wie in folgender XML-Datei ausgeliefert.

 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 <?xml version="1.0" encoding="utf-8" ?> <SearchResultResponse xmlns="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>2</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <vct:IsTest>false</vct:IsTest> <StartIndex>3</StartIndex> <Count>2</Count> <TotalCount>6</TotalCount> <ResultFormat>ITEM_TYPE</ResultFormat> <cac:Item> <cbc:Description>KOOL-STOP MTB contoured (Chart Index C1) gebogene Canti-Bremsschuhe, dual compound</cbc:Description> <cac:SellersItemIdentification> <cac:ID>221-98</cac:ID> </cac:SellersItemIdentification> <cac:ManufacturersItemIdentification> <cac:ID>RE 397 KS</cac:ID> <cac:IssuerParty><cac:PartyName><cbc:Name>KOOL STOP</cbc:Name></cac:PartyName></cac:IssuerParty> </cac:ManufacturersItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.50</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.30</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">25</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.17</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">50</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">5.98</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">100</cbc:MinimumQuantity> </cac:BasePrice> </cac:Item> <cac:Item> <cbc:Description>KOOL-STOP MTB contoured (Chart Index T1) gebogene Schraub-Bremsschuhe, dual compound</cbc:Description> <cac:SellersItemIdentification> <cac:ID>222-98</cac:ID> </cac:SellersItemIdentification> <cac:ManufacturersItemIdentification> <cac:ID>RE 387 KS</cac:ID> <cac:IssuerParty><cac:PartyName><cbc:Name>KOOL STOP</cbc:Name></cac:PartyName></cac:IssuerParty> </cac:ManufacturersItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.75</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.52</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">25</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.36</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">50</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.13</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">100</cbc:MinimumQuantity> </cac:BasePrice> </cac:Item> </SearchResultResponse>

 

Wäre im Request ResultFormat=ITEM_DETAIL verwendet worden, hätte der Response so ausgesehen:

 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 <?xml version="1.0" encoding="utf-8" ?> <SearchResultResponse xmlns="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:vco="urn:veloconnect:order-1.1"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>2</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <vct:IsTest>false</vct:IsTest> <StartIndex>3</StartIndex> <Count>2</Count> <TotalCount>6</TotalCount> <ResultFormat>ITEM_DETAIL</ResultFormat> <vco:ItemDetail> <cac:Item> <cbc:Description>KOOL-STOP MTB contoured (Chart Index C1) gebogene Canti-Bremsschuhe, dual compound</cbc:Description> <cac:SellersItemIdentification> <cac:ID>221-98</cac:ID> </cac:SellersItemIdentification> <cac:ManufacturersItemIdentification> <cac:ID>RE 397 KS</cac:ID> <cac:IssuerParty><cac:PartyName><cbc:Name>KOOL STOP</cbc:Name></cac:PartyName></cac:IssuerParty> </cac:ManufacturersItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.50</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.30</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">25</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">6.17</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">50</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">5.98</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">100</cbc:MinimumQuantity> </cac:BasePrice> </cac:Item> <vco:Availability> <vco:Code>available</vco:Code> </vco:Availability> </vco:ItemDetail> <vco:ItemDetail> <cac:Item> <cbc:Description>KOOL-STOP MTB contoured (Chart Index T1) gebogene Schraub-Bremsschuhe, dual compound</cbc:Description> <cac:SellersItemIdentification> <cac:ID>222-98</cac:ID> </cac:SellersItemIdentification> <cac:ManufacturersItemIdentification> <cac:ID>RE 387 KS</cac:ID> <cac:IssuerParty><cac:PartyName><cbc:Name>KOOL STOP</cbc:Name></cac:PartyName></cac:IssuerParty> </cac:ManufacturersItemIdentification> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.75</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.52</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">25</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.36</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">50</cbc:MinimumQuantity> </cac:BasePrice> <cac:BasePrice> <cbc:PriceAmount amountCurrencyID="EUR">7.13</cbc:PriceAmount> <cbc:BaseQuantity quantityUnitCode="EA">1</cbc:BaseQuantity> <cbc:MinimumQuantity quantityUnitCode="EA">100</cbc:MinimumQuantity> </cac:BasePrice> </cac:Item> <vco:Availability> <vco:Code>available</vco:Code> </vco:Availability> </vco:ItemDetail> </SearchResultResponse>

 

Und für ResultFormat=ID_ONLY wäre folgende Antwort geliefert worden:

 

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 <?xml version="1.0" encoding="utf-8" ?> <SearchResultResponse xmlns="urn:veloconnect:catalog-1.1" xmlns:vct="urn:veloconnect:transaction-1.0" xmlns:cac="urn:oasis:names:specification:ubl:schema:xsd:CommonAggregateComponents-1.0" xmlns:cbc="urn:oasis:names:specification:ubl:schema:xsd:CommonBasicComponents-1.0" xmlns:vco="urn:veloconnect:order-1.1"> <vct:BuyersID>B127645</vct:BuyersID> <vct:ResponseCode>200</vct:ResponseCode> <vct:TransactionID>2</vct:TransactionID> <vct:StatusCode>2</vct:StatusCode> <vct:IsTest>false</vct:IsTest> <StartIndex>3</StartIndex> <Count>2</Count> <TotalCount>6</TotalCount> <ResultFormat>ID_ONLY</ResultFormat> <cac:SellersItemIdentification> <cac:ID>221-98</cac:ID> </cac:SellersItemIdentification> <cac:SellersItemIdentification> <cac:ID>222-98</cac:ID> </cac:SellersItemIdentification> </SearchResultResponse>