anonymous wrote : A simple java client should have a main function or not? Depends on how you gonna run your client. In the examples you've looked at the client is ran as a JUnit Test Case. If you want to run your client stand-alone, of course you will need a main method.
If you deploy ws4ee-samples-server-jse.war from the examples and you want to write a a simple java client the consumes it Use wscompile to generate the needed artifacts from the wsdl file. | Write you main class and use of the generated artifacts | | config.xml for wscompile | <configuration | | xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config"> | | <wsdl location="http://localhost:8080/ws4ee-samples-server-jse/Organization?wsdl" | | packageName="show.me"> | | </wsdl> | | </configuration> | | Your main class: | | | package show.me; | | | | /** | | * A SimpleWSClient. | | * | | */ | | public class SimpleWSClient | | { | | | | public static void main(String[] args) | | { | | try | | { | | OrganizationService_Impl srv = new OrganizationService_Impl(); | | Organization port = srv.getOrganizationPort(); | | System.out.println(port.getContactInfo("Test")); | | } | | catch (Exception e) | | { | | e.printStackTrace(); | | } | | } | | } | | output: | The 'Test' boss is currently out of office, please call again. | | http://jboss.com/wiki/Wiki.jsp?page=JBossWS | http://java.sun.com/webservices/docs/1.4/tutorial/doc/index.html | https://bpcatalog.dev.java.net/nonav/soa/standalone-client/frames.html | View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3909742#3909742 Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3909742 ------------------------------------------------------- This SF.net email is sponsored by: Splunk Inc. Do you grep through log files for problems? Stop! Download the new AJAX search engine that makes searching your log files as easy as surfing the web. DOWNLOAD SPLUNK! http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click _______________________________________________ JBoss-user mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jboss-user
