Amazon SP API Feed POST_ORDER_FULFILLMENT_DATA Error ResultMessageCode 25 [closed] - amazon

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 days ago.
Improve this question
I'm getting error from feeds API. I've tried with and without Item tag section, chaneging shipping cariers and dates, but it did not help. Any ideas what else could be wrong? Request document:
<?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.01</DocumentVersion>
<MerchantIdentifier>???????</MerchantIdentifier>
</Header>
<MessageType>OrderFulfillment</MessageType>
<Message>
<MessageID>1</MessageID>
<OrderFulfillment>
<AmazonOrderID>305-8114363-8651532</AmazonOrderID>
<FulfillmentDate>2022-08-31T12:00:00</FulfillmentDate>
<FulfillmentData>
<CarrierCode>UPS</CarrierCode>
<ShipperTrackingNumber>xxxxx</ShipperTrackingNumber>
<ShippingMethod>Standard</ShippingMethod>
</FulfillmentData>
</OrderFulfillment>
</Message>
</AmazonEnvelope>
And getting Feed document response
<?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>xxxx</MerchantIdentifier>
</Header>
<MessageType>ProcessingReport</MessageType>
<Message>
<MessageID>1</MessageID>
<ProcessingReport>
<DocumentTransactionID>51256019234</DocumentTransactionID>
<StatusCode>Complete</StatusCode>
<ProcessingSummary>
<MessagesProcessed>1</MessagesProcessed>
<MessagesSuccessful>0</MessagesSuccessful>
<MessagesWithError>1</MessagesWithError>
<MessagesWithWarning>0</MessagesWithWarning>
</ProcessingSummary>
<Result>
<MessageID>1</MessageID>
<ResultCode>Error</ResultCode>
<ResultMessageCode>25</ResultMessageCode>
<ResultDescription>We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed.</ResultDescription>
</Result>
</ProcessingReport>
</Message>
</AmazonEnvelope>

Removing ShippingMethod did the thing

In the amazon feed, the main issue is formatting we have to submit the feed document in a proper format otherwise you always face the issue.
I just format the code in a proper way and got success again.
The should be a proper indent or better to use the plugin in your IDE to format the XML

In my case I was sending an incorrect dateTime format under FulfillmentDate tag.
Changing it to the iso-8601 did the trick https://developer-docs.amazon.com/sp-api/docs/iso-8601
val utcTZ = TimeZone.getTimeZone("UTC")
val calendar = Calendar.getInstance(utcTZ)
val shippedDate = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSS'Z'").setTimeZone(utcTZ).format(calendar.getTime)
<FulfillmentDate>$shippedDate</FulfillmentDate>

Related

Oracle BI Report based on Excel template has no data when called through ReportService?

