[jboss-user] [Beginner's Corner] - Web Service Cliente
luiz syncode
do-not-reply at jboss.com
Fri Jun 25 15:24:36 EDT 2010
luiz syncode [http://community.jboss.org/people/luizsync] replied to the discussion
"Web Service Cliente"
To view the discussion, visit: http://community.jboss.org/message/549757#549757
--------------------------------------------------------------
Thanks for your answer!
I solved the question with another tutorial:
http://www.personati.com/artigos/web_services.pdf http://www.personati.com/artigos/web_services.pdf
//===========================================================
package web_service_teste;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
public class web_teste
{
public static void main(String[] args)
{
try
{
String urlWS = " http://localhost:8080/web_service/services/HelloWorld http://localhost:8080/web_service/services/HelloWorld";
Object[] params = { "ooo" };
Service service = new Service();
Call call = (Call) service.createCall();
call.setOperationStyle(org.apache.axis.constants.Style.WRAPPED);
call.setOperationUse(org.apache.axis.constants.Use.LITERAL);
call.setTargetEndpointAddress(urlWS);
call.setOperationName("sayHello");
String ret = (String) call.invoke(params);
System.out.println("Resultado: " + ret);
}
catch (Exception ex)
{
ex.printStackTrace();
}
}
}
//======================================================
We can not forget the jars:
axis.jar
jaxrpc.jar
commons-logging.jar
commons-discovery.jar
saaj.jar
wsdl4j.jar
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/549757#549757]
Start a new discussion in Beginner's Corner at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2075]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100625/7f9c7b30/attachment.html
More information about the jboss-user
mailing list