Options

Navision 2009 sp1 Web service Integration With soap

dnvpraveendnvpraveen Member Posts: 6
edited 2010-09-08 in NAV Three Tier
Hi to all,

I new to web services.

i googled and found one soap API. which is
http://www.weather.gov/forecasts/xml/do ... Series.xml

by calling this SOAP request i will get a response of

<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot; xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/&quot; xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance&quot; xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"&gt;
<SOAP-ENV:Body>
<ns2199:GmlTimeSeries xmlns:ns2199="uri:DWMLgen">
<listLatLon xsi:type="xsd:string">38.99,-77.02 39.70,-104.80 47.6,-122.30</listLatLon>
<startTime xsi:type="xsd:string">2000-01-01T00:00:00</startTime>
<endTime xsi:type="xsd:string">2010-01-01T00:00:00</endTime>
<compType xsi:type="xsd:string">Between</compType>
<featureType xsi:type="xsd:string">Forecast_Gml2Point</featureType>
<propertyName xsi:type="xsd:string">maxt,mint</propertyName>
</ns2199:GmlTimeSeries>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>



Defined variable are

Name DataType Subtype Length
locautXmlDoc Automation 'Microsoft XML, v6.0'.DOMDocument
locautXmlHttp Automation 'Microsoft XML, v6.0'.XMLHTTP
test Text 250


and i coded in the code unit run tiger

//HTTP Start
// main method new
IF ISCLEAR(locautXmlDoc) THEN
CREATE(locautXmlDoc);
locautXmlDoc.async:=FALSE;


locautXmlDoc.loadXML('<?xml version="1.0" encoding="ISO-8859-1" ?>'
+'- <SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/&quot; '
+'xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"'
+'xmlns:xsd="http://www.w3.org/2001/XMLSchema&quot; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"'
+'xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">'
+'http://www.weather.gov/forecasts/xml/docs/SOAP_Requests/GmlTimeSeries.xml');
locautXmlHttp.send(locautXmlDoc);
locautXmlDoc.load(locautXmlHttp.responseXML);
locautXmlDoc.save(test);
MESSAGE(test);

While running error pops up at locautXmlHttp.send(locautXmlDoc); error message is (“The Automation variable has not been instantiated.”).



My intension is to consume this web service and print the out put.


Please Help Me to resolve this issue.

Comments

Sign In or Register to comment.