Query as a Web Service Guide - SAP Help Portal

Post on 25-Mar-2023

0 views 0 download

Transcript of Query as a Web Service Guide - SAP Help Portal

Query as a Web Service Guide

BusinessObjects Enterprise XI 3.0

Windows

© 2008 Business Objects. All rights reserved. Business Objects owns the followingU.S. patents, which may cover products that are offered and licensed by Business

Copyright

Objects: 5,555,403; 5,857,205; 6,289,352; 6,247,008; 6,490,593; 6,578,027;6,831,668; 6,768,986; 6,772,409; 6,882,998; 7,139,766; 7,299,419; 7,194,465;7,222,130; 7,181,440 and 7,181,435. Business Objects and the Business Objectslogo, BusinessObjects, Business Objects Crystal Vision, Business Process OnDemand, BusinessQuery, Crystal Analysis, Crystal Applications, Crystal Decisions,Crystal Enterprise, Crystal Insider, Crystal Reports, Desktop Intelligence, Inxight,the Inxight Logo, LinguistX, Star Tree, Table Lens, ThingFinder, Timewall, Letthere be light, Metify, NSite, Rapid Marts, RapidMarts, the Spectrum Design, WebIntelligence, Workmail and Xcelsius are trademarks or registered trademarks inthe United States and/or other countries of Business Objects and/or affiliatedcompanies. All other namesmentioned herein may be trademarks of their respectiveowners.

Business Objects products in this release may contain redistributions of softwarelicensed from third-party contributors. Some of these individual components may

Third-partyContributors

also be available under alternative licenses. A partial listing of third-partycontributors that have requested or permitted acknowledgments, as well as requirednotices, can be found at: http://www.businessobjects.com/thirdparty

ContentsOverview of Query as a Web Service 7Chapter 1

Overview of Query as a Web Service..........................................................8Architecture of Query as a Web Service......................................................8

Installing Query as a Web Service 11Chapter 2

Installation pre-requisites for Query as a Web Service.............................12Installing and validating Query as a Web Service.....................................12Troubleshooting Query as a Web Service.................................................14

Launching the CMS first.......................................................................15Setting the CMS name first .................................................................15Ensuring high availability of the CMS...................................................15Activating the web service provider traces in a test environment .......16

Configuring Query as a Web Service Client to connect to a reverse proxyweb server ................................................................................................17Setting Query as a Web Service background user ...................................18

Launching the Query as a Web Service Client Tool 21Chapter 3

Launching Query as a Web Service..........................................................22Logging in for the first time to Query as a Web Service............................23

Creating and Publishing a Query as a Web Service 25Chapter 4

Creating and publishing a Query as a Web Service..................................26Creating a Prompt in your Query as a Web Service..................................28Using context with your Query as a Web Service......................................30

Query as a Web Service Guide 3

Managing Query as a Web Service 33Chapter 5

Viewing Query as a Web Service properties.............................................34Viewing queries in a web browser .......................................................34

Deploying queries to another web server..................................................35Deploying to another server using the Query as a Web Service clienttool.............................................................................................................36Deploying Query as a Web Service from Import Wizard ..........................37Deploying Query as a Web Service from a BIAR file................................38Editing a Query as a Web Service.............................................................38Deleting a Query as a Web Service...........................................................39Copying a Query as a Web Service...........................................................39Setting advanced parameters for Query as a Web Service......................39

Web Service base URL........................................................................40Session time-out in seconds................................................................40Authentication mode.............................................................................40

Query as a Web Service Query Panel Options.........................................41

Consuming Query as a Web Service with Different Applications 43Chapter 6

Consuming a Query as a Web Service via WSDL....................................44Consuming a Query as a Web Service in Crystal Xcelsius.......................44

Cross-domain issue..............................................................................45Selecting the web service.....................................................................45Input messages....................................................................................46Output messages.................................................................................46Authentication in Xcelsius....................................................................47

Consuming a Query as a Web Service in Crystal Reports........................47Consuming a Query as a Web Service in Microsoft Office InfoPath.........48

4 Query as a Web Service Guide

Contents

Query as a Web Service Best Practices and Limitations 51Chapter 7

Best Practices using Query as a Web Service..........................................52Limitations using Query as a Web Service................................................52

Get More Help 53Appendix A

Index 57

Query as a Web Service Guide 5

Contents

6 Query as a Web Service Guide

Contents

Overview of Query as aWeb Service

1

Overview of Query as a Web ServiceQuery as a Web Service provides new easy ways to analyze informationthrough user-driven client solutions for businesses.

Business Intelligence (BI) content is usually bound to a specific user interfaceof BI tools. Query as a Web Service changes this by allowing BI content tobe delivered to any user interface that can process Web Services.

Using Query as a Web Service, business users define their own query froma universe, and then easily and securely publish that query as a standaloneweb service.

Query as a Web Service provides new client solutions for businesses. Forexample, it enables Crystal Xcelsius to aggregate multiple disparate datasources into a trusted BI view.

Query as aWeb Service also enables a range of client-side solutions in toolssuch as:Microsoft Office, Excel, and InfoPath

