About Me

My photo
Charles L. Cambil, Bsc. Business Management, IBM I/T Architect, IBM Business Partner

Thursday, June 5, 2008

Export/Import Web Services Binding How to

WID 6012.9 Export/Import Web Services Binding How to

WID V6.0.1.2, Interim Fix 009

Contact us...

How to import a component using Web Services Binding

A Completed Web Service Import Binding

This is the completed import nodes using various import bindings.

You use imports to invoke external services.

The following steps describes in details how to setup a web service import binding.

Select the Web Service Port

Drag the web service port from the library to the Assembly Diagram.

Select Import with Web Services Binding and click OK.

An import is created.

  1. Change the name from Import1 to DateTime_CImport_
    WS
  2. Wire the component (i.e Consumer) to the Web service import
  3. Save the module

Fix Synchronization errors

When you change a component, i.e, adding or deleting interfaces/references, you have to synchronize the changes to the component's implementation.

To fix this error, right-click the component and select Synchronize Interfaces and References > to implementation.

Web Services Import Generated Artifacts

Web Service import binding generates the following artifacts:

  1. Dynamic Web Project (Consumer...).
  2. Web ServicesClients (Consumer...)

How to export a component using Web Services Binding

A Completed Web Service Export Binding

This is the completed export nodes using various export bindings.

You use exports to make your services available to other components in external modules.

The following steps describes in details how to setup a web service export binding.

Right click the component you want to export and select Generate Export... > Web Services Binding.

Click Yes.

Select soap/http as the transport and click OK.

Rename WS export node

An export node (DateTime_CExport) and a Web Service Port are created.

Rename DateTime_CExport to DateTime_CExport_WS.

Do this by the export node name and appending _WS to it.

Important:

If you re-name the ws export node, you must also rename the related Web Service Port. Otherwise, you will get a 404 error (not found).

After Rename

Rename WEB Service Port

Ensure that the web service export node name(i.e, DateTime_CExport_WS in this example) is the same as the last block in the Web Service Port name.

To rename the Web Service Port name, do the following:

  1. Double-click the Web Service Port name (i.e DateTime_CExport....).
  2. Expand Services
  3. Click soap:address
  4. Rename the last block of location:Value to the Web service export node name.
  5. Save project

From

http://localhost:9080/CCambil_Provider_MWeb/sca/DateTime_CExport

To

http://localhost:9080/CCambil_Provider_MWeb/sca/DateTime_CExport_WS

Test the Web Service Export binding.

Right-click the Web Service export node you want to test and select Test Component.

Follow the same procedure specified in testing an exported component.

Share the Web Service Port

Sharing the Web Service port enables external modules to invoke your web service.

Steps:

  1. Right-click the Web Service port you want to share and select Copy.
  2. Right-click the library you want to copy the port to and select Paste.
  3. The port is copied into the library.

Web Service Export Generated artifacts

The following artifacts are generated when you define a web service export binding:

  1. Web Service Port
  2. Dynamic Web Project

Dynamic Web Project

Web Service Port

No comments:

Visitor counter