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