Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
 
					
				
		
Is direct interface to a web service no longer supported in version 10 or above?
I'm trying to connect to a web service using http and when I connect to the web server, I get errors like this:
Invalide xml declaration.
On line number: 1. On column number: 5.
I get the same errors when attempting to download the file as .xml and load it locally.
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You are using the wrong API (Soap API). Just use the HTTP GET request and response:
http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityForecastByZIP?ZIP=33139
Also take a look into my weather forecast implementation here (QonnView2012 for Qonnections in Miami):
http://community.qlik.com/qlikviews/1235
- Ralf
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		Hi,
I think the XML file/result is just not well formatted. Can you post an example?
- Ralf
 
					
				
		
Hi Ralf,
I'm actually using one that was documented in one of the discussions in the community. The URL is
http://wsf.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP
When I enter data and invoke the service, I get the following header:
<?xml version="1.0" encoding="utf-8" ?>
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You are using the wrong API (Soap API). Just use the HTTP GET request and response:
http://wsf.cdyne.com/WeatherWS/Weather.asmx/GetCityForecastByZIP?ZIP=33139
Also take a look into my weather forecast implementation here (QonnView2012 for Qonnections in Miami):
http://community.qlik.com/qlikviews/1235
- Ralf
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		You're probably not able to see the content of the Qonnections 2012 group. Here is a second link:
http://community.qlik.com/qlikviews/1233
- Ralf
 
					
				
		
That worked, but all I see is that you've tweaked the URL
Can you point me to some clear documentation on how web services actually work? I've got to replicate this on at least two internal sources and I have a stellar level of inexperience with this sort of thing. I need a 'web services for dummies' manual!
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		There is no "tweaking" here. Just read the documentation:
http://wsf.cdyne.com/WeatherWS/Weather.asmx?op=GetCityForecastByZIP
QlikView cannot access web services (like Soap). It can only retrieve the results of a HTTP GET request. Just use the URL as a web source. Ususally the result is XML formatted then.
In the case above the URL has a parameter ZIP which is attached after the URL with a question mark:
<URL>?ZIP=<zip code>
Hope that helps,
- Ralf
 
					
				
		
Ok, the URL to use GET is actually documented on their web page - I get it now 
However, when I look at the equivalent page on my internal server, I see only SOAP 1.1 and 1.2, and HTTP POST - there is no GET.
When I invoke the HTTP POST directly from a browser, I get the data in xml format which I could save and load as text, and the parse within the Qlikview script, but I'm trying to automate the load. And when I try to use the POST to retrieve it from within Qlikview script, it sees it as HTML but I don't see the fields and values. So I am thinking that I need to talk to the server owner to see if they can enable using a GET and what the syntax should be?
Forgive my ignorance here, like I said this is all new to me...
 rbecher
		
			rbecher
		
		
		
		
		
		
		
		
	
			
		
		
			
					
		There are some examples around here how to code a HTTP POST request in QlikView macro code by using Microsoft.XMLHTTP object. But, I think this is not a good implementation because this will not work on QlikView Server. So, maybe someone from your IT department can help.
- Ralf
 
					
				
		
Thanks for the input - you've been quite helpful.
- calvin
