Hi Doug,

I wanted to report back that with your help I was finally able to solve
my problem.  You were right the problem is not with FLEX or UPS but with
the environment.  Therefore I made the switch from WebSphere to Tomcat. 
Now this wasn't as easy as I had wished for.  I have been working most
of the time since your last post to get Tomcat up and running and then
installed Flex and put my code in only to find out that FLEX would not
let me connect to the UPS servers because they are HTTPS and my
development area is HTTP.  So then the long  journey began of
configuring Tomcat to serve over HTTPS and man was this a battle of
configuration.  FYI to everyone.  If you are running Tomcat 5.5.16 then
you have to remove this file from your Tomcat install "tcnative-1.dll". 
Once Tomcat cannot find this file then all of my configuration worked
and I can now server over HTTPS on Tomcat.  So then it was the moment of
truth.  I fired up Tomcat on HTTPS and tried your code and guess what
you are right it worked.  I am so excited and I want to thank you again
for taking the time to help me!

Thanks,

COREY
--- In [email protected], "Doug Lowder" <[EMAIL PROTECTED]> wrote:
>
> Tomcat can be run as a standalone server. It's not really suited
> for certain high-traffic production environments, but it's great for
> development.
>
> I figured you were running WebSphere because of the com.ibm.ws
> exceptions.
>
> You know, it might be worth opening up servlet-api.jar wherever
> WebSphere keeps it (or wherever HttpServlet.class is), and checking
> the date on javax.servlet.http.HttpServlet.class. Mine has
> 2/13/2004 9:36 PM. It's possible your serer is running with an
> outdated jar file.
>
>
> --- In [email protected], "Corey" whoop76@ wrote:
> >
> >
> > Hi Doug,
> >
> > Thanks for the help! I really appreciate it a lot. You have
> probably
> > saved me lots of hours of trouble trying to get this to work. Now
> I
> > know the code is right but my environment is messed up. It must be
> > something with websphere. How did you know I was running
> websphere? I
> > have two boxes with websphere and I get the same message on both.
> I
> > will need to setup another environment to run this. I thought you
> had
> > to have an app server to run Flex? Can you run Flex with just
> Apache
> > and Tomcat?
> >
> > Thanks,
> >
> > COREY
> > --- In [email protected], "Doug Lowder" <douglowder@>
> wrote:
> > >
> > >
> > > Hi Corey,
> > >
> > >
> > >
> > > The exact code I'm using is pasted below. This is Flex 1.5
> running
> > > under Tomcat 5.1.something, and the app is loaded over https. I'm
> > > wondering if maybe your problem is related to some outdated
> version of
> > a
> > > jar file used by IBM WebSphere (which unfortunately I don't have
> any
> > > experience with, so take it for what it's worth).
> > >
> > > <?xml version="1.0" encoding="utf-8"?>
> > >
> > > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml
> > > <http://www.macromedia.com/2003/mxml> "
> > > width="100%" height="100%"
> > > pageTitle="UPS Test"
> > > backgroundColor="0xFFFFFF" >
> > >
> > > <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;
> > >
> > > mx.core.Application.alert("xmlDecoder is called\n\n" +
> > > myXML);
> > > output.text = myXML;
> > > 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
> > > <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)"/>
> > > <mx:TextArea id="output" text="" width="100%" height="100%"/>
> > >
> > > </mx:Application>
> > >
> > >
> > >
> > > --- In [email protected], "Corey" whoop76@ wrote:
> > > >
> > > >
> > > > Wow Doug that is great! and its bad because I cannot do
> that. ;)
> > > >
> > > > I must be doing something wrong. I have tried it so many ways I
> > think
> > > I
> > > > have myself crossed up. Doug I would do anything to even get
> that
> > > > response that you got there. Could you post the exact code you
> used
> > to
> > > > get that response from UPS. That would help me so much. I have
> spent
> > > > about 16 hours on this over two days and I have not been able
> to
> > make
> > > > any progress except to figure out how not to do it. Your help
> would
> > be
> > > > greatly appreciated. Are you sending your request from http or
> > https?
> > > > I know you are sending to https I am just what protocol you are
> > > sending
> > > > from.
> > > >
> > > > Thanks,
> > > >
> > > > COREY
> > > > --- In [email protected], "Doug Lowder" douglowder@
> wrote:
> > > > >
> > > > > Well, I don't think it's mxml-related. I ran a little test
> with
> > > > > your code and it's working fine. Here is what I get back from
> > > > > xmlDecoder() after calling getServices():
> > > > >
> > > > > <?xml version="1.0"?>
> > > > > <RatingServiceSelectionResponse>
> > > > > <Response>
> > > > > <TransactionReference />
> > > > > <ResponseStatusCode>0</ResponseStatusCode>
> > > > >
> <ResponseStatusDescription>Failure</ResponseStatusDescription>
> > > > > <Error>
> > > > > <ErrorSeverity>Hard</ErrorSeverity>
> > > > > <ErrorCode>250005</ErrorCode>
> > > > > <ErrorDescription>No Access Identification
> > > > > provided</ErrorDescription>
> > > > > </Error>
> > > > > </Response>
> > > > > </RatingServiceSelectionResponse>
> > > > >
> > > > > --- In [email protected], "Corey" whoop76@ wrote:
> > > > > >
> > > > > > Hi Doug,
> > > > > >
> > > > > > Hi Doug my flex app is loaded over https. I have tried it
> loaded
> > > > > > both ways over http and https. Here is what happened when I
> > tried
> > > > > > it loaded over https://.
> > > > > >
> > > > > > I set the protocol="https" and I received the same error.
> Then I
> > > > > > also set useProxy="false". When I do this I do not get an
> output
> > > > > > error from the debugger at all. I get an error thrown from
> the
> > > > > > fault attribute of the HTTPService and the error
> says "Could not
> > > > > > retrieve data". I guess because I am bypassing the proxy
> is why
> > > > > > there is no error output. I am not sure which debugger to
> turn
> > on
> > > > > > to see if there are any other errors.
> > > > > >
> > > > > > Thanks,
> > > > > > COREY
> > > > > > --- In [email protected], "Doug Lowder"
> <douglowder@>
> > > > > > wrote:
> > > > > > >
> > > > > > > Just wondering... Is your Flex app loaded over http? If
> so,
> > add
> > > > > > > protocol="https" to your HTTPService and see if that
> helps.
> > > > > > >
> > > > > > > - Doug
> > > > > > >
> > > > > > > --- In [email protected], "Corey" <whoop76@>
> wrote:
> > > > > > > >
> > > > > > > >
> > > > > > > > Hi Matt,
> > > > > > > >
> > > > > > > > Great Idea I did not even think to turn that on. Once
> I did
> > I
> > > > > > > received
> > > > > > > > this message listed below. I am not sure what it
> means. What
> > > > > > do
> > > > > > > you
> > > > > > > > think? Do you think its on the FLEX side or the UPS
> side? Do
> > > > > > you
> > > > > > > know
> > > > > > > > of anyone that has connected Flex to the UPS API's?
> > > > > > > >
> > > > > > > > [4/7/06 16:15:43:828 CDT] 6af40fb9 SystemErr R 04/07
> > 16:15:43
> > > > > > ERROR
> > > > > > > > %%Server%%java.lang.RuntimeException: A valid target
> URL was
> > > > > not
> > > > > > > > specified: https://wwwcie.ups.com/ups.app/xml/Rate
> > > > > > > >
> > > > > > > > java.lang.RuntimeException: A valid target URL was not
> > > > > specified:
> > > > > > > > https://wwwcie.ups.com/ups.app/xml/Rate
> > > > > > > >
> > > > > > > > at flex.server.j2ee.proxy.ProxyServlet.service
> > > > > > > (ProxyServlet.java:440)
> > > > > > > >
> > > > > > > > at
> > > javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
> > > > > > > >
> > > > > > > > at flex.bootstrap.BootstrapServlet.service
> > > > > > > (BootstrapServlet.java:69)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > com.ibm.ws.webcontainer.servlet.StrictServletInstance.doService
> > > > > > > (StrictSe\
> > > > > > > > rvletInstance.java:110)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet._service
> > > > > > > (StrictLi\
> > > > > > > > fecycleServlet.java:174)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> com.ibm.ws.webcontainer.servlet.IdleServletState.service
> > > > > > > (StrictLifecycle\
> > > > > > > > Servlet.java:313)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > com.ibm.ws.webcontainer.servlet.StrictLifecycleServlet.service
> > > > > > > (StrictLif\
> > > > > > > > ecycleServlet.java:116)
> > > > > > > >
> > > > > > > > at
> > > > > > > > com.ibm.ws.webcontainer.servlet.ServletInstance.service
> > > > > > > (ServletInstance.\
> > > > > > > > java:258)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > > >
> > >
> com.ibm.ws.webcontainer.servlet.ValidServletReferenceState.dispatch
> > > > > > > (Vali\
> > > > > > > > dServletReferenceState.java:42)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > >
> com.ibm.ws.webcontainer.servlet.ServletInstanceReference.dispatch
> > > > > > > (Servle\
> > > > > > > > tInstanceReference.java:40)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> com.ibm.ws.webcontainer.filter.WebAppFilterChain.doFilter
> > > > > > > (WebAppFilterCh\
> > > > > > > > ain.java:61)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDi
> > > > > > > spa\
> > > > > > > > tch(WebAppRequestDispatcher.java:863)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch
> > > > > > > (WebAppRe\
> > > > > > > > questDispatcher.java:491)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward
> > > > > > > (WebAppReq\
> > > > > > > > uestDispatcher.java:173)
> > > > > > > >
> > > > > > > > at
> > > > > > > > com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward
> > > > > > > (WebAppInvoker.java:7\
> > > > > > > > 9)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook
> > > > > > > (WebAppInv\
> > > > > > > > oker.java:199)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > >
> com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvoc
> > > > > > > ati\
> > > > > > > > on(CachedInvocation.java:71)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > >
> com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI
> > > > > > > (Servle\
> > > > > > > > tRequestProcessor.java:182)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> > > > >
> com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service
> > > > > > > (OSELis\
> > > > > > > > tener.java:331)
> > > > > > > >
> > > > > > > > at
> > > > > > > >
> com.ibm.ws.webcontainer.http.HttpConnection.handleRequest
> > > > > > > (HttpConnection\
> > > > > > > > .java:56)
> > > > > > > >
> > > > > > > > at
> > > > > > > > com.ibm.ws.http.HttpConnection.readAndHandleRequest
> > > > > > > (HttpConnection.java:\
> > > > > > > > 432)
> > > > > > > >
> > > > > > > > at
> > com.ibm.ws.http.HttpConnection.run(HttpConnection.java:343)
> > > > > > > >
> > > > > > > > at
> > com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:592)
> > > > > > > >
> > > > > > > > Thanks,
> > > > > > > >
> > > > > > > > COREY
> > > > > > > >
> > > > > > > >
> > > > > > > > --- In [email protected], "Matt Chotin"
> <mchotin@>
> > > > > > wrote:
> > > > > > > > >
> > > > > > > > > I'm not sure if that error is coming from us or from
> the
> > UPS
> > > > > > > site. Can
> > > > > > > > > you turn on proxy debugging so you can see the
> content
> > going
> > > > > > to
> > > > > > > the
> > > > > > > > > server and coming back?
> > > > > > > > >
> > > > > > > > > -----Original Message-----
> > > > > > > > > From: [email protected]
> > > > > > > [mailto:[EMAIL PROTECTED]
> > > > > > > > On
> > > > > > > > > Behalf Of Corey
> > > > > > > > > Sent: Thursday, April 06, 2006 7:46 AM
> > > > > > > > > To: [email protected]
> > > > > > > > > Subject: [flexcoders] FLEX and UPS online tools XML
> > > > > integration
> > > > > > > > >
> > > > > > > > > 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
> > > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
>








--
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/
 



Reply via email to