XOG WSDL

Each XOG service includes a Web Service Description Language (WSDL) file. The WSDL describes the available XOG services and how to communicate with them.
ccppmop154
Each XOG service includes a Web Service Description Language (WSDL) file. The WSDL describes the available XOG services and how to communicate with them.
 
View the XOG WSDL Files
You can access the XOG WSDL on the 
Clarity PPM
 application server at the following URL:
http://<servername:port>/niku/wsdl
The resulting XOG WSDL web page shows a list of three XOG service category links.
  • InvokeAction
  • Query
  • Object
To view the included services, click a category link. For example, if you click InvokeAction, you see the Process service. Click the Object link and then select the All Objects link to access the WSDL for all objects on a single page.
The WSDL for queries is not prepackaged. A WSDL for a query only exists if you created an NSQL query in Studio. Depending on the number of NSQL queries already defined in Studio, you see the corresponding number of WSDLs.
Each service appears in HTML in your browser and includes a
(save as...)
option to download the XML file. Many tools exist that you can use to improve the readability and display of the WSDL. You can use a stand-alone viewer. To map data from one system to another, use Enterprise Application Integration (EAI) software. For more information about web services and WSDL, see the W3C website at w3.org.
WSDL Emitter Tools
A client program connecting to the XOG can read the WSDL to determine what functions are available on the server. Any special data types that are used are embedded in the WSDL file in the form of XML Schema. The XOG WSDL has been validated against these platforms:
  • Apache Axis 1.3 or newer
  • Microsoft Visual Studio 2005 (.NET) or newer
These emitter tools can interpret the XOG WSDL to enable communication with 
Clarity PPM
 as a web service. Because the XOG WSDL is compatible with Axis and .NET, these emitter tools generate an accurate and usable proxy API from the XOG WSDL. This capability facilitates interaction with the XOG services in the context of Axis or .NET.
Example: Process WSDL
This example illustrates the WSDL for the Process service:
<definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.niku.com/xog/InvokeAction" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" name="InvokeActionProcess" targetNamespace="http://www.niku.com/xog/InvokeAction"> <types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.niku.com/xog/InvokeAction"> <xsd:complexType name="Process"> <xsd:sequence> <xsd:element name="code" type="xsd:string" minOccurs="1" maxOccurs="1"/> <xsd:element name="request" minOccurs="0" maxOccurs="1"> <xsd:complexType> <xsd:sequence> <xsd:any/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:sequence> </xsd:complexType> <xsd:element name="Process" type="tns:Process"/> <xsd:element name="Auth"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" name="SessionID" type="xsd:string"/> <xsd:element minOccurs="0" name="Username" type="xsd:string"/> <xsd:element minOccurs="0" name="Password" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="Login"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" name="Username" type="xsd:string"/> <xsd:element minOccurs="0" name="Password" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="SessionID" type="xsd:string"/> <xsd:element name="Logout"> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="0" name="SessionID" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </types> <message name="Process"> <part element="tns:Process" name="body"/> <part element="tns:Auth" name="header"/> </message> <message name="Auth"> <part element="tns:Auth" name="header"/> </message> <message name="Login"> <part element="tns:Login" name="parameters"/> </message> <message name="LoginResponse"> <part element="tns:SessionID" name="body"/> </message> <message name="Logout"> <part element="tns:Logout" name="parameters"/> </message> <portType name="ProcessPort"> <operation name="Process"> <input message="tns:Process"/> </operation> <operation name="Login"> <input message="tns:Login"/> <output message="tns:LoginResponse"/> </operation> <operation name="Logout"> <input message="tns:Logout"/> </operation> </portType> <binding name="ProcessSoapBinding" type="tns:ProcessPort"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="Process"> <soap:operation soapAction="http://www.niku.com/xog/InvokeAction/Process" style="document"/> <input> <soap:body parts="body" use="literal"/> <soap:header message="tns:Auth" part="header" use="literal"/> </input> </operation> <operation name="Login"> <soap:operation soapAction="http://www.niku.com/xog/InvokeAction/Login" style="document"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="Logout"> <soap:operation soapAction="http://www.niku.com/xog/InvokeAction/Logout" style="document"/> <input> <soap:body use="literal"/> </input> </operation> </binding> <service name="ProcessService"> <documentation>Invoke Action Process Service </documentation> <port binding="tns:ProcessSoapBinding" name="ProcessService"> <soap:address location="http://<servername:port>//xog"/> </port> </service> </definitions>
 <xsd any> and Process WSDL