• SAP NetWeaver

• OpenOffice

• Business rules and process management applications

• Enterprise Service Bus platforms

Note: Business Objects provides a wide range of Web Services fordevelopers. Developers use these Web Services in IDEs with languagessuch as C# and Java. For more information, go to:

http://diamond.businessobjects.com

Architecture of Query as a Web ServiceQuery as a Web Service is designed to work on top of any Windowsapplication the same way as other web services.

Query as a Web Service is based on the W3C web service specificationsSOAP, WSDL, and XML. It has two main components:

• Server component

8 Query as a Web Service Guide

Overview of Query as a Web Service1 Overview of Query as a Web Service

The server component (included in BusinessObjects XI R3) stores theQuery as a Web Service catalog and hosts the published Web Services.

• Client toolThis is where business users create and publish Query as aWeb Service.You can install the client tool on several machines that can then accessand share the sameQuery as aWeb Service catalog stored on the server.The client tool communicates with the server components via WebServices.

Figure 1-1: Query as a Web Service architecture diagram

Query as a Web Service Guide 9

1Overview of Query as a Web ServiceArchitecture of Query as a Web Service

10 Query as a Web Service Guide

Overview of Query as a Web Service1 Architecture of Query as a Web Service

Installing Query as a WebService

2

Installation pre-requisites for Query as aWeb Service

There are a few steps to preform before installing. Before installing Queryas a Web Service, please read the Terms of Use agreement and conditionsand ensure you have met the pre-requisites described below.

The following must be installed on the server:

• BusinessObjects XI 3.0 Enterprise Edition

• Web Services

• Tomcat or another supported Web Application and JDK

For an updated list of supported Web Applications and versions, see:

http://support.businessobjects.com/supported_platforms/

The following must be installed on the client before you install Query as aWeb Service:

• .NET 1.1

The client platform must be supported for use with BusinessObjects XI3.0. For an updated list of supported versions, see:

http://support.businessobjects.com/supported_platforms/

Installing and validatingQuery as aWebService

The server component of Query as a Web Service installs automatically aspart of BusinessObjects Enterprise XI 3.0 with Web Intelligence.

You must then install the client tool on every machine that will access theserver via Web Services.

You must have a separate license for the client tool. It is not covered by thegeneral license for BusinessObjects XI 3.0.

12 Query as a Web Service Guide

Installing Query as a Web Service2 Installation pre-requisites for Query as a Web Service

1. Navigate to the Add-Ons\Query as a Web Service folder on theBusinessObjects Enterprise collaterals CD or locate the Query as a WebService setup.exe file on your network.

2. Double-click setup.exe to launch the Query as a Web Service Wizard.3. Follow the on-screen instructions in the Query as a Web Service

Installation Wizard to complete the installation procedure.You are ready to validate your installation.

4. To validate the installation, open a browser and type the following URLhttp://[server]:[port]/dswsbobje, where [server] corresponds toyour web server address and [port] corresponds to the port where youset up in your web server. The default used by Tomcat is 8080. dswsbobjeis the default name of the Web Service provider web application.

5. Click the Validate link button to get a status of the installation.6. Browse down to make sure Query as a Web Service is installed. You will

see Found resource:/managequeryasaservice.wsd

Query as a Web Service Guide 13

2Installing Query as a Web ServiceInstalling and validating Query as a Web Service

7. In your browser, type the following URL: http://[server]:[port]/dswsbobje/qaawsservices, where [server] corresponds to your serveraddress and [port] corresponds to the port where you set up your webserver.

Your browser page appears and contains the title "Available QaaWSservices". This page contains a list of the Query as a Web Service thathave already been created on this system.

TroubleshootingQuery as aWeb ServiceHere are a few tips to follow in the event that you have installation issues.

14 Query as a Web Service Guide

Installing Query as a Web Service2 Troubleshooting Query as a Web Service

Launching the CMS first

Ensure that the CMS is launched before Tomcat.

During launch of Tomcat, in the initialization of the Servlet, QaaWS cachereads the definition of the QaaWS in the repository to build its cache. Thus,you must ensure that the CMS is launched before Tomcat.

If you launch the CMS automatically using the NT Services, you do not needto do this manually.

Setting the CMS name first

By default, the Web Services connects to the local machine name's CMS.If you want to change to a dedicated CMS, you must change the domainproperty in the dsws.properties file. To locate the dsws.properties file,browse to...

This information complements what is available in the Central ManagementSystem documentation.

1. Stop Tomcat.2. Open the installation path folder of BusinessObjects Enterprise XI

3.0: [InstallationPath]\Tomcat55\webapps\dswsbobje\WEB-INF\classes

3. Open the file dsws.properties and locate: domain=4. Enter your CMS name.5. Close and save the dsws.properties file.6. Start Tomcat.

Related Topics• Installing and validating Query as a Web Service on page 12

Ensuring high availability of the CMS

The CMS can have only one single CMS system database. The connectionwith CMS system database can be lost for the following reasons:

Query as a Web Service Guide 15

