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


/** 
 * RenderServer3DSoapBindingStub.java 
 * 
 * This file was auto-generated from WSDL 
 * by the Apache Axis Wsdl2java emitter. 
 */ 
 
package com.xara.soap; 
 
public class RenderServer3DSoapBindingStub extends org.apache.axis.client.Stub implements com.xara.soap.RenderServer3DSoapPort { 
    private java.util.Vector cachedSerClasses = new java.util.Vector(); 
    private java.util.Vector cachedSerQNames = new java.util.Vector(); 
    private java.util.Vector cachedSerFactories = new java.util.Vector(); 
    private java.util.Vector cachedDeserFactories = new java.util.Vector(); 
 
    public RenderServer3DSoapBindingStub() throws org.apache.axis.AxisFault { 
         this(null); 
    } 
 
    public RenderServer3DSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 
         this(service); 
         super.cachedEndpoint = endpointURL; 
    } 
 
    public RenderServer3DSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault { 
        try { 
            if (service == null) { 
                super.service = new org.apache.axis.client.Service(); 
            } else { 
                super.service = service; 
            } 
            Class cls; 
            javax.xml.rpc.namespace.QName qName; 
            Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class; 
            Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class; 
            Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class; 
            Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class; 
            Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class; 
            Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class; 
            Class simplesf = org.apache.axis.encoding.ser.SimpleNonPrimitiveSerializerFactory.class; 
            Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class; 
            qName = new javax.xml.rpc.namespace.QName("http://soap.xara.com/type", "ArrayOfstring"); 
            cachedSerQNames.add(qName); 
            cls = java.lang.Object[].class; 
            cachedSerClasses.add(cls); 
            cachedSerFactories.add(arraysf); 
            cachedDeserFactories.add(arraydf); 
 
        } 
        catch(java.lang.Exception t) { 
            throw org.apache.axis.AxisFault.makeFault(t); 
        } 
    } 
 
    private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException { 
        try { 
            org.apache.axis.client.Call call = 
                    (org.apache.axis.client.Call) super.service.createCall(); 
            if (super.maintainSessionSet) { 
                call.setMaintainSession(super.maintainSession); 
            } 
            if (super.cachedUsername != null) { 
                call.setUsername(super.cachedUsername); 
            } 
            if (super.cachedPassword != null) { 
                call.setPassword(super.cachedPassword); 
            } 
            if (super.cachedEndpoint != null) { 
                call.setTargetEndpointAddress(super.cachedEndpoint); 
            } 
            if (super.cachedTimeout != null) { 
                call.setTimeout(super.cachedTimeout); 
            } 
            java.util.Enumeration keys = super.cachedProperties.keys(); 
            while (keys.hasMoreElements()) { 
                String key = (String) keys.nextElement(); 
                call.setProperty(key, super.cachedProperties.get(key)); 
            } 
            // All the type mapping information is registered 
            // when the first call is made. 
            // The type mapping information is actually registered in 
            // the TypeMappingRegistry of the service, which 
            // is the reason why registration is only needed for the first call. 
            if (firstCall()) { 
                // must set encoding style before registering serializers 
                call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP_ENC); 
                for (int i = 0; i < cachedSerFactories.size(); ++i) { 
                    Class cls = (Class) cachedSerClasses.get(i); 
                    javax.xml.rpc.namespace.QName qName = 
                            (javax.xml.rpc.namespace.QName) cachedSerQNames.get(i); 
                    Class sf = (Class) 
                             cachedSerFactories.get(i); 
                    Class df = (Class) 
                             cachedDeserFactories.get(i); 
                    call.registerTypeMapping(cls, qName, sf, df, false); 
                } 
            } 
            return call; 
        } 
        catch (Throwable t) { 
            throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t); 
        } 
    } 
 
    public void renderURL(java.lang.String template, java.lang.String text, java.lang.String textColor, java.lang.String BGColor, java.lang.String font, java.lang.String fontSize, java.lang.String exportType, javax.xml.rpc.holders.StringHolder URL, javax.xml.rpc.holders.LongHolder width, javax.xml.rpc.holders.LongHolder height) throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        javax.xml.rpc.namespace.QName p0QName = new javax.xml.rpc.namespace.QName("", "Template"); 
        call.addParameter(p0QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p1QName = new javax.xml.rpc.namespace.QName("", "Text"); 
        call.addParameter(p1QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p2QName = new javax.xml.rpc.namespace.QName("", "TextColor"); 
        call.addParameter(p2QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p3QName = new javax.xml.rpc.namespace.QName("", "BGColor"); 
        call.addParameter(p3QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p4QName = new javax.xml.rpc.namespace.QName("", "Font"); 
        call.addParameter(p4QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p5QName = new javax.xml.rpc.namespace.QName("", "FontSize"); 
        call.addParameter(p5QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p6QName = new javax.xml.rpc.namespace.QName("", "ExportType"); 
        call.addParameter(p6QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.IN); 
        javax.xml.rpc.namespace.QName p7QName = new javax.xml.rpc.namespace.QName("", "URL"); 
        call.addParameter(p7QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, javax.xml.rpc.ParameterMode.OUT); 
        javax.xml.rpc.namespace.QName p8QName = new javax.xml.rpc.namespace.QName("", "Width"); 
        call.addParameter(p8QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, javax.xml.rpc.ParameterMode.OUT); 
        javax.xml.rpc.namespace.QName p9QName = new javax.xml.rpc.namespace.QName("", "Height"); 
        call.addParameter(p9QName, new javax.xml.rpc.namespace.QName("http://www.w3.org/2001/XMLSchema", "long"), long.class, javax.xml.rpc.ParameterMode.OUT); 
        call.setReturnType(org.apache.axis.encoding.XMLType.AXIS_VOID); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI("http://soap.xara.com/action/RenderServer3D.RenderURL"); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("http://soap.xara.com/message/", "RenderURL")); 
 
        Object resp = call.invoke(new Object[] {template, text, textColor, BGColor, font, fontSize, exportType}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            java.util.Map output; 
            output = call.getOutputParams(); 
            try { 
                URL.value =(java.lang.String) output.get(new javax.xml.rpc.namespace.QName("", "URL")); 
            } catch (java.lang.Exception e) { 
                URL.value =(java.lang.String) org.apache.axis.utils.JavaUtils.convert(output.get(new javax.xml.rpc.namespace.QName("", "URL")), java.lang.String.class); 
            } 
            try { 
                width.value =((Long) output.get(new javax.xml.rpc.namespace.QName("", "Width"))).longValue(); 
            } catch (java.lang.Exception e) { 
                width.value =((Long) org.apache.axis.utils.JavaUtils.convert(output.get(new javax.xml.rpc.namespace.QName("", "Width")), long.class)).longValue(); 
            } 
            try { 
                height.value =((Long) output.get(new javax.xml.rpc.namespace.QName("", "Height"))).longValue(); 
            } catch (java.lang.Exception e) { 
                height.value =((Long) org.apache.axis.utils.JavaUtils.convert(output.get(new javax.xml.rpc.namespace.QName("", "Height")), long.class)).longValue(); 
            } 
              return ; 
        } 
    } 
 
    public java.lang.Object[] getTemplates() throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://soap.xara.com/type", "ArrayOfstring")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI("http://soap.xara.com/action/RenderServer3D.GetTemplates"); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("http://soap.xara.com/message/", "GetTemplates")); 
 
        Object resp = call.invoke(new Object[] {}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.Object[]) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.Object[].class); 
            } 
        } 
    } 
 
    public java.lang.Object[] getFonts() throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://soap.xara.com/type", "ArrayOfstring")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI("http://soap.xara.com/action/RenderServer3D.GetFonts"); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("http://soap.xara.com/message/", "GetFonts")); 
 
        Object resp = call.invoke(new Object[] {}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.Object[]) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.Object[].class); 
            } 
        } 
    } 
 
    public java.lang.Object[] getExportTypes() throws java.rmi.RemoteException{ 
        if (super.cachedEndpoint == null) { 
            throw new org.apache.axis.NoEndPointException(); 
        } 
        org.apache.axis.client.Call call = createCall(); 
        call.setReturnType(new javax.xml.rpc.namespace.QName("http://soap.xara.com/type", "ArrayOfstring")); 
        call.setUseSOAPAction(true); 
        call.setSOAPActionURI("http://soap.xara.com/action/RenderServer3D.GetExportTypes"); 
        call.setOperationStyle("rpc"); 
        call.setOperationName(new javax.xml.rpc.namespace.QName("http://soap.xara.com/message/", "GetExportTypes")); 
 
        Object resp = call.invoke(new Object[] {}); 
 
        if (resp instanceof java.rmi.RemoteException) { 
            throw (java.rmi.RemoteException)resp; 
        } 
        else { 
            try { 
                return (java.lang.Object[]) resp; 
            } catch (java.lang.Exception e) { 
                return (java.lang.Object[]) org.apache.axis.utils.JavaUtils.convert(resp, java.lang.Object[].class); 
            } 
        } 
    } 
 
}