⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 webserviceclient.java

📁 BEA WebLogic Server 8.1大全 = BEA webLogic server 8.1 unleashed (美) Mark Artiges等著 袁毅 ... [等] 译 eng
💻 JAVA
字号:
package com.wlsunleashed.webservices.javaclass;

/**
 * Class WebServiceClient
 * Description: A static Web Service client for the TestWS Web Service
 */

public class WebServiceClient {
	public static void main(String[] args) {
	    // Setup the global JAXM message factory    
	    System.setProperty("javax.xml.soap.MessageFactory",      
	    	"weblogic.webservice.core.soap.MessageFactoryImpl");    
	    // Setup the global JAX-RPC service factory    
	    System.setProperty( "javax.xml.rpc.ServiceFactory",      
	    	"weblogic.webservice.core.rpc.ServiceFactoryImpl");    
	    	
	    // Parse the argument list    
	    WebServiceClient client = new WebServiceClient();
	    String wsdl = (args.length > 0? args[0] : null);    
	    client.callWS(wsdl);  
	}
	
	public void callWS(String wsdlURI) {
		try {
			TestWSPort testWS = null;
			if (wsdlURI == null) {
				testWS = new TestWS_Impl().getTestWSPort();
			} else {
				testWS = new TestWS_Impl(wsdlURI).getTestWSPort();
			}
	
			String str = testWS.getGreeting("Jessie Marin");
			System.out.println(str);			
			
		} catch (Exception e) {
			e.printStackTrace();
		}
			
	}        
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -