OSB: Retrieve non XML Payload from a service that returns status code 500

Hello,
I'm using OSB 11g.
I have a Business Service that invokes a REST based service (AnyXML). The service I'm calling may return a 500 status code and some JSON-encoded information in the response body containing the remote service error information.
From a Proxy Service, I invoke the Biz Service using a standard Service Call Out. The Call Out works fine if the service doesn't return any error (status code 200).
The problem starts when the service returns a 500 status error: it seems that there is no way to to get hold of the error information (string) that are in the response body. The $fault variable contains some info, but not the actual payload.
I have also tried to "resume" the flow (using a resume action) but no luck.
Is there a way to retrieve a NON-XML payload of a service even if the service returns a 500 status code?
Thanks
Luciano

Hi,
I have same problem, any idea?
I created several Proxy Services between SOA (BPEL) and JDE. Proxy Service works correct, but if interface response has an error (fault) from JDE side, we get high level error message from OSB and we lost error information from endpoints. I want to get following error information from response body, which containing the remote service error information.
e.g. <SOAP-ENV:Fault>:
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode>SOAP-ENV:Client</faultcode>
<faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>
<faultactor>http://HOST/soap/default</faultactor>
<detail xmlns:webM="http://www.webMethods.com/2001/10/soap/encoding">
<webM:exception> </webM:exception>
</detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Until now, I solved errorhandling for Proxy Service with single route node, but if I use Proxy Service for “Failover” and OSB connect to Endpoint 2, BPEL-instances with "fault" state get OSB error message and WSG-Response will be lost from $body of messages.--> error-propagation to client is NOT OK.
Regards,
Moh