2Installing Query as a Web ServiceTroubleshooting Query as a Web Service

• because the database is down• because of a network outage between CMS and CMS System database• because of a software or hardware failure of CMSmachine or applicationIn any of these cases, deploying two CMS decreases the probability thatboth CMSs will be unable to communicate with the CMS system databasethat is on the CMS machine.

On the other hand, if the CMS system database is down then all CMSs willbe unable to process incoming requests without errors, regardless of whetherthere are a single CMS or multiple CMSs in the cluster.

You can limit the risk by employing the fault tolerance solutions provided bythe database vendor. Each database vendor provides fault tolerance solutionsto minimize the risk of the database being unavailable. One fault toleranceoptionmay be to set up a secondary mirror database that runs on a secondaryserver. For example, if the first database is out the tns.ora file isautomatically updated to point to the secondary database server. Sinceavailable fault tolerance measures are database-specific, see thedocumentation for your specific database vendor for more information onfault tolerance measures.

Note: If the feature is available and enabled, even if the system databaseconnection is lost, the CMS automatically re-establishes the databaseconnection without administrator intervention.

Activating the web service provider traces in a testenvironment

If there is configuration issue, the Business Objects Administrator may berequired to set up traces to allow better troubleshooting.

Business Objects strongly recommends using traces only for troubleshootingpurposes in test environments.

1. In the Central ConfigurationManager (CCM), stop "Apache Tomcat 5.5.20"service.

16 Query as a Web Service Guide

Installing Query as a Web Service2 Troubleshooting Query as a Web Service

2. Change the trace level.By default Query as a Web Service only traces errors. You may berequested to provide additional traces for customer assurance.

3. Edit log4j.properties located in [installationpath]\dswsbobje\WEB-INF\classes\

4. Type the following in the properties file:log4j.logger.com.businessobjects=DEBUG, BO1

5. Change the trace location.By default, it traces in the output console output. If you want to trace afile, comment the ConsoleAppender and uncomment the RollingFileAppender. If Tomcat is set as a service, you will trace in dswsbobje.logfound under the file pathC:\WINDOWS\system32.: # console appender# log4j.appender.BO1=org.apache.log4j.ConsoleAppender #log4j.appender.AXIS1=org.apache.log4j.ConsoleAppender#rolling file appender log4j.appender.BO1=org.apache.log4j.RollingFileAppender log4j.appender.BO1.File=dswsbobje.log log4j.appender.BO1.Append=falselog4j.appender.BO1.MaxBackupIndex=5 log4j.appender.BO1.MaxFileSize=10

6. In the CCM, start "Apache Tomcat 5.5.20" service.

Configuring Query as a Web ServiceClient to connect to a reverse proxy webserver

Reverse proxy is a network address translation of a machine from a URL ina given network to a URL in another external network. Since Query as a

Query as a Web Service Guide 17

2Installing Query as a Web ServiceConfiguring Query as a Web Service Client to connect to a reverse proxy web server

Web Service client binds to the Report Engine, Query and BICatalog WebService you must specify the external URL of the Web Services

wsresource4=QueryService|query web service alone|http://[myserver.mycompany.com]/dswsbobje/services/query

1. Locate the dsws.properties file.This file is located in dswsbobje web application.

2. Update the following properties:

Property valueProperty name

ReportEngine|reportengine web servicealone|http://[myserver.mycompany.com]/dswsbobje/services/reportengine

wsresource1

BICatalog|bicatalog web servicealone|[myserver.mycompany.com] dswsbobje/services/bicatalog

wsresource2

QueryService|query web servicealone|http:// [myserver.mycompany.com]/dswsbobje/services/query

wsresource4

Setting Query as a Web Servicebackground user

Query as a Web Service definitions are stored in the repository. Query as aWeb Services Web Application needs a BusinessObjects account to handleWSDL generation.

This account called QaaWSServletPrincipal and is pre-defined with minimalrights.

If you change this pre-defined account using the CMC you need to updatethe following properties in the dsws.properties file.

• qaaws.principal.username

• qaaws.principal.password

• qaaws.principal.authentication

18 Query as a Web Service Guide

Installing Query as a Web Service2 Setting Query as a Web Service background user

To avoid security risk, create a dedicated user that does not have access todocuments or any other BI content.

Query as a Web Service Guide 19

2Installing Query as a Web ServiceSetting Query as a Web Service background user

20 Query as a Web Service Guide

Installing Query as a Web Service2 Setting Query as a Web Service background user

Launching the Query as aWeb Service Client Tool

3

Launching Query as a Web ServiceOnce Query as a Web Service is installed, follow the steps below to launchit.

• In the Windows Start menu, point to Programs > Business Objects XI3 . 0 > BusinessObjects Enterprise > Query As A Web Service.

Note: To launch Query as aWeb Service, you must use the Administratoraccount or your user name must be in the user group QaaWS GroupDesigner.

Either of the following occur:

• If you are logging in for the first time, the Manage Hosts dialog boxappears.

• If this is not your first login, the Select your credentials dialog boxappears.

22 Query as a Web Service Guide

