search cancel

Custom XOG script failing when using http://www.niku.com/xog as namespace

book

Article ID: 142833

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

Custom XOG script failing with  "Make sure there is a valid namespace associated to the root element of the request document" when using http://www.niku.com/xog as namespace

When running a custom script, error is thrown: 


        <Exception type="com.niku.xog.XOGException">Invalid XOG Service Request.  Make sure there is a valid namespace associated to the root element of the request document.</Exception>

The GEL script was configured as follows:
    <soapenv:Envelope
                xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xog="http://www.niku.com/xog">
                <soapenv:Header/>
                <soapenv:Body>
                    <xog:Login>
                        <xog:Username>${XOGUsername}</xog:Username>
                        <xog:Password>${XOGPassword}</xog:Password>
                    </xog:Login>
                </soapenv:Body>
            </soapenv:Envelope>

Environment

Release : All supported Clarity releases with XOG

Resolution

These are the calls that should be used with the XOG:

  • For WSDL query calls: http://www.niku.com/xog/Query
  • For object calls: http://www.niku.com/xog/Object
  • http://www.niku.com/xog is incomplete in those contexts and will not work.

Please end the XOG namespace declarations with /Object or /Query accordingly. The product will generate the requests automatically from the WSDL urls which can be seen in SoapUI or Postman. 

Here is documentation referring to the need to do this:
https://techdocs.broadcom.com/content/broadcom/techdocs/us/en/ca-enterprise-software/business-management/clarity-project-and-portfolio-management-ppm-on-premise/15-6/reference/xml-open-gateway-xog-development/xog-services-object-api.html
"The namespace http://www.niku.com/xog/Object  must be localized in your request file to the <ActionObject> element. This localization is accomplished with the obj prefix. If you do not include this prefix, you see an error during the processing of the request."

Note: the namespace declarations are case-sensitive.