Similar Messages

  • How to create a proxy to retrieve the xml file from web services

    Hi Every one,
    We have a requirment where we receive a xml file from Kenexa, a third party HR tool using a middleware tool. from SAP side We have to create a proxy to retrieve the xml  file from web services by initiating call through middleware tool i used earlier.
    these are the steps i intend to follow to accomlish the requirement.  
    1) middleware tool has to initiate the call to kenexa web services to  receive the xml file when it is available.
    2) On SAP we need to create a ABAP Proxy service provider to middleware where this file can be received.
    Can any one guide me how i can create a proxy to retrieve the xml  file from web services by initiating call through other middlewre (its not PI). 
    Any help would be really great, i am not a ABAP developer, so please help me with this. Thanks.

    Thank for reply.
    The computers are in different locations, but yes it's possible, the users in this enviroment are all local administrator of the machines, and we can distribute the script centrally from the DC automatically
    Acrobat use Java, right? I'm not so expert in java, but something about it could not be so difficult to manage.
    Do you know some place where i can get some info about JS and acrobat?

  • Passing XML payload from Servlet to JMS

    Hi All,
    My requirement is that servlet will receive the HTTP request , convert it into XML format and publish it to JMS queue.
    Now, I am stuck at the part where I need to publish the XML payload to JMS queue.
    Is it possible to send the XML payload from servlet to JMS queue? Is yes, please let me know how can we achieve this.
    Thanks

    I suggest you go to the following page: [http://edocs.bea.com/wls/docs103/pdf.html] .
    In the "Programming" section, download and read at least "Programming WebLogic JMS" and perhaps "Developing Web Applications, Servlets, and JSPs for WebLogic Server" and "Developing Applications with WebLogic Server".

  • Problem in Flex to get XML result from web services

    Hi all
    I am struggling a proplem for a whole day, i hope somebody can help.
    I am trying to get the list file of files located on the server, so i use flex to access a ASP.NET ASMX web services, that returns all the file names in a folder.
    I can see that web servicese worked perfectly, however when i try to get the result from flex, i could not figure out how to get the real data i wantted
    public function LoadImage(e:ResultEvent):void{
    imageList.dataProvider = e.result;
    the e.result has some addtional tags, such as
    <GetImageFileListResponse xmlns="http://tempuri.org/" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <GetImageFileListResult>
        <images>
          <image>01417_ccurve_1280x1024.jpg</image>
          <image>1915619295407381096.png</image>
          <image>21051802471898733113.png</image>
    where GetImageFileList is the operation name used in web service
    I am only interested in the data starting from <images> . I don't know why the addtioanl tag has been added.
    here is the code i have used in flex.
    <mx:WebService 
    wsdl="http://localhost/Flex/GetImageFiles.asmx?WSDL" id="imageWs">
    <mx:operation name="GetImageFileList" result="LoadImage(event)" fault="mx.controls.Alert.show(event.fault.faultString)" resultFormat="
    e4x">
    </mx:operation>
    </mx:WebService> 
    Thanks in advance!!!

    Hi,
    Just replace the below line in your code and check...
    imageList.dataProvider = e.result.GetImageFileListResult.images;
    If this post answers your question or helps, please mark it as such.
    Thanks,
    Bhasker Chari

  • BPEL build error when invoke an extrenal Web Service that returns an Array

    Hello,
    I built with JDeveloper a web service that returns an Array of Java Bean classes and I try to invoke this web service from a BPEL process. The wsdl file is automatically generated by the JDev. When I built the BPEl project I obtained the following error:
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAP-ENC:Array'. It was detected that 'SOAP-ENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAP-ENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'.
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAPENC:Array'. It was detected that 'SOAPENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/Top300FactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAPENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/Top300FactoryWS?WSDL'.
    [bpelc] [Error] :-1:-1: src-resolve.4.2: Error resolving component 'SOAP-ENC:Array'. It was detected that 'SOAP-ENC:Array' is in namespace 'http://schemas.xmlsoap.org/soap/encoding/', but components from this namespace are not referenceable from schema document 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'. If this is the incorrect namespace, perhaps the prefix of 'SOAP-ENC:Array' needs to be changed. If this is the correct namespace, then an appropriate 'import' tag should be added to 'http://malangiu-ro:8988/cde-Project-context-root/CdeFactoryWS?WSDL'.
    Any hint? Thanks in advance!
    Regards,
    Marinel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Problem with web service that returns an object with a String that have som

    Hi everybody:
    I have a problem with a web service I am doing, I have made a web service that returns a collection of objects, the objects have a set of properties, there is one property that is a String,this property consists in a text fragment that could have some characters that are considered special in XML like &, <, >, " and that's why when I execute the service from a client an exception is thrown:
    {code}
    Exception in thread "main" org.codehaus.xfire.XFireRuntimeException: Could not invoke service.. Nested exception is org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    org.codehaus.xfire.fault.XFireFault: Could not read XML stream.. Nested exception is com.ctc.wstx.exc.WstxParsingException: Expected a text token, got START_ELEMENT.
    at [row,col {unknown-source}]: [9,646]
    at org.codehaus.xfire.fault.XFireFault.createFault(XFireFault.java:89)
    at org.codehaus.xfire.client.Client.onReceive(Client.java:410)
    at org.codehaus.xfire.transport.http.HttpChannel.sendViaClient(HttpChannel.java:139)
    at org.codehaus.xfire.transport.http.HttpChannel.send(HttpChannel.java:48)
    at org.codehaus.xfire.handler.OutMessageSender.invoke(OutMessageSender.java:26)
    at org.codehaus.xfire.handler.HandlerPipeline.invoke(HandlerPipeline.java:131)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:79)
    at org.codehaus.xfire.client.Invocation.invoke(Invocation.java:114)
    at org.codehaus.xfire.client.Client.invoke(Client.java:336)
    at org.codehaus.xfire.client.XFireProxy.handleRequest(XFireProxy.java:77)
    at org.codehaus.xfire.client.XFireProxy.invoke(XFireProxy.java:57)
    at $Proxy0.search(Unknown Source)
    at cu.co.cenatav.webservices.client.Client.main(Client.java:26)
    {code}
    I know that this is happening because special characters are sent by the soap message but I don't know how to solve this problem.
    How could I avoid this exception ?
    I hope you can help me.
    Regards.
    Ariel

    Hi,
    BPEL and BPEL PM do not have a good support for SOAPENC-Array: it would be very difficult to create such an array in BPEL or to receive it and manipulate it.
    The (unfortunately very intrusive) work around is to change the WSDL of the service to use a XML type defined using XML schema. This is all the more painful that JDev 9.0.4 does not have strong support for complex types.
    In general though, I would highly recommend this best practice:
    1) Start by define the WSDL contract first
    2) Then generate the server side skeleton to implement it
    3) Use BPEL as the client to this contract.
    By starting with the contract first, you make sure that 1) your interfaces are clean and coarse grained.
    2) things like java objects, sessions, etc to not leak through the interface (which would be the worst thing that could happen because it would closely link the client and the server.
    Sorry for not being more helpful. This will get radically cleaner in Oracle AS 10.1.3.
    Edwin

  • Test web service published returns Error code: InternalError, Http status code: 500

    Further invastigating ther error mentioned here: 
    https://social.msdn.microsoft.com/Forums/azure/en-US/14afa50f-287d-4158-852a-c9532f9f30eb/test-published-web-service-experiment-error-with-status-code-400?forum=MachineLearning
    I have made an even simpler experiment with two python scirpt modules. The experiment again runs fine in Azure ML Studio but fails in the web service test with the error
    Error code: InternalError, Http status code: 500, Request id: 53eef674-190a-4f63-bdc6-a072a45a9c72, Timestamp: Fri, 24 Apr 2015 09:30:37 GMT
    The experiment consists only of two python script modules. The code of the first module:
    import numpy as np
    import pandas as pd
    def azureml_main(dataframe1 = None, dataframe2 = None):
        dataframe1.loc[1] = ["U5000","resB",np.nan]
        dataframe1.loc[2] = ["U5000","resC",2]
        dataframe1.loc[3] = ["U5000","resD",2]
        dataframe1.loc[4] = ["U5000","resE",np.nan]
        dataframe1.loc[5] = ["U6000","resA",np.nan]
        dataframe1.loc[6] = ["U6000","resB",1]
        dataframe1.loc[7] = ["U6000","resC",2]
        dataframe1.loc[8] = ["U6000","resD",np.nan]
        dataframe1.loc[9] = ["U6000","resE",1]
        dataframe1['hasRated'] = pd.Series(1, index=dataframe1.index).astype(bool)
        df_new = pd.DataFrame()
        df_new = pd.DataFrame(dataframe1[["restaurant","rating","hasRated"]])
        return df_new,
    The code of the second module that takes as input the result of the first module:
    def azureml_main(dataframe1 = None, dataframe2 = None):
    return dataframe1,
    A url of a screenshot taken from the experiment.
    http://i.imgur.com/4nrbneA.png
    Please respond. Again I am using a free workspace of Azure ML Studio.
    Thank you very much

    Thank you for your quick reply.
    I hope you will be able to resolve this issue soon.
    asavvopoulos

  • Invoking a web service that returns binary

    Hi,
    Is it possible to invoke a web service that returns a binary object?
    Its similar the following example but I need to return a binary object :
    declare
    v_url:='http://www.somesite.com/function_name?invoke=placeOrder&par1=val1'
    v_output varchar2(4000);
    begin
    select utl_http.request(v_url)
    into v_output from dual;
    end;
    Thanks in advance

    No "advantage" as there are two very different tools.
    UTL_HTTP is basically an Oracle PL/SQL web browser. It uses the HTTP application protocol. It is just like your ordinary browser (IE, Firefox, Opera), but as it is server-side and display-less, it comes without a rendering engine.
    UTL_DBWS is to interact with web services using the SOAP application protocol.

  • Can Adobe Interactive PDF consume a service that returns JSON?

    Can Adobe Interactive PDF consume a service that returns JSON? A few web sites seem to suggest it can:
    http://livedocs.adobe.com/coldfusion/8/htmldocs/help.html?content=functions_c-d_43.html
    http://blogs.adobe.com/acdc/2008/08/using_json_to_exchange_data_wi.html

    Its probably better to post this in the Form or Designer forum as those ones deal more with the capabilities of XFA based PDFs.  The Generator forum deals with the server software that converts documents to PDF.
    Having said that.
        You should be able to do it, but not directly. I don't believe that there is a way to map the JSON returned values to a field, as XFA pdf's generally support XML.  You may be able to put the returned JSON value into a single field and then write some code that would parse that value into the proper fields.

  • Testing a service that returns an AsyncToken

    I have a working test that tests a service that returns an AsyncToken. I am using AsyncResponder instead of any of the Aysnc Flexunit stuff. Is this OK?
    One thing I don't get is that the passthroughData get passed to the onResult method, even though AsyncResponder doesn't pass on anything other than the event.
        [Test(async)]
            public function testAttemptLogin():void
          var token: AsyncToken = objectToTest.attemptLogin('k');
         token.addResponder(new AsyncResponder(onResult, faultHandler));
            private function onResult(event:ResultEvent,passthroughData:Object):void {
    //assertions

    No. This will not work.
    FlexUnit has a Async.asyncResponder
    method that will do what you want
    Mike

  • Retreive xml payload from Orabpel meta table.

    Hi guys,
    I am trying to trace where does the invoking xml payload get persisted for gor each bpel invocation
    By analyzing the orabpel meta tables at a high level i thought i might have to join tables cube_instance, invoke_message, xml_document on conversation_id and message_guid. But on some more investigation, it seems its not that simple.
    For each invocation of a "HelloWorld" program, a row is getting added to cube_instance but nothing gets into invoke_message & xml_document tables.
    So, how can i drill down to my actual payload for EACH invocation?
    Anybody tried this before?
    Thanks in advance
    Sumit

    Edit your posting and copy and paste the following two tags before and after your PL/SQL code.. [code] and [/code]
    This will properly format your PL/SQL code and make it a lot more readable. Remember that none here gets paid to read code and assist - so by making code easier to read ensures that it is easier to provide assistance and suggestions.
    A couple of comments.
    It seems like the code is confused about whether it is a web server process responding to a HTTP request, or a web browser initiating a HTTP request.
    It mixes HTP (web browser) calls with UTL_HTTP (web server) calls.
    I have posted sample code for a PL/SQL web browser in [url http://forums.oracle.com/forums/thread.jspa?messageID=1925304#1925297]this thread. Perhaps that will assist on the web browser side (using PL/SQL as a web browser to retrieve XML from a web server via a HTTP command).
    If you're intention is to be the actual web server process supplying the XML, then the code seems all wrong to me. You need to use OWA calls and mod_plsql to interface the PL/SQL procedure with a web server.

  • Retrieving Request XML Element in Web Service Code

    to create a web service: I write java code and using JDeveloper, I 'create J2EE web service' from the java code.
    I need to get and handle a parameter, passed to the web service in the request xml and process it in my java code. For example I want to access a header element received in the request.
    How can I retrieve those elements in my code?
    Regards
    Farbod

    Hi V.S,
    [Here|http://img144.imageshack.us/my.php?image=datetimekb1.jpg] by the screenshot of the working example.
    The expression that I have used is :
    =DSTR(@DATE1,"XML_DATE")&TSTR(@TIME1,"XML_TIME")
    Where,
    XML_DATE    YYYY-MM-DD    2001-01-31
    XML_TIME     THH:NN:SS 02:39:40
    This should work now. Let me know.
    Best regards,
    Dharmi
    Edited by: Dharmi Tanna on Sep 8, 2008 2:29 PM

  • Download a XML file from Web Services Using Flex

    Hi All...
    I am new for flex, im developing a windows application using Flex/Air, i have connected the web services with user authentication, now I want to download a xml file using web services in flex,
    how can i do this?? please reply...
    Thanks in advance
    Vasanth

    Hi All....
    I have done this myself using sample tutorials...
    here is the code for your reference guys
              plyLoginName = txtEmailIdDownload.text;                
                     var urlpath:String = new String("your url p?LoginName=");
                    urlpath = new String(urlpath.concat(plyLoginName));
                    urlpath = new String(urlpath.concat("&PlayerType="));
                    urlpath = new String(urlpath.concat(chkseasonvalue));
                    Alert.show(urlpath);
                var request:URLRequest = new URLRequest(urlpath)
                var fileRef:FileReference = new FileReference();           
                fileRef.download(request,"yourfilename.xml");
                Alert.show('File downloaded Successfully');   
                 txtEmailIdDownload.text = "";
                txtPWDownload.text = "";
    thanks
    Vasanth

  • Reading XML payload from text file

    Hello,
    I have a text file with XML payload in it. The text file has some header information and then the XML payload. How do I read only the XML payload for processing in PI?
    the structure of the text file is something like this..
    Header Information
    Payload
    Sample:
    #Datetime: 20140318-09:28:50.129
    #MessageID: sample123
    #Sender: TEST
    #SenderParty: TEST
    #ReceiverService:
    #ReceiverParty: Test
    #Interface: Test123
    #InterfaceNamespace: http://test.com
    <?xml version="1.0" encoding="UTF-8"?>
    <Sample ><Header>......
    Please advise.
    Thank you.
    Larry.

    package com.learning.utils;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class FetchPayload extends AbstractTransformation {
      String strData = null;
      @Override
      public void transform(TransformationInput arg0, TransformationOutput arg1)
      throws StreamTransformationException {
      // TODO Auto-generated method stub
      getTrace().addInfo("File Reading started ");
      String strData = convertStreamToString(arg0.getInputPayload()
      .getInputStream());
      getTrace().addInfo("File Reading successfully completed ");
      try {
      getTrace().addInfo("Generating XML started");
      strData.substring(strData.indexOf("<?xml"), strData.length());
      arg1.getOutputPayload().getOutputStream().write(
      strData.getBytes("UTF-8"));
      getTrace().addInfo("Generating XML started");
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      public String convertStreamToString(InputStream in) {
      StringBuffer sb = new StringBuffer();
      try {
      InputStreamReader isr = new InputStreamReader(in);
      Reader reader = new BufferedReader(isr);
      int ch;
      while ((ch = in.read()) > -1) {
      sb.append((char) ch);
      reader.close();
      } catch (Exception exception) {
      return sb.toString();
    and u can get  the xml as a resultant which  u can use as input for next message mapping.
    thanks and regards,
    Praveen T

  • Finding and retrieving an XML file from an application and an applet

    I have a problem.
    I have data stored in an XML file. I want to be able to call that file and store it into a document object from an application standing alone on a computer as weel as from an applet that would be running over the web.
    I don't know how to do this.
    When I use a relative path name for the application it attaches the path of the folder that contains java.exe. I could do something with the class path but this wouldn't help the end user of the application on a different computer. For similar reasons I don't want to hard code because I don't know where the final applet will be stored.
    I have a table that holds, sorts and filters the data so I want the table to collect the data, I don't want to dictate the path from the applet or the application, I want a method that is consistant with both scenarios.
    Can anyone offer some advice?

    I've just finished trying it out, here is what I did:
    String xmlDocName="filename.xml";
    java.net.URL fileURL=this.getClass().getResource(xmlDocName);
    private final String fileName = fileURL.toString().substring(6);
    The substring removes the "file:/" from the URL.
    This works fine in the IDE, I have even stored the xml file in a lower folder e.g. package_folder/xml_folder/filename.xml and replaced the xmlDocName with "xml_folder/filename.xml" and it worked fine.
    I haven't tried it in an applet because I'm running IE and as you are well aware there are problems with swing and IE applets. But you answer deserves the Duke Dollars, thank you very much.

Maybe you are looking for

  • Why is the Compare Document Feature is greyed out?

    Hello Everyone,     I am trying to compare two very similar large documents.  I want to use the compare document feature but it is greyed out.  What would cause this to happen? Thanks Derek L.

  • User accidentaly drop a table - no downtime is allowed , what will you do..

    hi guys, i am on oracle 10g. i do not have flashback recovery area. it is disabled. i have a daily full db backup schedule at 3am daily. i have a 12am daily logical export as well. Now assumming on 21th 2am user accidentally drop a table and purge it

  • I want oil paint how do I go back to photoshop cc

    I want oil paint how do I go frpm Photoshop CC 2014 to Photoshop CC

  • DOT1X certificate validation

    Hi i have a little challenge with some Dot1X and the mashine certificate my case is, i have serveral location with the same VLAN 10 for data and the same VLAN 20 for Voice, and vlan for the guest and now i have to enable and use dot1x for the Wired p

  • Field length restriction

    Hi Experts, I am uploading some customer witht the help of BAPI  BAPI_BUPA_FS_CREATE_FROM_DATA2. While uploadig the customer , I am getting a Warning message  " The use of last 5 character in field NAME1 is restricted (>35 to 40) " Message type 'W' ,