Launching the Query as a Web Service Client Tool3 Launching Query as a Web Service

Enter your system, user name, password and the user interfacelanguage, then click OK.

Note: You can display Query as a Web Service user interface in anylanguage supported by the Business Objects XI Enterprise Suite. Select anavailable language by clicking on the Interface drop-down list in the Selectyour credentials dialog box when you log in. Only languages that have beeninstalled with Query as a Web Service display in the drop-down list.

Related Topics• Logging in for the first time to Query as a Web Service on page 23• Creating and publishing a Query as a Web Service on page 26

Logging in for the first time to Query asa Web Service

The first time you log in, you need to define the system host where the webservices are installed. You only need to perform these steps once.

1. In the Manage Hosts dialog box, click Add.The Edit a Host dialog box appears.

2. Type a system name in the Name field.

Query as a Web Service Guide 23

3Launching the Query as a Web Service Client ToolLogging in for the first time to Query as a Web Service

The URL is automatically entered.

3. Make sure the port is correct.4. If the CMS is not on the same server as the Web Services, complete the

CMS field.5. Enter a user name that will be used by default, then click OK.

The Manage Hosts dialog box reappears and the host name appears inthe list.

6. Click OK.The Select your credentials dialog box appears.

7. Enter your password, then click OK.The Query as a Web Service client tool appears.

24 Query as a Web Service Guide

Launching the Query as a Web Service Client Tool3 Logging in for the first time to Query as a Web Service

Creating and Publishing aQuery as a Web Service

4

Creating and publishing a Query as aWeb Service

Creating and publishing a query using Query as aWeb Service is easy usingthe Wizard. To create and publish your query:1. Launch the Query as a Web Service client tool.

If you have not yet published a Query as a Web Service, the PublishQuery as a Web Service Wizard appears.

If you have already published a Query as a Web Service, click New toaccess the wizard.

2. In the Web Service name field, enter a name for the Query as a WebService.

The characters are restricted to avoid problems duringWSDL generation.

3. In the Web Service Description box, enter a description that will help youand others re-use the query.

4. If you want to set advanced parameters, click Advanced Parameters.For instructions, see Setting advanced parameters for Query as a WebService on page 39.

5. Click Next.The Select a universe page appears.

26 Query as a Web Service Guide

Creating and Publishing a Query as a Web Service4 Creating and publishing a Query as a Web Service

6. Select the universe from which you want to create the query, and thenclick Next.

The Query Panel appears.

7. Create your query by dragging and dropping the objects into the ResultObjects and Filter Objects pane .

For information on query creation, see the Building Queries Using WebIntelligence Query - HTML guide.

8. Click Next.

Query as a Web Service Guide 27

4Creating and Publishing a Query as a Web ServiceCreating and publishing a Query as a Web Service

Creating a Prompt in your Query as aWeb Service

You can create a prompt in a query to refine the query results.

Note: You cannot create a Query as a Web Service using nested prompts.

1. Select a prompt object, then click the right arrows until the value appearsin the Selected values pane.

2. Review the query prompts and contexts, if necessary, before displayingthe Preview page.

28 Query as a Web Service Guide

Creating and Publishing a Query as a Web Service4 Creating a Prompt in your Query as a Web Service

3. The Web Service in pane contains the input parameters of the WebServices you create. Each input parameter is linked to a filter prompt thatyou created in the Filter Objects pane of the Query Panel.

4. Change the default value of the prompt by clicking the prompt icon.

Note: The name of the Prompt text is important because it will appear inthe list of input parameters of the query web service at runtime. Theprompt text appears in the Wizard, Step 4. Preview.

The Web Service out pane contains the output parameters of the WebServices you create. The output parameters are linked to Result Objectsyou put in the Query Panel; they are expressed as a result set.

Query as a Web Service Guide 29

4Creating and Publishing a Query as a Web ServiceCreating a Prompt in your Query as a Web Service

When you run the query, the prompts you entered appear. The user isrequired to select or input values to display the query results.

Using context with your Query as a WebService

You can define a Query that uses the same context. You select the contextat design-time and always reuse that context at run-time. Follow the examplebelow to learn how to create a query with a context.1. Define a Query that requires the selection of a context, such as Sales or

Reservations in the Island Resorts marketing database.2. Click Next to display the Select the Query Context window.

3. Of the two available contexts "Reservations" and "Sales", select "Sales".4. Click OK, to display the Preview pane.

Note: The two contexts do not appear in the Input Parameters list. Onceyou select the context in the query design step, the selected context isstored in the query definition. At runtime, you cannot select a differentcontext than the one that is saved at design time — in our example"Sales".

5. Click Next to display the Select the Query Context window.6. Of the two available contexts "Reservations" and "Sales", select "Sales".

30 Query as a Web Service Guide

Creating and Publishing a Query as a Web Service4 Using context with your Query as a Web Service

7. Click OK, to display the Preview pane.

Note: The two contexts do not appear in the Input Parameters list. Onceyou select the context in the query design step, the selected context isstored in the query definition. At runtime, you cannot select a differentcontext than the one that is saved at design time — in our example"Sales".

