Using AJAX to call a method of controller.

I am working with weblogic 10.2 .I need to call a method of the controller using Ajax (because i don't wan to refresh the whole page).
I am new to Ajax.
Can any one provide me the stub or prototype for calling a method of contoller from jsp using AJax.

Another approach, if you would like to call a Pageflow action and then update only a portion of a portlet with the result, would be to use the Dynamic Content taglib.
http://download.oracle.com/docs/cd/E13155_01/wlp/docs103/javadocjsp/commonui/dc/tld-summary.html
Edited by: Brad Posner on Jan 12, 2009 10:42 AM

Similar Messages

  • Calling view method in controller

    I want invoke view method in controller but I don't know how :) I sought like example, but I don't found it. Can I do that in this code ? whether I must build it anew ? I use javafx and fxml technology( to build user interface ).
    My view file ( it have gotoRegister() and gotoLogin() method ( i want to invoke them ))
    public class FXMLExampleMVC extends Application{
        protected Parent root;
        @Override
        public void start(Stage stage) throws Exception {
            gotoLogin();
            Scene scene = new Scene(root);
            stage.setScene(scene);
            stage.setTitle("JavaFX Welcome!");
            scene.getStylesheets().add(FXMLExampleMVC.class.getResource("cssforapp.css").toExternalForm());
            stage.show();
        public void gotoRegister() throws IOException{
            root = FXMLLoader.load(getClass().getResource("RegisterFXML.fxml")); 
        public void gotoLogin() throws IOException{
            root = FXMLLoader.load(getClass().getResource("Sample.fxml"));
        public static void main(String[] args) {
          launch(args); 
    } My controller ( here i want invoke gotoRegister() method )
    public class SampleController {
        public SampleModel model = new SampleModel();
        @FXML
        protected Text actiontarget;
        @FXML
        protected PasswordField passwordField;
        @FXML
        protected TextField loginField;
        @FXML protected void handleSubmitButtonAction(){
            if((loginField.getText().equals(model.returnLogin()))&&(passwordField.getText().equals(model.returnPass())) ){
                actiontarget.setText("You have access !");
            } else {
               actiontarget.setText("Wrong data !");
        @FXML protected void handleSubmitButtonRegister() throws IOException{
           //Here I want to invoke gotoRegister
    } My question: Can I invoke gotoRegister ? or, maybe is other way to change fxml file ( from controller )?
    Edited by: 978940 on 2012-12-27 12:32

    Thanks for all your replies. I want this kind of a functionality because Im trying to invove a DC (Child DC) from a Parent DC such that the Child DC's view is displayed onto the view container of the Parent DC. I have embedded using 'interface view of a component instance' in the Parent Window and am able to create the component and set usage though the onPlugDefault of the Child View.
    But I observe that when i make a call from the parent, the flow is like this:
    1. The wdDoInit of the Child Component Controller gets triggered first.
    2. Then the wdDoInit of the Child's <b>VIEW</b> gets triggered
    3. and <b>THEN</b> the onPlugDefault of the Child Component Interface View
    What I had actually wanted was to Fire onPlugDefault where Im calling a method LoadData(), after which the Child DC's view must be triggered so it can display the fetched data.
    What is actually happening is the view gets displayed, but no data is displayed in the view.
    Right now I have just given a work around where Im triggering <b>LoadData()</b> of the <b>COmponent COntroller</b> from the <b>wdDoInit</b> of the <b>VIEW</b>.
    Is there a better way to do this? I find it strange that I have to load the Data from the view.
    Thanks
    Jack

  • Error while updating data using session and call transaction method

    Hi all,
        i have to update data using MM01 transaction from flat file to database.i have used both session method and call transaction method to do that.in both the methods data has been transferred from internal tables to screens but while updating the data that is by clicking the ok-code at the end of the transaction iam getting a dialogue box stating
       SAP EXPRESS DOCUMENT "UPDATE WAS TERMINATED" RECEIVED FROM AUTHOR "SAP".
      please tell whether the problem lies and solution for that.
                                       thanks and regards.

    hi,
    check your recording.check whether u saved your material no in recording or not.
    once again record the transacton mm01.
           MATNR LIKE RMMG1-MATNR,
           MBRSH LIKE RMMG1-MBRSH,
           MTART LIKE RMMG1-MTART,
           MAKTX LIKE MAKT-MAKTX,
           MEINS LIKE MARA-MEINS,
           MATKL LIKE MARA-MATKL,
           BISMT LIKE MARA-BISMT,
           EXTWG LIKE MARA-EXTWG,
    these are the fields which u have to take in internal table.
    this is the record which i took in my flatfile.use filetype as asc and hasfieldseperator as 'X'.
    SUDHU-6     R     ROH     MATSUDHU     "     001     7890     AA
    i did the same.but i didn't get any error.

  • Using Parentheses to Call a Method?

    So my code looks like this:
    DATA: o_ztransload_tools TYPE REF TO zcl_transload_toolbox.
               CREATE OBJECT o_ztransload_tools.
             o_ztransload_tools->zzcreate_date_range( zzobjin_dtlw    = zzin_dtlw
                                                      zzobjin_dthigh  = zzin_dthigh )  .
    This class method returns a date range. I would like to understand how to write this code without using the 'IMPORT' 'EXPORT' , parameter identifiers...if possible., and just using parentheses, as a shorthand way of writing the call method. So, from what I've read, it is possible to write the code this way.But when I try to add code for the single returning value, I get syntax errors.  How should the code be written for the method's returning value to be syntactically correct?
        Thank-You, Tom

    There would a several different combinations you may have to use depending on the type of parameters.
    If you have a single RETURNING parameter and single IMPORTING parameter, you can receive the results in that variable directly. Llike:
      lv_Day = zcl_Test=>give_day( sy-datum ).
    If you have multiple Importing parameters, you call the method like:
    zcl_test=>get_data(
      io_data = o_data
      io_data2 = o_data ).
    You can also set the the preferred parameter, when you have more than one importing parameter. Like IO_DATA and IO_DATA2. If make the preferred parameter as the IO_DATA2, than you can use pass this parameter without specifying parameter name.
      zcl_test=>get_Data( o_data_second ).
    If you have importing, exporting, changing parameters; than you have to explicitly mention the word EXPORTING, IMPORTING ... etc to let the system know what to change
      zcl_test_alv=>factory(
        EXPORTING
          iv_alv_type = alv_1
        IMPORTING
          eo_alv = me->o_alv
        changing
          ct_Data = t_Data ).
    You can't have Receiving parameter along with Changing and Exporting parameters in the same method.
    Regards,
    Naimesh Patel

  • Use Action to call JSP method instead for forwarding to another url

    I have a servlet button to save data I have entered on a form. The only way I understand to save the data when the button is pressed is to use ACTION and call up a .jsp to do the work like this:
    <FORM ACTION="http://localhost:8080/examples/jsp/learningJSP/UpdateStudentInfo.jsp" METHOD="POST">
    and here's the .jsp that sets my current properties from the form and saves them.
    <HTML>
    <BODY>
    <jsp:useBean id="studentDataBean"
         class="learningservlets.StudentDataBean"
         scope ="application"/>
    <jsp:setProperty name="studentDataBean" property ="*" />
    <!--call saveData() to send the data you just set - to the database%=stuInfo.saveData()%>-->
    <%studentDataBean.saveData();%>
    <jsp:forward page="PresentStudentData.jsp" />
    <H1>
    UpdateStudentInfo Bean
    </H1>
    </BODY>
    </HTML>
    The problem I have with using this approach is my user is sent to another page. Is there anyway to complete the above task transparently (i.e. without making the user go to the page that does all of the work)?
    Thanks for any assistance you may offer.

    Use this,
    UpdateStudentInfo.jsp
    <%@ page import="learningservlets.StudentDataBean" %>
    <jsp:useBean id="studentDataBean"
    class="learningservlets.StudentDataBean"
    scope ="application">
    <jsp:setProperty name="studentDataBean" property ="*" />
    </jsp:useBean>
    <!--call saveData() to send the data you just set - to the
    database%=stuInfo.saveData()%>-->
    <%
    studentDataBean.saveData();
    response.sendRedirect("PresentStudentData.jsp");
    return;
    %>
    Hope this helps.
    Sudha

  • Calling a pkg from managed code and then using reflection to call a method from a script task

    Hi we run 2012 std.  I have some pretty good evidence that when I call my pkg from a .net service, a script component in that pkg fails when trying 2 use reflection to load and invoke our .net message history method.  The exception is either on
    the invoke or in the message history method.  I suspect its in the method but will take additional steps 2 verify.
    But when I run the pkg stand alone, it has no problem and the method does what it is supposed 2 do.
    There r no vars passed from the service to the pkg.  I wonder if its a managed to unmanaged to managed issue that the community is already aware of.  If not, my apologies 4 posting this quickly.
    I'll post more info here as I collect it. 

    we have 2 theories after showing the exception trace to folks who r more adept at managed code.
    the first is related to the fact that our 3rd party dlls (I think entity framework is included in these) r older versions.  I don't want to discount this theory but we have some evidence already that this might not be true.
    I hope I can do justice to the 2nd theory but will make it clearer and clearer as I get a better understanding.  I believe this is what Arthur was saying and I applaud his instincts.  They explained that .net is so "smart" that it detected
    a change in namespace  (ie context as Arthur said) and purposely threw an exception 2 save us from ourselves.  The workarounds discussed were a bit over my head but I will continue trying to better understand it.  The fact that many of the methods
    we call after reflection r now merged into one assembly seemed relevant to the discussion and possible workarounds.   
    this link came up in their discussion and I believe the bottom line here is that by qualifying assembly names further (in config?)r, a workaround is possible. 
    http://msdn.microsoft.com/en-us/library/system.type.assemblyqualifiedname(v=vs.110).aspx  .
    This link came up as well and has something to do with ILMerge and workarounds to ILMerge. 
    http://elegantcode.com/2011/04/02/dynamically-load-embedded-assemblies-because-ilmerge-appeared-to-be-out/  .
    Finally, this link came up and seems to have something to do with embedding your dlls in one assembly without them losing their identity.
    http://blogs.msdn.com/b/microsoft_press/archive/2010/02/03/jeffrey-richter-excerpt-2-from-clr-via-c-third-edition.aspx
    I'll post more here as we muddle thru this.

  • Using reflector to call a method on an objectRef

    hey all! i have the following code to call a function to the objectRef that i keep in an array (jobServers) ...
    //   jobServers[0].objServerRef.addService(theCallbackObjectRef, number, jobServers);
               Class c = Class.forName("WorkflowFramework.Job");
               System.out.println(jobServers[0].functionName);
               Method meth = c.getMethod(jobServers[0].functionName);
               meth.invoke(jobServers[0].objServerRef, theCallbackObjectRef, number, jobServers);
    but i get the following error :
    addService
    FileClient Error: WorkflowFramework.Job.addService()
    java.lang.NoSuchMethodException: WorkflowFramework.Job.addService()
    at java.lang.Class.getMethod(Unknown Source)
    at Client.main(Client.java:123)
    in the first line i print the name of the function (addService) that i want to be called, and it is correct. Then i see that the function is called on the WorkflowFramework.Job and not on the jobServers[0].objServerRef which is an object of instanse Job.
    The addService function exists there because the declaration that is now in commends is running just fine if i take out the commends..
    Do you think the problem lies in the fact that Job is actually an interface declared like :
    //the job interface to enable client to choose services.
    public interface Job extends JobOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
    } // interface Job
    the addService function is declared in the JobOperations...
    any help plzzz?

    well.. you are kind of right...
    i write them as a struct in the IDL and the it is
    automatically transformed in the following java Class
    public final class lineArrayServers implements
    org.omg.CORBA.portable.IDLEntity
    public WorkflowFramework.Job objServerRef = null;
    public String functionName = null;
    public lineArrayServers ()
    } // ctor
    public lineArrayServers (WorkflowFramework.Job
    _objServerRef, String _functionName)
    objServerRef = _objServerRef;
    functionName = _functionName;
    } // ctorand then i wrap it in an array of these.. the
    jobServers...aha. so struct is an IDL construct in this case. I've never written any IDL, but I have written 'C', hence the confusion!
    thanks

  • Using reflector to call a method on the servant

    hey all! i have the following code to run a function to the objectRef that i keep in an array (jobServers) ...
    //   jobServers[0].objServerRef.addService(theCallbackObjectRef, number, jobServers);
               Class c = Class.forName("WorkflowFramework.Job");
               System.out.println(jobServers[0].functionName);
               Method meth = c.getMethod(jobServers[0].functionName);
               meth.invoke(jobServers[0].objServerRef, theCallbackObjectRef, number, jobServers);but i get the following error :
    addService
    FileClient Error: WorkflowFramework.Job.addService()
    java.lang.NoSuchMethodException: WorkflowFramework.Job.addService()
    at java.lang.Class.getMethod(Unknown Source)
    at Client.main(Client.java:123)
    in the first line i print the name of the function (addService) that i want to be called, and it is correct. Then i see that the function is called on the WorkflowFramework.Job and not on the jobServers[0].objServerRef which is an object of instanse Job.
    The addService function exists there because the declaration that is now in commends is running just fine if i take out the commends..
    Do you think the problem lies in the fact that Job is actually an interface declared like :
    //the job interface to enable client to choose services.
    public interface Job extends JobOperations, org.omg.CORBA.Object, org.omg.CORBA.portable.IDLEntity
    } // interface Job
    the addService function is declared in the JobOperations...
    any help plzzz?

    when i copy/paste that code in here i realised that..but i thought that it wanted the type of the class so it could make any sense to me to declare it as an array ...
    anw i changed the declaration to
    Class[] paramTypes = { WorkflowFramework.TheCallbackInterface.class, int.class , WorkflowFramework.JobPackage.lineArrayServers[].class};
         but i get a "wrong number of arguments " now...
    FileClient Error: wrong number of arguments
    java.lang.IllegalArgumentException: wrong number of arguments
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at Client.main(Client.java:167)
    how is this possible?!?!?!?

  • How to use Java to call a method in C program

    Hi,
    I have a method written in C program, and I need to call it in Java. Is there any way to do that? Thanks for ur suggestion.
    Regards

    Hi,
    JNI is the standard way to call C/C++ runtime code from Java.
    you find the spec under
    http://java.sun.com/products/jdk/1.2/docs/guide/jni/
    Greetings

  • How use RFBIBL00 for call transaction method.

    Hi,
    I am trying to use the direct input program RFBIBL00 to park document throught the transaction FBV1.
    Though I am trying to use call transaction option 'C'. Not able to process data directly but a session is getting created in SM35.
    Please let me know how to handle this.
    Thanks in advance.
    Pradeep.

    HI
    https://www.sdn.sap.com/irj/sdn/wiki?path=/display/snippets/lsmwwithRIFBIBL00
    Regards
    Pavan

  • Calling an On Demand Process in PL/SQL Region without using AJAX

    Hi!
    I am trying to find a way to call an On demand Process in a PL/SQL Reports Region. The reason is that i need Reportings for about 20 Pages that look like the same but have different parameters. I already have some Processes that return SQL Statements and it works fine. But these Reportings are more complex and it's not possible to return it wirh a SQL Statement.
    I have seen some solutions in this forum that used AJAX to call such a process. The problem is, that I'm not allowed to use AJAX because activeX is diabled. I tried it and it works but i need another way to solve this process call.
    Thanks in advance
    Philipp

    At the moment I cannot say if your link can help. Right now the call of the On demand Process looks like this:
    Inside annonymous PL/SQL Region:
    <script type="text/javascript">
    get = new htmldb_Get(null,'||:APP_ID||'.,'APPLICATION_PROCESS=F_REPORT_NAME',0);
    gReturn = get.get();
    document.write(gReturn);
    </script>

  • PHP using soap to call EJB

    Hello everybody,
    I've a problem to call a EJB form a PHP script.
    There is a Apache with PHP 5.2.0 and a SAP NetWeaver Application Server 7.10 / AS Java 7.10 running on the system.
    I wanted to use soap to call a method in an EJB. It's only a test EJB:
    [code]
    package beans;
    import javax.ejb.Stateless;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    @WebService(name="HelloWorldEARBean",serviceName="HelloWorldEARBeanService",targetNamespace="http://beans/",portName="HelloWorldEARBeanPort") @Stateless public class HelloWorldEARBean {
      @WebMethod public String sayHello(String testStr){
                return "Hello Mr. "+testStr;
      @WebMethod public String getReturn(String inputStr){
                return "the return value is"+inputStr;
    [/code]
    I tried it with the PEAR SOAP in the following script:
    [code]
    <?php
    require_once 'SOAP/Client.php';
    $wsdl_url     = 'http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean?wsdl';
    $WSDL = new SOAP_WSDL($wsdl_url);
    $client = $WSDL->getProxy();
    $client->__trace(1);
    $options=array('namespace' => 'http://beans/',
      'style' => 'rpc',
      'soapaction' => 'sayHello');
    $NAME = "Bob"; 
    $parameters=array(
         'parameters', $NAME
    $result = $client->getReturn($parameters);
    echo "<pre>";
    print_r($params);
    echo "</pre>";
    echo "<h2>return</h2>";
    echo "<pre>";
    print_r($result);
    echo "</pre>";
    echo '<h2>Request</h2>';
    echo '<pre>' . htmlspecialchars($client->__getlastrequest(), ENT_QUOTES) . '</pre>';
    echo '<h2>Response</h2>';
    echo '<pre>' . htmlspecialchars($client->__getlastresponse(), ENT_QUOTES). '</pre>';
    ?>
    [/code]
    The AS distributes the following WSDL:
    [code]
    - <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://beans/" xmlns:tns="http://beans/">
    - <wsdl:types>
    - <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://beans/">
      <xs:element name="getReturn" type="tns:getReturn" />
      <xs:element name="getReturnResponse" type="tns:getReturnResponse" />
      <xs:element name="sayHello" type="tns:sayHello" />
      <xs:element name="sayHelloResponse" type="tns:sayHelloResponse" />
    - <xs:complexType name="sayHello">
    - <xs:sequence>
      <xs:element name="arg0" type="xs:string" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
    - <xs:complexType name="sayHelloResponse">
    - <xs:sequence>
      <xs:element name="return" type="xs:string" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
    - <xs:complexType name="getReturn">
    - <xs:sequence>
      <xs:element name="arg0" type="xs:string" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
    - <xs:complexType name="getReturnResponse">
    - <xs:sequence>
      <xs:element name="return" type="xs:string" minOccurs="0" />
      </xs:sequence>
      </xs:complexType>
      </xs:schema>
      </wsdl:types>
    - <wsdl:message name="sayHelloIn">
      <wsdl:part name="parameters" element="tns:sayHello" />
      </wsdl:message>
    - <wsdl:message name="sayHelloOut">
      <wsdl:part name="sayHelloResponse" element="tns:sayHelloResponse" />
      </wsdl:message>
    - <wsdl:message name="getReturnIn">
      <wsdl:part name="parameters" element="tns:getReturn" />
      </wsdl:message>
    - <wsdl:message name="getReturnOut">
      <wsdl:part name="getReturnResponse" element="tns:getReturnResponse" />
      </wsdl:message>
    - <wsdl:portType name="HelloWorldEARBean">
    - <wsdl:operation name="sayHello" parameterOrder="parameters">
      <wsdl:input message="tns:sayHelloIn" />
      <wsdl:output message="tns:sayHelloOut" />
      </wsdl:operation>
    - <wsdl:operation name="getReturn" parameterOrder="parameters">
      <wsdl:input message="tns:getReturnIn" />
      <wsdl:output message="tns:getReturnOut" />
      </wsdl:operation>
      </wsdl:portType>
    - <wsdl:binding name="HelloWorldEARBeanBinding" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" type="tns:HelloWorldEARBean">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
    - <wsdl:operation name="sayHello">
      <soap:operation soapAction="" />
    - <wsdl:input>
      <soap:body parts="parameters" use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
    - <wsdl:operation name="getReturn">
      <soap:operation soapAction="" />
    - <wsdl:input>
      <soap:body parts="parameters" use="literal" />
      </wsdl:input>
    - <wsdl:output>
      <soap:body use="literal" />
      </wsdl:output>
      </wsdl:operation>
      </wsdl:binding>
    - <wsdl:service name="HelloWorldEARBeanService">
    - <wsdl:port name="HelloWorldEARBeanPort" binding="tns:HelloWorldEARBeanBinding">
      <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>
    [/code]
    By the following output it's obvious that the AS or the EJB (webservice) doesn't receive the parameter send by the PHP script. Look at the output:
    return value:
    the return value is null
    [code]
    Request:
    POST /HelloWorldEARBeanService/HelloWorldEARBean HTTP/1.0
    User-Agent: PEAR-SOAP 0.8.0RC4-devel
    Host: localhost
    Content-Type: text/xml; charset=UTF-8
    Content-Length: 438
    SOAPAction: ""
    <?xml version="1.0" encoding="UTF-8"?>
    <SOAP-ENV:Envelope  xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    >
    <SOAP-ENV:Body>
    <getReturn xmlns="http://beans/">
    <item>parameters</item>
    <item>Bob</item></getReturn>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Response:
    HTTP/1.1 200 OK
    server: SAP NetWeaver Application Server 7.10 / AS Java 7.10
    content-type: text/xml; charset=utf-8
    date: Wed, 14 Feb 2007 15:51:53 GMT
    connection: close
    <?xml version="1.0" encoding="utf-8"?>
    <SOAP-ENV:Envelope xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
    <SOAP-ENV:Header><wsse:Security xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
    <wsu:Timestamp xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
    <wsu:Created>2007-02-14T15:51:53Z</wsu:Created>
    <wsu:Expires>2007-02-14T15:52:23Z</wsu:Expires></wsu:Timestamp></wsse:Security></SOAP-ENV:Header>
    <SOAP-ENV:Body><ns2:getReturnResponse xmlns:ns2='http://beans/'>
    <return>the return value is null</return></ns2:getReturnResponse></SOAP-ENV:Body></SOAP-ENV:Envelope>
    [/code]
    I used different soap interfaces for PHP like nusoap and the integrated soap interface of PHP 5.
    Further I experimented with different parameters inside the function call
    that results in small differencies at the xml-request.
    Thanks.

    Hi
    I've solved the problem now. I just have to add
    @SOAPBinding(style=SOAPBinding.Style.RPC)
    in the EJB, that's all.
    Here is the complete code, ... maybe some other guys have this problem too, so I will post the working code:
    At first the EJB:
    package beans;
    import javax.ejb.Stateless;
    import javax.jws.WebParam;
    import javax.jws.WebService;
    import javax.jws.WebMethod;
    import javax.jws.soap.SOAPBinding;
    import beans.HelloWorldEARBean;
    @WebService(name="HelloWorldEARBean",serviceName="HelloWorldEARBeanService",targetNamespace="http://beans/",portName="HelloWorldEARBeanPort")
    @SOAPBinding(style=SOAPBinding.Style.RPC)
    @Stateless public class HelloWorldEARBean {
         @WebMethod public String sayHello(@WebParam(name="testStr") String testStr){
                return "Hello Mr. "+testStr;
    2. the local XML:
    <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://beans/" xmlns:tns="http://beans/">
      <wsdl:types>
        <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" version="1.0" targetNamespace="http://beans/">
          <xs:element name="sayHello" type="tns:sayHello"/>
          <xs:element name="sayHelloResponse" type="tns:sayHelloResponse"/>
          <xs:complexType name="sayHello">
              <xs:element name="testStr" type="xs:string" minOccurs="0"/>
          </xs:complexType>
          <xs:complexType name="sayHelloResponse">
              <xs:element name="return" type="xs:string" minOccurs="0"/>
          </xs:complexType>
        </xs:schema>
      </wsdl:types>
      <wsdl:message name="sayHelloIn">
        <wsdl:part name="parameters" element="tns:sayHello"/>
      </wsdl:message>
      <wsdl:message name="sayHelloOut">
        <wsdl:part name="sayHelloResponse" element="tns:sayHelloResponse"/>
      </wsdl:message>
      <wsdl:portType name="HelloWorldEARBean">
        <wsdl:operation name="sayHello" parameterOrder="parameters">
          <wsdl:input message="tns:sayHelloIn"/>
          <wsdl:output message="tns:sayHelloOut"/>
        </wsdl:operation>
      </wsdl:portType>
      <wsdl:binding name="HelloWorldEARBeanBinding" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" type="tns:HelloWorldEARBean">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="sayHello">
          <soap:operation soapAction=""/>
          <wsdl:input>
            <soap:body parts="parameters" use="literal"/>
          </wsdl:input>
          <wsdl:output>
            <soap:body use="literal"/>
          </wsdl:output>
        </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="HelloWorldEARBeanService">
        <wsdl:port name="HelloWorldEARBeanPort" binding="tns:HelloWorldEARBeanBinding">
          <soap:address xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" location="http://localhost:50000/HelloWorldEARBeanService/HelloWorldEARBean"/>
        </wsdl:port>
      </wsdl:service>
    </wsdl:definitions>
    3. the PHP script:
    see next post
    Thank you very much for your help.

  • Calling a method in another JVM instance

    I know you can use RMI to call the methods from classes across the network, but if the class is on the same machine, just in another JVM instance, is there a way to bypass the network layer and have the JVMs communicate directly with each other?

    Its not so much the overhead, as having the
    flexibility, to not have to modify firewall rules
    which disallow loop back traffic and most other non
    http (port 80) traffic if the production server is
    set up that way.You're coding to interfaces anyway, have a factory return either an RMI object which does the actual RMI work, or just a vanilla one if you're just running locally. As far as I know, there isn't a way to entirely circumvent the socket layer with RMI. Anyone know any different?

  • Call jpf method from jsp

    Is there anyway to call a method in Controller.jpf from a jsp page? I want to have my jsp page call a method from the jpf controller through an onChange event in the select tag. Otherwise I will have to write a large amount of javascript directly into my jsp page and really defeats the purpose of the MVC architecture. Any help is greatly appreciated. Thanks in advance.

    The jsp might look something like this:
    <netui:form action="DoThisOnChange">
    <!--all other jsp stuff-->
    <netui:select dataSource"" optionsDataSource="" onChange="this.form.submit()"/>
    </netui:form>
    And in JPF declare action named "DoThisOnChange" and write the logic to be done on event "onChange".
    --SJ                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • How can we call the method of used controller?

    Hi All,
       i created two WDA Applications.( like YWDA1,YWDA2 ) . i am using the component WDA2 in WDA 1.and displaying the one view of WDA2 as popup window in WDA1 on action of one of the input element in the view of WDA1 by using the method l_window_manager->create_window_for_cmp_usage
    I have a button on the view of WDA2 which has appear in the popup window...how can i call the method which has binded to that button....and where should i code that...and i need to assign selected value in the popup window to input elemetn of view  WDA1
    Please help me to resolve this....
    Regards,
    Ravi

    You can not directly call view's event handler from other component.
    create a method in component controller of the second component and in the button click call the component controller method. ( also make the method as interface so that you can call it from other components )
    Now, you can call the interfacecontroller's method
    DATA: l_ref_INTERFACECONTROLLER TYPE REF TO ZIWCI__VSTX_REBATE_REQ_WD .
      l_ref_INTERFACECONTROLLER =   wd_This->wd_CpIfc_<comp usage name>( ).
      l_ref_INTERFACECONTROLLER->Save_Rr(
        STATUS = '01'                       " Zvstxrrstatus
    save_rr is the method of second component controller

Maybe you are looking for

  • Deployment Rule Set broken with Java 7u55

    Hello! I'm using Deployment Rule Set in my company environment, its signed by code signing certificate that is given out by internal CA. After I upgraded to Java 7u55, the Deployment Rule Set does not recognize older statically installed Java version

  • Initialize Tape Error

    Dear All, When we are initializing the tape or taking the backup in first attempt, the following errors hav occured : 25.12.2007 18:36:49 Job started 25.12.2007 18:36:49 Step 001 started (program RSDBAJOB, variant &0000000002466, user ID JITENDRA) 25

  • Unable to install  the latest update security 2007-2009

    I have try several times to install the latest security update 2007-2009 but during installation a window pop out and read the installer could not validate the contents of the "secupd2007-009" package. Contact the software manufacturers for assistanc

  • Is there a fault with the Notes App?

    Very recently, I started to see some of my notes on my Notes App on my iPhone 4GS being duplicated, and when I deleted the duplicate, both disappeared, and an odd empty gap was left between the previous and subsequent notes.  The problem then seemed

  • Installing itunes on a windows vista computer

    When I did the download and install I received this message Could not access network location %APPDATA%\. What is this and how do I correct it in order to put i-tunes on this computer? Thanks