3 Replies Latest reply on Oct 9, 2013 11:02 PM by Riaan.Ingram

    MFL and email's subject: how to



      I'm just arrived in OSB family and some things are difficult for me.


      I have to transform from non-xml to xml the email contents.

      I have already created a service account, proxy service following the Eric Elzinga's cookbook recipes.

      I can read the body contents very easily (thanks Eric!) but I do not know how to read the email's subject.


      Do I have to create another MFL for it? Or just add other fields to Body MFL transformation file?

      Someone have already done this?


      Thanks for your help.

        • 1. Re: MFL and email's subject: how to

          Email transport detail is provided in the $inbound variable out of the box in OSB when you choose email transport:




          So you can just simply use the "Assign" activity to assign a variable to "$inbound/ctx:transport/ctx:request/tp:headers/email:Subject" (xquery) to get the subject.

          • 2. Re: MFL and email's subject: how to

            Hi Riaan,

            thanks for your suggestions.

            One more question please: how can I can pass this variable in a soap message?

            I have to use this variables to call another service and my request has to be in a soap message(xml format).

            Can I read them into a java class? If yes, how?


            (sorry for the dummies questions but It's my first time with OSB)

            • 3. Re: MFL and email's subject: how to

              You can use a service callout or a route to another soap web service. Before the service callout, replace or assign the contents (fn:data() or /text()) 'this' (email subject) variable into the service callout request variable or do similar into the $body variable if you use a route to call a soap web service.


              "The Definitive Guide to SOA: Oracle Service Bus (second edition)" is a good book to help you get started. Or you can go to the examples pages which also have tuts: https://java.net/projects/oraclesoasuite11g/pages/OSB. There is a java callout example in there which you can have a look at. 

              1 person found this helpful