001 /**
002 * ReportIncidentBindingStub.java
003 *
004 * This file was auto-generated from WSDL
005 * by the Apache Axis 1.4 Apr 22, 2006 (06:55:48 PDT) WSDL2Java emitter.
006 */
007
008 package org.apache.camel.example.reportincident;
009
010 public class ReportIncidentBindingStub extends org.apache.axis.client.Stub implements org.apache.camel.example.reportincident.ReportIncidentService_PortType {
011 private java.util.Vector cachedSerClasses = new java.util.Vector();
012 private java.util.Vector cachedSerQNames = new java.util.Vector();
013 private java.util.Vector cachedSerFactories = new java.util.Vector();
014 private java.util.Vector cachedDeserFactories = new java.util.Vector();
015
016 static org.apache.axis.description.OperationDesc [] _operations;
017
018 static {
019 _operations = new org.apache.axis.description.OperationDesc[1];
020 _initOperationDesc1();
021 }
022
023 private static void _initOperationDesc1(){
024 org.apache.axis.description.OperationDesc oper;
025 org.apache.axis.description.ParameterDesc param;
026 oper = new org.apache.axis.description.OperationDesc();
027 oper.setName("ReportIncident");
028 param = new org.apache.axis.description.ParameterDesc(new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", "inputReportIncident"), org.apache.axis.description.ParameterDesc.IN, new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", ">inputReportIncident"), org.apache.camel.example.reportincident.InputReportIncident.class, false, false);
029 oper.addParameter(param);
030 oper.setReturnType(new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", ">outputReportIncident"));
031 oper.setReturnClass(org.apache.camel.example.reportincident.OutputReportIncident.class);
032 oper.setReturnQName(new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", "outputReportIncident"));
033 oper.setStyle(org.apache.axis.constants.Style.DOCUMENT);
034 oper.setUse(org.apache.axis.constants.Use.LITERAL);
035 _operations[0] = oper;
036
037 }
038
039 public ReportIncidentBindingStub() throws org.apache.axis.AxisFault {
040 this(null);
041 }
042
043 public ReportIncidentBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
044 this(service);
045 super.cachedEndpoint = endpointURL;
046 }
047
048 public ReportIncidentBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
049 if (service == null) {
050 super.service = new org.apache.axis.client.Service();
051 } else {
052 super.service = service;
053 }
054 ((org.apache.axis.client.Service)super.service).setTypeMappingVersion("1.2");
055 java.lang.Class cls;
056 javax.xml.namespace.QName qName;
057 javax.xml.namespace.QName qName2;
058 java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
059 java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
060 java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
061 java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
062 java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
063 java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
064 java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
065 java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
066 java.lang.Class simplelistsf = org.apache.axis.encoding.ser.SimpleListSerializerFactory.class;
067 java.lang.Class simplelistdf = org.apache.axis.encoding.ser.SimpleListDeserializerFactory.class;
068 qName = new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", ">inputReportIncident");
069 cachedSerQNames.add(qName);
070 cls = org.apache.camel.example.reportincident.InputReportIncident.class;
071 cachedSerClasses.add(cls);
072 cachedSerFactories.add(beansf);
073 cachedDeserFactories.add(beandf);
074
075 qName = new javax.xml.namespace.QName("http://reportincident.example.camel.apache.org", ">outputReportIncident");
076 cachedSerQNames.add(qName);
077 cls = org.apache.camel.example.reportincident.OutputReportIncident.class;
078 cachedSerClasses.add(cls);
079 cachedSerFactories.add(beansf);
080 cachedDeserFactories.add(beandf);
081
082 }
083
084 protected org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
085 try {
086 org.apache.axis.client.Call _call = super._createCall();
087 if (super.maintainSessionSet) {
088 _call.setMaintainSession(super.maintainSession);
089 }
090 if (super.cachedUsername != null) {
091 _call.setUsername(super.cachedUsername);
092 }
093 if (super.cachedPassword != null) {
094 _call.setPassword(super.cachedPassword);
095 }
096 if (super.cachedEndpoint != null) {
097 _call.setTargetEndpointAddress(super.cachedEndpoint);
098 }
099 if (super.cachedTimeout != null) {
100 _call.setTimeout(super.cachedTimeout);
101 }
102 if (super.cachedPortName != null) {
103 _call.setPortName(super.cachedPortName);
104 }
105 java.util.Enumeration keys = super.cachedProperties.keys();
106 while (keys.hasMoreElements()) {
107 java.lang.String key = (java.lang.String) keys.nextElement();
108 _call.setProperty(key, super.cachedProperties.get(key));
109 }
110 // All the type mapping information is registered
111 // when the first call is made.
112 // The type mapping information is actually registered in
113 // the TypeMappingRegistry of the service, which
114 // is the reason why registration is only needed for the first call.
115 synchronized (this) {
116 if (firstCall()) {
117 // must set encoding style before registering serializers
118 _call.setEncodingStyle(null);
119 for (int i = 0; i < cachedSerFactories.size(); ++i) {
120 java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
121 javax.xml.namespace.QName qName =
122 (javax.xml.namespace.QName) cachedSerQNames.get(i);
123 java.lang.Object x = cachedSerFactories.get(i);
124 if (x instanceof Class) {
125 java.lang.Class sf = (java.lang.Class)
126 cachedSerFactories.get(i);
127 java.lang.Class df = (java.lang.Class)
128 cachedDeserFactories.get(i);
129 _call.registerTypeMapping(cls, qName, sf, df, false);
130 }
131 else if (x instanceof javax.xml.rpc.encoding.SerializerFactory) {
132 org.apache.axis.encoding.SerializerFactory sf = (org.apache.axis.encoding.SerializerFactory)
133 cachedSerFactories.get(i);
134 org.apache.axis.encoding.DeserializerFactory df = (org.apache.axis.encoding.DeserializerFactory)
135 cachedDeserFactories.get(i);
136 _call.registerTypeMapping(cls, qName, sf, df, false);
137 }
138 }
139 }
140 }
141 return _call;
142 }
143 catch (java.lang.Throwable _t) {
144 throw new org.apache.axis.AxisFault("Failure trying to get the Call object", _t);
145 }
146 }
147
148 public org.apache.camel.example.reportincident.OutputReportIncident reportIncident(org.apache.camel.example.reportincident.InputReportIncident parameters) throws java.rmi.RemoteException {
149 if (super.cachedEndpoint == null) {
150 throw new org.apache.axis.NoEndPointException();
151 }
152 org.apache.axis.client.Call _call = createCall();
153 _call.setOperation(_operations[0]);
154 _call.setUseSOAPAction(true);
155 _call.setSOAPActionURI("http://reportincident.example.camel.apache.org/ReportIncident");
156 _call.setEncodingStyle(null);
157 _call.setProperty(org.apache.axis.client.Call.SEND_TYPE_ATTR, Boolean.FALSE);
158 _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
159 _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
160 _call.setOperationName(new javax.xml.namespace.QName("", "ReportIncident"));
161
162 setRequestHeaders(_call);
163 setAttachments(_call);
164 try { java.lang.Object _resp = _call.invoke(new java.lang.Object[] {parameters});
165
166 if (_resp instanceof java.rmi.RemoteException) {
167 throw (java.rmi.RemoteException)_resp;
168 }
169 else {
170 extractAttachments(_call);
171 try {
172 return (org.apache.camel.example.reportincident.OutputReportIncident) _resp;
173 } catch (java.lang.Exception _exception) {
174 return (org.apache.camel.example.reportincident.OutputReportIncident) org.apache.axis.utils.JavaUtils.convert(_resp, org.apache.camel.example.reportincident.OutputReportIncident.class);
175 }
176 }
177 } catch (org.apache.axis.AxisFault axisFaultException) {
178 throw axisFaultException;
179 }
180 }
181
182 }