Oracle BI Publisher 12.2.1.4.0
I have a set of reports that I want to run using runReport Report Service. All the reports are working well when started within browser. The ones based on excel template when run through Report Service has just a header row with column labels. No data at all. Those based on BI template when asked for "xlsx format" through Report Service are all ok.
Those whose templates are created in excel (2019) using Oracle BI Publisher Desktop 12.2.1.4.0 add-on work ok unless called with SOAP envelope runReport action.
I'm doing something wrong, but could not find what. Not sure if the problem is in passing/formating parameters (dates especialy), or something else is missing or wrong in my SOAP:
<?xml version="1.0" encoding="utf-8"?>
<soap-env:Envelope xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<soap-env:Body>
<ns0:RunReport xmlns:ns0="http://xmlns.oracle.com/oxp/service/v2">
<ns0:reportRequest>
<ns0:attributeCalendar>Gregorian</ns0:attributeCalendar>
<ns0:attributeFormat>excel</ns0:attributeFormat>
<ns0:attributeLocale>hr-Hr</ns0:attributeLocale>
<ns0:attributeTemplate>_TO_EXCEL_WEEKS_Cards.xls</ns0:attributeTemplate>
<ns0:flattenXML>true</ns0:flattenXML>
<ns0:parameterNameValues>
<ns0:listOfParamNameValues>
<ns0:item>
<ns0:name>DateFrom</ns0:name>
<ns0:values>
<ns0:item>2022-05-01T00:00:00.000+02:00</ns0:item>
</ns0:values>
</ns0:item>
<ns0:item>
<ns0:name>DateTo</ns0:name>
<ns0:values>
<ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
</ns0:values>
</ns0:item>
<ns0:item>
<ns0:name>DateDeliveredTo</ns0:name>
<ns0:values>
<ns0:item>2022-05-28T00:00:00.000+02:00</ns0:item>
</ns0:values>
</ns0:item>
<ns0:item>
<ns0:name>Marcet</ns0:name>
<ns0:values>
<ns0:item>*</ns0:item>
</ns0:values>
</ns0:item>
</ns0:listOfParamNameValues>
</ns0:parameterNameValues>
<ns0:reportAbsolutePath>/MKTP/06-Sell/70_Offer/Reports/70_20_WEEKS_TO_EXCEL_TODAY_2022_REPORT.xdo</ns0:reportAbsolutePath>
<ns0:sizeOfDataChunkDownload>-1</ns0:sizeOfDataChunkDownload>
<ns0:byPassCache>True</ns0:byPassCache>
</ns0:reportRequest>
<ns0:userID>username</ns0:userID>
<ns0:password>password</ns0:password>
</ns0:RunReport>
</soap-env:Body>
</soap-env:Envelope>
I did try different attributeFormat tags (it works only when "excel", otherwise error), tryed to change the flattenXML tag (no data with true or false). Template is very simple with one group of repeating records and the header is always there, so there is not the problem with template name/location.
XDO_METADATA:
Data Constraints:
XDO_?XDOFIELD1? <?DOCTYPE?>
XDO_?XDOFIELD2? <?DOC_ID?>
XDO_?XDOFIELD3? <?STATUS?>
XDO_?XDOFIELD4? <?ORDER_ID?>
XDO_?XDOFIELD5? <?DOC_YEAR?>
XDO_?XDOFIELD6? <?DOC_NUM?>
XDO_?XDOFIELD7? <?DOC_DATE?>
...
...
XDO_GROUP_?XDOG1? <xsl:for-each select=".//G_1"> </xsl:for-each>
All the other reports (pdf-s) working ok whatever way they are run.
Thanks for your time...
Found it. The problem is parameter in BI defined as DATE. Changed it to text, adjusted the WHERE clause in dataset to something like
column Between To_Date(date_param1, 'dd.mm.yyyy') And To_Date(date_param2, 'dd.mm.yyyy')
and shortend the date parameter values in SOAP Envelope. It works now.
Anyway, I would like to know if there is a solution where I could keep my parameters in BI to stay of date type. This is a lot of boring things to do.

I get 'not implemented' response

