Web Service Basics: Difference between revisions

Added procedure for adding WS client to non-visual component or adding manually
m (added to basics)
(Added procedure for adding WS client to non-visual component or adding manually)
 
Line 81: Line 81:
====Using a Web Service Client Class====
====Using a Web Service Client Class====
The class created above will (by default) then appear within the [[Visual DataFlex Studio]] on the [[Class Palette]] pane under the "Web Services" group.  From there it can be dragged and dropped onto a visual component (a [[View]] or whatever) in the Studio's "Designer", creating an object of that class within the component.
The class created above will (by default) then appear within the [[Visual DataFlex Studio]] on the [[Class Palette]] pane under the "Web Services" group.  From there it can be dragged and dropped onto a visual component (a [[View]] or whatever) in the Studio's "Designer", creating an object of that class within the component.
If you are working on a component that cannot be modelled in the Designer (either because it is a non-visual component like a Business Process or for some other reason) then you can still do the same thing: just drag the class onto the blank Designer page - it will be saying "'''No Objects to Model'''".
Or you can do it manually:
Use cWSServiceName.pkg
Object oCallItWhatYouWant is a cWSServiceName
End_Object  // oCallItWhatYouWant


This object - which we can think of as a "''stub''" or "''proxy''" for the web service itself - can then have its methods (which will map onto the ''operations'' of the service) invoked, passing them the appropriate data, to invoke the service itself, and receive any returned data from it.
This object - which we can think of as a "''stub''" or "''proxy''" for the web service itself - can then have its methods (which will map onto the ''operations'' of the service) invoked, passing them the appropriate data, to invoke the service itself, and receive any returned data from it.


[[Category:Web Services]] [[Category:Basics]]
[[Category:Web Services]] [[Category:Basics]]