Query as a Web Service Guide 31

4Creating and Publishing a Query as a Web ServiceUsing context with your Query as a Web Service

32 Query as a Web Service Guide

Creating and Publishing a Query as a Web Service4 Using context with your Query as a Web Service

Managing Query as a WebService

5

Viewing Query as a Web Serviceproperties

When you launch the Query as a Web Service client tool, the Query Catalogappears on the left side. It shows the queries you created.

This section describes how view the properties of a Query as aWeb Service.

1. In the Query Catalog, select the Query as a Web Service you want.The properties display on the right side of the panel.

2. To open the WSDL in a web browser, click the WSDL URL.

Viewing queries in a web browser

You can also view, in a web browser, your instances of Query as a WebService.

• Open a web browser, and go to the following URL:dswsbobjehttp://<name of server>:<Tomcat port number>/dswsbobje/qaawsservices

34 Query as a Web Service Guide

Managing Query as a Web Service5 Viewing Query as a Web Service properties

Deploying queries to another web serverThis section explains how to deploy to another server; that is, copy a Queryas a Web Service definition from one server to another. For example, youcan move a query definition from a development server to a test or productionserver.

To deploy to another server, you have a choice of the following methods:

• the Query as a Web Service client tool

An advantage of this method is that the query will automatically point tothe web server on the new system.

• the Import Wizard• a BIAR file

Query as a Web Service Guide 35

5Managing Query as a Web ServiceDeploying queries to another web server

Note: Before starting, make sure the universe and users are the same onboth machines. Use the Import Wizard or BIAR files to import universes andusers. It is important to have the same CUID during Import Wizard operations.

Deploying to another server using theQuery as a Web Service client tool

Using Query as a Web Service client, you can deploy queries to anotherserver once, using the same service name.

You can use the Deploy to another serveroption between two servers thathave the same version of Query as aWeb Service installed. It is not possibleto migrate queries from one version to another using this option.

1. In the Query Catalog, select the Query as aWeb Service whose definitionyou want to copy.

2. Click Deploy to another server.

The Select Your Credentials dialog box appears.

3. Complete the information for the system on which you want to deploy theWeb Services, and then click OK.

The Query as a Web Service appears in the Publish Query as a WebService Wizard.

4. Publish the Query as a Web Service to the new system.

Deploying a Query as aWeb Service definition to another server automaticallychanges the WSDL location and the services execution location.

Note: You can customize this service-based URL using the wizard. You canalso make it dynamic in an Xcelsius project by using the Input Values textbox of theWeb Services Connectivity. Using this functionality, you can switcha dashboard from development to production by simply changing the URL.

You cannot deploy the same query Service Name more than once to thesame server. When you deploy to another server, Query as a Web Serviceverifies the Service Name does not exist already and only displays theavailable servers.

For instructions on how to publish to the new system, see below:

36 Query as a Web Service Guide

Managing Query as a Web Service5 Deploying to another server using the Query as a Web Service client tool

Related Topics• Creating and publishing a Query as a Web Service on page 26

Deploying Query as a Web Service fromImport Wizard

To deploy using the Import Wizard, import the Query as a Web Servicedefinition from the source server to the destination server.

1. Launch the Import Wizard on the source server.2. After logging in to the source CMS, select the target file to which you will

export the definitions.3. In the Select objects to import pane of the Import Wizard dialog box,

select Import folders and objects then select Import application foldersand objects.

4. In the Select application folders and objects pane of the Import Wizarddialog box, expand the QaaWS Folderthen the Query as a Web Servicedefinitions or Service Names you want.

5. Continue through the remaining steps of the Import Wizard by clickingNext.

6. Open the Import Wizard on the destination server.7. In the Source Environment dialog box, select the source file to which you

exported the definitions.8. Log into the destination CMS.9. In the Select objects to import pane of the Import Wizard dialog box,

select Import folders and objects then select Import application foldersand objects.

10. In the Select application folders and objects pane of the Import Wizarddialog box, select the Query as a Web Service definitions you want.

11. Continue through the remaining steps of the Import Wizard by clickingNext.

12. After importing, point the newly-deployed query definition to the webserver on the destination system.

Query as a Web Service Guide 37

5Managing Query as a Web ServiceDeploying Query as a Web Service from Import Wizard

Deploying Query as a Web Service froma BIAR file

Make sure the Import Wizard is installed on both the source and destinationserver.

1. Open the Import Wizard on the source server.2. After logging in to the source CMS, select the target BIAR file to which

you will export the definitions.3. In the Select objects to import pane of the Import Wizard dialog box,

select Import folders and objects then select Import application foldersand objects.

4. In the Select application folders and objects pane of the Import Wizarddialog box, expand the QaaWS Folderthen the Query as a Web Servicedefinitions or Service Names you want.

5. Continue through the remaining steps of the Import Wizard.6. Open the Import Wizard on the destination server.7. In the Source Environment dialog box, select the BIAR file to which you

exported the definitions.8. Log into the destination CMS.9. In the Select Objects to Import dialog box, select Import folders and

