Hi shiv 

Shiv: 
     well.. i have that class "instanciacao" in the JBOSS Server like a "Web 
Service".. and i am invoking her from a client:

 Here is the code of the cliente..
<% // includes necessários para ligar a um web service em AXIS %>
<%@ page import="org.apache.axis.client.Call" %>
<%@ page import="org.apache.axis.client.Service" %>
<%@ page import="org.apache.axis.encoding.XMLType" %>
<%@ page import="javax.xml.rpc.ParameterMode" %>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">








    Introduza o nome do processo a ser instanciado: 
    Introduza o valor da encomenda que deseja efectuar: 
        
                

        



<% 


if (!(request.getParameter("num1")==null))
{
        if(!(request.getParameter("num1").equals("")))
        {
        String n1 = request.getParameter("num1"); 
        Integer n2 = new Integer(request.getParameter("num2")); 

String endpoint = "http://localhost:8080/axis/instanciacao.jws";;
                        
//instânciar axis e call
Service service = new Service();         
        Call call = (Call) service.createCall();

//url de ligação
        call.setTargetEndpointAddress( new java.net.URL(endpoint) ); 
                        
//nome do método a chamar
        call.setOperationName( "inst" ); 
                
//definir nomes do parametros a enviar
 //     configg=2;
call.addParameter( "i", XMLType.XSD_INT, ParameterMode.IN ); 
call.addParameter( "numero", XMLType.XSD_INT, ParameterMode.IN );




//definir o tipo de retorno
        call.setReturnType(XMLType.XSD_ANYTYPE);

//invocar o web service e imprimir o resultado na pagina
        call.invoke(new Object[]{n1,n2});
//      out.println("Resultado: "+ret);
}
}

        %>


 

Shiv please take note that i am already changed the service.. so at this time 
the client choose the process name to instanciate and chage the value of one 
variable of that process..but you only have to change one or to thing to work 
with that class that i put here..if you have any more questions..please ask...
I don´t make any changes to the configuration file... that service and this 
client(with a few changes) is enough to make the process start..


 

View the original post : 
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3950856#3950856

Reply to the post : 
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3950856


_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to