OSB: Calling MTOM business service from non-MTOM proxy

Hi,
it is very easy to call non-MTOM business service from MTOM enabled proxy service, but I don't know how to do it in an opposite way. I have web service proxy (http) with binary data in Base64 in a soap body element and I'd like to call a business service (web service over http again) using MTOM format to send binary data in binary format (and not in Base64 as it is in proxy). Is it possible to somehow decode binary data from Base64 in a proxy service and send them from this proxy to a business service using MTOM?

I understand the flow you propose, but I don't know how to pass decoded data from Java callout back to message flow. As far as I know I can only return primitives, String and XmlObject, because anything else can't be processed in message flow.Yes you are correct.But you can also return DataSource in java callout. Please http://download.oracle.com/docs/cd/E13159_01/osb/docs10gr3/userguide/pojo.html
Now the working solution/POC --Tested on my local linux box
package manoj.javacallout.binary;
import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import javax.activation.DataSource;
import javax.mail.util.ByteArrayDataSource;
import com.sun.org.apache.xml.internal.security.utils.Base64;
* TODO: I have use sun internal API for decoding for simplicity. You should modify this code with any base64 decoding library
* Ideally should be using using http://commons.apache.org/downloads/download_codec.cgi
* @author mneelapu
public class Util {
     public static DataSource decodeBase64(DataSource ds) throws Exception {
     InputStream in=ds.getInputStream();
     BufferedReader bin = new BufferedReader(new InputStreamReader(in));
     byte[] decodedB64=Base64.decode(bin);
     ByteArrayDataSource decodedDS= new ByteArrayDataSource(decodedB64,"binary/octet-stream");
     return(decodedDS);
Java Callout to decodeBase64
Parameters
javax.activation.DataSource=[ $body/* ]
Result
javax.activation.DataSource=response
Now replace the $body with the decoded base64 response from java callout
Replace [ node contents ] of [  undefined XPath  ]
in [ body ] with [ $response ]
Use $BEA_HOME/modules/javax.mail_1.4.jar for compiling.
Let me know if this solves your problem.
Thanks
Manoj
Edited by: mneelapu on Apr 20, 2009 3:23 PM

Similar Messages

  • Calling a Business Service from a Web Template File

    I'm attempting to call a Business Service from my .swt
    I've tried everything I can think of and can not get this to work for the life of me.
    I've looked endlessly for information on this topic to no avail.
    the swt call looks something like this:
    <swe:case condition="My Business Service Name, My Business Service Method">
    </swe:case>
    I assume it is something to do with the set-up of my Business Service. Could someone please help me out here or point me to some information on this topic that is actually helpful? (The bookshelf, from what I could find, did not go into setting up the business service for this use at all)

    Hi Diz,
    I tried doing the same thing by following the steps as mentioned by you. Just to re iterate,
    1. Created a DC "Portal Application Standalone" project by the name myservice.
    2. Created a portal service inside myservice by the ame AmitsService.
    3. Exposed IAmitsService.class in the public part.
    4 Build and deployed the DC on server and tested it through an abstract portal component and it worked FINE !!
    Now..
    5. Created anoter DC of type WebDynPro
    6. Added SAP_JTECHS -> epbc.prtapi._api as a "Used DC" with dependency build time and runtime
    7. Specified the sharing reference in the properties as PORTAL:sap.com/myservice
    8. Tried to reference the service using the following code..
    IAmitsService portalservice=(IAmitsService)WDPortalUtils.getServiceReference(IAmitsService.KEY);
    9.Build and deployed the DC.
    10. When I run the application I am getting the following error
    Processing HTTP request to servlet [dispatcher] finished with error.
    The error is: com.sap.engine.frame.core.load.SAPNoClassDefFoundError: com/sapportals/portal/prt/service/IService
    Exception id: [000D6008418B005C0000002C00000D200004163CE6719E1D]
    PLEASE ADVISE

  • Calling an MFL business service from a WSDL proxy service

    Hi,
    I'm using Service Bus v2.6, and trying to call an MFL business service from a wsdl based proxy service.
    I have done the following so far:
    - Define an MFL-based business service that writes MFL messages to a JMS queue and reads reply messages off another queue, and it works when I debug this business service by itself.
    - Define a wsdl proxy service that routes requests to the MFL business service.
    Since the tutorials don't have MFL examples, I'm struggling to get this working. I've tried different ways, but no luck.
    Here's my definition of the route node in the Proxy Service at the moment.
    1. Call a custom XQuery (.xq file) to convert incoming message to an XML representation of the MFL message, and assign the result to a variable "param1"
    2. Use "Service Callout" to call the MFL business service, and set Request Document Variable to "param1" and Response Document Variable to "param2".
    When I debug the flow, param2 (reply) comes up as empty, and I don't know how to make it work.
    I've turned on the JMS trace etc and the JMS bit is working (i.e messages being written, and read by the business service).
    There seems to be something wrong with the way I call it from the proxy service.
    Any help would be much appreciated..
    Thanks

    Hello,
    Can you indicate the classpath that you use to run your client, version of weblogic and the version of jaxrpc api that you are using.
    As a quick experiment adding the jaxrpc jar files to your classpath one at a time.
    This [url http://www.javaworld.com/javaforums/showflat.php?Cat=&Board=Enterprisejava&Number=3801&page=12&view=collapsed&sb=9&o=&fpart=1]chap seemed to have a similar problem to you and solved it by adding the jaxprc-spi jar file to his class path. It may be that the jaxrpc-impl is causing you greif.
    Also see this thread:
    http://forums.bea.com/bea/message.jspa?messageID=200612003&tstart=0
    Hussein Badakhchani
    www.orbism.com

  • Calling Secured Business Service from OSB

    Hi,
    I am trying to call a Service which is secured.
    the Request SOAP message is like :
    <soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:ns="urn:crmondemand/ws/activity/10/2004"
    xmlns:act="urn:/crmondemand/xml/activity"
    xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    *<soapenv:Header>*
    *     *<wsse:Security>**
    *          *<wsse:UsernameToken>**
    *               *<wsse:Username>USERX</wsse:Username>**
    *               *<wsse:Password type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordText">PASSWORD</wsse:Password>**
    **          </wsse:UsernameToken>**
    *     </wsse:Security>*
    *</soapenv:Header>*
    <soapenv:Body>
    ========================
    ========================
    </soapenv:Body>
    </soapenv:Envelope>
    I have created a business service and attached the service to Proxy service.
    I am new to OSB.I am unable to change the header data.In the forums i found couple of responses pointing to create
    Policy file or creating service account which were not clear to me.Dear expert , please guide me what exactly need to be done in this case.
    Thanks in advance,
    Regards,
    Chandra

    hi,
    Finally i have done it with the help of documentation.
    solution is :
    In the service configuration --> Policy -->select OWSM policy bindings (your domain should be configured with OWSM extention))
    select predefined oracle/wss_username_token_client_policy from in the OWSM configuration window
    next login to the em console: http://localhost:7001/em
    In the left hand side pane Go to Weblogic Domain -> select <your domain name>
    In the central pallete Weblogic Domain drop down goto secutiry --> Credentials.
    Here create a map with name : oracle.wsm.security (if not exists)
    Create a key by selecting the map as :oracle.wsm.security
    Key name : Sample_KEY
    Type : password
    Username: The username you are expecting in the soap header
    Password: The password you are expecting in the soap header
    Now go back to your service configuration -> Policy -> select the policy that you have added.
    there you can see the properties button enabled.click on it...
    there for the default_value = basic_credentials give the over_ride value as Sample_KEY (the key name you have mapped to the map)
    Regards,
    Chandra sekhar kommalapati

  • OSB example calling multiple business services using a single proxy service???

    Hi,
    I have three business services created using http urls i.e.
    1. LoginBS
    2. GetListBS
    3. LogoutBS
    My requirement is to get a list of names from GetListBS using a single proxy service and to call GetListBS I have to first call LoginBS then GetListBS i.e. after authentication and then finally logout.
    Kindly help with a detailed example for this and I am new to OSB.
    Thanks,
    Vik

    Hi Eric,
    Thanks for the response. We figured that it is possible to call multiple services with Split Join. However, we ran into the issue you described. We had a blocking call and had to wait until each of the services returned a response.
    However, we needed a Async model for our design and felt that this might not be a right fit.
    We are now looking at implementing the publish option with QoS configured as this fits our usecase better. Thanks for the help again.
    Rudraksh

  • OSB call multiple Business Services and combine the responses into one

    Dear All,
    I am new to OSB and I have a use case that I need to solve. I have 3 web services and I imported their WSDLs into OSB and created 3 Business Services that goes with each WSDL. The scenario is like this.
    Business Service 1: takes an input value as [Region] and returns a list of employee names.
    Business Service 2: takes the list of employee names and returns the list of employee names with their job profile
    Business Service 3: takes the list of employee names with their job profile and returns their contact information.
    I need to return the result of Business Service 3 to the consumer. The consumer basically need to call the Proxy service with [Region] as the input value and the result should be the output of above Business service 3.
    As I mentioned, I have WSDL for all the 3 Business Services, but, I do not have the WSDL for the Proxy Service. The Business Service WSDLs are all different and they do not match.
    My question is it possible to achieve the above result without having a concrete WSDL for Proxy Service? Also, how can I go about solving this use case. I have gone through some articles that talk about Split-Join, and am really lost.
    I really appreciate your kind reply on this.
    Thanks in advance.
    Regards,
    Syama

    You have multiple options:
    1. Create a WSDL which has input similar to input of WS1 (only Region as input) and an output similar to output of WS3.
    Create Proxy Service based on this WSDL. Then call all the thee business services one after the other and doing transformations/assigns as needed after each call. Finally map the result of BS3 to the similar output of your new WSDL on which the Proxy service is based.
    2. Create an Any XML type of web service. Create a schema which has two elements, one for input and one for output. Input containing only Region and output containing all the details. All consumers need to send request according to input defined in schema and expect output defined in schema. Its similar to creating the WSDL but can be used in case your consumer do not want to call a Web Service but want to call an XML API over HTTP. Rest will be same as option 1.
    Split join is needed to make calls in parallel, it wont be usable in your use case unless you expect a list og regions in the same request for each of which you need to gather same information by calling three services.

  • How to call business service from xquery transformation in OSB ??

    Hi All,
    How to call business service from xquery transformation in OSB ??
    I need to assign the response variable of Business Service to a target element in XQuery Transformation Mapper file.
    It's urgent.
    Regards,
    Jyoti Nayak

    Transformation is to mapping the source and target of 2 different schemas.
    In your case you should have a XQuery transformation between, your Business Service output schema and the target schema.
    Thanks,
    Vijay

  • [OSB1031] how to call a RESTful service from OSB

    Hi all,
    I need to call a RESTful service from OSB.
    The RESTful URL service is http://xxx.xxx.xxx.xxx/api/ordertracer and has been implemented in IIS.
    The service accepts a xml string message as input and returns an HttpStatusCode.
    So I started defining a business service (named OrderTracer):
    Service Type: Any XML Service
    Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
    HTTP Request Method:POST
    Or should I define instead a business service (named OrderTracer2) as following ?
    Service Type = Messaging Service
    Request Message Type = None
    Response Message Type = Text
    Endpoint URI: http://xxx.xxx.xxx.xxx/api/ordertracer
    HTTP Request Method:POST
    When I try to test the business service (the first one named OrderTracer) from OSB test console I got an error:
    <con:metadata xmlns:con="http://www.bea.com/wli/sb/test/config">
    <tran:headers xsi:type="http:HttpResponseHeaders" xmlns:http="http://www.bea.com/wli/sb/transports/http" xmlns:tran="http://www.bea.com/wli/sb/transports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <http:Connection>close</http:Connection>
    <http:Content-Length>315</http:Content-Length>
    <http:Content-Type>text/html; charset=us-ascii</http:Content-Type>
    <http:Date>Wed, 03 Oct 2012 14:26:39 GMT</http:Date>
    <http:Server>Microsoft-HTTPAPI/2.0</http:Server>
    </tran:headers>
    <tran:response-code xmlns:tran="http://www.bea.com/wli/sb/transports">3</tran:response-code>
    <tran:response-message xmlns:tran="http://www.bea.com/wli/sb/transports">Not Found</tran:response-message>
    <tran:encoding xmlns:tran="http://www.bea.com/wli/sb/transports">us-ascii</tran:encoding>
    <http:http-response-code xmlns:http="http://www.bea.com/wli/sb/transports/http">404</http:http-response-code>
    </con:metadata>
    Could I test that RESTful service from business service test console or should I test it from a service callout within a proxy service ?
    Thanks in advance for any hints!
    ferp

    Hi,
    There's a sample on JSON REST here...
    http://java.net/projects/oraclesoasuite11g/downloads/download/OSB/osb-206-JSONREST.zip
    For other samples, see this...
    http://java.net/projects/oraclesoasuite11g/pages/OSB
    Cheers,
    Vlad

  • Calling two Business service using split join in osb

    Hi,
    While trying to call two business service using Split Join in osb i am getting selection failure message in Bpel em console. i am using invoke activity to invoke the BS and assign to assign the input. in the assign i am assigning *$request.payload/input* to input.payload . In the em console i am getting input like this
    receiveInput
    Jun 19, 2012 5:05:45 PM Received "process" call from partner "bpelprocess1_client"
    <payload>
    <inputVariable>
    <part name="payload">
    <client:process>xxxxx</client:process>
    </part>
    </inputVariable>
    Assign (pending)
    Jun 19, 2012 5:05:48 PM Error in evaluate <from> expression at line "65". The result is empty for the XPath expression : "/client:process/client:input".
    <payload>
    <client:process>xxxxxx</client:process>
    Jun 19, 2012 5:05:48 PM The following exception occurred while attempting to execute operation copy at line 63
    <payload>
    <bpelFault>
    <faultType>0</faultType>
    <selectionFailure/>
    </bpelFault>
    Jun 19, 2012 5:05:57 PM "BPELFault" has not been caught by a catch block.
    Jun 19, 2012 5:06:00 PM The transaction was rolled back. The work performed for bpel instance "650002" was rolled back, but the audit trail has been saved for this instance.If this is a sync request, please resubmit the request from the client. If it is an async request, please recover from the recovery console by resubmitting the invoke message.
    Can anyone help on this?
    Thanks in Advance...

    maybe this one helps a bit, it's the same pattern
    http://www.xenta.nl/blog/2011/07/03/oracle-service-bus-implementing-aggregator-pattern-by-use-of-split-join/
    if you're using a dynamic split join easiest way is to do something like
    assing <yourresponse/> to $response
    at this moment your assign an empty placeholder to the response variable
    now you go into the for-each looping and for each iteration you need to insert the response of your bpel call in the $response variable
    so in the looping as last step you add something like
    insert $mybpelresponse/rootelement into $response/yourresponse
    with the insert it will insert the reponse 1..x times into the $response variable (so actually aggregating all the responses for you)

  • Error while calling a bpel service from OSB

    Hi
    I try to call a BPEL service from OSB 10.3 and use these bpel url's
    ormi://<hostname>:<rmi port>/<domain name>/<process name>
    opmn://<hostname>:<opmn port>/<oc4j instance name>/<domain name>/<process name>
    and I create a static service account with ocj4admin
    when I try to run the BusinessService then I got this error
    WARNING: Exception returned by remote server: {0}
    com.evermind.server.rmi.RMIConnectionException: Disconnected: javax.xml.namespace.QName; local class incompatible: stream classdesc serialVersionUID = -91204487
    54896609940, local class serialVersionUID = -916876369326528164
    at com.evermind.server.rmi.RmiCallQueue.notifyQueuedThreads(RmiCallQueue.java:70)
    at com.evermind.server.rmi.RMIClientConnection.notifyQueuedThreads(RMIClientConnection.java:208)
    at com.evermind.server.rmi.RMIClientConnection.resetState(RMIClientConnection.java:147)
    at com.evermind.server.rmi.RMIConnection.receiveDisconnect(RMIConnection.java:236)
    at com.evermind.server.rmi.RMIClientConnection.receiveDisconnect(RMIClientConnection.java:176)
    at com.evermind.server.rmi.RMIConnection.handleOrmiCommand(RMIConnection.java:208)
    Please help me out.I am using SOA Server 10.1.3.4 with jdk 1.4.
    Regards
    Ayush
    Edited by: Ayush fujitsu on Apr 6, 2010 3:36 AM

    Hi i have followed the following steps which is specified in this thread
    You need to follow below steps...
    add a java parameter to the OSB server. Go to domains\osb_domain\bin folder and edit the setDomainEnv file and add this line to this file. set JAVA_PROPERTIES=-Dplatform.home=%WL_HOME% -Dwls.home=%WLS_HOME% -Dweblogic.home=%WLS_HOME% -Dcom.sun.xml.namespace.QName.useCompatibleSerialVersionUID=1.0
    Step 2 is to replace the bpel jars in the bpel transport ear. Go folder osb_10.3\lib\transports and open bpel10gtransport.ear and replace the following jar files orabpel.jar, orabpel-common.jar , xmlparserv2.jar and oc4jclient.jar with the ones you can find in the soa suite 10.1.3 home.
    But still i am getting the error.
    I am using WLS (10.0).Is it compatible with bpel-10g protocol, because i have already called a sync BPEL process with http protocol and it worked?This thread talks about WLS(9.2)
    Regards
    Ayush

  • Best practices for Calling Multiple Business Services in OSB

    Hi All,
    I have a requirement where I need to call multiple business services in OSB. We are presently calling them sequentially in a proxy pipeline. I was wondering if we could accomplish the same task in a better way. Each of the business services are mutually exclusive.
    Thanks in Advance,
    Rudraksh

    Hi Eric,
    Thanks for the response. We figured that it is possible to call multiple services with Split Join. However, we ran into the issue you described. We had a blocking call and had to wait until each of the services returned a response.
    However, we needed a Async model for our design and felt that this might not be a right fit.
    We are now looking at implementing the publish option with QoS configured as this fits our usecase better. Thanks for the help again.
    Rudraksh

  • Calling a Siebel Business Service from an Excel Macro

    Hi Everyone !!
    I have a requirement where i have to call a siebel Business Service from an excel macro. Please help me with the code.
    Regards,
    Abhi

    Here's a starter for one:
    Private Function ConnectToSiebel(sConnectString As String, sUserName As String, sPassword As String, _
    oSiebel As SiebelDataControl) As Boolean
    On Error GoTo ErrorHandler
    ' Uses the specified parameters to connect to the Data Control
    Dim iErrCode As Integer
    Set oSiebel = CreateObject("SiebelDataControl.SiebelDataControl.1")
    oSiebel.Login sConnectString, sUserName, sPassword
    If (oSiebel.GetLastErrCode <> 0) Then GoTo ErrorHandler
    ConnectToSiebel = True
    Exit Function
    ErrorHandler:
    MsgBox oSiebel.GetLastErrCode
    ConnectToSiebel = False
    End Function
    The connect string passed takes the format:
    host="siebel://<SERVER_HOST>/<SERVER_NAME>/PSCcObjMgr_enu"
    You can then use the 'oSiebel' object as if it was the Application(). For example, Set oService = oSiebel.GetBusService("Blah")
    Regards,
    mroshaw

  • Calling a business service based on operation-soap action in Proxy service

    Hi,
    I have a requirement in which I have to call a business service based on operation-soap action defined in Proxy service wsdl.
    Like in below mentioned wsdl GetPartCostDelta and GetCurrencyList operations are there.But which ever operation I select,It just goes to one business service.
    Is there any way,I can route to some another business service based on the soap action
    proxy service WSDL
    <?xml version="1.0" encoding="UTF-8"?>
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:ewopcd="urn:com:gm:gpd:schema:ewopartcostdelta" xmlns:gen="urn:com:gm:gpd:schema:genericfault" xmlns:tns="urn:com:gm:gpd:services:ewopartcostdeltaservice" targetNamespace="urn:com:gm:gpd:services:ewopartcostdeltaservice">
         <wsdl:types>
              <xs:schema>
                   <xs:import namespace="urn:com:gm:gpd:schema:ewopartcostdelta" schemaLocation="ewocostdelta.xsd"/>
                   <xs:import namespace="urn:com:gm:gpd:schema:genericfault" schemaLocation="servicefault.xsd"/>
              </xs:schema>
         </wsdl:types>
         <wsdl:message name="EWOCurrencyListRequest">
              <wsdl:part name="CurrencyListRequest" element="ewopcd:EWOCostDeltaInput"/>
         </wsdl:message>     
         <wsdl:message name="EWOCurrencyListResponse">
              <wsdl:part name="CurrencyListResponse" element="ewopcd:EWOCurrencyList"/>
         </wsdl:message>     
         <wsdl:message name="EWOPartCostDeltaRequest">
              <wsdl:part name="PartCostDeltaRequest" element="ewopcd:EWOCostDeltaInput"/>
         </wsdl:message>
         <wsdl:message name="EWOPartCostDeltaResponse">
              <wsdl:part name="PartCostDeltaResponse" element="ewopcd:EWOCostDeltaResult"/>
         </wsdl:message>
         <wsdl:message name="EWOPartCostDeltaServiceFault">
              <wsdl:part name="PartCostDeltaServiceFault" element="gen:ServiceFault"/>
         </wsdl:message>
         <wsdl:portType name="EWOPartCostDeltaPortType">
              <wsdl:operation name="GetCurrencyList">
                   <wsdl:input name="EWOCurrencyListRequest" message="tns:EWOCurrencyListRequest"/>
                   <wsdl:output name="EWOCurrencyListResponse" message="tns:EWOCurrencyListResponse"/>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault" message="tns:EWOPartCostDeltaServiceFault"/>
              </wsdl:operation>
              <wsdl:operation name="GetPartCostDelta">
                   <wsdl:input name="EWOPartCostDeltaRequest" message="tns:EWOPartCostDeltaRequest"/>
                   <wsdl:output name="EWOPartCostDeltaResponse" message="tns:EWOPartCostDeltaResponse"/>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault" message="tns:EWOPartCostDeltaServiceFault"/>
              </wsdl:operation>          
         </wsdl:portType>
         <wsdl:binding name="EWOPartCostDeltaBinding" type="tns:EWOPartCostDeltaPortType">
              <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
              <wsdl:operation name="GetCurrencyList">
                   <soap:operation soapAction="GetCurrencyList" style="document"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault">
                        <soap:fault name="EWOCostDeltaServiceFault" use="literal"/>
                   </wsdl:fault>
              </wsdl:operation>
                        <wsdl:operation name="GetPartCostDelta">
                   <soap:operation soapAction="GetPartCostDelta" style="document"/>
                   <wsdl:input>
                        <soap:body use="literal"/>
                   </wsdl:input>
                   <wsdl:output>
                        <soap:body use="literal"/>
                   </wsdl:output>
                   <wsdl:fault name="EWOPartCostDeltaServiceFault">
                        <soap:fault name="EWOCostDeltaServiceFault" use="literal"/>
                   </wsdl:fault>
              </wsdl:operation>
         </wsdl:binding>
         <wsdl:service name="EWOPartCostDeltaService">
              <wsdl:port name="EWOPartCostDeltaPort" binding="tns:EWOPartCostDeltaBinding">
                   <soap:address location="https://localhost/EWOPartCostDelta"/>
              </wsdl:port>
         </wsdl:service>
    </wsdl:definitions>

    Did you try using the Operational branching node of OSB?
    You have copy the operation name from the inbound variable and populate the SOAP Header with that value into the SOAPAction tag.I think this will work.
    Thanks,
    Prabu

  • Call a Web Service from within an e-Sourcing script

    Hi Guys
    I would like to know wether anyone has successfully been able to call a Web Service from within an
    e-Sourcing script? If you have, can you please share your experience and code?
    Thank You

    Hi Faaiez -
    As with any use of Web Services, however, you should carefully consider the security issues that may come up. How, for example, will the Web Service server validate that the Web Service client (E-Sourcing) is properly authenticated? Will password information be included in the web service call? You will find that it is very easy to make a web service call, but I would encourage you to carefully consider security before implementing a productive solution.
    Web service calls can be made using raw Java web service APIs from the open source Axis library which is included with E-Sourcing; this approach is slightly more difficult to code, but very dynamic. Web service calls can also be made using proxies. In one solution that I worked on, we generated java proxies for the web service, compiled those proxies into a Jar file, and included that jar file as a custom jar in E-Sourcing. Let me provide a few more details on each of these approaches.
    Using raw java web service APIs that are part of the Service and Call classes, I prototyped a web service call to Googles sample spell checker web service. Here is the code:
    import org.apache.axis.client.Call;
    import org.apache.axis.client.Service;
    import org.apache.axis.encoding.XMLType;
    import javax.xml.rpc.ParameterMode;
    import javax.xml.namespace.QName;
    String endpoint = "http://api.google.com/search/beta2";
    Service  service = new Service();       
    Call call = (Call) service.createCall();       
    call.setTargetEndpointAddress( new java.net.URL(endpoint) );       
    call.setOperationName( "doSpellingSuggestion" );       
    call.setOperationName(new QName("urn:GoogleSearch", "doSpellingSuggestion"));       
    call.addParameter("key", XMLType.XSD_STRING, ParameterMode.IN);       
    call.addParameter("phrase", XMLType.XSD_STRING, ParameterMode.IN);       
    call.setReturnType( XMLType.XSD_STRING );       
    String ret = (String) call.invoke( new Object[] { "googlekey", doc.getDocumentDescription()} );       
    doc.setDocumentDescription(ret);
    This block of code does a very simple thing...it calls the Google "doSpellingSuggestions" web service with two parameters: a key provided by Google, and a string for which the spelling suggestions should be generated. I used the current document description as my sample string for the web service and I put the results back into the document description - remember, this is just showing how you can call the web service, not doing anything really intelligent or useful from a business perspective
    There is nothing special to E-Sourcing about the above code...this is really just using the Axis java classes to call a web service.
    The second approach that can be used is to generate Java proxies for the web service calls. The open source Axis library includes a tool called "wsdl2java". Using the WSDL for the web service, you can generate Java proxies. Java classes will be generated by the tool; these Java classes will then need to be compiled and included in E-Sourcing as a custom jar. Once they are part of the E-Sourcing deployment, they can be called like any Java API. If you were to examine the generated code, you would notice that it looks a lot like the raw web service code shown above...the generated classes really just provide a simpler interface to the same functionality.
    You can see this information and other E-Sourcing information at my blog at: http://www.sunshinesys.com/
    Rob

  • Setting JMSPriority on call to Business Service on AquaLogic 2.6 ?

    I have a one-way web service receiving requests on the service bus in a Proxy Service as SOAP/HTTP and sending this further on to as Business Service as SOAP/JMS.
    As part of calling the Business Service, how do I set the JMS priority?
    I am using AquaLogic 2.6. Under the common "Transport Headers" it very much appears to me as if the existing and pre-defined "JMSPriority" does not work - trying to use it leads to a runtime error. I found someone else noting this problem too as an older post - JMS priority transport header This post has some kind of solution too but appears to be aimed at the Proxy Service and not the Business Service.
    So far, all my attempts to set the JMSPriority has failed. Information on the subject appears scarce.
    How do I make my Business Service use a specific JMS priority in its SOAP/JMS call to the actual service?

    Yes, I understand you fully - this selecting the "JMSPriority" from the dropdown is what I meant with the existing and pre-defined setting not working.
    In AquaLogic 2.6. this leads to the same as noted by the other fellow in the older post from 2008 (JMS priority transport header it at runtime results in a transport exception like -
    com.bea.wli.sb.transports.TransportException: java.lang.String
    at com.bea.wli.sb.transports.TransportException.newInstance(TransportException.java:146)
    at com.bea.wli.sb.transports.jms.JmsOutboundMessageContext.setRequestMetaData(JmsOutboundMessageContext.java:220)
    at com.bea.wli.sb.transports.jms.JmsOutboundMessageContext.send(JmsOutboundMessageContext.java:456)
    - and this is where the problem begins. I have tried all sorts of things with little result.
    I have done exactly as you describe.
    The value you assign to the expression in your 11g - does this expression happen to be special in any way?

Maybe you are looking for

  • Questions on the technical feasibility of some desired functions in OBIEE

    Question1: Is the functionality shown in the picture (URL link) below possible? http://hi.erp100.com/attachment/200902/13/26518_1234504624r78c.jpg Question 2: Can we achieve the functionality shown in the picture(URL link) below? http://hi.erp100.com

  • Couldn't convert marker text

    i have a session that wont open becaus logic gives me this message before craching. luckily the backup session works but im just curious as to what this means

  • Differenti​al mode and CB68LP board

    Hi: I have a question on differential mode on CB68LP board. Attached is a diagram of op am with a differential stage circuit digram. I got from the link here. http://zone.ni.com/devzone/conceptd.nsf/webmain/D5​9654FA44D2F9FA86256F4A006064F3?opendocum

  • [Solved] Problem with "alt" keys

    Hi, I've just installed arch and fluxbox on top of it. The problem is, that when in fluxbox, my alt and alt gr keys are treated like one so I cant write any symbol that is combination of altgr and some other key. How could I fix this? Thanks in advan

  • I can't copy and paste in blackboard discussions.

    I can't copy and paste in blackboard discussion or any where in blackboard when using firefox. I can if I use a different browser but I prefer firefox. I have also tried the keyboard shortcuts without succes. Any suggestions?