Ariba Response For Setup Request

2.1k Views Asked by At

I have a question about Ariba punchoutSetupRequest.

My API response is like this:

<?xml version="1.0" encoding="UTF-8"?>
<cXML payloadID="1454654070603.1234567890@ctoms1234" timeStamp="2016-02-05T15:34:30-15:00">
    <Response>
        <Status code="400" text="Failed"/>
        <PunchOutSetupResponse>
            <StartPage>
                <URL>http://ARIBA-TEST.ty.chugai-pharm.co.jp/Buyer/punchout?client=HTML.8gnyW0CvGJ1R!-34269844!1454653851331&amp;responseid=5&amp;locale=ja_JP</URL>
            </StartPage>
        </PunchOutSetupResponse>
    </Response>
</cXML>

However, Ariba calls my API and response like this to me.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.034/cXML.dtd">
<cXML payloadID="[email protected]" timestamp="2017-07-27T23:57:54-07:00">
    <Response>
        <Status code="500" text="Internal Server Error">Error:Punchout error from supplier:Response:
            <!DOCTYPE cXML SYSTEM "http://xml.cxml.org/schemas/cXML/1.2.014/cXML.dtd">
            <cXML payloadID="[email protected]" timestamp="2005-06-14T12:59:09-07:00">
                <Response>
                    <Status code="400" text="Bad request"/>
                    <PunchOutSetupResponse>
                        <StartPage>
                             <URL>https://punchout.workchairs.com/Servlet/sessionid=7006</URL>
                        </StartPage>
                    </PunchOutSetupResponse>
                </Response>
            </cXML>
            Please contact support with the Error Reference Number: ANERR-10000000000000000381125876 for more details
        </Status>
    </Response>
</cXML>

Anyone can help me to fix it? Not sure about my response for setupRequest API.

2

There are 2 best solutions below

4
On BEST ANSWER

so just to be clear, you're setting up the supplier side of the transaction ?

why do you reply with a 400 code, 400 will mean there is an error and the PunchOutSetupRequest transaction is not correct, its unlikely you want to send the StartPage (entry for your punch out catalog) if the request is not valid, your API should serve

<?xml version="1.0" encoding="UTF-8"?>
<cXML payloadID="1454654070603.1234567890@ctoms1234" timeStamp="2016-02-05T15:34:30-15:00">
    <Response>
        <Status code="200" text="success"/>
        <PunchOutSetupResponse>
            <StartPage>
                <URL>http://ARIBA-TEST.ty.chugai-pharm.co.jp/Buyer/punchout?client=HTML.8gnyW0CvGJ1R!-34269844!1454653851331&amp;responseid=5&amp;locale=ja_JP</URL>
            </StartPage>
        </PunchOutSetupResponse>
    </Response>
</cXML>
0
On

In Ariba cXML a 400 code has specific meaning such as if one were to have sent a duplicate to an already processed request. For example submit an invoice with an operation = "new" and then attempt to issue a creditmemo for the same invoice number, without operation = "update" value in the header. The other typical 400 code causes are missing payload id, missing timestamp, missing "code required by the particular transaction" missing, etc.