Calling one WTC service from another WTC service

Hi,
We have a service called COLLECT defined in our WTC server.
Recently we've added a second service called SUM in the same WTC server.
We were wondering if it's possible to call SUM from COLLECT, and if it is, what configuration changes should be made in order to do it?
Currently both services are exported by the WTC server (and imported by our Tuxedo).
Thanks,
Shy

Hi Shy,
Although I haven't tried it, I'm fairly certain you cannot call a Tuxedo EJB using tpcall() within a WTC based application. What I normally advise customers to do when writing a Tuxedo EJB is to implement two separate interfaces. One is obviously the TuxedoService interface that all Tuxedo EJBs must implement. In particular you must implement the service() method that accepts a TPServiceInformation instance that provides access to the typed buffer passed to the EJB. Normally one then extracts the necessary fields or information from the typed buffer, performs whatever necessary business logic needs to be performed, and then constructs a reply typed buffer.
What I recommend is that you separate out the business logic into a separate interface and have your class implement both interfaces. The service() method would only deal with the marshalling/unmarshalling of the information contained in the typed buffers, and leave all business processing to methods on the second interface. Then if you need to access another "service", you would use the second interface, thus saving you from all the typed buffer manipulation.
So in your case, the business logic in the second interface of the COLLECT implementation would simply call the SUM implementations second interface (the EJB's business logic) instead of trying to call a Tuxedo service. While this helps in reuse of the business logic, it doesn't address the issue of trying to transparently move a service implementation from say Tuxedo to WLS. If that's what you are trying to do, you might try exporting the SUM service from WTC to the Tuxedo domain gateway, and then importing the SUM service from that gateway. This would likely cause a network round trip if it works, but it's something to consider.
Another alternative is to use something like the Apache Tuscany/Java project and build your Java applications using SCA. Tuxedo SALT includes a Tuscany/Java binding extension that allows Tuscany/Java applications to transparently call Tuxedo services. The choice of whether to actually call a Tuxedo service or call a Tuscany/Java based SCA service is determine by the binding selection and not changes in your code. Just a thought...
Regards,
Todd Little
Oracle Tuxedo Chief Architect

Similar Messages

  • Invoking one web service from another web service

    Hi there,
    I want to invoke a web service lets say X. But befor sending parameters to this web service, what i want to do is first pass the parameters to a web service called Y and Y will decide wether to call X or not. In other words i want to invoke a web service from another web service.
    Its kind of urget so do the needful asap.
    Thanks

    Calling another webservice from within a webservice does not require anything special. The service (say svc1) that calls another service (svc2) will be a web svc client. So you will have to do the same steps for svc1 as you would do for any other web service client

  • Calling one WAD Report from another WAD Report

    Hi All,
              I want to Call one WAD report from another WAD Report and I want to show that Report in a Container of the Calling Report Itself. Kindly give the Solution. Thanks for your support in advance.
    Thanks & Regards
    Shiva

    Hi Shiva,
    There is Command called "SET_TEMPLATE" Set Web Template.
    Here you can select any of your existing web template and choose to open it in current page of in a new window.
    Hope it helps.
    Regards,
    Pratap Sone

  • How sholud we call one jframe class from another jframe class

    Hi
    In my application i am calling one jframe class from another jframe clas.
    how sholud we make previous jframe inactve when another jframe is invoked?(user sholud not able to make any changes on on parent jframe window when another jframe is invoked)
    Pls reply.

    Sorry for me it is not possible to change existing code,
    pls suggest me any other solution so that i can inactive parent jframe when child jframe execution is going on.

  • Calling one report program from another

    Hi All,
             i am calling one report program from my program & exporting it's output to SAP-SPOOL using SUBMIT statement. I want to fetch the spool no in my program for this spool. Please guide me how this can be achieved? i have tried SYST- SPONO but it's not working.
    Thanks & Regards,
    Chetan.

    Hi,
    Initially check this it might be helpful  to u.
    http://help.sap.com/saphelp_sm40/helpdata/en/30/cc154219fce12ce10000000a1550b0/content.htm.
    Even use the function module slike Job_open , Job_close  this is also one of the methid to achive spool requests.
    Regards,
    Sana.
    Reward with points if found helpful..

  • Calling a Web Service from another Web Service

    Hello,
    I have the following scenario: Web Service -> XI -> RFC.
    I have created the XI -> RFC configurations in the XI and exposed them as a Web Service. I tested the generated WSDL with WebDynpro for Java and it works well (I also uploaded the WSDL to the XI server and tested it from the wsnavigator).
    I have created a Web Service from a Java class, deployed it on the XI server (the same XI server as the one with the RFC scenario), tested it and it works well.
    Now I want to call the service I exposed from the XI from inside my Web Service.
    How can I do that? Are there any code samples for that? I searched and couldn't find any.

    create a standalone proxy for your WSDL of the web service deployed on XI java stack and use its API library in the caller Web service...
    find the details here...
    http://help.sap.com/saphelp_nw04/helpdata/en/77/1484b9ecb98c41af4a01131d8d46d3/content.htm

  • Is it possible to call one mathscript function from another?

    HI iam bahrath..i need call the operation takin place in one mathscript in another..is it possible?pls help..

    Thanks for your concern..let me explain my project.Iam actually developing a system which provides the stress strain relationship of a material..For calculating strain which is nonlinear in this case we are using image processing techniques.We take a picture of the system initially with light markers and we find the centroid of all the markers(i use four of them).After the force is applied on the particle the centroid of the markers change as the marker positions change.I use this change in the centroid and calculate the strain.Now, 90% of the code is ready in matlab(jus capturing image and usin is needed).But i have been asked to implement it in labview.so iam tryin to put the code in mathscript and try.But the problem i face is incompatibility of many functions like imshow,input etc.so im implementin parts of the code inlabview mwthod and rest in mathscript.In matlab code i have two files and call the function in in another file from one file..thus i thought i might use two mathscripts and call one from the other..pls help.

  • Error calling web service from another web service

    I get the following deployment error:
    BUILD FAILED
    /home/appgcelc/DS_028/Receive/XMLReceiveService/build.xml:170: Deploy error: Ope
    ration failed with error:
    Error compiling :/u10/app/gcelc/ora/appserver10131/j2ee/home/applications/XMLRe
    ceiveService/ReceiveMessage: Error instantiating compiler: Webservice artifact g
    eneration failed:java.lang.IllegalStateException: Service {http://ds.gcss.usmc.m
    il/}compsvc for service-ref service/CompressService not found
    Below is my web.xml fine...the service ref looks good! What's the issue???
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_5.xsd"
    version="2.5">
    <servlet>
    <description>Web Service DefaultDepPort</description>
    <display-name>Web Service DefaultDepPort</display-name>
    <servlet-name>DefaultDepPort</servlet-name>
    <servlet-class>mil.usmc.gcss.DefaultDepImpl</servlet-class>
    <load-on-startup>1</load-on-startup>
    </servlet>
    <servlet-mapping>
    <servlet-name>DefaultDepPort</servlet-name>
    <url-pattern>DefaultDepPort</url-pattern>
    </servlet-mapping>
    <ejb-local-ref>
    <ejb-ref-name>ejb/local/SessionFacade</ejb-ref-name>
    <ejb-ref-type>Session</ejb-ref-type>
    <local>mil.usmc.gcss.SessionFacadeLocal</local>
    </ejb-local-ref>
    <service-ref>
    <service-ref-name>service/CompressService</service-ref-name>
    <service-interface>javax.xml.rpc.Service</service-interface>
    <wsdl-file>WEB-INF/wsdl/compsvc.wsdl</wsdl-file>
    <jaxrpc-mapping-file>WEB-INF/compsvc-java-wsdl-mapping.xml</jaxrpc-mapping-file>
    <service-qname xmlns:service-qname_ns__="http://ds.gcss.usmc.mil/">service-qname_ns__:compsvc
    </service-qname>
    <port-component-ref>
    <service-endpoint-interface>mil.usmc.gcss.CompressService</service-endpoint-interface>
    </port-component-ref>
    </service-ref>
    <resource-env-ref>
    <description>Data Source for error handling API</description>
    <resource-env-ref-name>jdbc/xxmcDS</resource-env-ref-name>
    <resource-env-ref-type>javax.sql.DataSource</resource-env-ref-type>
    </resource-env-ref>
    </web-app>

    Well questions related to Web Services have been answered here in past, please Search on SCN for links to it.

  • Calling one java program from another

    Hello,
    How can I start another java program from one? Lets
    say I want Second.java to start by calling it from
    First.java. How do I do it? The two programs are given
    below. Any help is appreciated.
    Thanks,
    Amanda
    First.java
    import java.io.*;
    import java.lang.reflect.*;
    public class  First
         public static void main(String[] args)
              Process theProcess=null;
              System.out.println("Hello World from First.java!");
              String second=new String("Second.java");
              //System.load(second);
              //Runtime.getRuntime().load(second);
              try
                   theProcess=Runtime.getRuntime().exec( "Second.java"
                   System.out.println("after exec");
              catch (IOException ioe)
                   System.out.println(">>IOException thrown in
    First.java while calling
    Second.java."+ioe.getMessage());
    Second.java
    public class  Second
         public static void main(String[] args)
              System.out.println("Hello World from Second.java!");
    }

    Thanks, warnerja
    What if Second.java is on a remote machine i.e.
    First.java and second.java are on different machines?
    Will I have to use RMI?Well, you'd have to do some kind of remote invocation. Depends on what kinds of apps house the classes. There are all kinds of ways - web services, servlets, RMI, (maybe others...)
    That's a totally different question than what you originally posted, and would have been very relevant to say so in the first place.

  • How to call one Main MXML from another main MXML file and pass values between them?

    Hi,
    I am trying to populate a datagrid from a XML file ,which I have done successful
    I am able to get data out of the datagrid on clicking on any element
    Now when I click on any element in datagrid I want call a new mxml file which is also have Aplication tag and I want to pass that value of clicked element to it
    This is the code I am using for getting data from XML into data grid in 1st MXML file and the XML file used.
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                    xmlns:s="library://ns.adobe.com/flex/spark"
                     xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"  initialize="exp.send()">
         <fx:Declarations>
             <s:HTTPService id="exp" url="expLab1.xml" result="
    resultHandlerQuestionBar(event)"/>
         </fx:Declarations>
         <s:Panel x="74" y="218" width="485" height="333" title="Work On Configured Experiments" id="p1" fontSize="14" chromeColor="#9BFDAB" dropShadowVisible="false" contentBackgroundColor="#E4EEE6" contentBackgroundAlpha="1.0" backgroundColor="#67B6AC" textAlign="left">
              <mx:DataGrid  x="35" y="33" width="338" height="88" dataProvider="{experimentdetails}" chromeColor="#FCFCFC" contentBackgroundColor="#FFFFFF" selectionColor="#FAFBFD" rollOverColor="#FCFDFF" focusColor="#FCFDFD" itemClick="onItemClick( event );">
                  <mx:columns>
                     <mx:DataGridColumn id="j1" dataField="experimentName" headerText="" itemRenderer="jaya">
                     </mx:DataGridColumn>
                  </mx:columns>
             </mx:DataGrid>
         </s:Panel>
         <fx:Script>
             <![CDATA[
                 import mx.collections.ArrayCollection;
                 import mx.controls.Alert;
                  import mx.events.FlexEvent;
                 import mx.events.ListEvent;
                 import mx.rpc.events.ResultEvent;
                 [Bindable]
                 private var workbenchname:ArrayCollection;
                  //private var a:String;
                 private function resultHandlerQuestionBar(event:ResultEvent):void
                    experimentdetails=event.result.List.experimentList.experiment;  
                 [Bindable]
                 private var experimentdetails:ArrayCollection;
                  private var alert:Alert;
    private var data:String;
                 private function onItemClick( e:ListEvent ):void {
       data= experimentdetails.getItemAt(e.rowIndex).experimentName.toString();
                    alert=Alert.show(experimentdetails.getItemAt(e.rowIndex).experimentName.toString());
             ]]>
         </fx:Script>
    </s:Application>
    and the xml file is:
    <?xml version="1.0" encoding="UTF-8"?>
    <List>
       <workbench>Basic Movement</workbench>
         <experimentList>
           <experiment>
             <experimentName>Distance with varying time</experimentName>
             <Rating>2</Rating>
             <expNO>1</expNO>
           </experiment>
           <experiment>
             <experimentName>Distance with Constant time</experimentName>
             <Rating>1</Rating>
             <expNO>2</expNO>
           </experiment>
           <experiment>
             <experimentName>Time taken while decelerating</experimentName>
             <Rating>3</Rating>
             <expNO>3</expNO>
           </experiment>
          </experimentList> 
    </List>
    Now the code for 2nd MXML is as follows
    <?xml version="1.0" encoding="utf-8"?>
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                         xmlns:s="library://ns.adobe.com/flex/spark"
                         xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600">
          <fx:Declarations>
                <!-- Place non-visual elements (e.g., services, value objects) here -->
          </fx:Declarations>
          <s:Label text="lable1" >
          </s:Label>
    </s:Application>

    Check out ExternalInterface class:
    http://livedocs.adobe.com/flex/3/html/help.html?content=passingarguments_2.html
    If this post answers your question or helps, please mark it as such.
    Greg Lafrance - Flex 2 and 3 ACE certified
    www.ChikaraDev.com
    Flex Training and Support Services

  • Calling one business role from another business role on CRM web client

    Hi,
    I have a requirement where, one business role can be launched just by click a navigation link on another.,
    For eg. in a UTIL_IC role frame work , I add a link by clicking on it, I go to UITIL_SALES role.
    This is required so that person need to launch crm_ui_frame again if he wants to login for another business role assigned to him..
    Please suggest the solution if possible for this one.
    Regards,
    Pratyasha Shishodia

    Hi Kavita,
    We are facing the same problem. Did you manage to solve this and if yes how?
    Kind regards
    Lars

  • Calling one abap report from another

    1.There are two abap reports Report A and Report B.
    2.Report A is already developed and I am working on Report B.
    3.Report B has two radio buttons.
    4.The logic for the first radio button is written in the Report B itself.
    5.While for the second radio button i want to call the Report A.
    6.The selection-screen fields required for executing the report A are already present in the report B.i.e Report B's selection-screen contains all the selection-screen fields of Report A plus some additional fields.
    Now my requirement is that when I select radio button 2 in the report B and fill up the selection screen data in the report B and execute the report I want that the selection-screen of Report A should not be displayed but the logic of the report A should be used and should return back to Report B. (Report A just downloads some data on into excel file). How can I achieve this?

    Hi ,
    Use submit z_reportA    with selection-table p_rspar_tab and return. Here you need to populate the selection screen fields in table p_rspar_tab  of type rsparams.
        rspar_line-selname = 'P_TAB'.
        rspar_line-kind    = 'P'.
        rspar_line-sign    = 'I'.
        rspar_line-option  = 'EQ'.
        rspar_line-low     = value.
        append rspar_line to rspar_tab.
        clear rspar_line.
    Thanks
    Subhankar

  • Web service as another web service client - problem in JavaEE SE?

    Hello,
    I observed strange behaviour with OpenESB, Glassfish (build 33) and following scenario:
    I need to call web service from another web service. When I use simple schema:
    web service client -> web service (as EJB) -> another Web service
    everything works. But I would like to use JBI/ESB, so:
    web service client -> HTTP SOAP BC -> JAVAEE SE -> web service (as EJB) -> another Web service
    the following exception prevents success:
    com.sun.xml.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class cz.muni.fi.yucca.client.jbiws.gamanager.Calculate is not fou
    nd. Have you run APT to generate them?
    at com.sun.xml.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:254)
    at com.sun.xml.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:550)
    at com.sun.xml.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:497)
    at com.sun.xml.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:339)
    at com.sun.xml.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:225)
    at com.sun.xml.ws.client.WSServiceDelegate.addSEI(WSServiceDelegate.java:584)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:287)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:270)
    at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:263)
    at javax.xml.ws.Service.getPort(Service.java:92)
    at cz.muni.fi.yucca.client.jbiws.gamanager.GAManagerService.getGAManagerPort(GAManagerService.java:51)
    When I call both services separately they work correctly, when I don't use JBI it works correctly too.
    Should anybody help me solving this problem?
    Thanks in advice, Vlado

    Fine,
    I've found out that this problem is caused by different classloaders assigned to directly (EJBClassloader) and through-JBI (improperly configured URLClassloader) called web services.
    I've moved my question to GlassFish forum (http://forums.java.net/jive/thread.jspa?threadID=24901&tstart=0) beacause of it's "technical" nature.
    Despite this, any help is welcome:-)

  • Not able to execute one Java program from another one via. exec()

    Hi,
    I am new to this forum, so I might be asking a very trivial quetion.
    My program Ap1 is :
    class Ap1
    public static void main(String a[]) throws Exception
    Runtime rt=Runtime.getRuntime();
    Process p=null;
    p=rt.exec("javac,Pr.java");
    Runtime.getRuntime().exec("javac,Pr.java");
    When I run the above program, I get below error at the line 7(bold one):
    D:\batchwe>javac Ap1.java
    D:\batchwe>java Ap1
    Exception in thread "main" java.io.IOException: CreateProcess: javac,Pr.java err
    or=2
    at java.lang.ProcessImpl.create(Native Method)
    at java.lang.ProcessImpl.<init>(ProcessImpl.java:81)
    at java.lang.ProcessImpl.start(ProcessImpl.java:30)
    at java.lang.ProcessBuilder.start(ProcessBuilder.java:451)
    at java.lang.Runtime.exec(Runtime.java:591)
    at java.lang.Runtime.exec(Runtime.java:429)
    at java.lang.Runtime.exec(Runtime.java:326)
    at Ap1.main(Ap1.java:7)
    Path is set as below(which seems correct):
    D:\batchwe>path
    PATH=C:\Program Files\Java\jdk1.5.0_05\bin
    I am just wondering how to call one Java program from another one?!
    Please help.
    thanks
    Rashmi

    Hi diptaPB,
    Thanks for your suggestion.
    Here is how I tried it again, but not getting the desired output:
    Class Pr looks like below -->
    class Pr
    public static void main(String a[])
    System.out.println("hi from process");
    When I run 'Pr' from command prompt, i get the desired output:
    D:\batchwe>java Pr
    hi from process
    However, when I call 'Pr' from another program Ap2.java, it seems that it does not call 'Pr':
    class Ap2
    public static void main(String a[]) throws Exception
    Runtime rt=Runtime.getRuntime();
    Process p=null;
    String[] cmd=new String[2];
    cmd[0]="javac";
    cmd[1]="Pr.java";
    p=rt.exec("cmd");
    D:\batchwe>javac Ap2.java
    D:\batchwe>java Ap2
    ************* no output appears here***********************
    Looking forward for your help.
    regards
    Rashmi

  • Calling another ITS service from existing ITS service

    Hi to Everyone,
    I would like your advice on calling another ITS service from existing ITS service.
    From my current ITS service eg. "Z_TESTA", i wish to call another ITS service "Z_TESTB". The problem is that it always prompt for userid and password when i called the 2nd ITS service. However, user already enter the password & id when they login to the 1st ITS service. Is there a way to call this new ITS service w/o the userid & password prompt again?
    Below is the codes that we used to call the new ITS service:
    (a) "http://.../scripts/wgate/webgui/!?~transaction=z_testb"
    OR
    (b) "http://.../scripts/wgate/z_testb/!"
    We used both method (a) and (b) but same outcome. Thank you in advance!
    YanaJ

    Hi YanaJ,
    in order to skip a manual login you have to have the credentials somewhere. If you disabled cookies, what I told you will not work. Another possibility would the usage of X509 client certificates. But this requires that you have a setup that distributes the certificates of all of your users. I personally nether setup such scenario. Maybe someone other can explain what you have to do.
    Best regards,
    Klaus

