HTTP Responses with Flex, how to transform http 500 into http 200

Hello
We have deployed a Web Service application in our WAS 7.10 SP6.
Our application is a standard java 5 app with annotations (ejbs exposed as web services).
When a web service call operation returns a java exception (any kind of exception), WAS returns http 500 to the client.
http 500 cannot be interpreted by a flex client (2.0, 3.0 no matter which version) because of an interaction between browser and flex runtime issue.   Flex code can only obtain an i/o error when http 500 is returned by the server.
The usual way to solve this problem is to create a filter that transforms http 500 to http 200, but we don't know how to implement a filter for web services http responses in WAS 7.1 or 7.0
Other solutions involve using Adobe proxy, but in our case we can't use it.
Is there any other solution to this matter?

Hello
We have deployed a Web Service application in our WAS 7.10 SP6.
Our application is a standard java 5 app with annotations (ejbs exposed as web services).
When a web service call operation returns a java exception (any kind of exception), WAS returns http 500 to the client.
http 500 cannot be interpreted by a flex client (2.0, 3.0 no matter which version) because of an interaction between browser and flex runtime issue.   Flex code can only obtain an i/o error when http 500 is returned by the server.
The usual way to solve this problem is to create a filter that transforms http 500 to http 200, but we don't know how to implement a filter for web services http responses in WAS 7.1 or 7.0
Other solutions involve using Adobe proxy, but in our case we can't use it.
Is there any other solution to this matter?

