sap-aribacxml-commercexml

Ariba Response For Setup Request


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="1501225074983-2497119422372518906@216.109.111.6" 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="958074700772@www.workchairs.com" 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.


Solution

  • 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>