on 04-03-2009 9:25 AM
Hi,
I am trying to connect to CR Server 2008 using the following VB.Net code but keep getting the following exception: Could not load file or assembly 'BusinessObjects.Enterprise.Sdk, Version=12.0.1100.0, Culture=neutral, PublicKeyToken=692fbea5521e1304' or one of its dependencies. The system cannot find the file specified. I have installed the CR Server 2008 Client Tools.
Where can i get the above dll?
Below is the code i'm using and i have highlighted the line that generates the error.
Try
Dim serverName As String = "servername"
Dim mySessionMgr As SessionMgr = New SessionMgr()
'Logon to the enterprise box
Dim myEnterpriseSession As EnterpriseSession = mySessionMgr.Logon("Administrator", "pwd", serverName, "secEnterprise")
'Exception raised at line below
Dim myEnterpriseService As EnterpriseService = myEnterpriseSession.GetService("InfoStore")
Dim myInfoStore As InfoStore = New InfoStore(myEnterpriseService)
myEnterpriseService = myEnterpriseSession.GetService("PSReportFactory")
Dim psrfObject As Object = myEnterpriseService.Interface
Dim myPSReportFactory As PSReportFactory = CType(psrfObject, PSReportFactory)
Dim queryString As String = "Select SI_ID, SI_NAME, SI_PARENTID From CI_INFOOBJECTS " _
& "Where SI_PROGID='CrystalEnterprise.Report' "
Dim myInfoObjects As InfoObjects = myInfoStore.Query(queryString)
Dim myInfoObject As InfoObject = myInfoObjects(1)
Dim myReportSource As ReportSource = myPSReportFactory.OpenReportSource(myInfoObject.ID)
Catch ex As Exception
strMsg = ex.Message
End Try
Thanks
Added Doamin Name and Auth type but still getting an error. I've got more details on the error -
login exception (Error: FWM 01009) - Communication error occurred when trying to connect to server XXXX (FWM 01009) socket() failed: java.net.NoRouteToHostException: No route to host: connect - Communication error occurred when trying to connect to server XXXX (FWM 01009) - com.crystaldecisions.sdk.exception.SDKException$OCAFramework
Edited by: spb123 on Apr 6, 2009 7:38 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hmmm..."No route to host exception"
sounds like a failure for the web services to connect to the CMS. Try using the machine name instead of localhost for the Session URL.
Also, is this a multi-homed machine (multiple nics). If so, make sure the nic with the IP the CMS is using is at the top of the binding order.
if developing with the 2.0 .net framework, ensure the assemblies you added for the DSWS consumer dlls are from the dswsDotNet2Api folder, otherwise use the dlls in the dswsDotNetApi folder for 1.1 framework applications.
the source code looks correct
Dan,
Yes the web services are on the same box as the application. Browsing to - http://localhost:8080/dswsbobje/services/Session?wsdl returns the Session wsdl in the browser.
For the domain name, should it be the full machine name?
Thanks
Sean-Paul
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
typically, the DomainName is simply the NetBios name of the machine (this should suffice with everything on the same box) if it fails, try the fully qualified name.
I've also noticed you do not provide the authentication type for the enterprisecredential (secWinAD, secEnterprise etc.) be sure to add this as well.
by default the domainname and authentication type should be the local machine name and secEnterprise, so in theory, you should be able to create the enterprisecredential by passing only the username and password if secenterprise is being used.
Thanks Dan for the update. Are there any sample of using the web services to connect to CR Server 2008 to display a report?
I have tried using the following code that i got in the Business Objects Web Service Developer Guide and populating with login credentials:
try
{
Connection boConnection = new Connection("http://localhost:8080/dswsbobje/services/Session");
EnterpriseCredential boCredential = new EnterpriseCredential();
boCredential.Login = "username";
boCredential.Password = "password";
boCredential.Domain = "domain";
Session boSession = new Session(boConnection);
SessionInfo boSI = boSession.Login(boCredential);
}
catch(DSWSException exc)
{
Label1.Text = exc.ToString();
}
but keep getting the error - login exception (Error: FWM 01003) when executing the line boSession.Login(boCredential);
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
LocalHost assumes that the web services are installed on the same machine as your application. Is this the case? Also note that the Web Service providers are running on a Java server, so the URLs are case sensitive.
you can test by using http://localhost:8080/dswsbobje/services/Session?wsdl in a browser to see if the wsdl returns.
Also, another common mistake is that the boCredential.Domain is not your network domain name, but the name of the server hosting the CMS.
also verify that the web services are installed by going to: http://localhost:8080/dswsbobje/services/
this should list each of the available web services
Dan
I have since read a few post's which say to install Crystal Reports 2008 Service Pack 1. However, when you go to the 'Crystal Reports 2008 Service Pack Reference' page (https://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/webcontent/uuid/90d7dc4e-36ce-2b10-d2b3-d5d72d067e21 [original link is broken]) you are unable to download the incremental service pack 1.
Is there any where else that this can be downloaded?
Thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi all,
There have been a few compatability issues when installing SP1 on top of or the system may have access to SP0 and CR Server.
The install team is adding checks so the installer will check and notify if they are found. Check back daily for the updated SP.
Thank you and sorry for the inconvenience.
Don
User | Count |
---|---|
88 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.