SOAP in ASP

I'm currently trying to program up a page to take information from a WSDL...I found this peice of code which I have run and it works without any errors, but now I need to make it work with the webservice im calling.

The webservice is: https://www.flightstats.com/developers/bin/download/Web+Services/WSDL/WeatherForecastService.wsdl

References to this webservice can be seen at: https://www.flightstats.com/developers/bin/view/Web+Services/WeatherGetAirportForecastService

The Guid i have to use is : 49e3481552e7c4c9:2a2216a6:127f1bae19d:1566

The code im using so far is below, if I could get this working I would be very greatful as I've been going around in circles for the past week and need to get this working for work.........in a bit of a pickle.....any info you need please just ask.

Ideally I would like to extract the temperature of any airport from the WSDL.

Cheers

<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>
<%

Dim strCurrency, strDialCode, strGMT

Call SoapRequest()
%>

<HTML>
<BODY>

<P>
<font face="verdana" size="-2"><b>Currency: </b> <%=strCurrency%>
</font>

</BODY>
</HTML>

<%
Function SoapRequest

If Request.ServerVariables("REQUEST_METHOD") = "POST" Then
'initialize the variables

Dim oSOAP
' Instantiate the SOAP object
Set oSOAP = Server.CreateObject("MSSOAP.SoapClient30")
oSOAP.ClientProperty("ServerHTTPRequest") = True

'**** Call the eServeInquiry.wsdl
oSOAP.mssoapinit("https://www.flightstats.com/developers/bin/download/Web+Services/WSDL/WeatherForecastService.wsdl")

oSOAP.eServeSearch(CSTR(Request.Form("T1")))

'*** if the above line is called like this, IT FAILS *******
'*** since the response returns multiple <element name> at THIS TIME
'strCurrency = oSOAP.eServeSearch(CSTR(Request.Form("T1")))

'Response.write("Test: " &
oSOAP.eServeSearch(CSTR(Request.Form("T1")))

set oSOAP = Nothing

End If
End Function
%>
nickmacdAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

neeraj523Commented:
Hello

There is an issue in SOAP..

Service Documentation :  None  Error parsing the WSDL file: https://www.flightstats.com/developers/bin/download/Web Services/WSDL/WeatherForecastService.wsdl Error at Line 145, position 86 Error c00cee2c, Illegal name character.  

check if your SOAP method is working in a generic SOAP client before using it in your code..

here is one good SOAP client to test

http://www.soapclient.com/soaptest.html

let me know if you need more info.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nickmacdAuthor Commented:
Thanks I have found the correct address now which is https://www.pathfinder-xml.com/development/WSDL/WeatherForecastService.wsdl

Now I just need to pass the login details through and then display the contents on a page.....i really appreciate your help on this as I have spent all week to get this far and struggling a great deal with it.......what info would you need from me to help me on this????

Thanks
neeraj523Commented:
Hello

What further help are you looking from my side ??

Get your webservice running using SOAP generic client. If it works there, it should also work in your code..
Exploring SQL Server 2016: Fundamentals

Learn the fundamentals of Microsoft SQL Server, a relational database management system that stores and retrieves data when requested by other software applications.

nickmacdAuthor Commented:
Hi again,

Well I managed to find an example from the company that is suppling the information to me and and have now entered into a ASP.NET page which is below;

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System;
using System.Net;
using System.IO;
using System.Text;


String url = "http://www.pathfinder-xml.com/development/xml";
Console.WriteLine(url);

StringBuilder pars = new StringBuilder();
pars.Append("Service=AirlineGetAirlineService");
pars.Append("&login.accountID=5430"); //Replace with your credentials
pars.Append("&login.userID=mhayward"); //Replace with your credentials
pars.Append("&login.password=passw0rd"); //Replace with your credentials
pars.Append("&airline.iataCode=AA");

HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(url);
webRequest.Method = "POST";
webRequest.ContentType = "application/x-www-form-urlencoded";
webRequest.ContentLength = pars.Length;

StreamWriter writer = new StreamWriter(webRequest.GetRequestStream());
try
{
      Console.WriteLine(pars.ToString());
      writer.Write(pars.ToString());
}
catch
{      
}
finally
{
      writer.Close();
}

WebResponse webResponse = null;
try
{
      webResponse = (HttpWebResponse)webRequest.GetResponse();
StreamReader rdr = new StreamReader(webResponse.GetResponseStream());
      String responseData = rdr.ReadToEnd();
      Console.WriteLine(responseData);
}
catch
{
}
finally
{
      if (webResponse != null)
            webResponse.Close();
}
 
===========================================
But receive the following error...

Line 11:
Line 12:
Line 13: String url = "http://www.pathfinder-xml.com/development/xml";
Line 14: Console.WriteLine(url);
Line 15:
nickmacdAuthor Commented:
Was the best answer received
neeraj523Commented:
hello.. i am not getting what exactly you want to do. If you have working code as you posted above, what are you expecting from my side..

can you define in details..

neeraj523Commented:
hey.. you should have provided me more details of what you want from my side..

anyway, thanx for accepting my answre, but not good to get 'C' grade :(..
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Web Languages and Standards

From novice to tech pro — start learning today.