Closed mashhood1995 closed 2 years ago
You must convert initializationVector string from base64 string to byte array. And use it for encryption.
Thanks . shall i convert key to byte array as well ?
sure. in the same way, from base64 string to byte array.
@esalesplatform
What is the return value you get after uploading?
I have a similar problem, but my problem is the XML format. How to correct it is still this error
Please have a look
my xml:
<?xml version="1.0" encoding="UTF-8"?> <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> <Header> <DocumentVersion>1.02</DocumentVersion> <MerchantIdentifier>XXXXXXXX</MerchantIdentifier> </Header> <MessageType>Product</MessageType> <PurgeAndReplace>true</PurgeAndReplace> <Message> <MessageID>10001</MessageID> <OperationType>Update</OperationType> <Product> <SKU>XXXXXX</SKU> <ProductTaxCode>A_GEN_TAX</ProductTaxCode> <LaunchDate>2021-01-05T08:17:01</LaunchDate> <DescriptionData> <Title> Test</Title> <Brand>Test</Brand> <Description>This is a test case ,please agree this product publish</Description> <BulletPoint>made in China</BulletPoint> <BulletPoint>500 thread count</BulletPoint> <BulletPoint>plain weave (percale)</BulletPoint> <BulletPoint>100% Egyptian cotton</BulletPoint> <Manufacturer>Test</Manufacturer> <SearchTerms>Test</SearchTerms> <SearchTerms>Test-ying</SearchTerms> <ItemType>flat-sheets</ItemType> <IsGiftWrapAvailable>false</IsGiftWrapAvailable> <IsGiftMessageAvailable>false</IsGiftMessageAvailable> </DescriptionData> <ProductData> <Home> <Parentage>variation-parent</Parentage> <VariationData> <VariationTheme>Size-Color</VariationTheme> </VariationData> <Material>cotton</Material> <ThreadCount>500</ThreadCount> </Home> </ProductData> </Product> </Message> </AmazonEnvelope>
Get the return
<?xml version="1.0" encoding="UTF-8"?> <AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd"> <Header> <DocumentVersion>1.02</DocumentVersion> <MerchantIdentifier>XXXXXXXXX</MerchantIdentifier> </Header> <MessageType>ProcessingReport</MessageType> <Message> <MessageID>1</MessageID> <ProcessingReport> <DocumentTransactionID>XXXXXX</DocumentTransactionID> <StatusCode>Complete</StatusCode> <ProcessingSummary> <MessagesProcessed>0</MessagesProcessed> <MessagesSuccessful>0</MessagesSuccessful> <MessagesWithError>1</MessagesWithError> <MessagesWithWarning>0</MessagesWithWarning> </ProcessingSummary> <Result> <MessageID>0</MessageID> <ResultCode>Error</ResultCode> <ResultMessageCode>5001</ResultMessageCode> <ResultDescription>XML Parsing Fatal Error at Line 1, Column 226: The element type "Header" must be terminated by the matching end-tag "</Header>". The element type "Header" must be terminated by the matching end-tag "</Header>".</ResultDescription> </Result> </ProcessingReport> </Message> </AmazonEnvelope>
I can`t say something about XML, since I using CSV files. After uploading encrypted CSV file (I also using PUT Http request type for that) - I getting empty response and this is fine. After that - I do CreateFeed using FeedDocumentId which I got from CreateFeedDocument request.
@esalesplatform Thanks
This is a very old issue that is probably not getting as much attention as it deserves. We encourage you to check if this is still an issue after the latest release and if you find that this is still a problem, please feel free to open a new issue and make a reference to this one.
Hi , I am trying to connect with feeds api for uploading inventory information. I am successfully able to retrieve key and initializationVector . But when i use those keys in online tool for AES encryption . I get this error "Length of secret key should be 32 for 256 bits key size" . When i try aes js library in my javascript code , I get the this error "Error: invalid initialation vector size (must be 16 bytes)". I have tried different things e.g decoded key and initialation from base64 to utf-8 ,base64 to hex etc but it doesn't work and i get same error . Does anyone know what is the issue ? Am i missing out something ?