In order to develop a COBOL SOAP consumer (client-side), to invoke SOAP Web Service, the COBOL program should take advantage of HTTPClient class. That class contains several useful methods to work with SOAP Web Service.In the isCOBOL sample folder you find the folder eis/webservices/soap/client that contains an example of COBOL client program called "IP2GEO.cbl" that shows how to use a SOAP Web Service available over internet at http://ws.cdyne.com/ip2geo/ip2geo.asmx .A SOAP Web Service usually provides a way to inquire the functionality available and the parameters that should be used. To simplify the working storage definition able to manage the XML envelope, a the STREAM2WRK utility can be used.That utility is able to read WSDL definition obtained adding ?WSDL to the Web Service URL definition, something like: http://ws.cdyne.com/ip2geo/ip2geo.asmx?WSDL generates the following working storage:
namespace 'http://www.w3.org/2003/05/soap-envelope'.namespace 'http://ws.cdyne.com/'.This program has the objective to invoke the ResolveIP functionality providing the IP address and receiving some geographic information like City, State, Country, etc.
configuration section.
WORKING-STORAGE SECTION.copy "ip2geo.cpy".
Note - The type "text/xml;charset=utf-8" is suitable for SOAP v1.1. If the service is SOAP v1.2, use "application/soap+xml; charset=utf-8" instead.
| Copyright (c) 2017 Veryant |
| Contact us |
|
Please share your comments on this manual or on any Veryant product documentation with the email button at the top left |