Similar Messages

  • Problem with socket responses with flex

    Hi, I am using the code below to connect to an IMAP server.
    When I telnet to the server and use the commands that I am sending in the code, the rsponses are correct.
    However, when I run the code below, I only obtain the ready and logged in responses as shown below.
    Any ideas why I am not receiving the full set of responses from the socket?
    Thanks in advance fro your advice.
    The following is the output from the code:
    +++++++++++++++++ START SENDING IMAP DATA +++++++++++++++++++++++++
    sent: . login user1 myPassword
    sent: . status INBOX (messages)
    sent: . select INBOX
    +++++++++++++++++ END SENDING IMAP DATA +++++++++++++++++++++++++
    ++++++++ [IMAP START]
    Response is: * OK Dovecot ready.
    [IMAP END] +++++++++
    ++++++++ [IMAP START]
    Response is: . OK Logged in.
    [IMAP END] +++++++++
    The code is:
    <?xml version="1.0" encoding="utf-8"?>
    <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009"
       xmlns:s="library://ns.adobe.com/flex/spark"
       xmlns:mx="library://ns.adobe.com/flex/mx"
       applicationComplete="init()">
    <fx:Declarations>
    <!-- Place non-visual elements (e.g., services, value objects) here -->
    </fx:Declarations>
    <fx:Script>
    <![CDATA[
    public var dataStr:String;
    private var socket:Socket;
    private var serverURL:String= "dead.org";
    private var serverPort:int = 143;
    private var serverResponse:ByteArray = new ByteArray();
    private function init():void
      this.serverURL = serverURL;
      this.serverPort = serverPort;
      socket = new Socket();
      socket.addEventListener(ProgressEvent.SOCKET_DATA,handleNewIMAPData); //Event when socket receives new data
      this.connectToServer();
      sendIMAPdata();
    private function sendString(dataStr:String):void
      var bytes:ByteArray = new ByteArray();
      bytes.writeMultiByte(dataStr, "UTF-8");
      socket.writeBytes(bytes);
      socket.flush();
      trace("sent: " + dataStr);
    public function sendIMAPdata():void
      trace("\t +++++++++++++++++ START SENDING IMAP DATA +++++++++++++++++++++++++");
      dataStr =". login user1 myPassword" + "\r\n";
      sendString(dataStr);
      dataStr =". status INBOX (messages)" + "\r\n";
      sendString(dataStr);
      dataStr =". select INBOX" + "\r\n";
          sendString(dataStr);
      trace("\t +++++++++++++++++ END SENDING IMAP DATA +++++++++++++++++++++++++");
    private function handleNewIMAPData(event:ProgressEvent):void
      var numBytes:int = socket.bytesAvailable;
      serverResponse = new ByteArray();
      while(socket.bytesAvailable)
        var byte:int = socket.readUnsignedByte();
    serverResponse.writeByte(byte);
      var response:String = serverResponse.toString();
      trace(" ++++++++ [IMAP START]\n Response is: " + response + "[IMAP END] +++++++++\n");
    private function connectToServer():void
      socket.connect(serverURL, serverPort);
    ]]>
    </fx:Script>
    </s:WindowedApplication>

    When I run telnet, the console responses are the same as the tcpdump messages.
    When I run the program, the messages from tcpdump match the messages in my trace statements.
    The messages from telnet and running the program are different:-)
    I can only assume (at the moment) that I am sending multiple messages too quickly(?), but I did a quick and dirty big "for loop" to slow down the sending of subsequent messages, but with no resulting change in the programs behaviour.
    So, still thinking about the problem -  unfortunately.

  • How to transform an image into this ?

    most 3d picture wall animations do this. how do i make the transformation in flash, either by hand or by action script or both?
    e.g.
    initial image
    the transformed img (the entire image should take the form of trapezium)
    transformed image should not be like this- in this case, parts of the image is cut off in the black parts.

    If you use CS4 you can do the following:
    1. import your picture to stage
    2. hit f8 chose moviclip as your symbol type and press ok
    3. hit ctrl+t and under 3D rotation enter the required amount of degrees you want to turn the image.
    Hope this helps.

  • Log into Device with AAA, how do I get right into enable mode?

    I am using a Cisco ACS server with an RSA server behind it. When the user is authenticated from the ACS server, I want them to go straight into enable mode, not have to type the enable mode password. What line am I missing?
    aaa authentication login ACS group ACS_servers local enable
    aaa authorization exec ACS group ACS_servers local
    aaa authorization commands 15 ACS group ACS_servers local
    aaa accounting commands 1 default start-stop group ACS_servers
    aaa accounting commands 15 default start-stop group ACS_servers
    line vty 0 5
    login authentication ACS
    authorization commmands 15 ACS

    The configuration in question is for telnet, but I do need to design my new console access connection. Console access would be either remotely or on-site, but I don't feel comfortable giving priv 15 right into it. I plan to use the same authentication method on the console (ACS group 1st, local database 2nd) and will just have to enter the enable password through the console.
    One more question on the aaa config, I kept getting this error in the log:
    AAA/AUTHOR: config command authorization not enabled
    So I added:
    aaa authorization config-commands
    I don't know if it was needed because I could still execute config-commands, but it kept giving me that warning if I didn't have that line.
    Also, do I really need this line if the ACS server is taking care of priv 15 authorization:
    aaa authorization commands 15 ACS if-authenticated

  • I have projects with subclips, How do I export them into 1 new project?

    I am using premiere pro and have created several Projects where I have gone through long source files and created many subclips.  I would now like to start a new project and have all of those subclips as the primary source media .  I am wondering if it is possible to do this, and how I would export the subclips.  Thoughts?
    Thanks,
    Garrett

    Go to the Media Browser, there you will find all the assets of a project including subclips.
    Providing you are on PPCC.

  • How to transforming prproj file into prv file

    I  purchased Digital Classroom for Premiere Pro 5.5, for easy learning, but every time I want  to open a lesson in the premiere program I get the warning "No item mach your search". I press cancel and the program leason open but in Program Monitor panel is another warning  "Media offline". I right click on Project Panel after on Link Media and in the window which open I find "Adobe premiere Pro preview files" and when I open it, there  the "prproj" file was  changed in "prv"  file.
    I close the premiere  program and I open the MY Document  the file is again "prproj". I get creazi..........
    Please help  me to solve this problem because it stopped me to learn this program.
    Thank you very much in advance.
    With regards
                           George

    "prproj" file was  changed in "prv"  file.
    Those are two different things.  The first is the Premiere Pro project file, the second is a Premiere Pro generated Preview file for use inside a given project.

  • How to transform with xquery from CDATA to XML

    Hi everyone
    I want to transform from CDATA to XML and I don´t know how to do.
    anyone can help me please?
    I'm using OSB OEPE PS3, I have artifacts: person.PROXY, person.BIZ, BIZ-Person.WSDL, PROXY-Person.WSDL, Person-response.xq and Person.xsd.
    I Use Message Flow Within Route, Routing (Request and Response Actions)
    To Request Xquery transformation is ok, for Response Action I need help. I receive a String and inside with CDATA:
    +<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">+
    +<soapenv:Body>+
    +<executeResponse soapenv:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">+
    +<executeReturn xsi:type="xsd:string">+
    +*<![CDATA[<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>]]>+*
    +</executeReturn>+
    +</executeResponse>+
    +</soapenv:Body>+
    +</soapenv:Envelope>+
    I want to map from CDATA to XML like this (Person.xsd):
    <xs:schema xmlns="http://www.domain.com/XSD/Persons" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://www.domain.com/XSD/ABCD" targetNamespace="http://www.domain.com/XSD/Persons" elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:import namespace="http://www.domain.com/XSD/ABCD"
    <xs:complexType name="Persons">
              <xs:sequence>++
                   <xs:element name="id" type="xs:string"/>
                   <xs:element name="surname1" type="xs:string" minOccurs="0"/>
                   <xs:element name="surname2" type="xs:string" minOccurs="0"/>
                   <xs:element name="name" type="xs:string" minOccurs="0"/>
                   <xs:element name="code" type="xs:string"/>
              </xs:sequence>
         </xs:complexType>
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 10:58 PM
    Edited by: user10070593 on Aug 29, 2012 11:00 PM

    Hey Patrick / Vlad thank you very much for your help :)
    I have solved it like this:
    Within my proxy in Message Flow (*using Routing -- Route -- Response Action*)
    I'm using the elements Assing and Replace
    In Assing element (expression: Person-response.xq, variable: varBStoPS)
    In Replace element (xpath : executeResponse/executeReturn/text() , in Variable: body, expression:
    *$varBStoPS*)
    Now, within Person-Response.xq , I am using the parameter: *$anyType1*, but this is a string, I don´t know to use a FOR loop in Xquery, as I can apply it to the XML mapping (Person.xsd)?, Knowing I get the list:
    *+<example-data rows="1"><person><id>123</id><name>JHON</name><surname>MAGNESS</surname>+*
    *+<code>123456789V</code></person></example-data>+*
    Person.xsd:
    <xs:element name="processResponse">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="ns1:HeaderMsgABCD"/>
                        <xs:element name="bodyResponse">
                             <xs:complexType>
                                  <xs:sequence>
                                       <xs:element name="PersonsCollection">
                                            <xs:complexType>
                                                 <xs:sequence>
              <xs:element name="Persons" type="Persons" minOccurs="0" maxOccurs="unbounded"/>
                                                 </xs:sequence>
                                            </xs:complexType>
                                       </xs:element>
                                  </xs:sequence>
                             </xs:complexType>
                        </xs:element>
                        <xs:element ref="ns1:ErrorMsgABCD"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    Person-response.xq:
    xquery version "1.0" encoding "Cp1252";
    (:: pragma parameter="$anyType1" type="xs:anyType" ::)
    (:: pragma bea:global-element-return element="ns0:processResponse" location="../XSD/ Person-response.xq" ::)
    declare namespace xf = "http://tempuri.org/oracle/xquery/Person-response/";
    declare namespace ns1 = "http://www.domain.com/XSD/ABCD";
    declare namespace ns0 = " http://www.domain.com/XSD/Persons";
    declare function xf:XQ_SEARCH_PERSONS_RESPONSE($anyType1 as element(*))
    as element(ns0:processResponse) {
    <ns0:processResponse>
    <ns0:bodyResponse>
         <ns0:PersonsCollection>
    <ns0:Persons>
    <ns0:id>{ data(0) }</ns0:id>
    <ns0:surname1>{ data(0) }</ns0:surname1>
    <ns0:surname2>{ data(0) }</ns0:surname2>
    <ns0:name>{ data(0) }</ns0:name>
    <ns0:code>{ data(0) }</ns0:code>
              </ns0:Persons>
         </ns0:PersonsCollection>
    </ns0:bodyResponse>
    </ns0:processResponse>
    declare variable $anyType1 as element(*) external;
    xf:XQ_SEARCH_PERSONS_RESPONSE ($anyType1)
    Edited by: chromosoma on Aug 30, 2012 12:47 PM
    Edited by: chromosoma on Aug 30, 2012 12:50 PM
    Edited by: chromosoma on Aug 30, 2012 1:00 PM

  • PO 7.4: NW BPM: HTTP Error response for SOAP request or invalid content-type.HTTP 200 OK

    Hi Experts
    I am trying to call NW BPM scenario(File to BPM) from PI, and using below adapter config.
    I am getting below error.
    Failed to call the endpoint: Error in call over HTTP: HTTP 200 OK
    SOAP: Call failed: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    SOAP: Error occurred: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Transmitting the message to endpoint <local> using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: java.io.IOException: HTTP Error response for SOAP request or invalid content-type.; HTTP 200 OK
    Any idea how to fix this issue?
    Thanks,
    Sandeep Maurya.

    Hi Sandeep,
    Test the URL from your browser and check the proxy settings as well.
    Refer the below links
    SOAP: call failed: java.io.IOException: invalid content type for SOAP: TEXT
    SOAP: Call failed: java.io.IOException: Failed to get the input stream from socket: java.net.SocketException: Connection…
    Regards
    Bhargava Krishna

  • Anyone know how to gernerate CRUD applications with flex and coldfusion?

    Anyone know how to gernerate CRUD applications with flex and
    coldfusion? I am working with a remote coldsfusion installation
    with MS SQL and I don't have RDS.

    You might investigate "squidhead". It is CF based. I'm not
    sure if it has any Flex related features.
    http://squidhead.riaforge.org/

  • How do I import SWC files created with Flex info Flash CS4?

    I've created very nice UI component using Flex 3 and I have exported it into a SWC file.
    How can I import it into Flash CS4 to use it there?

    Hmm... if you happen to be familiar with C#, then you may probably know about the problem of P/Invoke (this is a command that lets you access Windows API through C# code, which will apparently prevent it from functioning on other OSs).
    What happens with Flex framework is somewhat similar to this. I.e. it relies to much on the features of Flex compiler and the components of the framework create a lot of cross-dependencies, which makes them barely usable outside the framework.
    So, if you have time and doing this just as a matter of learning, I'd suggest you start an AS project in Flex builder and advance with it compiling it both with Flex and Flash to see if there are any differences (basically, once you see it doesn't compile / doesn't behave as you'd expect in Flash, you'll know you used something that is specific to Flex). These would be mostly meta tags, like [Bindable] for example.
    And, if you need any tutorials on how to code in pure AS, then, well, there are really to many So that you can even choose what's appropriate / goes better with your learning habits.
    If you like video lessons, there're tons of them at gotoandlearn.com, if you prefer reading documentation, here you go: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/class-summary.html
    if you prefer forums / written tuts, then, kirupa.com, actionscript.org, flashkit.com as well as Adobe forums will provide you with a lot of information.

  • SOAP Response change from http 200 to http 204

    Hello
    I must change for a application, that call a webservice on the pi, change the
    SOAP Response from HTTP 200 OK to HTTP 204. I think that must chnage on the SOAP Adapter and wei can't change in the messages or mapping. Also wit a Fault Messages is this not runnig.
    What is with BPM, have any body do somthing with that.
    Regards Tom

    Hello Stefan
    This thrid Application need this response. We cann't change this. We spaek with this product manager, but he want change this. He want this when the interface is async, that application now no conntent come back.
    Regards Tom

  • How to play live Video Stream with Flex?

    I'm trying to get Flex Builder 3 to play a live video stream with Flash Media
    Server and Flash Live Media Encoder.
    I'm able to stream pre-recrorded (vod) flvs in flex from flash media server.
    I'm able to stream live video using Flash/FMS/Flas Live Media Encoder, but not
    with Flex.
    This code streams pre-recorded Video on Demand flvs, but not live streams:
    If I change source to "rtmp://localhost/live/livesream.flv, I get nothing.
    What am I doing wrong?
    <?xml version="1.0"?>
    <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HBox>
            <mx:Label text="RTMP FMS 2.0"/>
            <mx:VideoDisplay
                autoBandWidthDetection="false"
                source="rtmp://localhost/vod/Legend.flv"/>
        </mx:HBox>
    </mx:Application>
    Oh and sorry for the double post. I didn't know there was a seperate FMS forum.

    That worked! Thanks  *very* much. Stupid of me to forget to set the live attribute to true. Also removed the .flv. BTW: what video component do you prefer?
    Here's the working code:
    <?xml version="1.0"?>
    <!-- controls\videodisplay\VideoDisplayFMS.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
        <mx:HBox>
            <mx:VideoDisplay
                live="true"
                autoBandWidthDetection="false"
                source="rtmp://localhost/live/livestream"/>
        </mx:HBox>
    </mx:Application>

  • How can I create an executable with Flex Builder 3?

    I'm working with Flex Builder 3 right now and I've run my
    head into a brick wall. Here's the situation:
    I'm creating a standalone application (runs in its own
    window, not in a web page) and I want to run it on a computer that
    does not have Flex Builder 3 installed. Help files and web searches
    haven't directed me to the right answer, so I was hoping that
    someone on this forum could help. Anyone know how to create a .exe
    file or something else that can be run outside of Flex Builder?
    Thanks a lot for any help!

    quote:
    Originally posted by:
    rob_parkhill
    Convert it to an AIR Application?
    Thanks Rob,
    This may be what I'm looking for, but I don't know enough
    about the difference. I guess I should have pointed out that I'm a
    complete Flex Novice!
    Anyway, with Flex Builder, I created an MXML Application. I
    went through all my various options again in Flex Builder and found
    that under the project menu, I could export a release build in what
    appears to be the format you mentioned. I managed to create a .air
    file, but it is not a recognized file type on my computer. I tried
    double clicking it and the built-in windows services couldn't even
    find a possible way to run it. Am I missing some important step?
    Thanks again.

  • How to create Rules with Flex Field mapping in the bpm worklist

    I Have created a flex field label and was able to map to the flex field attributes .
    But when i try to create a rules , I don't see the label or the flex attributes in the task payload .
    Can someone please help is understanding how to create Rules with Flex Field mapping in the bpm worklist .
    Even I am also searching for any scripts which will take the flex fields prompts and can directly create a label in the bpm worklist .
    Any pointers or suggestion is highly appreciated .

    Hi,
    SE38 -> Enter program
    Select Variants button and display. In the next screen, enter a variant name, (If not existing , press Create to create new one), else click on Change.
    Now the selection screen will display with a button "Variant Attributes" at the top.
    Click on that button.
    In the next screen, go to the selection variable column of the date field. Press F4 or drop down and select 'D' for date maintenance.
    In the column "Name of Variable (Input Only Using F4)" press F4 or drop down, select whichever kind of date calculation you want and save the variant.
    Now whenever you run the prgrm with this variant, date will be displayed by default.
    Regards,
    Subramanian

  • SOAP Adapter XI 3.0 - HTTP 200 response fails

    We have a scenario where a request message is sent successfully to a URL by the SOAP Adapter.
    However, the response message has an HTTP response of 200 (meaning ok) which is not handled correctly by the
    SOAP Adapter.
    The error text shown in SXMB_MONI is:
    com.sap.aii.af.ra.ms.api.DeliveryException: Failed to call the endpoint HTTP 200 OK
    Is there something I am missing in the configuration to allow HTTP responses in the SOAP Adapter ? It is very odd that the SOAP Request works fine, but the SOAP Response does not.
    Any ideas anyone ?
    Kind regards
    Colin.

    Hi Bill
    1. synchronous out / in
    2. yes
    3. working fine
    following the way out to the elocateserver system is working fine.
    The soap is working and the responce from the elocteserver is fine . But when the message is pick put the Timeout show up.
    below is the Responce from elocateserver to xi
    Hope this will help you
    thanks olaf
    Help
    !http://sapnt09:50200/sap/public/icman/img/theme.jpg|alt=SAP|width=122 height=61 border=0 |src=http://sapnt09:50200/sap/public/icman/img/theme.jpg!
    500 Connection timed out
    Connection timed out (-5)
    Error:
    -5
    Version:
    6040
    Component:
    ICM
    Date/Time:
    Sat Oct 16 06:13:25 2004
    Module:
    icxxthr.c
    Line:
    2556
    Server:
    sapnt09_M64_02
    Detail:
    Connection to partner timed out
    © 2001-2003, SAP AG

Maybe you are looking for