locked
Programmatically publish/delete briefing books on PAS server 6.3 RRS feed

  • Question

  • Does anyone have some sample code to publish and remove briefing books on a PAS server, utilizing the PAS web service within .NET (C# preferred)?

     

    Also, if someone has written a command-line utility to steamline deployments of BBK files to the server, I'd be interested in seeing how you did it.


    Thanks!

     

    Kory

    Saturday, November 17, 2007 4:47 AM

Answers

  • Kory, jgrovert,

     

    I've discussed this with an SDK engineer and he believes this should be possible.  This is due to the possiblity that you can have two different PStore instances - one that can call GetBook and one that can call PublishBook.  The strings after GetBook represent GUIDs in the PAS DB.  He says you should be able to go through the DB and pick which books, and libraries I assume, that you want to migrate to the next environment.  I wish I could explain it a little deeper - but I didn't have much time with him this week.  Please let me know your questions and I'll see what I can find out.

     

    -Joey

     

    string result;

    PStore myPStore = new PStore();

    myPStore.Credentials = System.Net.CredentialCache.DefaultCredentials;

    result = myPStore.ClearCache();

    object myBook = new object();

    myBook = myPStore.GetBook("8687687687678");

    myPStore.PublishBook(

    myNewPStore.PublishBook(myBook, "myNewBook", "", "678797987897", "");

    MessageBox.Show(result);

    //PClient2 MyClient = new PClient2();

    //MyClient.Login("localhost/pas", "INT\\skistadk", "xxxxx");

     

    Saturday, December 15, 2007 12:03 AM

All replies

  • Kory,

     

    I'll let the SDK folks have the final say on this answer - but, PAS is ASP, not ASP.NET and does not have a web service.  Our SDK is available here: http://www.microsoft.com/downloads/details.aspx?FamilyID=90319a1c-73ce-4014-a8fb-684f5e034f7b&DisplayLang=en

     

    What type of deployment scenario are you looking at?  Migration of content from on environment to another - such as dev to test to prod?

     

    -Joey Pruett, Microsoft Support Escalation Engineer | Americas Commercial Office System Support

    Disclaimer: This posting is provided 'AS IS' with no warranties, and confers no rights.

     

    Monday, November 19, 2007 4:43 PM
  • Here is an excerpt from the SDK help file:

     

    Web Service method calls

    The Briefing Book Server is designed to be used as a Web Service that can be accessed by remote applications across the Web. Using a combination of SOAP schema, XML data formatting, and Web Service method calls, a developer can build a client application that will retrieve and transfer data using HTTP.

    The Analytics Server implementation of the PBS Web Service defines Web Services using the Web Services Description Language (WSDL) specification. You can access the WSDL using the following URL format:

    http://<ServerName>/PAS/PStore.asp?WSDL

    In Visual Studio 2005, you can add a Web reference to a URL that auto-generates an interactive class library used to call into the Web Service methods.

     

    And yes, this would be for deployment from one evironment to another.

     

    -Kory

    Monday, November 19, 2007 11:38 PM
  • Kory,

     

    Thanks for the good info.  I'll see if I can find out more information about using the web service calls for deployment.

     

    -Joey

     

    Tuesday, November 20, 2007 7:08 PM
  • Kory,

     

    I don't have any sample code at the moment, but the SDK engineer I'm talking with believes this should be possible.  I'll gather some ideas and try to have them posted by tomorrow evening. 

     

    Thanks for your patience,

     

    -Joey Pruett

     

    Thursday, December 13, 2007 11:48 PM
  • Thanks Joey.  I look forward to the examples.

    Friday, December 14, 2007 4:14 PM
  • I'm interested in this as well.

     

    Up to now, we've found a way to push the entire environment from dev to test, and test to prod - but it does not allow the ability to publish specific books.  It's an all or nothing approach.

     

    How we do this, is we first use Red Gate's DataCompare tool to synchronize the PAS and Dashboard databases from dev to test.

     

    And then we run the following scripts:

     

    //* Against Dashboard Database - Promote To Test *//

    update Parameters set PropertiesXML = Replace(PropertiesXML, 'trgazcdbip01', 'trgazctbip01')

    update PortletViews set PropertiesXML = Replace(PropertiesXML, 'trgazcdbip01', 'trgazctbip01')

    update PortletViews set PropertiesXML = Replace(PropertiesXML, 'trgazcdbis01', 'trgazctbis01')

     

    //* Against PAS Database - Promote To Test *//

    update BookElements set ServerName = 'trgazctbis01' where servername = 'trgazcdbis01'

    update BookElements set LocalServerName = 'trgazctbis01' where LocalServerName = 'trgazcdbis01'

    update Books set LinkURL = Replace(LinkURL, 'trgazcdbis01', 'trgazctbis01') where LinkURL like '%trgazcdbis01%'

    update MDStores set XMLData = Replace(XMLData, 'trgazcdbis01', 'trgazctbis01')

     

    ... where the following server names are:

    trgazcdbip01 - dev proclarity server

    trgazctbip01 - test proclarity server

    trgazcdbis01 - dev sql server that has pas / dashboard databases

    trgazctbis01 - test sql server that has pas / dashboard databases

     

    We have had to change the "PropertiesXML" field in Parameters and PortletViews and XMLData in MDStores to be a nvarchar(max) (instead of ntext) because ntext does not allow the "replace" function.

     

    The LinkURL replacing is done because we also use Reporting Services linked from the dashboard, and have to update the URL that the dashboard points to.

     

    We're looking for a solution that can promote specific books / reports to an environment instead of the entire thing.

    Friday, December 14, 2007 4:31 PM
  • Kory, jgrovert,

     

    I've discussed this with an SDK engineer and he believes this should be possible.  This is due to the possiblity that you can have two different PStore instances - one that can call GetBook and one that can call PublishBook.  The strings after GetBook represent GUIDs in the PAS DB.  He says you should be able to go through the DB and pick which books, and libraries I assume, that you want to migrate to the next environment.  I wish I could explain it a little deeper - but I didn't have much time with him this week.  Please let me know your questions and I'll see what I can find out.

     

    -Joey

     

    string result;

    PStore myPStore = new PStore();

    myPStore.Credentials = System.Net.CredentialCache.DefaultCredentials;

    result = myPStore.ClearCache();

    object myBook = new object();

    myBook = myPStore.GetBook("8687687687678");

    myPStore.PublishBook(

    myNewPStore.PublishBook(myBook, "myNewBook", "", "678797987897", "");

    MessageBox.Show(result);

    //PClient2 MyClient = new PClient2();

    //MyClient.Login("localhost/pas", "INT\\skistadk", "xxxxx");

     

    Saturday, December 15, 2007 12:03 AM