bea.com | products | dev2dev | support | askBEA |
![]() |
![]() |
|
![]() |
e-docs > Liquid Data for WebLogic > Administration Guide > Generating and Publishing Web Services |
Administration Guide
|
Generating and Publishing Web Services
This topic describes how to publish BEA Liquid Data for WebLogicTM stored queries as Web services. It contains the following sections:
Using the Administration Console, you can publish Liquid Data stored queries as Web services. Web-based applications can then invoke Liquid Data queries as Web service clients.
Viewing a Demo
Generate Web Service Demo... If you are looking at this documentation online, you can click the "Demo" button to see a viewlet demo showing how to use the Liquid Data Administration Console to generate a Web service from a stored query. The viewlet also demonstrates how to test the generated Web service in BEA WebLogic WorkshopTM. The demo assumes that you have already stored the query you want to use in the Liquid Data Repository.
About Web Services
Web services are a type of service that can be shared by, and used as components of, distributed Web-based applications. Web services communicate with clients (both end-user applications or other Web services) through XML messages that are transmitted by standard Internet protocols, such as HTTP. Web services endorse standards-based distributed computing. Currently, popular Web Service standards are SOAP (Simple Object Access Protocol), WSDL (Web services description language) and UDDI (Universal Description, Discovery, and Integration).
Creating a New Web Service from a Stored Query
This section describes how to generate a Web service from a stored query in the server repository. For each stored query, you can have up to one generated Web service.
Notes: The names of stored queries to be generated as Web services must begin with an alphabetic character, followed by other alphabetic characters or numbers. The file name must also have an .xq suffix. For more information, see Naming Conventions for Stored Queries in Building Queries and Data Views.
To create a new web service from a stored query:
The Administration Console prompts you to select a target schema for the web service.
The Administration Console generates the Web service, storing the generated Web service as an EAR (enterprise archive) file in the web_services_gen directory, using the name of the stored query as the file name prefix. For example, the generated web service for a stored query named order.xq would be order.ear. The WSDL of the generated Web service is dynamically generated at runtime by the EAR file after it is deployed successfully.
The Administration Console automatically deploys the EAR file to all nodes in the currently active domain. If you subsequently need to manage this EAR file, such as undeploying or redeploying it, see Managing the Deployment of a Generated Web Service.
The Administration Console shows a confirmation message if it completes the process successfully, displaying the URL of the generated web service, as shown in the following example:
If the associated stored query is modified or deleted, then this generated Web service is deleted automatically. If the stored query has been modified, you need to explicitly create it again using the instructions in this section.
Modifying a Web Service
You cannot directly modify a generated Web service. If the associated stored query is modified or deleted, the generated Web service is deleted automatically.
To modify a Web service:
Deleting a Web Service
You can delete a Web service that you no longer need or that you want to regenerate.
Note: A Web service is automatically deleted if its associated stored query is subsequently changed or deleted.
To delete a Web service:
Testing a Generated Web Service
You can use BEA WebLogic WorkshopTM to test a Web service that you have generated with the Administration Console.
Note: Before you begin, make sure that the WebLogic Workshop Example server and the Workshop tool use a different port number from the one that the Liquid Data server uses. For example, if the Liquid Data server uses port 7001, then the WebLogic Workshop Example server should be started on a different port (such as 7010) and the Workshop tool should be configured to access that different port.
To test the Web service:
public AnonType_CustomerOrderReport test()
public AnonType_CustomerOrderReport test()
{
return testws
}
public AnonType_CustomerOrderReport test()
{
return testws.order();
}
Managing the Deployment of a Generated Web Service
When you create a Web service, the Administration Console automatically deploys the generated EAR file to all nodes in the currently active domain. If you subsequently need to manage this EAR file, such as undeploying or redeploying it:
For detailed information about WebLogic Web services, see Programming WebLogic Web Services in the WebLogic Server documentation.
Invoking Published Web Services
You invoke Liquid Data Web services that were generated in the Administration Console using the same approach that you would use for invoking any WebLogic Web Service. For more information, see Invoking Queries in Web Service Clients in Invoking Queries Programmatically.
![]() |
![]() |
![]() |
![]() |
||
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |