ComponentX Web Services Help Topics
Component-X has the ability to import a wsdl file from a web service provider
URL and to generate a set of components to use the specified services. Once you
import a wsdl file the result is a set of type documents that reflect the
specified input and output document for each service, an interface for each
method, an interface combining the individual method interfaces, and a set of
pre-configured components using the interfaces and documents that can make each
method call as needed. Currently only the basic soap types and some arrays are
supported.
Using a wsdl file to make the components necessary for using soap RPC.
- load the cxDemos:fedex sample and test it, you should get back a FEDEX
tracking status (you must be connected to the internet for this work)
- to build this sample start with a new project and include the cx:soap
project and make a new package and call it fedex
- now from the project menu choose import->wsdl file
- choose the fedex package and use http://www.abacus-labs.com/fedextrackerservice.WSDL
for the wsdl url
and click OK
- The fedex package should now contain some generated components
- add a new component to the fedex package and call it track1
- add the getStatus interface to the right hand side of the new component
- add the getStatus document to the MIDDLE of the new component (so it
doesn't become a port)
- add a dialog component from the utility palette
- wire the output of the getStatus document to the call port of the
interface
- wire the return port to the input of the dialog
- right click the document and open the initial value dialog
- make the initial value of trackingNumber 791901881310
and save it
- add a pin called send to the component and connect
it to the send pin of the document
- close the component and make a new component and
call it track2
- add a track1 to track2 and add a send pin and
connect it to the send pin of the track1
- add a fedextrackerportinterface to the right hand
side of track2 and wire the getStatus interfaces together
- close track2 and make a new component called track3
- add track2 and fedextrackerport to track3 and wire
them together
- pulse the pin of the track2 component and a dialog
with a FEDEX tracking status should appear after a few seconds
If you need to hand-build the required components we
recommend examining this sample to see how all the required pieces are
configured and assembled to implement soap RPC. This document is not intended to
provide tuition in soap, there are many references about soap available.
Component-X has the ability to browse the UDDI registry
to find a wsdl specification. The UDDI browser is located in the
projects/imports menu. For example choose to browse using x as then business
name to search for. Choose xmethods from the list that is returned and from the
list of services choose the delayed stock quote service. This will return a wsdl
file that can the be selected to create components similar to the description
above.
Back
Copyright 2000,2001 Data Access Technologies