How to Implement Async JAX-WS 2.1 Service

I would appreciate some guidance, or links to documentation, on how to implement an asynchronous JAX-WS 2.1 web service (note that I am NOT asking how to implement a client program that invokes a JAX-WS web service asynchronously b/c BPEL will be invoking the service).
Ultimately, what I need to accomplish is to:
(a) implement a JAX-WS web service that can be invoked asynchronously
(b) deploy that JAX-WS web service to Oracle WebLogic 10.3 and
(c) invoke the JAX-WS web service asynchronously from Oracle BPEL Process Manager 10.1.3.3.
As an example, let's say I have the following class that I'd like to expose as an async JAX-WS web service:
<pre>
public class EngineConfigurationService
public Configuration configureEngine(ConfigurationRequest aRequest)
//....arbitrary amounts of long-running computation happens here...
return configuration;
</pre>
How would I annotate this class to allow it to be consumed as an async JAX-WS web service? Would I need any other classes (e.g., a "response" class)?
Thanks in advance for any help.
Dave

I recently developed a test async web service and deployed it on weblogic 9. What I did was 1.) create a java class with with standard ws annotations.
2.)Compile it using jwsc ant task setting the attribute enableAsyncService="true".
I am pasting the java file and the ant target here for your reference.
<taskdef name="jwsc" classname="weblogic.wsee.tools.anttasks.JwscTask" classpathref="classpath.basic"/>
<target name="buildWebService">
     <jwsc
     srcdir="${basedir}/src/com/test/"
     sourcepath="${basedir}/src/com/test/"
     destdir="${basedir}/build"
     classpathref="classpath.basic"
     keepGenerated="true"
     enableAsyncService="true"
     debug="on">
     <module contextPath="TestAsyncWS" name="TestAsyncWS" explode="false" >
          <jws file="TestAsyncWS.java">
     <WLHttpTransport contextPath="TestAsyncWS" serviceUri="TestAsyncWS" portName="TestAsyncWS" />
     </jws>
     <FileSet dir="${basedir}/src" >
     <include name="**/*.java" />
     </FileSet>
     </module>
          </jwsc>     
     </target>
and here is the java class
package com.test;
import javax.jws.WebMethod;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
@WebService (name = "TestAsyncWS", targetNamespace = "java:com.test")
public class TestAsyncWS
     public TestAsyncWS()
     @WebMethod()
          public String sayHello(String textToDisplay)
          String result = "I can still work.Here is what you sent to me. "+ textToDisplay;
          System.out.println(result);
          try {
               Thread.sleep(20000);
          } catch (InterruptedException e) {
               e.printStackTrace();
          return result;
}

