OnError() function in web service: impossible?

Hi,
Context: A ColdFusion web service with application.cfc and OnError() function.
I want the OnError function to log and email me when exceptions occur in web service but for some reason OnError() is never fired in such a case.
It's weird because it works if a .cfm page is called instead of a .cfc!
Is it a standard behaviour with CF webservice? Is there a workaround?
Thanks

Hi Dan,
Thank you for reading and suggesting. The fact is I would like to use onError() for what it is supposed to provide - and also to understand the mechanism.
My onRequestStart() sets request variables to bar.cfc so application.cfc globally plays fine with the webservice cfcs. Well... except for error handling
I found that if exception occurs in application.cfc it is actually caught by onError().
But if exception occurs in webservice cfcs then it is not caught by onError() and a ugly SOAP error is sent to consumer instead.
Here are my application.cfc and bar.cfc webservice components. They are pretty simple so I don't see why onError() is not fired:
<cfcomponent displayname="Application" output="false">
    <cfscript>
        this.Name                = "foo";
        this.applicationTimeOut    = CreateTimeSpan(0,1,0,0);
        this.sessionManagement    = false;
        this.setClientCookies    = false;
        this.clientManagement    = false;
        this.scriptProtect        = "all";
    </cfscript>
    <cffunction name="onApplicationStart" access="public" output="false">
        <cfset application.foo= "foo" />
    </cffunction>
    <cffunction name="onRequestStart" access="public" output="true">
        <cfargument name="targetPage" type="string" required="true" />
    </cffunction>
    <cffunction name="onError" access="public" returnType="void" output="true">
        <cfargument name="Exception" required="true" />
        <cfargument name="EventName" type="string" required="true" />
        <cfmail from="toto" to="[email protected]" subject="error">
            error
        </cfmail>
    </cffunction>
</cfcomponent>
<cfcomponent displayname="bar">
    <cffunction name="test" access="remote" returntype="cpTest" output="false">
     <!--- Throws an exception as b does not exist. This must be caught by onError() but it is not --->                   
     <cfset a = b />
     </cffunction>
</cfcomponent>
Any clue?
-Salvo