objects > Import application folders and objects.10. In the Select Application Folders and Objects dialog box, select the Query

as a Web Service definitions you want.11. Continue through the remaining steps of the Import Wizard.12. After importing, point the newly-deployed query definition to the web

server on the destination system.

Editing a Query as a Web ServiceEditing a Query as a Web Service may change the associatedWSDL, andthis could break the link that is used by others to communicate with WebServices. Business Objects recommends that you notify users of any changesyou make.

1. In the Query Catalog, select the Query as a Web Service you want toedit.

2. Click Edit.

38 Query as a Web Service Guide

Managing Query as a Web Service5 Deploying Query as a Web Service from a BIAR file

The Query as a Web Service appears in the Publish Query as a WebService Wizard.

3. Make the changes you want.

For instructions, see Creating and publishing a Query as a Web Serviceon page 26.

Deleting a Query as a Web ServiceTo delete a query from the list of available queries:

1. In the Query Catalog, select the Query as a Web Service you want todelete.

2. Click Delete.

Copying a Query as a Web ServiceYou must change the name of the Query as a Web Service when you copyit.

1. In the Query Catalog, select the Query as a Web Service you want tocopy.

2. Click Copy.

The Query as a Web Service appears in the Publish Query as a WebService Wizard.

The default name of the copied query is Copy_<name of original>.

3. Change the default name, if you want.4. Go through the remaining pages of the wizard and, if you want, modify

the information.

Setting advanced parameters for Queryas a Web Service

You can set several advanced parameters by clicking the Advancedparameters button on the bottom left of the Publish Query as aWeb ServiceWizard.

Query as a Web Service Guide 39

5Managing Query as a Web ServiceDeleting a Query as a Web Service

Web Service base URL

Reverse proxy is a network address translation of a machine from a URL ina given network to a URL in another network, usually an external networklike the public internet.

Example: Using the base URL technique

A server called myserver.company.com within a company network couldbe called: www.mycompany.com in the external network.

To support such a deployment, you must set up aWeb Services base URL.The base URL contains the external URL from which you want your WebService to be accessible, for example www.mycompany.com/dswsbobje/.To use Query as aWeb Service client tool with a reverse proxyWeb Server,see Configuring Query as a Web Service Client to connect to a reverseproxy web server on page 17.

Session time-out in seconds

To improve the performance of Query as a Web Service, particularly thecascading call scenario, the user's connection to the server is cached by theweb service provider. You can configure session time-out (in seconds) foreach Query as a Web Service connection. The default is 60 seconds.

For example, if a given user login calls service 1 and then under 60 secondscalls service 2 with the same login (identical username and password), theserver reuses the same connection and reinitializes the session time-out.

Authentication mode

Authentication mode is the type of directory against which theBusinessObjects XI platform validates the login.

Examples include Enterprise, LDAP, Windows AD, and SAP.

You can set the authentication mode so that it will be defined according tothe service, or by the consumer:

40 Query as a Web Service Guide

Managing Query as a Web Service5 Setting advanced parameters for Query as a Web Service

• Service

You, as administrator, select the authentication directory; all userssubsequently accessing the service authenticate on this directory (exceptfor the sessionID option).

All authentication directories supported by the server are available forselection in the Authentication Mode drop-down list.

• Consumer defined

The consumer of the query selects the authentication mode as an inputparameter called authenticationType.

Query as a Web Service Query PanelOptions

You can set several options for the Query Panel in the Options dialog box.

To access the dialog box, click the Options icon in the Query Panel ofthe Publish Query as a Web Service Wizard.

Duplicate rows

By default, the query will not return duplicate rows (this is different than inearlier versions). If you want duplicate rows, select this check box.

Query as a Web Service Guide 41

5Managing Query as a Web ServiceQuery as a Web Service Query Panel Options

Max fetched time

Enter the maximum date fetch time, in seconds. The default value "-1" meansthat this option is deactivated and the universe connection will be taken intoaccount.

Max rows fetched

Enter the maximum number of rows to fetch. The default value "-1" meansthat this option is deactivated and the universe connection will be taken intoaccount.

Sample result set

Enter the number of rows you want to return for a sample result set beforerunning the query.

42 Query as a Web Service Guide

Managing Query as a Web Service5 Query as a Web Service Query Panel Options

ConsumingQuery as aWebService with DifferentApplications

6

Consuming aQuery as aWeb Service viaWSDL

WSDL is an XML-based description of how to communicate using the webservice; that is, the protocol bindings andmessage formats required to interactwith the Web Services listed in its directory.

The supported operations and messages are described on a high level andthen bound to a concrete network protocol and message format. WSDL isoften used in combination with SOAP and XML schema to provide WebServices via the Internet.

A client program connecting to a web service can read the WSDL todetermine what functions are available on the server.

To find the WSDL for a Query as a Web Service, select it in the QueryCatalog.

Consuming a Query as a Web Service inCrystal Xcelsius

To consume a Query as a Web Service inside Crystal Xcelsius, use the WebService Connector.

