I made the change to dates suggested by Sean, and have gotten a bit father.  I 
now get results from both functions this NWS web service 
[http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl], but 
I am still getting "Could not perform web service invocation 
"NDFDgenByDay|NDFDgen" because java.lang.IllegalArgumentException: argument 
type mismatch errors" from both functions of the advertised web service 
[http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl].

The data successfully returned by the NDFDgenByDay is not properly formed XML, 
but the data returned by the NDFDgen seems to be correctly formed, but I'm not 
sure it is all there.

I'm posting my current code on the hope that others may be able to take this 
further.

CODE:
------------------

<!--- 
        http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl
        http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl
--->

<cfscript>
        NDFDgenByDay = structNew();
        NDFDgenByDay.latitude = 38.9936;
        NDFDgenByDay.longitude = -77.0224;
        NDFDgenByDay.format = "12hourly";
        NDFDgenByDay.startDate = "Jan 6, 2004";
        NDFDgenByDay.numDays = 7;
        
        NDFDgen = StructNew();
        NDFDgen.Latitude = 38.9936;
        NDFDgen.Longitude = -77.0224;
        NDFDgen.StartTime = "Jan 6, 2004 12am";
        NDFDgen.Endtime = "Jan 7, 2004 12am";
        NDFDgen.Product = "glance";
        
        weatherParameters = StructNew();
        weatherParameters.maxt = true;
        weatherParameters.mint = true;
        weatherParameters.temp = true;
        weatherParameters.dew = true;
        weatherParameters.pop12 = true;
        weatherParameters.qpf = true;
        weatherParameters.snow = true;
        weatherParameters.sky = true;
        weatherParameters.wspd = true;
        weatherParameters.wdir = true;
        weatherParameters.wx = true;
        weatherParameters.icons = true;
        weatherParameters.waveh = true;
        
        NDFDgen.weatherParameters = weatherParameters;
        //The new URI I found when digging around the documentation
        ws1 = CreateObject("webservice", 
"http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl";);
        //The Original URL
        ws2 = CreateObject("webservice", 
"http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";);
        
        aStringWS1 = 'No Output Generated';
        aStringWS2 = 'No Output Generated';
</cfscript>

<cftry>
        <!--- This call will return data, but not well formed XML --->
        <cfset aStringWS1 = ws1.NDFDgenByDay(argumentCollection = NDFDgenByDay)>
        <cfcatch type="any"><cfdump var="#cfcatch#" expand="no" label="ERROR: 
http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl";></cfcatch>
</cftry>

<cftry>
        <!--- This call does not return data, but errors with the mismatched 
argurment type error. --->
        <cfset aStringWS2 = ws2.NDFDgenByDay(argumentCollection = NDFDgenByDay)>
        <cfcatch type="any"><cfdump var="#cfcatch#" expand="no" label="ERROR: 
http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";></cfcatch>
</cftry>

<cfoutput>
<h1>NDFDgenByDay Results</h1>

        
<h2>http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl</h2>
        #HTMLEditFormat(aStringWS1)#
        <hr>
        <h2>http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl</h2>
        #HTMLEditFormat(aStringWS2)#
</cfoutput>

<cfscript>
        aStringWS1 = 'No Output Generated';
        aStringWS2 = 'No Output Generated';
</cfscript>


<cftry>
        <!--- This call will return data, but not well formed XML --->
        <cfset aStringWS1 = ws1.NDFDgen(argumentCollection = NDFDgen)>
        <cfcatch type="any"><cfdump var="#cfcatch#" expand="no" label="ERROR: 
http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl";></cfcatch>
</cftry>

<cftry>
        <!--- This call does not return data, but errors with the mismatched 
argurment type error. --->
        <cfset aStringWS2 = ws2.NDFDgen(argumentCollection = NDFDgen)>
        <cfcatch type="any"><cfdump var="#cfcatch#" expand="no" label="ERROR: 
http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl";></cfcatch>
</cftry>

<cfoutput>
<h1>NDFDgen Results</h1>

        
<h2>http://www.nws.noaa.gov/forecasts/xml/SOAP_server/ndfdXMLserver.php?wsdl</h2>
        #HTMLEditFormat(aStringWS1)#
        <hr>
        <h2>http://www.nws.noaa.gov/forecasts/xml/DWMLgen/wsdl/ndfdXML.wsdl</h2>
        #HTMLEditFormat(aStringWS2)#
</cfoutput>

--------------
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
- Cynthia Dunning



Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message. 



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Get the mailserver that powers this list at 
http://www.houseoffusion.com/banners/view.cfm?bannerid=17

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:189517
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to