Maybe you are looking for

  • In SM21 - Database error 235 at EXE

    Hello Gurus, In sm21 - Database error 235 at EXE this error shown in our test server, while investigating I found this ( I am attaching log for your reference ) Details Recording at local and central time........................ 25.03.2009 23:02:24 T

  • Quick VPN Windows 7 unable to acess network shares or ping

    I have an RV042 using Quick VPN to connect to a remote network. I have port 1723 forwarded to a static IP address on a Windows 7 Pro 64 bit PC. I can establish the VPN and ping a printer but not the Win 7 PC. I can not acccess any shares on the pc vi

  • Materialized View with recursive join

    Why is this not allowed? create materialized view bone_mv refresh complete on commit as select a.pk from tablea a, tableb b, tableb b2 where tablea.col1 = b.col1 and tablea.col2 = b2.col2 If I use "on demand" there is no problem.

  • Problem with Wireless settings in WRT 300N (V2)

    Greetings, I've just managed to reset the WRT 300N to default settings and have setup the internet conncection etc and home network ... BUT no matter how I've fiddled with the wireless settings I cannot get any of the laptops or mobile phones to conn

  • E2500 with multiple APs for guest access

    I got 5 E2500 routers and the main one has setup to IP address 192.168.1.254 and the rest APs are programmed into the bridge mode with the IP address 192.168.1.245 through 248. The secured wireless network  works fine when I roaming between these APs