The Web Service Connector component allows a Flash document createdin Xcelsius to communicate with Query as a Web Service via SOAP, usingpoint and click. The Xcelsius Flash document is self-contained andcommunicates with the web service to display data visually. The onlyprerequisite is that there be a SOAP-based web service available to theFlash document.

The Web Service Connector component, when activated, creates aSOAP-basedmessage (basically an XML document) and sends it to the webservice. The web service responds with a SOAP-based message of its own.The Web Service Connector component then sends this data to all the othercomponents, resulting in a live visual representation of your data.

There are many public Web Services available, and many different toolkitsand packages for SOAP-based Web Services. Using public Web Servicesand packages that already have a web service on top is easy. You need only

44 Query as a Web Service Guide

Consuming Query as a Web Service with Different Applications6 Consuming a Query as a Web Service via WSDL

a WSDL document for the web service. For Query as a Web Service, youcan find the WSDL in the properties of each web service by selecting it inthe Query Catalog.

See the Crystal Xcelsius User Guides for more information.

Cross-domain issue

After downloading the Xcelsius widget via the web, you may encounterdifficulty retrieving data with the Query as a Web Service client tool if theFlash and the client tool come from different web domains.

This occurs for security reasons related to Macromedia Flash. The Flashdisplayed in a browser is not permitted to access data residing outside theweb domain from which the Flash file format (SWF) originated.

The solution depends on whether your Xcelsius server and the Query as aWeb Service client tool are on the same or different machines.

Same machine

Open the Optional Parameters dialog box from the Advanced parametersbutton and modify the Web Service Base URL so that it matches the webdomain from which you downloaded Xcelsius.

Different machines

For instructions, go to:

http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=tn_14213

Related Topics• Web Service base URL on page 40

Selecting the web service

Selecting the web service involves pointing the Web Service Connectorcomponent to the WSDL document.

1. When working on an Excel spreadsheet, double-click the Web ServiceConnector component to open the Properties panel.

Query as a Web Service Guide 45

6Consuming Query as a Web Service with Different ApplicationsConsuming a Query as a Web Service in Crystal Xcelsius

2. Click Select Web Service.

The Select Web Service dialog box appears.

3. In theWSDL URL box, type or paste the location of theWSDL document.4. Click Submit.

If there was an error, the WSDL document may not be fully validated orit may not meet requirements of the Web Service Connector component.

5. In the Methods list, select the method you want to bind with.

For a given web service, you can bind to only one method per component.

6. Click OK.

The input and output messages are now available for you to tie to yourdata.

Input messages

For input messages, only elements can be tied to data.

Use the "-" button to remove folders and elements. This prevents the folderor field from being sent in the message.

The "+" button can be used to add a folder or a repeating element.

Output messages

For output messages, both elements and folders can be tied to data.

Selecting a folder displays the number of columns in that folder. When youtie this to data, each element in the folder is assigned to a column in theorder the elements appear.

Selecting fewer columns limits the data that is bound to the number ofcolumns that you select. Selecting additional columns inserts blank columns.If an element is repeating underneath the folder, only the first element willbe mapped to the column. The folders underneath the selected folder cannotbe mapped.

46 Query as a Web Service Guide

Consuming Query as a Web Service with Different Applications6 Consuming a Query as a Web Service in Crystal Xcelsius

Use the "-" button to remove unnecessary elements. This contracts the viewof the tree and may reduce processing time in the Flash document.

Authentication in Xcelsius

Xcelsius provides an authentication mechanism that enables you to avoidlogging into InfoView twice with the same session ID.

Keep in mind the following rules if you customize authentication:

• An existing session ID is used only if the user name and password areblank (if they are not hard coded or not passed as input values capturedby a dialog). This occurs when Query as a Web Service is running inInfoView or Dashboard Manager.

• If the user name and password are not blank, then use these values toauthenticate the user. No session is created. This is the most scalablescenario and is the preferred option for large-scale usage.

• If there is no pre-existing session (and username and password are blank),Xcelsius displays the standard security dialog, in which a session iscreated. This occurs when Xcelsius designers do not build their ownsecurity dialog.

Consuming a Query as a Web Service inCrystal Reports

This section explains how Crystal Reports can consume Query as a WebService as a data source.

1. In the Crystal Reports Standard Report Creation Wizard, on the Datapage, create a new XML connection.

2. In the XML Type and Location page of the XML dialog box, select UseWeb Server Data Source, and then click Next.

The Web Services Location page appears.

3. In the HTTP WSDL URL field, type the WSDL of the selected Query asa Web Service.

The Authentication page appears.

Query as a Web Service Guide 47

6Consuming Query as a Web Service with Different ApplicationsConsuming a Query as a Web Service in Crystal Reports

