I am trying to use FLEX to talk to the UPS servers. I have
downloaded the UPS software and decided to use their XML interface.
On the FLEX side I am using HTTPService. The problem I am getting
when trying to use the HTTPService is this error message
java.lang.RuntimeException: A valid target URL was not specified:
https://wwwcie.ups.com/ups.app/xml/Rate
Now I guess I see why FLEX thinks that this URL is not valid because
it is pointing to a servlet and not an XML file or other file type.
Listed below is the code I am using that is giving me this error.
<mx:Script>
<![CDATA[
var RequestObject: Object;
function getServices(xmlUPSTest){
mx.core.Application.alert("Services is called");
hs.send(xmlUPSTest);
}
function xmlDecoder ( myXML ) {
// Simplified decoding logic.
var myObj = new Object();
//myObj.name = myXML.rss.channel.item;
//myObj.honorific = myXML.firstChild.attributes.honorific;
return myObj;
}
]]>
</mx:Script>
<mx:XML id="xmlUPSTest" source="UPSTest.xml"/>
<mx:HTTPService id="hs" xmlDecode="xmlDecoder"
showBusyCursor="true" fault="mx.core.Application.alert
(event.fault.faultstring)"
url="https://wwwcie.ups.com/ups.app/xml/Rate" method="post"
resultFormat="object" contentType="application/xml">
<mx:request>
<AccessRequest>{xmlUPSTest}</AccessRequest>
</mx:request>
</mx:HTTPService>
<mx:Button label="Check UPS" click="getServices
(xmlUPSTest)"/>
Listed below are the contents of the UPSTest.xml file
<?xml version="1.0"?>
<AccessRequest xml:lang="en-US">
<AccessLicenseNumber>EBE9B32BAFD77EC8</AccessLicenseNumber>
<UserId>COREYCORMIER</UserId>
<Password>GOLF1997</Password>
</AccessRequest>
Has anyone connected Flex to the UPS online tools through XML? If
so do you have some example code that you could share with me? I am
just not sure how to pass the XML file into their servlet.
Thanks,
COREY
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/