That shouldn't be too difficult. I did a test with a free zip code
service.
What tools/components do you need to write a service to send stuff OUT
of unidata?
$ cat ST.BASIC.ZIP.REQ2
SUBROUTINE ST.BASIC.ZIP.REQ2(L.ZIP.CODE, RespHeaders, RespData,
SoapStatus, xmlString)
******************************************************************
* Description of subroutine
* Used for documentation purposes (including auto documentation)
******************************************************************
*
$INCLUDE INCLUDE XML.H
*
RespHeaders = ''
RespData = ''
SoapStatus = ''
xfile = ""
xmlString = ""
XMLMap = "_XML_/ZIPCODES.map"
ZIPX = ''
ZIPX := '<?xml version="1.0" encoding="UTF-8"?>'
ZIPX := '<soap:Envelope'
ZIPX := ' xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
ZIPX := ' xmlns:xsd="http://www.w3.org/2001/XMLSchema"'
ZIPX := ' xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
ZIPX := ' <soap:Body>'
ZIPX := '<GetInfoByZIP xmlns="http://www.webserviceX.NET">'
ZIPX := '<USZip>':L.ZIP.CODE:'</USZip>'
ZIPX := ' </GetInfoByZIP>'
ZIPX := ' </soap:Body>'
ZIPX := '</soap:Envelope>'
URL = 'http://www.webservicex.net/uszip.asmx?WSDL'
SoapAction = 'http://www.webserviceX.NET/GetInfoByZIP'
Timeout = 30000
* create the request
Ret = SoapCreateRequest(URL, SoapAction, SoapReq)
if (Ret = 0) then
SETREQUEST.STATUS = soapSetRequestContent(SoapReq, ZIPX, 1)
Ret = SoapSubmitRequest(SoapReq, Timeout, RespHeaders, RespData,
SoapStatus)
RespData = RespData:CHAR(10) ;* add a line-feed at the end of the
xml string
Status = XDOMOpen(RespData, XML.FROM.STRING, DOMH) ;* domh is the
document handle
if (Status = XML.SUCCESS) then
Status = XDOMLocate(DOMH,'//NewDataSet','',domHandle)
if (Status = XML.SUCCESS) then
Status = XDOMLocateNode(domHandle, XDOM.CHILD,
XDOM.FIRST.CHILD, XDOM.ELEMENT.NODE, sibHandle)
Status = XDOMWrite(domHandle, xmlString, XML.TO.STRING)
end
end
end
return
_XML_/ZIPCODES.map
<?xml version="1.0" ?>
<!-- DOCTYPE U2XMAP SYSTEM "U2XMAP.DTD" -->
<U2XMAP version="1.0" Name="ZIPCODES.map" XSD="ZIPCODES.xsd">
<OPTIONS>
</OPTIONS>
<!-- Table/Class map ZIPCODES_NewDataSet -->
<TABLECLASSMAP MapName="ZIPCODES_NewDataSet"
StartNode="/NewDataSet" Table
Name="ZIPCODES" Action="Default">
<ColumnMap Node="Table/AREA_CODE" Column="AREA_CODE"/>
<ColumnMap Node="Table/CITY" Column="CITY"/>
<ColumnMap Node="Table/STATE" Column="STATE"/>
<ColumnMap Node="Table/TIME_ZONE" Column="TIME_ZONE"/>
<ColumnMap Node="Table/ZIP" Column="ZIP"/>
</TABLECLASSMAP>
</U2XMAP>
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Larry Hiscock
Sent: Wednesday, August 20, 2008 3:50 PM
To: [email protected]
Subject: RE: [U2] SOAP in Unidata 6.1
Hi Tony,
Thanks for the response, but I'm trying to go the other way. I'm trying
to write a web service CONSUMER in Unidata, not provide access to the MV
database. I was looking at the SOAP functions in Basic
(SOAPCreateRequest, SOAPSetParameters, SOAPSubmitRequest, etc) to
connect to an outside web service to retrieve data.
--Larry
Larry Hiscock
Western Computer Services
-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tony G
Sent: Wednesday, August 20, 2008 10:07 AM
To: [email protected]
Subject: RE: [U2] SOAP in Unidata 6.1
Larry - have a look at the video on our website:
removepleaseNebula-RnD.com/products/gallery.htm
You can do this in less than 20 minutes. You said free so disregard
references to mv.NET and use UO.NET. The point here is that the
SOAP/webservice part is completely generated by Visual Studio. The only
thing you need to do is connect to Unidata and exchange plain text.
My general policy is to use the database as a database, not as an engine
for XML, web services, ODBC, or many of the other non-portable things
that get embedded into the engine. YMMV
HTH
Tony Gravagno
Nebula Research and Development
TG@ remove.pleaseNebula-RnD.com
> From: Larry Hiscock
> Does anyone have a working SOAP example in Unidata (UD
> 6.1) that they'd be willing to share? Preferably one that works with
> a free (or demo) webservice that I can use to test. I've done
> webservices before in .NET, but not in Unidata. The example in the
> manuals looks pretty simple, but doesn't actually work.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/