Testing Async service that uses callbacks, not Events

Hello All,
I am curios how others are writing Async tests on a service layer where events are not used?
Ex: calling into a service object - sending a callback method (closure)
private function buyItem(id:String, callback:Function
DataManager.getInstance().purchaseItem(id, callback);
private function callback(success:Boolean, data:Object):void
     // Do stuff
TestBuyItem.as
[Test (order=1, async, timeout="60000")]
public function testBuyItem():void
     Async.asyncHandler(this, callback, 20000, null, null);
     DataManager.getInstance().purchaseItem("myitemid", callback);
private function callback(success:Boolean, data:Object
     // This method gets called and success does equal true - however my test fails
     Assert.assertTrue(success);
What am I doing wrong? 
What type of method does the 'callback' need to be?
Is there an Async.waitForCallbackFunctionCall()
I am sure I am doing something wrong, I am just not sure what - thanks for any help you can offer.
--jason

Jason,
Async.asyncHandler(... returns a function. This is your callback. Store a reference to it, and when you receive the result in your callback, execute the function that was returned from Async.asyncHandler.
The asyncHandler signature is "handler(event:Event, passThroughData:Object):void". Just create a dummy event that wraps the data from your callback and invoke the handler.
Hope this helps,
Russ

Similar Messages

  • 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

  • Calling a web service that uses DIME

    Can ColdFusion interact with a web service that uses DIME? Has anyone worked with that?
    Thanks.

    CF doesn't support DIME "natively", but Apache Axis does, and that's the library that CF uses. So, you'll have to drop to Java to do this.
    Dave Watts, CTO, Fig Leaf Software
    http://www.figleaf.com/
    http://training.figleaf.com/

  • Custom wcf service that uses SharePoint Object Model.

    Hi All,
    I am writing a custom service on SharePoint. I have noticed most of the people do deploy the custom wcf service in layout folder in 12/14/15 hive. I am wondering is it mandatory? Can’t we deploy the custom wcf service that uses SharePoint Object Model as
    virtual directory on a specific port?
    Regards Restless Spirit

    It is suggested to use WCF in 12/14/15 hive folder due to security and eas in use. Check below
    http://www.dotnetcurry.com/showarticle.aspx?ID=760
    http://msdn.microsoft.com/en-us/library/office/ff521584%28v=office.14%29.aspx
    http://stackoverflow.com/questions/16008593/where-should-custom-wcf-service-for-sharepoint-2010-resides
    If you want to use the server object model you have to host your WCF service on the same server as your SharePoint is installed on.
    If the WCF service has to be on a different server you can use the client object model or the SharePoint webservices to communicate to SharePoint.
    (link to a question about using server object model on different server
    http://nikpatel.net/2012/02/29/step-by-step-building-custom-wcf-services-hosted-in-sharepoint-part-i/

  • Problem running Web Service that uses OracleXMLSave on Oracle AS 10.1.3

    I am trying to deploy a Web Service that uses OracleXMLSave. The service was built in Jdeveloper 10.1.3 and is deployed to 10gR3 AS. I have all the utitlites available from the 10g Production XML Developers Kit installed . The code compiles and generates correctly . I then deploy to an EAR file that inlcudes the applicaiton code and also all the XDK libraries . No problems so far. But when I run the app, I get an exception like the one below. It says it can't find XMLType . The funny thing is that this library (xdb.jar) and all other related libraries are there in the EAR file . In fact the class loader seems to see it because the exception says that it is there (see text below).
    I have added all the libraries from XML Developer kit like xdb.jar , xsu12.jar , etc. I have also verfieid that the files are selected in the WebServices.deploy file and also present in the EAR file . (See full list below the eror message below. ).
    It looks like for some reason the class loader can't load the class even though it seems to know that the class exists in the path.
    Been sweating on this for a while (probably staring it at too long :) and would really appreciate some help.
    This is the exception thrown when the OracleXMLSave Class is called for the first time.
    Missing class: oracle.xdb.XMLType
    Dependent class: myXML.DbXMLSave
    Loader: TEAMWEBSERV.web.WebServices:0.0.0
    Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/classes/
    Configuration: WEB-INF/classes/ in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\classes
    The missing class is available from the following locations:
    1. Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/lib/xdb.jar (from WEB-INF/lib/ directory in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\lib)
    This code-source is available in loader TEAMWEBSERV.web.WebServices:0.0.0.
    2. Code-Source: /D:/OracleAS10gR3/j2ee/TEAMWEBSERV/applications/TEAMWEBSERV/WebServices/WEB-INF/classes/ (from WEB-INF/classes/ in D:\OracleAS10gR3\j2ee\TEAMWEBSERV\applications\TEAMWEBSERV\WebServices\WEB-INF\classes)
    This code-source is available in loader TEAMWEBSERV.web.WebServices:0.0.0.
    [oracle.classloader.util.AnnotatedNoClassDefFoundError]
    List of libraries :
    <list n="exportedReferences">
    <hash>
    <value n="id" v="Dms.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Log4j-1.2.9.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Mail.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="NetComponents.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oc4j.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ocrs12.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdbc14dms.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdl.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="ADF Model Runtime"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="ADF Model Generic Runtime"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle XQuery"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle XML Parser v2"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle JDBC"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oracle SOAP"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Dms.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Log4j-1.2.9.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Mail.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="NetComponents.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oc4j.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ocrs12.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdbc14dms.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Ojdl.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xdb.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xml.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlmesg.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlparserv2.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xschema.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsu12.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Classgen.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Jdev-rt.zip"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Oraclexsql.jar2"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Transx.zip"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xdb.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xml.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlcomp.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlcomp2.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmldemo.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlmesg.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xmlparserv2.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xschema.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsqlserializers.jar"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Xsu12.jar1"/>
    <value n="isJDK" v="false"/>
    </hash>
    <hash>
    <value n="id" v="Orai18n.jar2"/>
    <value n="isJDK" v="false"/>
    </hash>
    </list>

    Well I got the EJB lookup working but only when I changed the Provider Url to the pre-10.1.3 format e.g. ormi://someserver:12421/someapp and used jazn.com/oc4jadmin as the username. After reading the online documentation, I didn't think this should work!
    Another issue I am having is casting a datasource returned from a JNDI lookup for a datasource. We used to do the lookup in the code and cast to an OracleDataSource. Now it is throwing a class cast exception to ManagedDataSource. Is there a quick and easy solution to this? I really don't want to have to go into the code and change this cast so it'd be great if we can get this working without changing code. This code has been working in a prod environment for two years now on 9.0.3 -> 9.0.4...

  • Problems creating a web service that uses the report generation toolkit

    Hi,
           Im trying to develop a web service using labview 2013.
    I create a html form that is correctly communicating with my labview method and part of the web service functionality is to create a report from the data obtained in the html form published.
    I realized that using the report generation toolkit inside of the web service method the server cannot generate a report. ( If I run the same Vi before publishing the web service it works on the server but it doesnt work after I deploy it)
    I thought that maybe Im unable to use the report generation toolkit VIs inside of the web service because Im not incluiding the (dynamic VIs labview uses when they run), I tried to add the excel dynamic library to the proyect but with no success.
    I also tried to use VI SERVER to call a VI that generates the report using the report generation toolkit  in the method that runs when the web service is call but  it doesnt work either.
    How can I deploy a web service able to use  the report generation toolkit ?, how can I deploy a web service able to use VI server ?
    Any help is really appreciated.
    Erwin Franz 
    Erlab

    The issue you are running into is actually a limitation intended by Microsoft.  They don't want windows services to be able to call into the ActiveX interface for Microsoft Office for security reasons.  If you are deploying your web service to the NI Application Web Server on Windows you will run into this problem since the web server is a Windows Service.
    While I haven't tested this, you may be able to work around this by packaging your Web service with a LabVIEW EXE rather than deploying to the NI Application Web server. 
    Mark
    LabVIEW R&D

  • XML parser error while testing web service client using jdeveloper 10.1.2.1

    hi
    I have generated a web service stub/skeleton out of the wsdl file using jdeveloper 10.1.2.1.0. The client will return a complex type result, i.e., it will return an array of elements. When I try to run the client using jdeveloper 10.1.2.10 i am getting the following error:
    E:\oracle\DevSuiteHome_1\jdk\bin\javaw.exe -ojvm -classpath E:\oracle\DevSuiteHome_1\jdev\mywork\Application2\Project2\classes;E:\oracle\DevSuiteHome_1\jdev\lib\jdev-rt.jar;E:\oracle\DevSuiteHome_1\soap\lib\soap.jar;E:\oracle\DevSuiteHome_1\lib\xmlparserv2.jar;E:\oracle\DevSuiteHome_1\jlib\javax-ssl-1_2.jar;E:\oracle\DevSuiteHome_1\jlib\jssl-1_2.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\activation.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\mail.jar;E:\oracle\DevSuiteHome_1\j2ee\home\lib\http_client.jar;E:\oracle\DevSuiteHome_1\lib\xmlcomp.jar mypackage2.RESSelectionServiceStub
    oracle.xml.parser.v2.XMLElement@11
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:112)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    [Lmypackage2.ProfiledClaimant;@18
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    java.lang.ClassCastException: oracle.xml.parser.v2.XMLText
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:877)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:903)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.getType(WrappedDocLiteralStub.java:928)
         at oracle.jdeveloper.webservices.runtime.WrappedDocLiteralStub.fromElement(WrappedDocLiteralStub.java:621)
         at mypackage2.RESSelectionServiceStub.selectParticipants(RESSelectionServiceStub.java:113)
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:43)
    java.lang.ArrayIndexOutOfBoundsException: 1
         at mypackage2.RESSelectionServiceStub.main(RESSelectionServiceStub.java:55)
    Process exited with exit code 0.I have googled to see if i can get any solution , i got the following information:
    Cannot Generate a Stub or Skeleton for a WSDL that Uses Certain Types (3912349)
    JDeveloper 10.1.2 only understands a subset of all of the complexTypes that can be defined in a WSDL document. For example, if the following appear in the "types" section of the WSDL, any use of those types will cause JDeveloper to generate a reference to UnknownType in a stub or skeleton:
    •     Restrictions of simpleTypes
    •     complexTypes which define attributes Does that mean that the jdeveloper will not support complex types?Could anybody tell me how to resolve the above said issue? Is there any patch that i can run to resolve the issue?

    Can i use the client generated using jdeveloper 11g to import into the oracle forms 10g, i.e., form builder 10g. Currently this is the version we have in our office.

  • How can I delete an iCloud-Account that uses a not anymore existing email-adress?

    Months ago my GMX-Account got blocked because it was hijacked by some SPAM-sending-********.
    I recognized that when I was not able to log into my iTunes account and buy stuff anymore.
    I changed the emailadress by setting up a new Account with a new ID I used from that day on - problem solved.
    Plus: I deleted the email-adress as I was sick of it anyways - problem solved, too.
    I changed all my IDs on iPhone and iPad to the new ID, except the one of the iCloud.
    During that time I had already decided that I did not want to use my iClound storage anyways so I did not work on how to change the emailadress.
    I want to use it now - and that is, where the problem started today:
    I tried to change the adress, it is grey, cannot be changed.
    I tried to log in with the emailadress, iPhone tells me: wrong password (yes, I already tried everything I ever used)
    I tried deleting the account: no way, needs password.
    That would not be a problem BUT:
    I could not use iForgot because the emailadress does not exist anymore.
    I could not use the security-questions because I. Simply. Do. Not. Remember. The. Answers. -.-  
    I DID remember the Username though.
    So I logged in and changed the emailadresses.
    With the new emailadresses I set up I was able to change the security-questions.
    So THAT problem is solved.
    Problem is: iCloud-emailadress is still the same and grey.
    Trolled by technology and own stupidity/forgetfulness, I guess.
    So: I have everything on my new emailadress BUT the iCloud storage which I am not able to use because I cannot change a thing because I forgot the password and the emailadress is no longer existing.
    How do I solve that problem?
    Anyone?
    Best
    Sarah

    Lawrence Finch wrote:
    Why would anyone need a 3rd party program to erase an iPhone? It can be erased using iTunes or the phone itself. You keep promoting unnecessary 3rd party software, and from the same developer. Maybe you are shilling for the company, or work for it?
    Lawrence, I really hope you didn't mean to reply to me!
    But, yes, I believe selenafromshezhen is shilling for that company.

  • Does anyone know what command-esc does in mavericks? Trying to create service that uses that shortcut but can't.

    Created the service, tried to set command-esc as the shortcut but mavericks won't let me. I don't see anything else that uses it. command-option-esc is force quit, I know that. command-esc used to be to launch front row years ago. As far as I can tell it does nothing in mavericks yet I can't set it as a shortcut? *sigh* Anyone? Thanks.

    Here is a list of keyboard shortcuts, but I don't see Cmd+Esc listed:
    http://support.apple.com/kb/HT1343?viewlocale=en_US&locale=en_US
    Also I found this on google, about Cmd+Esc being used to launch Front Row, but it is quite old information:
    http://sstechblog.com/561/the-dreaded-command-esc-front-row/

  • Service that uses several insert sql statements

    Hello!  Is it possible to use one service, which updates two DB tables?  Also, one field in these two tables is the same, like the ProcessID? For example, here is the service:
    <tr>
      <td>EUM_WORKFLOW_UPDATE_ACTIONS</td>
      <td>Service
      3
      null
      null
      null<br>
      null</td>
      <td>2:IEumWorkflowActions:::null
            2:IEumWorkflowDocumentProcess:::null</td>-->
    </tr>
    Here are two separate SQL queries called from the above service:
    <tr>
      <td>IEumWorkflowActions</td>
      <td>INSERT INTO EUM_WORKFLOW_ACTIONS(WORKFLOWACTION, WKFLACTIONID) values (?, ?)</td>
      <td>WORKFLOWACTION varchar
      WKFLACTIONID int</td>
    </tr>
    <tr>
      <td>IEumWorkflowDocumentProcess</td>
      <td>INSERT INTO EUM_WORKFLOW_ACTIONS(WKFLACTIONID, DocumentProcessID, dDocName, dRevLabel) values (?, ?, ?, ?)</td>
      <td>WKFLACTIONIDint
      DocumentProcessID int
      dDocName varchar
      dRevLabel varchar</td>
    </tr>
    And here is how I call this service via GenericSoapPort call:  
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
      <soap:Body xmlns:ns1="http://www.oracle.com/UCM">
        <ns1:GenericRequest webKey="cs">
          <ns1:Service IdcService="EUM_WORKFLOW_UPDATE_ACTIONS">
            <ns1:User></ns1:User>
            <ns1:Document>
              <ns1:Field name="WORKFLOWACTION">Reject</ns1:Field>
              <ns1:Field name="WKFLACTIONID">123</ns1:Field>
              <ns1:Field name="WKFLACTIONID">123</ns1:Field>
              <ns1:Field name="DocumentProcessID">45234</ns1:Field>
              <ns1:Field name="dDocName">1554322</ns1:Field>
              <ns1:Field name="dRevLabel">1A</ns1:Field>
            </ns1:Document>
          </ns1:Service>
        </ns1:GenericRequest>
      </soap:Body>
    </soap:Envelope>
    Would it be possible NOT to use the WKFLACTIONID twice in the service call somehow?
    Thank you for your help!

    Thank you for the confirmation that this would work.  I've also tried the Insert query like this:
    insert all
    into EUM_WORKFLOW_ACTIONS (WORKFLOWACTION, WKFLACTIONID) values (?, ?)
    into EUM_WORKFLOW_DOCUMENT_PROCESS (WKFLACTIONID, DOCUMENTPROCESSID) values (?, ?)
    select * from dual
    Would this single SQL be better for my purposes then the two statements?  If that would matter at all?
    Thank you!

  • Why is creation of a service notification using BAPI not working?

    I need to create a service notification.
    I have found 2 BAPIs.
    BAPI_SERVICENOTIFICAT_CREATE
    BAPI_SERVNOT_CREATE
    The code below using the second BAPI is not creating a notification and the return parm does not have any errors.
    You can see it does a call to commit after the BAPI call
    Perhaps I am missing something critical in the parms.
    We are trying to creat a service type notification using equipment.
    DATA ls_notif_h TYPE bapi2080_nothdri.
    data ls_notif_e type BAPI2080_NOTHDRE.
    DATA lt_return  TYPE STANDARD TABLE OF bapiret2.
    DATA ls_return  LIKE LINE OF lt_return.
    ls_notif_h-equipment = '10000044'.
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
      EXPORTING
      EXTERNAL_NUMBER          =
        notif_type               = 'S3'
        notifheader              = ls_notif_h
      TASK_DETERMINATION       = ' '
      SENDER                   =
      ORDERID                  =
    IMPORTING
        NOTIFHEADER_EXPORT       = ls_notif_e
    TABLES
      NOTITEM                  =
      NOTIFCAUS                =
      NOTIFACTV                =
      NOTIFTASK                =
      NOTIFPARTNR              =
      LONGTEXTS                =
      KEY_RELATIONSHIPS        =
        return                   = lt_return
    IF lt_return IS INITIAL.
      COMMIT WORK AND WAIT.
      write: / ls_notif_e-NOTIF_NO.
    ELSE.
      LOOP AT lt_return INTO   ls_return.
        WRITE:/ 'errors'.
       ls_return.
      ENDLOOP.
    Thanks.
    Scott

    Try this way
    CALL FUNCTION 'BAPI_SERVNOT_CREATE'
    EXPORTING
    * EXTERNAL_NUMBER =
    notif_type = 'S3'
    notifheader = ls_notif_h
    * TASK_DETERMINATION = ' '
    * SENDER =
    * ORDERID =
    IMPORTING
    NOTIFHEADER_EXPORT = ls_notif_e
    TABLES
    * NOTITEM =
    * NOTIFCAUS =
    * NOTIFACTV =
    * NOTIFTASK =
    * NOTIFPARTNR =
    * LONGTEXTS =
    * KEY_RELATIONSHIPS =
    return = lt_return
    * IF lt_return IS INITIAL.                                               " <<< Comment this lie
    read table  lt_return into ls_return with key type = 'E'. " << Change
    if sy-subrc ne 0.                                                             " << Change
    COMMIT WORK AND WAIT.
    write: / ls_notif_e-NOTIF_NO.
    ELSE.
    LOOP AT lt_return INTO ls_return.
    WRITE:/ 'errors'.
    * ls_return.
    ENDLOOP.
    endif.

  • Testing an application that uses adobe acrobat pro with a trail version

    Hello,
    I have a program that references Adobe Acrobat Pro.  We previously were using Adobe Acrobat Pro version 8 and would like to upgrade to the newest version.  I downloaded a trial version of Adobe Acrobat Pro XI to test the program with, but I get an error when trying to create an adobe object.  The error says that it cannot create the object.  In doing some research I've found that this is likely a result of me having an unregistered version of Adobe Acrobat Pro on my machine.  It is unregistered since it's the trail version.
    My question is, am I able to test that the program will work with the latest version of Adobe Acrobat Pro without having to buy it first?  We would like to be sure it's working with the new version prior to buying licenses for the version for our users.
    Thanks,
    Aaron

    Hi Rave,
    The error that I am getting is "Cannot Create ActiveX Component".  It's occurring when I try to create the object "AFormAut.App".  Below is the line of code that is throwing the error.
    _formapp = DirectCast(CreateObject("AFormAut.App"), AFORMAUTLib.AFormApp)
    Thanks,
    Aaron

  • Test web service proxy using EJB session bean client...

    Hello!
    I am following this blog /people/abdelmorhit.elrhazi/blog/2009/10/30/how-to-consume-an-inbound-backend-web-service-in-nwdsjboss-environment to create a EJB session bean client to access the web service proxy...
    The blog is not very clear. Where should I be deploying the web service proxy and the EJB session bean (web service client) ? on the PI 7.1 ?
    How to find out the URL for the wsdl ?
    Thanks

    > The blog is not very clear. Where should I be deploying the web service proxy and the EJB session bean (web service client) ? on the PI 7.1 ?
    "To deploy your web service proxy and session bean, right click on your JBoss server in the Servers view, and click on Add Remove Projects, add you ear file and click finish."
    You need a JBoss server.

  • PI 7.1 import wsdl that uses paths not working

    Hello SDN!!!
    I have a question. Our company is using wsdl's that have external http links to xsd documents. This is a valid wsdl per XML SPY and Soap Util.
    A snapshot of the wsdl looks like so
    <xs:import namespace="urlToA.xsd"/>
    <xs:import namespace="http://schemas/shared/EMFSchemaV1" schemaLocation="http://url_TO_A_.xsd"/>
    <xs:import namespace="http://schemas/shared/EMFSoapFaultV1" schemaLocation="http://anotherurlTOA.xsd"/>
    <xs:element name="request">
      <xs:complexType>
        <xs:sequence>
         <xs:element ref="init:Project"    xmlns:init="http://schemasdefinedabove"                                             minOccurs="0" maxOccurs="1"/>
                             </xs:sequence>
                        </xs:complexType>
    Basically it makes a reference to schemas defined in links, it seems the wsdl being generated as an external definition in SAP doesn't follow the links to fill in the xsd definition.
    Is there a method to have sap import the xsd's in the location they are being referenced?

    Yeah, you also need to import these remote xsd's in XI. Download them and create an external definition for each one of them.
    Then, within each external definition, fill the "Source" field with the schema Location that the wsdl is waiting for. For example, in the external definition for the 1st xsd, fill its Source field with the value
    http://url_TO_A_.xsd
    Check in the wsdl's References tab whether it found the references correctly (for each expected location, you should see the corresponding external definition).
    Regards,
    Henrique.

  • Async problem when using FlexUnit4

    Hi all,
    I have a problem I could use a little help with. I'm trying to change a test to FlexUnit4 (first used FlexUnit 0.9), but when using the Async class I get a "Timeout Occurred before expected event" (from the ExpectAsync.handleAsyncTimeOut function (line 315)).
    The function looks like this:
    [Test(async)]
    public function GetApplicationMenuTest():void
    var event:GetApplicationMenuEvent=new GetApplicationMenuEvent(this.loader, applicationId);
    var asyncHandler:Function=Async.asyncHandler(this, resultHandler, 500);
    this.loader.fireEvent(event, asyncHandler);
    The loader.fireEvent(event:MVCEvent, callback:Function) method is a function that will set a busy indicator on the screen and that fires the event. When the event is fired a server call is eventually made, and we wait for a responds. When the responds is received the retrieved data is processed until finally the function this.event.loader.receiveData(resultObject) is called. Where the loader is the same as the function above and the resultObject is the processed responds data.
    This receivedata function removes the busy indicator from the screen and calls the the callback:Function as can be seen from the super class of the loader:
    public function receiveData(data:Object):void
       this.callBackFunction(data);
    The callBackFunction is the following function in our test:
    private function resultHandler(data:EibDataObject):void
    Assert.assertTrue("The session is not ok", data.sessionOK);
    Assert.assertTrue("Fault messages have been retrieved", data.messages.length <= 0);
    Using this setup described above I get a "Timeout Occurred before expected event". I never had a problem using the FlexUnit 0.9 setup that looked as follows:
    public function GetApplicationMenuTest():void
    var applicationId:String = "";
    var event:GetApplicationMenuEvent = new GetApplicationMenuEvent(this.loader, applicationId);
    this.loader.fireEvent(event, addAsync(resultHandler, Model.TIMEOUT));
    So the only difference in the test is the callback:Function that is set.
    I checked out the code of FlexUnit4 (http://opensource.adobe.com/svn/opensource/flexunit/branches/4.x/FlexUnit4) to debug the problem and I found that the method AsyncHandler.handleEvent(event:Event) would not be entered. When I changed this method to AsyncHandler.handleEvent(data:Object) I saw that the argument passed to this function was not an event but  the resultObject described above.
    This is offcourse pretty logical because AsyncHandler.handleEvent is the method that is returned as the Function from Async.asyncHandler(...).
    What do I need to do to change
    public function GetApplicationMenuTest():void
    var applicationId:String = "";
    var event:GetApplicationMenuEvent = new GetApplicationMenuEvent(this.loader, applicationId);
    this.loader.fireEvent(event, addAsync(resultHandler, Model.TIMEOUT));
    to FlexUnit 4 in the scenario described above? Hope you guys can help
    Greetz,
    Rick
    Also I have a small question, what is the 'timeout=xxx' statement for in the [Test] metadata when you also provide a timeout to the async method?

    A few things for you:
    1) The opensource.adobe.com address is always lagging behind. Our active website is www.flexunit.org and our active code development is at github. We just update the adobe site with major release versions.
    2) The timeout in the Test metadata: We support multiple simultaneous outstanding events in FlexUnit 4. In other words, you can say, you expect a given object to broadcast event1, followed by event2, followed by event3. The timeout in the Test is an overall timeout for all of the steps, so each is given their own timeout, but in total they should not exceed the number assigned in the Test metadata
    3) As you noted the async methods are expecting to handle an event and you are using them with a callback, which is the root of the problem. I clearly missed the fact that the .9 version would allow this use case, so, if you would, I would appreciate if you could file an enhancement request in our project at bugs.adobe.com and I can work on getting this resolved for the next version.
    In the meantime, you could use the responder functionality, which seems like it would work fine, albeit not as elegant as I would like. I can't test this out at my current location, but wanted to get you an answer asap, so post back with issues.
    [Test(async)]
    public function GetApplicationMenuTest():void
       var event:GetApplicationMenuEvent=new GetApplicationMenuEvent(this.loader, applicationId);
       var responder:Responder = new mx.rpc.Responder( resultHandler, null );
       var asyncResponder:IResponder=Async.asyncResponder(this, responder, 500);
       this.loader.fireEvent(event, asyncResponder.result );
    Mike

Maybe you are looking for