4. Set Basic authentication (if you haven't already), and then click Next.

The Web Service, Port, and Method page appears.

5. Complete the information, and then click Finish.

The Enter Values dialog box appears.

6. Set the Web Services parameters with login, password, and prompts,and then click OK.

The Data page of the Standard Report Creation Wizard re-appears.

7. Select one of the following options and click Next.• runQueryAsServiceResponse• runQueryAsServicetable• runQueryAsServicerow

The Fields page appears.

8. Select the field to build your query on, and then click Next.

A report is created.

9. Refresh the report.

The correct parameters are shown in the report.

Consuming a Query as a Web Service inMicrosoft Office InfoPath

This section explains how Microsoft Office InfoPath can consume Query asa Web Service as a data source.

1. In InfoPath, access the Design a Form task list.2. Click New From Data Connection.

The Data Connection Wizard appears.

3. Select Web Service, and then click Next.4. Select Receive and Submit Data, and then click Next.5. Type or browse for the WSDL file, and then click Next.6. Select the web service operation, and then click Next.7. Enter a name for the data connection, and then click Next.

48 Query as a Web Service Guide

Consuming Query as a Web Service with Different Applications6 Consuming a Query as a Web Service in Microsoft Office InfoPath

8. Type or browse for the web service you want users to submit their formsto, and then click Next.

The Parameters page appears.

9. For each parameter, select Entire Form, and then click Next.10. Type a name for the data connection submitting data, and then clickNext.

The data form appears on the left, and the data source on the right.

11. Build the form, and then click Run Query.

Query as a Web Service Guide 49

6Consuming Query as a Web Service with Different ApplicationsConsuming a Query as a Web Service in Microsoft Office InfoPath

50 Query as a Web Service Guide

Consuming Query as a Web Service with Different Applications6 Consuming a Query as a Web Service in Microsoft Office InfoPath

Query as a Web ServiceBest Practices andLimitations

7

Best Practices using Query as a WebService

More tips for creating Query as a Web Service

The documentation for Query as a Web Service is updated regularly. Toview the most up-to-date source, go to the online documentation library anduse the Search field to find the latest Query as aWeb Service best practices.

http://support.businessobjects.com/documentation/product_guides/

Limitations usingQuery as aWebServiceYou may encounter certain limitations when using Query as a Web Service.These can occur when creating a query, or at run-time.

Limitations when creating a query• Multi-cubes cannot be used

• Combined queries and subqueries cannot be used

• IndexAware prompts are not implemented

Also, keep in mind that the name of the Web Service and its metadata areencoded to support various programming languages (such as C#, Java, C++,VB, Flash).

Limitations at query run-time

• Object restrictions cannot be used

52 Query as a Web Service Guide

Query as a Web Service Best Practices and Limitations7 Best Practices using Query as a Web Service

Get More Help

A

Online documentation library

Business Objects offers a full documentation set covering all products andtheir deployment. The online documentation library has the most up-to-dateversion of the Business Objects product documentation. You can browsethe library contents, do full-text searches, read guides on line, and downloadPDF versions. The library is updated regularly with new content as it becomesavailable.

http://support.businessobjects.com/documentation/product_guides/

Additional developer resources

http://devlibrary.businessobjects.com

Online customer support

The Business Objects Customer Support web site contains information aboutCustomer Support programs and services. It also has links to a wide rangeof technical information including knowledgebase articles, downloads, andsupport forums.

http://www.businessobjects.com/support/

Looking for the best deployment solution for your company?

Business Objects consultants can accompany you from the initial analysisstage to the delivery of your deployment project. Expertise is available inrelational andmultidimensional databases, in connectivities, database designtools, customized embedding technology, and more.

For more information, contact your local sales office, or contact us at:

http://www.businessobjects.com/services/consulting/

Looking for training options?

From traditional classroom learning to targeted e-learning seminars, we canoffer a training package to suit your learning needs and preferred learningstyle. Find more information on the Business Objects Education web site:

http://www.businessobjects.com/services/training

54 Query as a Web Service Guide

Get More HelpA

Send us your feedback

Do you have a suggestion on how we can improve our documentation? Isthere something you particularly like or have found useful? Drop us a line,and we will do our best to ensure that your suggestion is included in the nextrelease of our documentation:

mailto:documentation@businessobjects.com

Note: If your issue concerns a Business Objects product and not thedocumentation, please contact our Customer Support experts. For informationabout Customer Support visit: http://www.businessobjects.com/support/.

Business Objects product information

For information about the full range of Business Objects products, visit:http://www.businessobjects.com.

Query as a Web Service Guide 55

AGet More Help

56 Query as a Web Service Guide

Get More HelpA

IndexAarchitecture

understanding 8

CCMS database

preventing failures 15configuring

reverse proxy 17context

in queries 26copying

how to 39creating

prompts 28queries 26

Ddeleting

queries 39deploying

webservices to another server, publishingwebservices to another server 36

documentationaccessing online library 52

Iinstallation

activate trace logging 16launch CMS first 15

Llaunching 22logging in 23

Oonline documentation

accessing 52overview 8

Pprompts

creating 28publishing

queries 26

Qqueries

copying 39creating 26deleting 39publishing 26using context 26

Query as a Web Serviceunderstanding 8

Rreverse proxy

configuring 17

Query as a Web Service Guide 57

Sstarting 22

first time 23

Ttips

using Query as a Web Service 52troubleshooting

fault tolerance options 15tips 14

58 Query as a Web Service Guide

Index