Friday, May 18, 2012

SOA Suite PS5 Email (UMS) Adapter

With the release of Soa Suite Patch Set 5 we can now try out the new UMS Email adapter. The UMS adapter allows you to listen for new mail or send a mail from a service component. Combined with BPEL it’s now relative easy to process email bodies or attachments.  To read more and test it yourself check my blogpost on Amis Technology.

10 comments:

  1. Biemond
    your post is very helpful.
    i have scenario, where i need to read an attachment which is from CSV file type.Then i need to convert it to xml.

    So can we listen to mailbox for .csv files which are in attachement.

    Thanks
    Sujan

    ReplyDelete
    Replies
    1. Hi,

      Yes, you can listen for all messages and then retrieve the attachments in BPEL.

      thanks

      Delete
  2. Hi Edwin,

    I have requirement of reading email and parsing email body and sending it to target application.I have followed below link to use UMS adaptor to achive this.

    http://technology.amis.nl/2012/05/18/proces-email-with-the-new-ums-adapter-of-soa-suite-ps5/

    I have followed the exact steps given out in this post for listening emails.
    But when i deployed my process, there is no instance created. when i checked SOA log file.I see below error message

    "Caused by: BINDING.JCA-12517
    Endpoint Activation Error.
    AdapterFrameworkImpl::endpointActivation - Endpoint Activation Error.
    The Resource Adapter UMS Adapter was unable to activate the endpoint :{InboundThreadCount=1, To=Veeresh.Hawalkhod@uniform.aramark.com, DeliveryType=Email, ConsumeMode=listener} due to the following reason: java.lang.NoClassDefFoundError: oracle/sdp/messaging/AccessPoint
    Please correct the reported issue and redeploy the BPEL process."

    Please help me on this.

    ReplyDelete
  3. I am able to resolve this issue by having entry for jar files in Weblogic_Calsspath in commEnv.sh file. Then I have restarted all the services.

    This time no errors in log files but instance are not creating for the bpel process.
    Please help me on this.

    Thanks
    Veeresh

    ReplyDelete
  4. Hi Edwin,

    Now I see error message as below in logs
    Message handle error.
    error while attempting to process the message "com.collaxa.cube.engine.dispatch.message.instance.ExpirationMessage"; the reported exception is: Cannot resolve scope.
    The scope associated with the block element "BpSeq40" is not defined in the current instance.
    This was an internal error. The scope metadata was corrupt.
    Contact Oracle Support Services. Provide the error message, the composite source, and the exception stack trace in the log files (with the logging level set to debug mode).

    This error contained an exception thrown by the message handler.
    Check the exception trace in the log (with logging level set to debug mode).

    at com.collaxa.cube.engine.dispatch.DispatchHelper.handleMessage(DispatchHelper.java:205)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.process(BaseDispatchTask.java:88)
    at com.collaxa.cube.engine.dispatch.BaseDispatchTask.run(BaseDispatchTask.java:65)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:909)
    at com.collaxa.cube.engine.dispatch.Dispatcher$ContextCapturingThreadFactory$2.run(Dispatcher.java:850)
    at java.lang.Thread.run(Thread.java:662)


    Please help on this

    ReplyDelete
    Replies
    1. Hi,

      please enable all the ums logging to see if it polls for your email.

      thanks

      Delete
  5. how can i get the header value ?like subject, sender and receiver value. because i follow your tutorial and the xml payload only contain the message body.

    ReplyDelete
    Replies
    1. Hi,

      when you look at this http://technology.amis.nl/wp-content/uploads/2012/05/Screen-Shot-2012-05-18-at-1.04.25-PM.png
      you can see that you receive all the headers. Can you get these values on the receive activity and assign it to bpel variables. or put a mediator before it and use assigns to retrieve them and assign them to the bpel request.

      thanks

      Delete
  6. Hi Edwin,

    While deploying my composite after following your blog, I am getting an error stating 'EndPoint activation error' in soa logs:

    ====> CubeEngine load aa_email/aa_email_bpel took 333 ms
    aa_email Java Error while performing endpoint Activation: java.lang.NoClassDefFoundError: oracle/sdp/messaging/AccessPoint>>
    < aa_email
    java.lang.NoClassDefFoundError: oracle/sdp/messaging/AccessPoint
    at java.lang.Class.getDeclaredMethods0(Native Method)
    at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
    at java.lang.Class.getMethod0(Class.java:2670)
    at java.lang.Class.getMethod(Class.java:1603)
    at oracle.integration.platform.blocks.adapter.fw.wsdl.WSDLUtils.isActivationSpecProperty(WSDLUtils.java:452)
    at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.merge(AdapterFrameworkImpl.java:842)
    at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.createActivationSpec(AdapterFrameworkImpl.java:819)
    at oracle.integration.platform.blocks.adapter.fw.impl.AdapterFrameworkImpl.endpointActivation(AdapterFrameworkImpl.java:407)
    at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performEndpointActivation(JCAEndpointActivation.java:649)
    at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.activateInboundJcaEndpoint(JCAEndpointActivation.java:632)
    at oracle.integration.platform.blocks.adapter.fw.jca.lifecycle.JCAEndpointActivation.performActivation(JCAEndpointActivation.java:386)
    at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.endpointActivation(AdapterServiceRevisionRegistry.java:593)
    at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.activate(AdapterServiceRevisionRegistry.java:444)
    at oracle.integration.platform.blocks.adapter.fw.metadata.AdapterServiceRevisionRegistry$AdapterServiceRevision.setDefaultRevision(AdapterServiceRevisionRegistry.java:409)

    Can you provide your views on this.

    Thanks,
    Abhi

    ReplyDelete
    Replies
    1. Hi,

      did you do this on all servers.
      copy two UMS libraries to your SOA Suite domain folder. Copy sdpmessagingclient.jar and sdpmessagingcommon.jar to the lib folder of the SOA Suite WebLogic Domain. You can find these jars at MiddlewareHome\Oracle_SOA1\communications\modules\oracle.sdp.client_11.1.1

      thanks Edwin

      Delete