The request and response types of the Object WSDL are defined as <xsd:any> as illustrated in the Process WSDL example. However, the schema of these request/response types must be consistent with the corresponding XOG Object schema (as seen in the .xsd file). This example shows the SOAP representation of the Project object WSDL for the ReadProject operation. The
bold DataBus document
shows the correct representation of the DataBus <xsd:any> type.
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<soap:Header>
<Auth xmlns="http://www.niku.com/xog/Object">
<SessionID>5000156__171120a:10a241ff830:-7f711143139816999</SessionID>
</Auth>
</soap:Header>
<soap:Body>
<ReadProject xmlns="http://www.niku.com/xog/Object">
<DataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/xog_read.xsd" xmlns="">
<Header version="12.0.0.5028" externalSource="NIKU" />
<Query>
<Filter name="subject" criteria="EQUALS">admin</Filter>
</Query>
</DataBus>
</ReadProject>
</soap:Body>
</soap:Envelope>
Example: Demand for Resource Query WSDL
This example illustrates the WSDL for the Demand for Resource query service:
<definitions xmlns:tns="http://www.niku.com/xog/Query" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" name="DemandforResourceQuery" targetNamespace="http://www.niku.com/xog/Query"> <types> <xsd:schema elementFormDefault="qualified" targetNamespace="http://www.niku.com/xog/Query"> <xsd:complexType name="DemandforResourceFilter"> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="0" name="actual_hours" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="actual_hours_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="actual_hours_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="allocated_hours" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="allocated_hours_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="allocated_hours_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="estimated_effort" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="estimated_effort_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="estimated_effort_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_name" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_name_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_name_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_name_wildcard" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_id" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_id_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="resource_id_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_key" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_key_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_key_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_key_wildcard" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_level" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_level_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_level_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_level_wildcard" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_label" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_label_from" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_label_to" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="calendar_time_label_wildcard" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DemandforResourceQuery"> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="Code" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="0" name="Filter" type="tns:DemandforResourceFilter"/> </xsd:sequence> </xsd:complexType> <xsd:element name="Query" type="tns:DemandforResourceQuery"/> <xsd:complexType name="DemandforResourceRecord"> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="actual_hours" type="xsd:decimal"/> <xsd:element maxOccurs="1" minOccurs="1" name="allocated_hours" type="xsd:decimal"/> <xsd:element maxOccurs="1" minOccurs="1" name="estimated_effort" type="xsd:decimal"/> <xsd:element maxOccurs="1" minOccurs="1" name="resource_name" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="1" name="resource_id" type="xsd:long"/> <xsd:element maxOccurs="1" minOccurs="1" name="calendar_time_key" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="1" name="calendar_time_level" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="1" name="calendar_time_label" type="xsd:string"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DemandforResourceRecords"> <xsd:sequence> <xsd:element maxOccurs="unbounded" minOccurs="0" name="Record" type="tns:DemandforResourceRecord"/> </xsd:sequence> </xsd:complexType> <xsd:complexType name="DemandforResourceQueryResult"> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="1" name="Code" type="xsd:string"/> <xsd:element maxOccurs="1" minOccurs="1" name="Records" type="tns:DemandforResourceRecords"/> </xsd:sequence> </xsd:complexType> <xsd:element name="QueryResult" type="tns:DemandforResourceQueryResult"/> <xsd:element name="Auth"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="0" name="SessionID" type="xsd:string"/> <xsd:element minOccurs="0" name="Username" type="xsd:string"/> <xsd:element minOccurs="0" name="Password" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="Login"> <xsd:complexType> <xsd:sequence> <xsd:element minOccurs="1" name="Username" type="xsd:string"/> <xsd:element minOccurs="0" name="Password" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:element name="SessionID" type="xsd:string"/> <xsd:element name="Logout"> <xsd:complexType> <xsd:sequence> <xsd:element maxOccurs="1" minOccurs="0" name="SessionID" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:element> </xsd:schema> </types> <message name="Query"> <part element="tns:Query" name="body"/> <part element="tns:Auth" name="header"/> </message> <message name="QueryResult"> <part element="tns:QueryResult" name="body"/> </message> <message name="Auth"> <part element="tns:Auth" name="header"/> </message> <message name="Login"> <part element="tns:Login" name="parameters"/> </message> <message name="LoginResult"> <part element="tns:SessionID" name="body"/> </message> <message name="Logout"> <part element="tns:Logout" name="parameters"/> </message> <portType name="DemandforResourceQueryPort"> <operation name="Query"> <input message="tns:Query"/> <output message="tns:QueryResult"/> </operation> <operation name="Login"> <input message="tns:Login"/> <output message="tns:LoginResult"/> </operation> <operation name="Logout"> <input message="tns:Logout"/> </operation> </portType> <binding name="DemandforResourceQuerySoapBinding" type="tns:DemandforResourceQueryPort"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="Query"> <soap:operation soapAction="http://www.niku.com/xog/Query/DemandforResource" style="document"/> <input> <soap:body parts="body" use="literal"/> <soap:header message="tns:Auth" part="header" use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="Login"> <soap:operation soapAction="http://www.niku.com/xog/Query/Login" style="document"/> <input> <soap:body use="literal"/> </input> <output> <soap:body use="literal"/> </output> </operation> <operation name="Logout"> <soap:operation soapAction="http://www.niku.com/xog/Query/Logout" style="document"/> <input> <soap:body use="literal"/> </input> </operation> </binding> <service name="DemandforResourceQueryService"> <documentation>Demand for Resource Query Service </documentation> <port binding="tns:DemandforResourceQuerySoapBinding" name="DemandforResourceQueryService"> <soap:address location="http://<servername:port>//xog"/> </port> </service> </definitions>
Generate Supporting API
Both Apache Axis and Microsoft Visual Studio have emitter tools that generate proxy classes that are based on service descriptions that conform to the WSDL.
Generate a Proxy API from Axis
The emitter tool that is packaged with Apache AXIS is WSDL2Java. The following example shows how to initiate this tool from the command line against the All Objects XOG WSDL.
java -cp lib\wsdl4j-1.5.1.jar;lib\commons-discovery-0.2.jar;lib\axis.jar;lib\log4j-1.2.8.jar;lib\commons-logging-1.0.4.jar;lib\jaxrpc.jar org.apache.axis.wsdl.WSDL2Java -W [url]
You must include the -W flag when generating the proxy API from the XOG WSDL definitions. This flag indicates that the WSDL is the document/literal style. If you do not include the -W flag, it is assumed that the WSDL is the wrapped/literal style, which is incorrect. If you do not include this flag, an error is thrown in the proxy generation but the resulting API will cause runtime errors when trying to communicate with the XOG interfaces.
The default output location of the proxy files follows the namespace convention that is defined in the WSDL. Because the targetNamespace that is defined in the All Object WSDL is
http://www.niku.com/xog/Object
, the resulting proxy classes from the command-line request reside in D:\axis\com\niku\www\xog\Object.
For exact syntax to use with Apache Axis2 for generating a proxy API, refer to the Apache documentation.
For details and sample Java on how to consume 
Clarity PPM
web services using Apache Axis or Apache Axis2, refer to the
Clarity PPM
Gobal user community and search using "apache".
Add a Web Reference from Microsoft Visual Studio
The emitter tool that is packaged with Microsoft Visual Studio is implemented as a web reference. The reference is developed from within a project that is within the Microsoft Visual Studio user interface.
Follow these steps:
  1. From Project, select Add Web Reference.
  2. In URL, enter the desired XOG WSDL URL and click Go.
  3. In Web Reference Name, enter a name for the service and click Add Reference.
    The generated proxy API for the
    All Objects
    Web Reference is on the left side of the page. This enables a developer to communicate programmatically with the services that are defined in the
    All Objects
    Web Reference.