Please see whether I'm right. A company claims that its cameras are Profile T compliant. So I visit this document to see what functions the cameras supports:
https://www.onvif.org/wp-content/uploads/2018/09/ONVIF_Profile_T_Specification_v1-0.pdf
In section 7.2.3 I see the function list for devices. I examine the first one, GetServices with the following command:
curl 192.168.11.92/onvif/device_service -d
'<?xml version="1.0" encoding="utf-8"?>
<soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http://www.w3.org/2003/05/soap-envelope">
<soap12:Body>
<GetServices xmlns="Battle of the Bulge, 75 years on" />
</soap12:Body>
</soap12:Envelope>'
The camera responds:
<?xml version="1.0" encoding="UTF-8"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:c14n="Exclusive XML Canonicalization Version 1.0" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:ds="XML-Signature Syntax and Processing" xmlns:tt="http://www.onvif.org/ver10/schema" xmlns:tns1="http://www.onvif.org/ver10/topics" xmlns:xmime="http://www.w3.org/2005/05/xmlmime" xmlns:xop="http://www.w3.org/2004/08/xop/include" xmlns:wsa="WS-Addressing 1.0 Namespace" xmlns:wsrfr="http://docs.oasis-open.org/wsrf/r-2" xmlns:wsrfrw="http://docs.oasis-open.org/wsrf/rw-2" xmlns:wsrfbf="http://docs.oasis-open.org/wsrf/bf-2" xmlns:wstop="http://docs.oasis-open.org/wsn/t-1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd" xmlns:wsnt="http://docs.oasis-open.org/wsn/b-2" xmlns:dn="http://www.onvif.org/ver10/network/wsdl" xmlns:tan="http://www.onvif.org/ver20/analytics/wsdl" xmlns:tds="http://www.onvif.org/ver10/device/wsdl" xmlns:tev="http://www.onvif.org/ver10/events/wsdl" xmlns:timg="http://www.onvif.org/ver20/imaging/wsdl" xmlns:tptz="http://www.onvif.org/ver20/ptz/wsdl" xmlns:trt="http://www.onvif.org/ver10/media/wsdl" xmlns:tmd="http://www.onvif.org/ver10/deviceIO/wsdl" xmlns:ter="http://www.onvif.org/ver10/error" xmlns:tavg="http://www.avigilon.com/onvif/ver10/avigilon-types" xmlns:tnsavg="http://www.avigilon.com/onvif/ver10/topics" xmlns:avg="http://www.avigilon.com/onvif/ver10/avigilon/wsdl" xmlns:avgb="http://www.avigilon.com/onvif/ver10/avigilon-base/wsdl" xmlns:d="Web Services Dynamic Discovery (WS-Discovery)">
<SOAP-ENV:Body>
<SOAP-ENV:Fault SOAP-ENV:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<SOAP-ENV:Code>
<SOAP-ENV:Value>
SOAP-ENV:Sender
</SOAP-ENV:Value>
</SOAP-ENV:Code>
<SOAP-ENV:Reason>
<SOAP-ENV:Text xml:lang="en">
Method 'GetServices' not implemented: method name or namespace not recognized
</SOAP-ENV:Text>
</SOAP-ENV:Reason>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
It says that the method is not implemented. Whatever I've examined until now got the same response. So I wonder maybe I've some mistakes in my requests.
Three points:
The namspace is wrong: xmlns="Battle of the Bulge, 75 years on". According to the Media 2 Service specs, it shall be http://www.onvif.org/ver20/media/wsdl.
This is not the way you are supposed to discover if a device supports Profile T. You should check if the scope onvif://www.onvif.org/Profile/T is returned by GetScopes or by discovering. A camera may implement Media Service 2 even if it is not Profile T compliant.
The best way to check if the claim of conformance to Profile T is correct, it to check the Declaration of Conformance being uploaded on the ONVIF website.
The correct way to specify the operation is
<wsdl:GetServices xmlns:wsdl="http://www.onvif.org/ver10/device/wsdl">
Reason: your main request,
<GetServices xmlns="Battle of the Bulge, 75 years on" />
is wrong for several reasons.
The most important is that you refer the operation by its local (unqualified) name. The correct name must be qualified, including a namespace. It is usually represented as {http://www.onvif.org/ver10/device/wsdl}GetService, but it must be used as wsdl:GetService
You can not use just any string as namespace; it must be the one that was used when the operation was defined (in this case, in devicemgmt.wsdl is defined as above)
Your definition of the namespace via xmlns is wrong, as it does not secify the namespace, only its value. The namespace used must be defined using the syntax xmlns:<uour namespace short>=<namespace as url>.
The namespace must be defined in the tag where it is used or one of its parents. It is most common to define all namespaces at the topmost level (root node/element)
and will return a list of services present, such as analytics, deviceio, event, etc. If the device supports Profile T, it will have Media2 service present, as below (not that is actually enabled, you need to use GetScopes for that or check the discovery message, as the other poster said)
<tds:Service>
<tds:Namespace>http://www.onvif.org/ver20/media/wsdl</tds:Namespace>
<tds:XAddr>http://10.12.34.56/onvif/media_service</tds:XAddr>
<tds:Version>
<tt:Major>17</tt:Major>
<tt:Minor>12</tt:Minor>
</tds:Version>
</tds:Service>

NodeJS Amazon AWS Submit Feed Generic Error

I am trying to submit a product feed to AWS and I keep getting a generic error related to the XML I am sending
I have gone through all the .xsd files and come up what I believe to be correct xml but apparently not :(
The Error
{
"MessageID": "1",
"ResultCode": "Error",
"ResultMessageCode": "25",
"ResultDescription": "We are unable to process the XML feed because one or more items are invalid. Please re-submit the feed."
}
How I am creating the content
const getContent = (upc) => `<?xml version="1.0" encoding="iso-8859-1"?>
<AmazonEnvelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="amzn-envelope.xsd">
<Header>
<DocumentVersion>1.01</DocumentVersion>
<MerchantIdentifier>${process.env.MERCHANT_ID}</MerchantIdentifier>
</Header>
<MessageType>Product</MessageType>
<Message>
<MessageID>1</MessageID>
<OperationType>Update</OperationType>
<Product>
<SKU>${upc}</SKU>
</Product>
</Message>
</AmazonEnvelope>`
Turns out this just means a value in the xml is malformed. It helped a lot to search the xsd files for the specific variable I was trying to tie a value to and then it provides the restrictions on that value (i.e. AmazonOrderId has a regex validation associated with it that restricts the value to be in the structure of 123-1234567-1234567). After I manually ran through this process for each variable I was able to submit a feed finally but now I have to have an associated OrderAcknowledgement which I am working through.

How to store payload and append it to another payload later?

I am using Spring Integration in my project. I have the following payload.
<?xml version="1.0" encoding="UTF-8"?>
<PQ>
<PQContact>
<hostAddress>10.193.244.136</hostAddress>
</PQContact>
<workflowStatusComment>
<comment>I am here</comment>
</workflowStatusComment>
</PQ>
I want to extract the tag <workflowStatusComment> i.e workflowStatusComment <comment>I am here</comment></workflowStatusComment> and save it for future purpose. I don't want to use any java code to use the saved tag info in the future. I want to add the saved info to another payload at the end of the execution.I know about header enrichers, but I don't know how to use the saved header enriched values without using java. I have to only use Spring Integration components to manipulate the payload.
The second payload to which I am going to append the saved tag info is here:
<?xml version="1.0" encoding="UTF-8"?>
<PQ>
<PQContact>
<hostAddress>10.193.244.136</hostAddress>
<name>Ashok</name>
<userId>007</userId>
</PQContact>
</PQ>
After appending the saved tag info to the above payload, my final payload should look like the initial payload with some extra information. Something like below:
<?xml version="1.0" encoding="UTF-8"?>
<PQ>
<PQContact>
<hostAddress>10.193.244.136</hostAddress>
<name>Ashok</name>
<userId>007</userId>
</PQContact>
<workflowStatusComment>
<comment>I am here</comment>
</workflowStatusComment>
</PQ>
is there any way?
You can extract that info from the XML using <int-xml:xpath-transformer> or #xpath() SpEL-function.
But you have to share with us what is your "another payload" and how you would like to add this extracted.
Maybe it even better to have some solution with Java and than we consider here how to convert it into Spring Integration XML DSL or similar.
Please, revise your question to make it more clearer.
UPDATE
To insert one XML into another you have to fight a bit javax.xml API.
The code might be something like this:
DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
Document target = builder.parse(new StringBufferInputStream(targetXML));
Element source = builder.parse(new StringBufferInputStream(sourceXML)).getDocumentElement();
target.appendChild(source);
UPDATE 2
But I don't want to use any java code.
Well, if your target XML can represent as a template string you can use standard replaceFirst() in the <transformer> with expression:
String targetXml = "";
<transformer expression="'<?xml version="1.0" encoding="UTF-8"?>
<PQ>
<PQContact>
<hostAddress>10.193.244.136</hostAddress>
<name>Ashok</name>
<userId>007</userId>
</PQContact>
$workflowStatusCommentToken$
</PQ>'.replaceFirst('\\$workflowStatusCommentToken\\$', headers.originalXml)"/>

DocuSign API using XML to move Envelope to Recycle Bin

I'm having issues trying to move a completed envelope into the deleted bin in DocuSign using the REST API. The error I am getting is:
<errorDetails xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<errorCode>INVALID_REQUEST_BODY</errorCode>
<message>The request body is missing or improperly formatted. <envelopeMoveRequest xmlns=''> was not expected.</message>
</errorDetails>
Here is the API call I make:
Address: https://www.docusign.net/restapi/v2/accounts/{accountid}/folders/recyclebin Http-Method: PUT
Content-Type: application/xml
Headers: {Content-Type=[application/xml], Accept=[application/xml], X-DocuSign-Authentication=[{"Username":"username","Password":"password","IntegratorKey":"integrator key"}], Context-Length=[31274]}
Payload:
<?xml version="1.0" encoding="UTF-8"?>
<envelopeMoveRequest xmlns="http://www.docusign.com/restapi" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
<envelopeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>EnvelopeId</d2p1:string>
</envelopeIds>
<fromFolderId/>
</envelopeMoveRequest>
I could use some help figuring out how my API call is wrong.
The following just worked for me. Make sure you are not copy/pasting any hidden or extra characters as well:
<envelopeMoveRequest xmlns:i="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.docusign.com/restapi">
<envelopeIds xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays">
<d2p1:string>828a593e-10ae-4e54-bccc-66b5e66a5e81</d2p1:string>
</envelopeIds>
</envelopeMoveRequest>
Usually the corresponding XML for DocuSign requests (when compared to the JSON equivalent) has extra nodes representing individual elements of a collection or array. So in this case try adding an individual node for each envelopeId.
Right now you have:
<envelopeIds>EnvelopeId</envelopeIds>
Try changing to this:
<envelopeIds>
<envelopeId>EnvelopeId</envelopeId>
</envelopeIds>

Resources