IT Process Automation

  • 1.  Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Dec 17, 2014 03:55 AM

    Hi all,

     

    I'm working to extract a few fields of Project data from Clarity PPM into CA SDM using PAM.  Having trouble with the the 'ReadProject' operation - clearly the XML I'm passing is incorrect, although the essentials are OK as I can run the operation successfully through SoapUI (which places the 'Auth' into the SOAP header).

     

    This is what is currently in the 'Inline Text' of my PAM operator - and I am substituting a Process.SessionID retrieved from the Login operator into the SessionID__ macro in the 'Auth' block:

     

    <tns:ReadProject xmlns:tns="http://www.niku.com/xog/Object">

      <tns:ReadProject>

    <NikuDataBus xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../xsd/nikuxog_read.xsd'>

      

       <Header version='13.3.0.0286' externalSource='NIKU'>

      <args name="order_by_1" value="name"/>

      <args name="order_by_2" value="ProjectID"/>

     

      <args name="include_tasks" value="false"/>

      <args name="include_dependencies" value="false"/>

      <args name="include_subprojects" value="false"/>

      <args name="include_resources" value="false"/>

      <args name="include_baselines" value="false"/>

      <args name="include_allocations" value="false"/>

      <args name="include_estimates" value="false"/>

      <args name="include_actuals" value="false"/>

      <args name="include_custom" value="false"/>

       </Header>

      

       <Query>

      <Filter name="active" criteria="EQUALS">true</Filter>

       </Query>

    </NikuDataBus>

      </tns:ReadProject>

     

      <tns:Auth>

    <tns:SessionID>SessionID__</tns:SessionID>

      </tns:Auth>

    </tns:ReadProject>

     

    When I run this in PAM I get this error:

    "No active session.  Please login or provide a valid session identifier."

     

    Hoping someone can point out where I've gone wrong!

    Regards,

    James



  • 2.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Dec 17, 2014 11:36 AM

    Hi James,

     

    Are you sure the session ID placeholder in the XML is being properly replaced?  One of the fields in the operator allows you to save the request to the file system.  This will show you the exact request with all substitutions already applies.

     

    Thanks,

    Tom



  • 3.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Dec 17, 2014 10:44 PM

    Hi Tom, thanks for responding.  The placeholder is being replaced properly - here is the saved file:

     

    <?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:Header/><SOAP-ENV:Body><tns:ReadProject xmlns:tns="http://www.niku.com/xog/Object">
      <tns:ReadProject>
    <NikuDataBus xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../xsd/nikuxog_read.xsd">

     

    <Header externalSource="NIKU" version="13.3.0.0286">
       <args name="order_by_1" value="name"/>
       <args name="order_by_2" value="ProjectID"/>
      
       <args name="include_tasks" value="false"/>
       <args name="include_dependencies" value="false"/>
       <args name="include_subprojects" value="false"/>
       <args name="include_resources" value="false"/>
       <args name="include_baselines" value="false"/>
       <args name="include_allocations" value="false"/>
       <args name="include_estimates" value="false"/>
       <args name="include_actuals" value="false"/>
       <args name="include_custom" value="false"/>
    </Header>

     

    <Query>
       <Filter criteria="EQUALS" name="active">true</Filter>
    </Query>
      </NikuDataBus>
      </tns:ReadProject>
      <tns:Auth>
    <tns:SessionID>9102371__938F6AC6-0A39-45F4-8AF7-D0BAED1BF9C9</tns:SessionID>

      </tns:Auth>
    </tns:ReadProject></SOAP-ENV:Body></SOAP-ENV:Envelope>

     

    One curious thing is that when I import the WSDL using SoapUI the 'Auth' block goes into the SOAP Header rather than into the Body.  Here is how SoapUI presents the ReadProject operation, before I add the 'NikuDataBus' component between the 'obj:ReadProject' tags:

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">

       <soapenv:Header>

          <obj:Auth>

             <!--Optional:-->

             <obj:SessionID>?</obj:SessionID>

             <!--Optional:-->

             <obj:TenantID>?</obj:TenantID>

             <!--Optional:-->

             <obj:Username>?</obj:Username>

             <!--Optional:-->

             <obj:Password>?</obj:Password>

          </obj:Auth>

       </soapenv:Header>

       <soapenv:Body>

          <obj:ReadProject>

             <!--You may enter ANY elements at this point-->

          </obj:ReadProject>

       </soapenv:Body>

    </soapenv:Envelope>

     

    And here is how PAM 'wsdl wizard' presents the same wsdl:

    <tns:ReadProject xmlns:tns="http://www.niku.com/xog/Object">

      <tns:ReadProject>

         <!--xsd:Any Type Here-->

      </tns:ReadProject>

      <tns:Auth>

         <tns:SessionID>SessionID__</tns:SessionID>

         <tns:TenantID>TenantID__</tns:TenantID>

         <tns:Username>Username__</tns:Username>

         <tns:Password>Password__</tns:Password>

      </tns:Auth>

    </tns:ReadProject>

     

    So, my solution so far is to load the XML payload below from a file into PAM, copying the format that 'SoapUI' produces, and substitute in the Session ID. This gets the desired project data returned:

     

    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:obj="http://www.niku.com/xog/Object">
       <soapenv:Header>
          <obj:Auth>
             <!--Optional:-->
             <obj:SessionID>SessionID__</obj:SessionID>
          </obj:Auth>
       </soapenv:Header>
       <soapenv:Body>
       <obj:ReadProject xmlns:obj='http://www.niku.com/xog/Object'>

    <NikuDataBus xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='../xsd/nikuxog_read.xsd'>

     

      <Header version='13.3.0.0286' externalSource='NIKU'>
       <args name="order_by_1" value="name"/>
       <args name="order_by_2" value="ProjectID"/>
       
       <args name="include_tasks" value="false"/>
       <args name="include_dependencies" value="false"/>
       <args name="include_subprojects" value="false"/>
       <args name="include_resources" value="false"/>
       <args name="include_baselines" value="false"/>
       <args name="include_allocations" value="false"/>
       <args name="include_estimates" value="false"/>
       <args name="include_actuals" value="false"/>
       <args name="include_custom" value="false"/>
      </Header>
      
      <Query>
       <Filter name="active" criteria="EQUALS">true</Filter>
      </Query>
    </NikuDataBus>
       </obj:ReadProject>
       </soapenv:Body>
    </soapenv:Envelope>

     

    Is this the best way to go about constructing a call to PPM?  Any comments you can make will be most welcome.

    Regards,

    James



  • 4.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM
    Best Answer

    Posted Dec 18, 2014 09:24 AM

    PAM imports the body into the inline text and automatically creates the header when you execute.  But instead of that, you can just copy/paste the request from SoapUI (including the header) to the inline text.  If the header exists there, PAM will not add another one to it.  Try this approach and see if you get a better result.



  • 5.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Dec 18, 2014 10:04 PM

    Thanks!  That works perfectly.  Just what I was looking for.



  • 6.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Jan 15, 2015 10:43 PM

    Hi Tom,

     

    I have my PAM process to extract Project data from PPM working fine in my Dev environment.  From the customer's server, however, I can't log on to PPM from PAM, although I can log on from 'SoapUI'.

     

    The logon operation in PAM returns 'SOAP invocation failed: java.security.PrivilegedActionException: com.sun.xml.messaging.saaj.SOAPExceptionImpl: Message send failed'

     

    In c2o.log there are messages suggesting that the connection times out, but from SoapUI the log on only takes a couple of seconds.

     

    Do you have some troubleshooting hints for resolving that sort of issue?

     

    Regards,

    James



  • 7.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Jan 15, 2015 10:51 PM

    It sounds like the customer's PPM instance has a self-signed SSL certificate.  Is that the case?  If so, you'll need to import the certificate into the keystore of the JRE or JDK being used by the Orchestrator/Agent.

     

    Thanks,

    Tom



  • 8.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Feb 12, 2015 11:44 PM

    Hi Tom,

     

    I'm returning to this issue after having to work on something else for a while.  The PPM instance has a certificate signed by Entrust, not self-signed.  I have been sent the crt file anyway, and have imported it into both the JDK and JRE keystores but PAM still fails to log on. I'm at a bit of a loss as to where to start looking for the issue, any guidance would be most appreciated.

     

    Regards,

    James



  • 9.  Re: Call Clarity PPM 'ReadProject' SOAP operator from PAM

    Posted Feb 22, 2015 09:58 PM

    After installing Wireshark and running traces of both SoapUI and PAM, it became evident that SoapUI looks at the host system for proxy settings, but PAM doesn't.  Followed the recommendation in this posting: Using a SOAP operator with a corporate proxy - except that as my process is running on the PAM server rather than on an agent, the file to modify is c2osvcw.conf.  Ticket 00027908 refers.