Similar Messages

  • Problem  pl/sql function as web service in OAS as omni portlet

    Dear All,
    I try to use pl/sql function from package as web service in OAS as omni portlet. This function returning, for example, the result of searching as number of rows (Id, name).
    As I have understood, OAS omni portlets understands only J2EE 1.3(oracle) web service (which is chosen on the first step of the making the service from PL/SQL). Since in the event of choice J2EE 1.3(JAX-PRC) OAS can not analyse the answer SOAP on elements.
    I try return types:
    1. xml. Kind of <rowset><row><id>1</id><name>John</name></row><rowset>.
    2. ref cursor – can`t use
    3. varray of records – can`t use.
    At the best, answer recognizes as line, rather then as array element.
    Thank you in advance for answer

    Dear All,
    I try to use pl/sql function from package as web service in OAS as omni portlet. This function returning, for example, the result of searching as number of rows (Id, name).
    As I have understood, OAS omni portlets understands only J2EE 1.3(oracle) web service (which is chosen on the first step of the making the service from PL/SQL). Since in the event of choice J2EE 1.3(JAX-PRC) OAS can not analyse the answer SOAP on elements.
    I try return types:
    1. xml. Kind of <rowset><row><id>1</id><name>John</name></row><rowset>.
    2. ref cursor – can`t use
    3. varray of records – can`t use.
    At the best, answer recognizes as line, rather then as array element.
    Thank you in advance for answer

  • Exposing Portal's User Management functionality via Web Service issue

    Dear experts,
    I am trying to create and deploy a web service that will tap into User Management functionality (UMFactory) of the Portal. I created a Java project with a Java class with one of the methods exposed via Web Service. Since this is a Java project and not a Web Dynpro project, a number of external jars and libraries, but I don't know how to add WD_RUNTIME and I am guessing that my problem is related to that.
    When trying to run the application, I receive the following error message when trying to envoke UMFactory:
    java.lang.NoClassDefFoundError: com/sap/tc/logging/Location
         at com.sap.security.api.UMFactory.<clinit>(UMFactory.java:166)
         at com.hollister.getusers.GetPortalUsers.getPortalUsers(GetPortalUsers.java:75)
         at com.hollister.getusers.GetPortalUsers.main(GetPortalUsers.java:39)
    Please, help.
    Thanks,
    Alex

    Container Managed Authentication. Does everything you need.

  • Calling RFC-enabled function as web service using XI 3.0

    Hi,
    I have a problem when trying to use web services (sending a soap-req. to XI 3.0 based on the generated WSDL from Integration Directory).
    According to the message monitoring, all steps in the central pipeline executes just fine until the last step - CALL ADAPTER.
    I don't think this is an authorization issue since I have tested the XIISUSER/pwd against the URL for adapter engine.
    Seems to me that the problem is related to the msg sent to AE:
    "HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)"
    How to proceed from here?

    Hi Torstein,
    <i>Seems to me that the problem is related to the msg sent to AE:
    "HTTP response contains status code 401 with the description Unauthorized XML tag Envelope missing in SOAP message header (SAP XI Extension)"
    </i>
    According to you, the problem occurs within the SOAP envelope. Does your incoming SOAP message looks like the one below here?
    If that's not the case, then make sure your SOAP/Web Service client is sending a valid SOAP envelope/request (like the sample below) to XI.
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    <!--  Inbound Message -->
    <SOAP:Envelope xmlns:SOAP='http://schemas.xmlsoap.org/soap/envelope/'>
    <SOAP:Header/>
    <SOAP:Body>
    <ns1:WebServiceRequest xmlns:ns1='http://company.com/xi/webservice/myws' SOAP:actor='http://schemas.xmlsoap.org/soap/encoding/' xmlns:SOAP-ENV='http://schemas.xmlsoap.org/soap/envelope/' xmlns:xsd='http://www.w3.org/2001/XMLSchema' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
    <Customer xsi:type='xsd:string'>000025</Customer>
    <CompanyCode xsi:type='xsd:string'>BE01</CompanyCode>
    <KeyDate xsi:type='xsd:string'>20050310</KeyDate>
    <Selection>
    <OpenItems xsi:type='xsd:string'>X</OpenItems>
    <ClearItems xsi:type='xsd:string'></ClearItems>
    <GLItems xsi:type='xsd:string'></GLItems>
    <Dunning>
    <From xsi:type='xsd:string'>A</From>
    <To xsi:type='xsd:string'>Z</To>
    </Dunning>
    </Selection>
    </ns1:WebServiceRequest>
    </SOAP:Body>
    </SOAP:Envelope>
    Cheers,
    R.

  • How to call java function through Web Service

    Hello Experts,
    I want to call a method through Java Web Service in my abap code. Is it possible ? If so, plz guide me.
    Requirement: In SD module user enters the PAN, on after entering PAN in want to validate it on NSDL. For that a Web Service has already been deployed on a Web Server. and that the deployed Web Service I want to call in abap code.

    Hi,
    check this link
    Re: Call to WS from one backend to other backend
    regards
    afzal

  • Issue of invoke wf_engine function from web service client.

    hi,
    I want to update work flow item attribute from web service client through soa gateway. but got the below exception:
    Error Description Error occured while service was processing.
    Error Details oracle.apps.fnd.soa.util.SOAException: ServiceProcessingError: Exception returned from JCA Service Runtime. file:/pim/oracle/DEV/inst/apps/DEV_pimenv/soa/PLSQL/1318/SETITEMATTRTEXT.wsdl [ SETITEMATTRTEXT_ptt::SETITEMATTRTEXT(InputParameters) ] - WSIF JCA Execute of operation 'SETITEMATTRTEXT' failed due to: Error while processing an API interaction execution. An error occurred while processing the interaction for invoking the WF_ENGINE.SETITEMATTRTEXT API. Cause: oracle.tip.adapter.apps.AppsContextValidationException: Cannot set Context ; nested exception is: ORABPEL-11812 Error while processing an API interaction execution. An error occurred while processing the interaction for invoking the WF_ENGINE.SETITEMATTRTEXT API. Cause: oracle.tip.adapter.apps.AppsContextValidationException: Cannot set Context Check to ensure that the XML containing parameter data matches the parameter definitions in the XSD. Contact oracle support if error is not fixable. at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.invoke(JCAHandler.java:173) at oracle.apps.fnd.soa.provider.services.jca.JCAHandler.handleRequest(JCAHandler.java:120)
    it indicate " cannot set context". but there is no method of wf_engine api to set it.
    Thanks,
    Rock

    Hi, Buddy,
    Did you fix your issue?
    Now, I have the same issue, EBS version is 12.1.3. Using Soapui invoking PL/SQL, then go back to SOA monitor to check the error message.
    Could you please give me some advises?
    Thanks,
    Jackie

  • OIM (Xellerate) Provisioning Functionality with Web Services

    Hi,
    Has anyone had any experience with needing to issue user provisioning requests to Oracle Identity Manager (formally Xellerate) using web services?
    I envision that it would most likely involve using SPML as the standard communication protocol within the SOAP messages.
    From my readings, the current version of OIM does not offer web services as one of its interfaces, but I'd like to check if anyone has already done this themselves?
    Any help is appreciated.
    Thanks.

    If you have made some custom connector using internal oim api, you can made your own web service interface but outside of OIM infrastructure.
    We have made some custom connector test directly from Eclipse, before integrate it inside OIM, so if you want to provide a web service interface to publish some OIM funtionality should be possible do it using OIM API.
    using generic connector let you use only a SPML webservice for provisioning resources, your webservice must parse the SPML message and then run your own logic, however you must login to OIM and then assign the resource to the user using the connector, There is not a web service interface to do it outside OIM infrastructure.

  • Adding Functions to Web Services

    Never mind, it's something else.

    Hi,
    If you have web service in source and target, we can choose SOAP adatper
    External system--SOAP(Sender) PI SOAP(Receiver)--
    External system
    Configure IR & ID objects according to your requirement and take communication channels SOAP for sender & receiver.  At sender soap adapter no inputs required, if u go for authentication need to enable that option.
    SOAP receiver end need to give system name, service no and path
    Refer below links will help u
    Invoke Webservices using SAPXI

  • Call rmi function from web services

    hi all
    I'm trying to publish this method but always it throws this exception:
    Exception in thread "main" java.security.AccessControlException: access denied (
    javax.xml.ws.WebServicePermission publishEndpoint)
    at java.security.AccessControlContext.checkPermission(AccessControlConte
    xt.java:323)
    at java.security.AccessController.checkPermission(AccessController.java:
    546)
    at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
    at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.checkPlatf
    orm(EndpointImpl.java:162)
    at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(En
    dpointImpl.java:84)
    at com.sun.xml.internal.ws.spi.ProviderImpl.createAndPublishEndpoint(Pro
    viderImpl.java:59)
    at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
    at proxyserver.Proxy.main(Proxy.java:70)
    This is my function:
    @WebMethod
         public float add2Num(float num1,float num2)
              float answer = 0;
              try {
                   answer = call.add2Num(num1, num2);
              } catch (RemoteException e) {
                   e.printStackTrace();
              return answer;
    /*call.add2Num(num1,num2)
    this  function is RMI function which i call it from RMI server */

    You will have to provide way more info. Please see the [Rules of Engagement|https://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement]
    Step 2 Asking Your Question; Provide Enough Information
    Ludek

  • Web Service from RFC function module

    Hi all,
    I'm searching for a way to create web services from RFC-enabled function modules. I know there is a wizard, but it's not suitable for my problem:
    I have around 30 function modules (number raising in near future) I want to enable for web services, most of them share the same structures representing the underlying data model. When one structure is modified (i.e. a new sub-structure is added) I have to recreate all web services, which is quite uncomfortable.
    In addition, using the wizard results in one wsdl-file for each web service operation, that leads to an administration overhead using this web services from a java frontend.
    So I'm searching for a "bulk creation". I also know the wizard can be used for a function group, but I can't put all my RFC-enabled function module in one function group, that would lead to confusion in the package.
    Does anyone know how web services are created programmaticaly? If I had a function module which creates the web services I could write a function module which creates all web services I need.
    Thank you in anticipation!
    Florian

    I'm not sure I understand the 're-create' part...how are you re-creating the web service?  if you modify the interface of a function-based web service, then you use the 'modify operations' functionality (context menu - right-click) to regenerate the web service interface; this works for a function group based web service as well and hits all of the methods at once.  As for the java overhead on function group services, stating the obvious, maybe you just need to lower the number of functions in your groups.  We use .Net-developed applications with multi-function webservices and don't have any overhead issues.

  • How to make my Portal Web Service SECURED?

    Hi Experts,
    I created one portal Service and exposed it as Portal Web Service.
    Everything is working fine, as i deployed my Portal Web Service on to the SAP J2EE Engine ie SAP Server.
    I m able to access functions of Web Service from my StandAlone Java Application.
    but the problem is my Web Service is not SECURED.
    How can i make my Portal Web Service SECURED?
    Please help me out.
    Help will be appreciated and rewarded!!!!!

    user13046122 wrote:
    I have an old pl/sql "helper" package, originally written to make SOAP Web Service calls from the database - it uses UTL_HTTP to invoke the target services.
    I now need to make SOAP Web Service calls - from an 8.1.7.4 database
    But the version of UTL_HTTP inside 8.1.7.4 does not contain the functions needed in the helper package
    Can anybody suggest a means of making SOAP Web Service calls from an 8.1.7.4 database ?I think you'll be very lucky to find anyone here who still has access to a version of Oracle that is that old.... I mean... that's like what? 15 years old at least? I'm surprised you've still got hardware that can run that.
    It would probably help if you could post what code you've got and explain which function(s) it's complaining about, as I doubt people will want to guess.

  • Is Web-Services the only way to trigger Workflow on Time-Based conditions?

    <p>
    Here is the requirement:
    When a Custom Object's record is set to a specific status and it hasn't been modified in 7 days an email should be sent to the owner to notify them to update the record.
    Any thoughts on how we can do this?
    Thanks,
    Dan
    </p>

    Tim, I would recommend that you post this question on the CRM On Demand Integration Development forum. Also, some of our On Demand partners are capable of creating this functionality with web services.

  • Insert or Update method - removed from Web Services v2.0?

    Was the "insert or update" method on standard objects taken out of Web Services v2.0 for a reason? Is there an equivalent of this functionality in Web Services v2.0?
    Thanks,
    -Kevin

    Hello,
    You can make use of the Execute method in WS 2.0 as an alternate, but if you are looking out for InsertOrUpdate Functionality u have to use WS 1.0.

  • Error connecting to Salesforce using a Web Service Adapter

    Hi,
    I'm working on a connection from Data Services 4.2 to Salesforce using a Web Service Adapter.
    I've setup up the adapter (including JVM parameters to use a HTTP proxy), created a Datastore based on the adapter and built a batch job that calls the login operation and initiates a sessions towards Salesforce.
    When I execute the batch job I get an error message that says:
    Error calling function <login>: <Web Services client unable to create a SOAP request to send to server. Error: The current node has been removed using a method other than Iterator#remove()>.
    The trace log for the Web Service Adapter contains the same error message and has some additional info.
    4/16/15 1:17:25 PM Thread[Thread-10,5,main] Handle request starting for operation: login
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Entering addDocumentMessage()...
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Entering addHeadersToEnvelope()...
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Web Services client unable to create a SOAP request to send to server. Error: The current node has been removed using a method other than Iterator#remove()
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Remove message listener for message type [adapter.WSAdapter.__STREAM_FUNCTION.1].
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Stopping web service function call operation
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Receive message: BrokerMessage(
    _e.ErrorsTo=com.acta.adapter..client.dataAndMetadata_8
    _e.Timestamp=Thu Apr 16 13:17:26 2015
    _e.SourceTimeoutLength=90000
    _e.MessageID=16
    _e.Destination=com.acta.adapter.webservice.adapter.WebServiceAdapter.data_2
    _e.MessageType=MSG_ADAPTER_END_OPER
    _e.ReplyTo=com.acta.adapter..client.dataAndMetadata_8
    _e.CorrelationID=15_com.acta.adapter..client.dataAndMetadata_8
    _a.MSGFIELD_ADAPTER_SESSION_ID=2
    _e.Source=com.acta.adapter..client.dataAndMetadata_8
    _a.MSGFIELD_ADAPTER_OPER_ID=1)
    I've searched for any additional tracing/logging on the server but I haven't found anything relevant. Can anyone help me determining what the cause of this error is so I can solve this?
    Thanks,
    - Ian

    Hi,
    I'm working on a connection from Data Services 4.2 to Salesforce using a Web Service Adapter.
    I've setup up the adapter (including JVM parameters to use a HTTP proxy), created a Datastore based on the adapter and built a batch job that calls the login operation and initiates a sessions towards Salesforce.
    When I execute the batch job I get an error message that says:
    Error calling function <login>: <Web Services client unable to create a SOAP request to send to server. Error: The current node has been removed using a method other than Iterator#remove()>.
    The trace log for the Web Service Adapter contains the same error message and has some additional info.
    4/16/15 1:17:25 PM Thread[Thread-10,5,main] Handle request starting for operation: login
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Entering addDocumentMessage()...
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Entering addHeadersToEnvelope()...
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Web Services client unable to create a SOAP request to send to server. Error: The current node has been removed using a method other than Iterator#remove()
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Remove message listener for message type [adapter.WSAdapter.__STREAM_FUNCTION.1].
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Stopping web service function call operation
    4/16/15 1:17:26 PM Thread[Thread-10,5,main] Receive message: BrokerMessage(
    _e.ErrorsTo=com.acta.adapter..client.dataAndMetadata_8
    _e.Timestamp=Thu Apr 16 13:17:26 2015
    _e.SourceTimeoutLength=90000
    _e.MessageID=16
    _e.Destination=com.acta.adapter.webservice.adapter.WebServiceAdapter.data_2
    _e.MessageType=MSG_ADAPTER_END_OPER
    _e.ReplyTo=com.acta.adapter..client.dataAndMetadata_8
    _e.CorrelationID=15_com.acta.adapter..client.dataAndMetadata_8
    _a.MSGFIELD_ADAPTER_SESSION_ID=2
    _e.Source=com.acta.adapter..client.dataAndMetadata_8
    _a.MSGFIELD_ADAPTER_OPER_ID=1)
    I've searched for any additional tracing/logging on the server but I haven't found anything relevant. Can anyone help me determining what the cause of this error is so I can solve this?
    Thanks,
    - Ian

  • Web service transported but not active in QA environment

    Hi all,
    In order to support a template document i've created a web service using the web service tool. All is working fine in DEV and all has been successfully transported to QA environment (I think). The web service objects have been included in the transport using transaction CRMOST_TRANSPORT and I see the web service in the web service tool in QA.
    Problem is that the web service is not active. In the web service tool I see the web service and see that the Active status is still available to be selected. When I select it I get the following errors:
    - Object type does not exist
    - Not possible to get data for service object
    - Activation cannot be performed in this client:
    - Details Changes to Repository objects are not permitted in this client
    I read somewhere that you have to do 'after import functions' for web services but don't know what!? Is it simply a matter of opening the client in QA and reactivating the web service in the Web Service Tool?
    Thanks,
    Patrick

    Hi Patrick ,
    Ihave a question.
    I created a webservice through CRM 7.0 Web Service Tool
    ie we went to Component WS_DESIGN_TOOL and executed the component and we Launched the tool ,
    using tool we created a Web service for Sales Order, Due to missing of some settings I guess it didnt ask for a Transport request and it went and saved in an ' Local Object'.
    Could you please help in explaining as what steps we need to configure to make sure that the web service goes and sits in a Transport which is required in moving it to QA System.
    Regards,
    Sijo

Maybe you are looking for

  • CALLERS CAN'T HEAR ME - AND I'M NOT PUSHING 'MUTE'

    Frequently when I answer or make a call on my Droid X the person on the other end can not hear me.  I can hear them, but they can not hear me. I just replied to a recent post of someone having the same problem, but just realized the post was marked '

  • JS CS3 - PathItem

    Hi all, I'm finding it very difficult understanding the documentation for Illustrator Scripting. Can anybody help me figure out how I could change the properties of a selected pathItem which is actually a simple line? Especially stroke weight? Also a

  • Slide Show screen saver

    I'm looking for a OS9 screen saver that works like the slide show screen saver in OSX. I have an old Performa that i've upgraded to a G3 and am running 9.2.2. I use it for email, iTunes, and scanning. I'm running a G4 mirror for the rest of my work.

  • Mac Book Pro Starting to freeze... :0(

    hi forum my MBP, early 2008 model, has started to freeze on start up. not sure why. any ideas? i recently filled up the hard drive, so i have emptied 25Gbs, could that be affecting it? HDD is 160GB drive. when i boot up, the keyboard and the mouse wo

  • Sales Order - BOM Explosion

    Hi , We have a scenario of variant configuration, wherein there is a bom explosion. Whenever there is a change in the BOM, the change is also getting reflected in the order. How can I prevent this? Thank you very much Jaffer