Similar Messages

  • How to Implement Management Chain in External routing Service

    hi,
    I am using External Routing Service to Assign & route the tasks.
    I will get the authorisation workflow in our external Routing class , Now I am suppose to implement that workflow in BPM worklist for that human task.
    One way is to know the way to implement management chain in the External Routing Service.
    I have found some BPEL classes for doing the same eg. ParticipantsType.ManagementChain, objFactory.createParticipantsTypeManagementChain().
    But not able to find any sample code to implement.
    Does any body knows how to implement the same.
    Is their any other way to resolve this issue.
    you can also refer the following thread to understand the problem statement: PROGRAMMATICALLY PERSISTING THE APPROVAL WORKFLOW FOR A HUMAN TASK.
    thanks
    Jagdish

    I have tried the below mentioned code for implemnting management chain...
         private Participants createParticipant() {
              System.out.println("1");
              String user = users[numberOfApprovals++];
              ObjectFactory objFactory = new ObjectFactory();
              Participants participants = objFactory.createParticipants();
              participants.setIsAdhocRoutingSupported(false);
                   StageType stage = objFactory.createParticipantsTypeStage();
                   stage.setName("Stage1");
                   System.out.println("2");
                   SequentialParticipant seqParticipant = objFactory.createParticipantsTypeSequentialParticipant();
                   seqParticipant.setName("Stage1.Participant1");
                   System.out.println("3");
                   ListType listType = objFactory.createList();
                   ManagementChainListType managementListType = objFactory.createManagementChainListType();
                   // adding Resource in the management chain
                   ResourceType resourceChain = objFactory.createResourceType("fkafka");
                   resourceChain.setIsGroup(false);
                   resourceChain.setType("STATIC");
                   resourceChain.setIdentityType("user");
                   managementListType.getResource().add(resourceChain);
                   System.out.println("4");
                   // adding levels in the management chain
                   ParameterType levelParameterType = objFactory.createParameterType("2");
                   levelParameterType.setType("STATIC");
              managementListType.setLevels(levelParameterType);
                   System.out.println("5");
                   // adding title in the management chain                    
                   ParameterType titleParameterType = objFactory.createParameterType("Vice President");
                   titleParameterType.setType("STATIC");
                   managementListType.setTitle(titleParameterType);
                   System.out.println("6");
                   listType.setManagementChain(managementListType);
                   System.out.println("7");
                   seqParticipant.setList(listType);
                   System.out.println("8");
                   stage.getParticipantOrSequentialParticipantOrAdhoc().add(seqParticipant);
                   System.out.println("9");
              participants.getParticipantOrSequentialParticipantOrAdhoc().add(stage);
              System.out.println("10");
              return participants;
    The above code doesnot give error during execution but It doesnot work, what It's suppose to be...
    what It does is..It calls onInitiation method number of times [equal to the number of levels given in hierachy +1] at one shot. without being assigned to anybody and come out of the human task.
    please let me know..If am missing something...
    thanks
    Jagdish Khera

  • How to implement the odata model with web service

    hi dear all,
    i am trying to expose the web service as odata service in gwpa (not the NW Gateway) and i want to deploy it into smp 3.0
    but cannot find any helpful materials on it.
    could you give me some guide?
    thank you very much
    best regards
    lawrence

    Hi Lawrence,
    There are plenty blogs available. You can check either
    Marvin Hoffmann
    How to use Integration Gateway with SMP 3.0 (Part 1)
    Let me know if you face any issues.
    Rgrds,
    Jitendra

  • How to implement Sync-Sync scenario in BPM? Please help!

    Hi Experts,
       I have a Sync-Sync scenario (SOAP - RFC) where both sender as well as receiver are synchronous.
       I have created outbound sender sync interface, abstract sender sync interface, Receiver abstract sync interface and Receiver inbound sync interface.
      In BPM I have started with Receive step.
      But in receive step I can give either Async Abstract interface or Open Sync-Async bridge. I am confused!
      How to implement my scenario in BPM?
      It will be really great if somebody can send me the step by step info or doc.
    Thanks & Regards,
    Gopal

    Hi,
    Refer this link
    use synchronous send step in your BPM - http://help.sap.com/saphelp_nw04/helpdata/en/43/6211331c895f6ce10000000a1553f6/content.htm
    RFC Scenario using BPM --Starter Kit
    http://help.sap.com/saphelp_nw04/helpdata/en/83/d2a84028c9e469e10000000a1550b0/content.htm
    RFC -> XI -> WebService - A Complete Walkthrough (Part 1)
    RFC -> XI -> WebService - A Complete Walkthrough (Part 2)
    regards
    Aashish Sinha
    PS : reward points if helpful

  • How to implement an independent static stub client ? Please, help

    Hi everybody!
    I'm using the jwsdp1.2 and i got the static stub tutorial client to test my webservice. It works fine! However, i tried to compile the client code separately and it didn't worked. The jvm can't find the webservice class. So, the questions are:
    - How to implement an independent static stub whithout the ant help?
    - How can the client get the endpoint to create the proxy?
    - Must I use any javax.xml.rpc interface (call or service maybe) to do the job?
    - Could anybody show me some sample code?
    Well, that's it. I'm waiting for some answer. Please, help me.
    Tks in advance,
    Rodrigo.

    Can you explain what you mean by "independent static stub" ?
    JWSDP Tutorial explains all the steps required to create a static stubs client and invoke the service. In addition, https://jax-rpc.dev.java.net/whitepaper/1.1/index-part2.html#Scenario2 explains the detailed steps to achieve the same from command line.
    Hope that helps.
    Post your JAX-RPC related questions to [email protected] for a quicker resolution.
    Send an email to [email protected] to subscribe to the alias.
    Send an mail to [email protected] for a complete list of help commands.
    -Arun

  • How to Implement BW in IT Service Desk/IT Help Desk /IT Complain Surveillance Dept/IT Customer Support Dept?

    Hi
    If a organization have 200 to 300 daily complains of there IT equipment/Software/Network e.t.c.
    How to Implement BW in IT Service Desk/IT Help Desk /IT Complain Surveillance Dept/IT Customer Support Dept?
    Is there any standard DataSources/InfoObjects/DSOs/InfoCubes etc. available in SAP BI Content?

    Imran,
    The point I think was to ensure that you knew exactly what was required. A customer service desk can have many interpretations from a BI perspective.
    You could have :
    1. Operational reports - calls attended per shift , Average number of calls per person , Seasonality in the calls coming in etc
    2. Analytic views - Utilization of resources , Average call time and trending , customer satisfaction , average wait time
    3. Strategic - Call volumes corresponding to campaigns etc , Employee churn and related call times
    Based on these you would then have to construct your models which would be populated by data from the MySQL instance for you to report.
    Else if you have BWA you could have data discovery instead or if you have HANA - you could do even more and if you have a HANA sidecar - you technically dont need BW. The possibilities are virtually endless - it depends on how you want to drive it and how the end user ( client ) sees value in the same.

  • How to implement implicit and explicit enhancement points

    Hi,
    Can anybody please provide some technical aspects of enhancement spots. I have gone through several sap sites and help poratl but have not get much technical things (how to implement or related t codes). please do not provide link to read theories.
    Rgds
    sudhanshu

    Hi,
    Refer to this link...
    http://help.sap.com/saphelp_nw2004s/helpdata/en/5f/103a4280da9923e10000000a155106/content.htm

  • How many types of authentications in sharepoint and how to implement those authentication in sharepoint?

    Hi All,
    How many types of authentications in sharepoint and how to implement those authentication in sharepoint?
    can any one explain the above things with examples?
    Thanks in Advance!

    In addition to
    A Sai Gunaranjan you can also check this URL for Sharepoint 2010:
    http://technet.microsoft.com/en-us/library/cc288475(v=office.14).aspx
    http://www.codeproject.com/Tips/382312/SharePoint-2010-Form-Based-Authentication
    ***If my post is answer for your query please mark as answer***
    ***If my answer is helpful please vote***

  • How to Implement custom share functionality in SharePoint 2013 document Lib programmatically?

    Hi,
    I have created custom action for Share functionality in document library.
    On Share action i'm showing Model pop up with Share form with addition functionality.
    I am developing custom share functionality because there is some addition functionality related to this.
    How to Implement custom share functionality in SharePoint 2013  document Lib pro-grammatically?
    Regards,
    - Siddhehswar

    Hi Siddhehswar:
    I would suggest that you use the
    Ribbon. Because this is a flexible way for SharePoint. In my project experience, I always suggest my customers to use it. In the feature, if my customers have customization about permission then i can accomplish this as soon
    as possible. Simple put, I utilize this perfect mechanism to resolve our complex project requirement. Maybe we customize Upload/ Edit/ Modify/ Barcode/ Send mail etc... For example:
    We customize <Edit> Ribbon. As shown below.
    When user click <Edit Item>, the system will
    render customized pop up window.
    Will

  • Can't Figure Out How To Implement IEnumerable T

    I have no problem implementing IEnumerable but can't figure out how to implement IEnumerable<T>. Using the non-generic ArrayList, I have this code:
    class PeopleCollection : IEnumerable
    ArrayList people = new ArrayList();
    public PeopleCollection() { }
    public IEnumerator GetEnumerator()
    return people.GetEnumerator();
    class Program
    static void Main(string[] args)
    PeopleCollection collection = new PeopleCollection();
    foreach (Person p in collection)
    Console.WriteLine(p);
    I'm trying to do the same thing (using a List<Person> as the member variable instead of ArrayList) but get compile errors involving improper return types on my GetEnumerator() method. I start out with this:
    class PeopleCollection : IEnumerable<Person>
    List<Person> myPeople = new List<Person>();
    public PeopleCollection() { }
    public IEnumerator<Person> GetEnumerator()
    throw new NotImplementedException();
    IEnumerator IEnumerable.GetEnumerator()
    throw new NotImplementedException();
    class Program
    static void Main(string[] args)
    // Create a PeopleCollection object.
    PeopleCollection peopleCollection = new PeopleCollection();
    // Iterate over the collection.
    foreach (Person p in peopleCollection)
    Console.WriteLine(p);
    Console.ReadLine();
    That code compiles (basically because I haven't really done anything yet), but I get compile errors when I try to implement the GetEnumerator() methods.

    The List<T> class implements the IEnumerable<T> interface, so your enumerator can return the GetEnumerator call from the list.
    class PeopleCollection : IEnumerable<Person>
    List<Person> myPeople = new List<Person>();
    public PeopleCollection() { }
    public IEnumerator<Person> GetEnumerator()
    return myPeople.GetEnumerator();
    IEnumerator IEnumerable.GetEnumerator()
    return myPeople.GetEnumerator();
    class Program
    static void Main(string[] args)
    // Create a PeopleCollection object.
    PeopleCollection peopleCollection = new PeopleCollection();
    // Iterate over the collection.
    foreach (Person p in peopleCollection)
    Console.WriteLine(p);
    Console.ReadLine();

  • How to implement Tool TIP in Table Control

    Hello Everyone,
    Can you please tell me how to implement a tooltip messages in table control columns.
    The Tooltip contains a simple message like "Doublde click on column.
    Thanks in advance.
    Edited by: Suruchi Razdan on Jun 6, 2011 7:57 AM

    Hello,
    In table Control->first Header Row has chance to maintain the Tooltip option.
    In table control columns maintain Double click options in attributes .
    Regards,
    Praveen

  • How to implement a java class in my form .

    Hi All ,
    I'm trying to create a Button or a Bean Area Item and Implement a class to it on the ( IMPLEMENTATION CLASS ) property such as ( oracle.forms.demos.RoundedButton ) class . but it doesn't work ... please tell me how to implement such a class to my button .
    Thanx a lot for your help.
    AIN
    null

    hi [email protected]
    tell me my friend .. how can i extend
    the standard Forms button in Java ? ... what is the tool for that ... can you explain more please .. or can you give me a full example ... i don't have any expereience on that .. i'm waiting for your reply .
    Thanx a lot for your cooperation .
    Ali
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by [email protected]:
    Henrik, the Java importer lets you call Java classes on the app server side - I think what Ali is trying to do is integrate on the client side.
    If you want to add your own button then if you extend the standard Forms button in Java and then use this class name in the implementation class property then the Java for your button will be used instead of the standard Forms button. And since it has extended the basic Forms button it has all the standard button functionality.
    There is a white paper on OTN about this and we have created a new white paper which will be out in a couple of months (I think).
    Regards
    Grant Ronald<HR></BLOCKQUOTE>
    null

  • How to implement a file system in my app?

    How to implement a file system in my app? So that we can connect to my iPhone via Finder->Go->Connect to Server. And my iPhone will show as a shared disk. Any ideas about it? Thanks.

    Hi Rain--
    From webdav.org:
    DAV-E is a WebDAV client for iPhone, with free and full versions. It provides remote file browsing via WebDAV, and can be used to upload pictures taken with the iPhone.
    http://greenbytes.de/dav-e.html
    http://www.greenbytes.de/tech/webdav/
    Hope this helps.

  • How to implement remote blob storage in SharePoint 2013

    How to implement remote blob storage in SharePoint 2013 

    Try below:
    http://blogs.technet.com/b/wbaer/archive/2013/05/23/deploying-remote-blob-storage-with-sql-server-2012-alwayson-availability-groups.aspx
    If this helped you resolve your issue, please mark it Answered. You can reach me through http://itfreesupport.com/

  • How to implement tool-tip for the list items for the Choice column in SharePoint 2013

    I had created a simple list with a "Choice" column, i have three entries in my drop-down, 
    First Entry
    Second Entry
    Third Entry.
    If i select any entries in drop-down and hour-over (Second Entry), a
    tool-tip need need to show. 
    Is it possible? If yes how to implement any help will be appreciated.

    Hi,
    We can use JavaScript to achieve it.
    The following code for your reference:
    <script type="text/javascript" src="/sites/DennisSite/Shared%20Documents/js/wz_tooltip.js"></script>
    <script type="text/javascript" src="/sites/DennisSite/Shared%20Documents/js/jquery-1.11.1.min.js"></script>
    <script type="text/javascript">
    $(function () {
    $("select[title='Choice']").change(function(){
    Tip($(this).val());
    $("select[title='Choice']").mouseout(function(){
    UnTip();
    </script>
    Download wz_tooltip.js:
    http://www.walterzorn.de/en/tooltip/tooltip_e.htm#download
    Best Regards
    Dennis Guo
    TechNet Community Support

Maybe you are looking for