Export/Import Web Services Binding How to
Websphere Integration Developer v612
Contents
Introduction
When to Use Web Services bindings | Consider a Web Service binding when these factors are applicable:
|
Related links | Connectivity Accessing services |
How to generate Web Service bindings for exports
Related links | |
Generate Web Service Export
In the assembly diagram, do the following:
| |
Select the transport
In the Transport Selection window, select the required transport (soap/http or soap/jms) and click OK. | |
Web Service export generated
A web service export is generated.
Note the following:
|
How to generate Web Service bindings for imports
Related links | |
Generate Web Service import from a Web Service export
We will create a web service import binding from an existing web service export.
| |
Select the type
In the Component Creation window, select Import with Web Service Binding and click OK. A Web Service import binding is created. | |
Wire the Import Wire the service requester component (i.e CCambil_Consumer_C) to the import as required. Note: Notice that the import and export web service binding properties are identical. | |
How to create an export component by dragging an interface
Related links | |
Drag an Interface
Drag an interface (i.e StockQuoteService) from a library/module and drop it on the Assembly diagram canvas. | |
Export with no Binding
In the Component Creation window, select Export with no Binding and click OK.
Note: You can also select the other types:
| |
Export Component created
An export component is created using a default name of StockQuoteServiceExport1 (original interface name + Export1). | |
Rename Export Component
Rename the export component as required (i.e StockQuoteService, without the Export1 suffix).
Click StockQuoteServiceExport1 in the Assembly Editor to highlight its name. Type StockQuoteService to rename the export.
Notice that the name change is reflected in the Description tab in the export icon's Properties view. |
How to generate a Web Services binding
Related links | |
Select a component to be bound
In the assembly diagram, right-click on a component (i.e StockQuoteService) you want to bind and select Generate Binding > Web Service Binding. | |
Select soap/jms
In the Transport Selectioin window, select soap/jms and click OK. | |
Web Services Binding Generated
If you look at ResourcesWeb Service Ports, you will notice that the wsdl port, StockQuoteService_StockQuoteServiceJmsPort, has been generated. | |
How to create an import component by dragging an interface
Related links | Imports and exports |
Drag an Interface
Drag an interface (i.e DelayedServicePortType) from a library/module and drop it on the Assembly diagram canvas. | |
Import with Web Service Binding
In the Component Creation window, select Import with Web Service Binding and click OK.
Note: You can also select the other types:
| |
Select Web Service Import Details
| |
Select Service Port
Select the service port (i.e DelayedServiceSOAP) and click OK.
| |
Use an existing web service port
Click OK to finalize your selection. | |
Rename import component
By default, WID 6.1.2 concatenate the interface name (i.e, DelayedServicePortType) with a fixed value of 'ImportN', where N is a sequential number starting with 1 to come up with the import component name.
Rename the default import component as required (i.e to DelayedService). To do this, high-light the current import component name and type over with the new name.
| |
Renamed import component |
How to export a component using Web Services Binding
Export Bindings
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:
| 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:
| |
Web Service Export Generated artifacts
The following artifacts are generated when you define a web service export binding:
| Dynamic Web Project Web Service Port |
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.
| |
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:
|
No comments:
Post a Comment