001: /**
002: * SupplierWebServiceSoapBindingStub.java
003: *
004: * This file was auto-generated from WSDL
005: * by the Apache Axis WSDL2Java emitter.
006: */package com.sun.j2ee.blueprints.opc.webservice.supplierclient;
007:
008:public class SupplierWebServiceSoapBindingStub extends org.apache.axis.client.Stub implements com.sun.j2ee.blueprints.opc.webservice.supplierclient.SupplierServiceImpl {
009: private java.util.Vector cachedSerClasses = new java.util.Vector();
010: private java.util.Vector cachedSerQNames = new java.util.Vector();
011: private java.util.Vector cachedSerFactories = new java.util.Vector();
012: private java.util.Vector cachedDeserFactories = new java.util.Vector();
013:
014: static org.apache.axis.description.OperationDesc [] _operations;
015:
016: static {
017: _operations = new org.apache.axis.description.OperationDesc[2];
018: org.apache.axis.description.OperationDesc oper;
019: oper = new org.apache.axis.description.OperationDesc();
020: oper.setName("submitOrder");
021: oper.addParameter(new javax.xml.namespace.QName("", "in0"), new javax.xml.namespace.QName("http://xml.apache.org/xml-soap", "Source"), javax.xml.transform.Source.class, org.apache.axis.description.ParameterDesc.IN, false, false);
022: oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
023: oper.setReturnClass(java.lang.String.class);
024: oper.setReturnQName(new javax.xml.namespace.QName("", "submitOrderReturn"));
025: oper.addFault(new org.apache.axis.description.FaultDesc(
026: new javax.xml.namespace.QName("http://localhost:8080/supplier/services/SupplierWebService", "fault"),
027: "com.sun.j2ee.blueprints.opc.webservice.supplierclient.InvalidOrderException",
028: new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "InvalidOrderException"),
029: true
030: ));
031: _operations[0] = oper;
032:
033: oper = new org.apache.axis.description.OperationDesc();
034: oper.setName("queryOrderStatus");
035: oper.addParameter(new javax.xml.namespace.QName("", "in0"), new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"), java.lang.String.class, org.apache.axis.description.ParameterDesc.IN, false, false);
036: oper.setReturnType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
037: oper.setReturnClass(java.lang.String.class);
038: oper.setReturnQName(new javax.xml.namespace.QName("", "queryOrderStatusReturn"));
039: oper.setStyle(org.apache.axis.enum.Style.RPC);
040: oper.setUse(org.apache.axis.enum.Use.ENCODED);
041: oper.addFault(new org.apache.axis.description.FaultDesc(
042: new javax.xml.namespace.QName("http://localhost:8080/supplier/services/SupplierWebService", "fault"),
043: "com.sun.j2ee.blueprints.opc.webservice.supplierclient.UnknownOrderIdException",
044: new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "UnknownOrderIdException"),
045: true
046: ));
047: _operations[1] = oper;
048:
049: }
050:
051: public SupplierWebServiceSoapBindingStub() throws org.apache.axis.AxisFault {
052: this (null);
053: }
054:
055: public SupplierWebServiceSoapBindingStub(java.net.URL endpointURL, javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
056: this (service);
057: super .cachedEndpoint = endpointURL;
058: }
059:
060: public SupplierWebServiceSoapBindingStub(javax.xml.rpc.Service service) throws org.apache.axis.AxisFault {
061: if (service == null) {
062: super .service = new org.apache.axis.client.Service();
063: } else {
064: super .service = service;
065: }
066: java.lang.Class cls;
067: javax.xml.namespace.QName qName;
068: java.lang.Class beansf = org.apache.axis.encoding.ser.BeanSerializerFactory.class;
069: java.lang.Class beandf = org.apache.axis.encoding.ser.BeanDeserializerFactory.class;
070: java.lang.Class enumsf = org.apache.axis.encoding.ser.EnumSerializerFactory.class;
071: java.lang.Class enumdf = org.apache.axis.encoding.ser.EnumDeserializerFactory.class;
072: java.lang.Class arraysf = org.apache.axis.encoding.ser.ArraySerializerFactory.class;
073: java.lang.Class arraydf = org.apache.axis.encoding.ser.ArrayDeserializerFactory.class;
074: java.lang.Class simplesf = org.apache.axis.encoding.ser.SimpleSerializerFactory.class;
075: java.lang.Class simpledf = org.apache.axis.encoding.ser.SimpleDeserializerFactory.class;
076: java.lang.Class mimesf = org.apache.axis.encoding.ser.JAFDataHandlerSerializerFactory.class;
077: java.lang.Class mimedf = org.apache.axis.encoding.ser.JAFDataHandlerDeserializerFactory.class;
078:
079: qName = new javax.xml.namespace.QName("http://localhost:8080/supplier/services/SupplierWebService", "DataHandler");
080: cachedSerQNames.add(qName);
081: cls = javax.activation.DataHandler.class;
082: cachedSerClasses.add(cls);
083: cachedSerFactories.add(mimesf);
084: cachedDeserFactories.add(mimedf);
085:
086: qName = new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "InvalidOrderException");
087: cachedSerQNames.add(qName);
088: cls = com.sun.j2ee.blueprints.opc.webservice.supplierclient.InvalidOrderException.class;
089: cachedSerClasses.add(cls);
090: cachedSerFactories.add(beansf);
091: cachedDeserFactories.add(beandf);
092:
093: qName = new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "UnknownOrderIdException");
094: cachedSerQNames.add(qName);
095: cls = com.sun.j2ee.blueprints.opc.webservice.supplierclient.UnknownOrderIdException.class;
096: cachedSerClasses.add(cls);
097: cachedSerFactories.add(beansf);
098: cachedDeserFactories.add(beandf);
099:
100: }
101:
102: private org.apache.axis.client.Call createCall() throws java.rmi.RemoteException {
103: try {
104: org.apache.axis.client.Call _call =
105: (org.apache.axis.client.Call) super .service.createCall();
106: if (super .maintainSessionSet) {
107: _call.setMaintainSession(super .maintainSession);
108: }
109: if (super .cachedUsername != null) {
110: _call.setUsername(super .cachedUsername);
111: }
112: if (super .cachedPassword != null) {
113: _call.setPassword(super .cachedPassword);
114: }
115: if (super .cachedEndpoint != null) {
116: _call.setTargetEndpointAddress(super .cachedEndpoint);
117: }
118: if (super .cachedTimeout != null) {
119: _call.setTimeout(super .cachedTimeout);
120: }
121: if (super .cachedPortName != null) {
122: _call.setPortName(super .cachedPortName);
123: }
124: java.util.Enumeration keys = super .cachedProperties.keys();
125: while (keys.hasMoreElements()) {
126: java.lang.String key = (java.lang.String) keys.nextElement();
127: _call.setProperty(key, super .cachedProperties.get(key));
128: }
129: // All the type mapping information is registered
130: // when the first call is made.
131: // The type mapping information is actually registered in
132: // the TypeMappingRegistry of the service, which
133: // is the reason why registration is only needed for the first call.
134: synchronized (this ) {
135: if (firstCall()) {
136: // must set encoding style before registering serializers
137: _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
138: _call.setEncodingStyle(org.apache.axis.Constants.URI_SOAP11_ENC);
139: for (int i = 0; i < cachedSerFactories.size(); ++i) {
140: java.lang.Class cls = (java.lang.Class) cachedSerClasses.get(i);
141: javax.xml.namespace.QName qName =
142: (javax.xml.namespace.QName) cachedSerQNames.get(i);
143: java.lang.Class sf = (java.lang.Class)
144: cachedSerFactories.get(i);
145: java.lang.Class df = (java.lang.Class)
146: cachedDeserFactories.get(i);
147: _call.registerTypeMapping(cls, qName, sf, df, false);
148: }
149: }
150: }
151: return _call;
152: }
153: catch (java.lang.Throwable t) {
154: throw new org.apache.axis.AxisFault("Failure trying to get the Call object", t);
155: }
156: }
157:
158: public java.lang.String submitOrder(javax.xml.transform.Source in0) throws java.rmi.RemoteException, com.sun.j2ee.blueprints.opc.webservice.supplierclient.InvalidOrderException {
159: if (super .cachedEndpoint == null) {
160: throw new org.apache.axis.NoEndPointException();
161: }
162: org.apache.axis.client.Call _call = createCall();
163: _call.setOperation(_operations[0]);
164: _call.setUseSOAPAction(true);
165: _call.setSOAPActionURI("");
166: _call.setProperty(org.apache.axis.AxisEngine.PROP_DOMULTIREFS, Boolean.FALSE);
167: _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
168: _call.setOperationName(new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "submitOrder"));
169:
170: setRequestHeaders(_call);
171: setAttachments(_call);
172: java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
173:
174: if (_resp instanceof java.rmi.RemoteException) {
175: throw (java.rmi.RemoteException)_resp;
176: }
177: else {
178: extractAttachments(_call);
179: try {
180: return (java.lang.String) _resp;
181: } catch (java.lang.Exception _exception) {
182: return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
183: }
184: }
185: }
186:
187: public java.lang.String queryOrderStatus(java.lang.String in0) throws java.rmi.RemoteException, com.sun.j2ee.blueprints.opc.webservice.supplierclient.UnknownOrderIdException {
188: if (super .cachedEndpoint == null) {
189: throw new org.apache.axis.NoEndPointException();
190: }
191: org.apache.axis.client.Call _call = createCall();
192: _call.setOperation(_operations[1]);
193: _call.setUseSOAPAction(true);
194: _call.setSOAPActionURI("");
195: _call.setSOAPVersion(org.apache.axis.soap.SOAPConstants.SOAP11_CONSTANTS);
196: _call.setOperationName(new javax.xml.namespace.QName("http://webservice.supplier.blueprints.j2ee.sun.com", "queryOrderStatus"));
197:
198: setRequestHeaders(_call);
199: setAttachments(_call);
200: java.lang.Object _resp = _call.invoke(new java.lang.Object[] {in0});
201:
202: if (_resp instanceof java.rmi.RemoteException) {
203: throw (java.rmi.RemoteException)_resp;
204: }
205: else {
206: extractAttachments(_call);
207: try {
208: return (java.lang.String) _resp;
209: } catch (java.lang.Exception _exception) {
210: return (java.lang.String) org.apache.axis.utils.JavaUtils.convert(_resp, java.lang.String.class);
211: }
212: }
213: }
214:
215:}
|