If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Allow SDK connections to Cognos

Started by psenechal, 01 Dec 2009 05:22:53 PM

Previous topic - Next topic

psenechal

I have the SDK installed and I ran a very simple C# app to login to Cognos and retrieve the CAM Passport. I'm getting the following error:

CM-REQ-4342 An error occurred with the client.

I'm pretty sure it's because my Cognos Configuration file has not been setup to allow remote connections. We're running Cognos on Unix which just isn't my specialty, but I'm thinking some of these options need to be enabled...I just don't know which ones:


              <crn:instances name="DS_NET_CONNECTION" disabled="true">
                <!-- localhost: Defines a group of properties used to define a server connection.  -->
                <!-- Ensure that the server exists and that the resource name is the host name of the
                     remote server.  -->
                <crn:instance name="localhost" class="DS_NET_SERVERCONNECTION" disabled="true">
                  <!-- DS_NET_PORT: Specifies the port of the remote connection.  -->
                  <crn:parameter name="DS_NET_PORT" disabled="true">
                    <crn:value xsi:type="xsd:unsignedShort">9300</crn:value>
                  </crn:parameter>
                  <!-- DS_NET_PROTOCOL: The protocol used for remote connection.  -->
                  <!-- Use this property to specify the protocol for the remote connection.  -->
                  <crn:parameter name="DS_NET_PROTOCOL" disabled="true">
                    <crn:value xsi:type="xsd:string">SOAP</crn:value>
                  </crn:parameter>
                  <!-- DS_NET_PWD: The service access password for the Data Manager network server.  -->
                  <crn:parameter name="DS_NET_PWD" disabled="true">
                    <crn:value xsi:type="cfg:systemPassword">NoPassWordSet</crn:value>
                  </crn:parameter>
                </crn:instance>
              </crn:instances>


Do I just need to change the flag to FALSE on the disabled tags in DS_NET_CONNECTION, DS_NET_SERVERCONNECTION, and DS_NET_PORT?

Also...it looks like we haven't defined a namespace...


      <crn:parameter name="cps_namespaceID">
        <crn:value xsi:type="xsd:string"></crn:value>
      </crn:parameter>


are we required to have one in order to connect using the SDK?

The method I'm using to connect is...


        contentManagerService1 cm = new contentManagerService1();
        cm.Url = "http://bi-olap.vsp.com:9300/p2pd/servlet/dispatch";

        string defaultUserName = "username";
        string defaultPassword = "password";
        string defaultNamespace = null;
        string cam_passsport = null;

        try
        {
            System.Text.StringBuilder credentialXML = new System.Text.StringBuilder("<credential>");
            credentialXML.AppendFormat("<namespace>{0}</namespace>", defaultNamespace);
            credentialXML.AppendFormat("<username>{0}</username>", defaultUserName);
            credentialXML.AppendFormat("<password>{0}</password>", defaultPassword);
            credentialXML.Append("</credential>");

            //The csharp toolkit encodes the credentials
            string encodedCredentials = credentialXML.ToString();
            xmlEncodedXML xmlEncodedCredentials = new xmlEncodedXML();
            xmlEncodedCredentials.Value = encodedCredentials;
            searchPathSingleObject[] emptyRoleSearchPathList = new searchPathSingleObject[0];
            cm.logon(xmlEncodedCredentials, null);

            cam_passsport = cm.biBusHeaderValue.CAM.CAMPassport.id;

        }


Thanks for the assistance!

birliban

Hi,

could you post the complete error message ? The real error code is somewhere in the XML message.

psenechal

#2
I actually figured part of it out. We do have a namespace defined, it just doesn't show up in the config file. When I added the namespace to my XML string, the logon worked fine and I'm getting back a CAM Passport.