www.pudn.com > google_examples.zip > My3DRenderer.java, change:2002-05-05,size:1631b


import com.xara.soap.*; 
import java.net.URL; 
import javax.xml.rpc.holders.*; 
 
/* 
 
 My3DRenderer.java 
  
 This is a test client that invokes a 3D graphics rendering service. Note, 
 this web service uses output parameters instead of a return value. 
 For more information, see http://ws.xara.com/graphicrender/soap/render3d/info.asp.  
  
 Sample output: 
 
 E:\test>java My3DRenderer 
 return_url=http://ws.xara.com/graphicpub/render_20020505_14/7f169e00.gif 
 return_width=283 
 return_height=28 
 
*/ 
 
public class My3DRenderer { 
	 
	public static void main(String[] args) { 
		try { 
			String template = "Coolsville"; 
			String text = "Koko Taylor Rocks!"; 
			String textColor = "9999FF"; 
			String bgColor = "CCCCFF"; 
			String font = "Coolsville Regular"; 
			String fontSize = "18"; 
			String exportType = "gif"; 
 
			StringHolder return_url = new StringHolder(); 
			LongHolder return_width = new LongHolder(); 
			LongHolder return_height = new LongHolder(); 
 
			RenderServer3DLocator locator = new RenderServer3DLocator(); 
			String serviceURL = locator.getRenderServer3DSoapPortAddress(); 
			RenderServer3DSoapBindingStub soapstub = new RenderServer3DSoapBindingStub(new URL(serviceURL), null); 
	 
			soapstub.renderURL(template, text, textColor, bgColor, font, fontSize, exportType, return_url, return_width, return_height); 
			System.out.println("return_url=" + return_url.value); 
			System.out.println("return_width=" + return_width.value); 
			System.out.println("return_height=" + return_height.value); 
 
		} catch (Exception e) { 
			e.printStackTrace(); 
			System.exit(0); 
		} 
 
	} 
 
}