1 28 29 package com.caucho.soap.jaxrpc; 30 31 import com.caucho.log.Log; 32 import com.caucho.soap.wsdl.WSDLOperation; 33 import com.caucho.soap.wsdl.WSDLPort; 34 import com.caucho.util.L10N; 35 import com.caucho.xml.XMLWriter; 36 37 import org.xml.sax.SAXException ; 38 39 import javax.xml.namespace.QName ; 40 import javax.xml.rpc.Call ; 41 import javax.xml.rpc.JAXRPCException ; 42 import javax.xml.rpc.ParameterMode ; 43 import java.io.IOException ; 44 import java.util.Iterator ; 45 import java.util.List ; 46 import java.util.Map ; 47 import java.util.logging.Logger ; 48 49 52 public class CallImpl implements Call { 53 private final static L10N L = new L10N(CallImpl.class); 54 private final static Logger log = Log.open(CallImpl.class); 55 56 public final static String XMLNS = 57 "http://www.w3.org/2000/xmlns/"; 58 59 public final static String SOAP_ENVELOPE = 60 "http://www.w3.org/2003/05/soap-envelope"; 61 public final static String SOAP_ENCODING = 62 "http://schemas.xmlsoap.org/soap/encoding/"; 63 64 private WSDLPort _port; 65 private WSDLOperation _op; 66 67 CallImpl(WSDLPort port) 68 { 69 _port = port; 70 } 71 72 CallImpl(WSDLPort port, WSDLOperation op) 73 { 74 _port = port; 75 _op = op; 76 } 77 78 79 82 public boolean isParameterAndReturnSpecRequired(QName operationName) 83 { 84 throw new UnsupportedOperationException (); 85 } 86 87 90 public void addParameter(String paramName, 91 QName xmlType, 92 ParameterMode parameterMode) 93 throws JAXRPCException 94 { 95 throw new UnsupportedOperationException (); 96 } 97 98 101 public void addParameter(String paramName, 102 QName xmlType, 103 Class javaType, 104 ParameterMode parameterMode) 105 throws JAXRPCException 106 { 107 throw new UnsupportedOperationException (); 108 } 109 110 113 public QName getParameterTypeByName(String paramName) 114 { 115 throw new UnsupportedOperationException (); 116 } 117 118 121 public void setReturnType(QName xmlType) 122 throws JAXRPCException 123 { 124 throw new UnsupportedOperationException (); 125 } 126 127 130 public void setReturnType(QName xmlType, 131 Class javaType) 132 throws JAXRPCException 133 { 134 throw new UnsupportedOperationException (); 135 } 136 137 140 public QName getReturnType() 141 { 142 throw new UnsupportedOperationException (); 143 } 144 145 148 public void removeAllParameters() 149 throws JAXRPCException 150 { 151 throw new UnsupportedOperationException (); 152 } 153 154 157 public QName getOperationName() 158 { 159 throw new UnsupportedOperationException (); 160 } 161 162 165 public QName getPortTypeName() 166 { 167 throw new UnsupportedOperationException (); 168 } 169 170 173 public void setPortTypeName(QName portType) 174 { 175 throw new UnsupportedOperationException (); 176 } 177 178 181 public void setTargetEndpointAddress(String address) 182 { 183 throw new UnsupportedOperationException (); 184 } 185 186 189 public String getTargetEndpointAddress() 190 { 191 throw new UnsupportedOperationException (); 192 } 193 194 197 public void setProperty(String name, Object value) 198 throws JAXRPCException 199 { 200 throw new UnsupportedOperationException (); 201 } 202 203 206 public Object getProperty(String name) 207 throws JAXRPCException 208 { 209 throw new UnsupportedOperationException (); 210 } 211 212 215 public void removeProperty(String name) 216 throws JAXRPCException 217 { 218 throw new UnsupportedOperationException (); 219 } 220 221 224 public Iterator getPropertyNames() 225 { 226 throw new UnsupportedOperationException (); 227 } 228 229 232 public Object invoke(Object []params) 233 throws java.rmi.RemoteException 234 { 235 throw new UnsupportedOperationException (); 236 } 237 238 241 public Object invoke(QName operationName, Object []params) 242 throws java.rmi.RemoteException 243 { 244 throw new UnsupportedOperationException (); 245 } 246 247 250 public void invokeOneWay(Object []params) 251 { 252 writeCall(params); 253 } 254 255 258 259 262 public Map getOutputParams() 263 { 264 throw new UnsupportedOperationException (); 265 } 266 267 270 public List getOutputValues() 271 { 272 throw new UnsupportedOperationException (); 273 } 274 275 278 private void writeCall(Object []params) 279 { 280 301 } 302 303 306 private void writeCall(XMLWriter writer, Object []params) 307 throws IOException , SAXException 308 { 309 writer.startDocument(); 310 326 330 331 353 354 writer.endDocument(); 355 } 356 357 382 383 386 private void startElement(XMLWriter writer, QName name) 387 throws IOException , SAXException 388 { 389 if (name.getPrefix().equals("")) { 390 writer.startElement(name.getNamespaceURI(), 391 name.getLocalPart(), 392 name.getLocalPart()); 393 } 394 else { 395 writer.startElement(name.getNamespaceURI(), 396 name.getLocalPart(), 397 name.getPrefix() + ":" + name.getLocalPart()); 398 } 399 } 400 401 404 private void endElement(XMLWriter writer, QName name) 405 throws IOException , SAXException 406 { 407 if (name.getPrefix().equals("")) { 408 writer.endElement(name.getNamespaceURI(), 409 name.getLocalPart(), 410 name.getLocalPart()); 411 } 412 else { 413 writer.endElement(name.getNamespaceURI(), 414 name.getLocalPart(), 415 name.getPrefix() + ":" + name.getLocalPart()); 416 } 417 } 418 419 422 public String toString() 423 { 424 if (_op != null) 425 return "CallImpl[" + _port.getName() + ",op=" + _op.getName() + "]"; 426 else 427 return "CallImpl[" + _port.getName() + "]"; 428 } 429 } 430 431 432 | Popular Tags |