Products

  1. webMethods CAF 7.1.1
  2. BPM Designer 7.0
  3. BPM Designer 7.1
  4. MWS 7.0
  5. MWS 7.1

Article Types

  1. Sample Applications
  2. Core Concepts
  3. External References
  4. Webinars

Key Subjects

  1. Web Services
  2. Database
  3. JavaScript
  4. JSF Controls
  5. Task Development
  6. Task Inbox
  7. Task Assignments
  8. Task Events
  9. Debugging
  10. Web Application
 
MOST POPULAR
  1. CAF JavaDocs
  2. Designer Online Help
  3. CAF Java(Script)Docs
  4. CAF Samples for webMethods 7.1...
  5. Confirmation Dialog Tutorial
  6. CAF and JSF
  7. JSF Binding Expressions
  8. Dynamic Panel Switch Applicati...
WHATS NEW
  1. Session State Mgmt
  2. Print Table
  3. Popup Dialog

Use web service to write/update data

This samples demonstrate how to use web service to get,update and add new data.
Create the View to Add Data Using a Web Service


The Web service descriptor resides in the IS_Package_CAFDemo package, which you should already have installed in the Integration Server that you use with Designer.
a
From the Project Explorer view, right click the Project > WebContent, where Project is the name of the project you created for this application, and select New > Folder.
a
From the Project Explorer view, right click Project > WebContent > webServiceViews and select New > Other.
b
In the Select a Wizard window, select Web Application View and click Next.
c
In the JSF Web Application View File window in the File Name field, type addCustomer.view.
d
Click Finish.
3
From the Palette view, drag a Form control (Control > Command > Form) into the View Root of the new view.
4
Generate a Web Service Connector in Designer from the Integration Server Web Service Descriptor caf.northwind:createNewCustomerWS, which is in the IS_Package_CAFDemo package.
a
From the IS Browser view, browse to and right click IS_Package_CAFDemo > caf > northwind > createNewCustomerWS and select Generate Web Service Connector.
c
On the Select WSDL Location window, update the WSDL field, if necessary; then click Next.
d
On the Select Operation window, select CreateNewCustomer, and click Finish.
Designer creates a Create New Customer node in the Bindings view.
5
From the Bindings view, drag the Create New Customer node into the Form control on the design canvas.
6
Delete the Refresh button that Designer generated.
The Refresh button that Designer generates invokes the Web service. However, in a subsequent step, you will add an addNewCustomer action, which the application will use to invoke the Web service.
7
From the Palette view, drag a Static Row control (Control > Panel > Static Row) to the bottom of the Form control.
9
From the Palette view, drag a Static Cell control (Control > Panel > Static Cell) into the Static Row control.
*
Alignment property to center
*
Height property to 100%
*
Width property to 100%
b
In the Add New Action Method window in the Action Name field, type addNewCustomer.
c
Click Finish.
customerid = this.getCreateNewCustomer().getParameters().getCreateNewCustomerInput().getCustomerID();
getFacesContext().addMessage(null, new FacesMessage(e.getLocalizedMessage()));
12
From the Bindings view, drag the new Add New Customer action into the Static Cell control.
Designer adds an Add New Customer Async Command Button control to the design canvas.
13
With the Add New Customer Async Command Button control selected on the design canvas, in the Properties view select the Value tab and set the Value property to Create User.
Related Topics 
 
 
Powered by webMethods
Samples and utilities are "working examples" that can be used to test and build production-quality solutions.
Most are not eligible for technical support through webMethods Customer Care.
webMethods makes no guarantees pertaining to the functionality, scalability, robustness, or degree of testing of these utilities and samples.