1 29 30 package com.caucho.soap.skeleton; 31 32 import com.caucho.jaxb.skeleton.Property; 33 34 import javax.jws.WebParam; 35 import javax.xml.bind.JAXBException; 36 import javax.xml.bind.Marshaller; 37 import javax.xml.bind.Unmarshaller; 38 import javax.xml.namespace.QName ; 39 import javax.xml.stream.XMLStreamException; 40 import javax.xml.stream.XMLStreamReader; 41 import javax.xml.stream.XMLStreamWriter; 42 import java.io.IOException ; 43 44 abstract public class ParameterMarshal { 45 protected final int _arg; 46 protected final Property _property; 47 protected final QName _name; 48 protected final Marshaller _marshaller; 49 protected final Unmarshaller _unmarshaller; 50 51 protected ParameterMarshal(int arg, Property property, QName name, 52 Marshaller marshaller, Unmarshaller unmarshaller) 53 { 54 _arg = arg; 55 _property = property; 56 _name = name; 57 _marshaller = marshaller; 58 _unmarshaller = unmarshaller; 59 } 60 61 static ParameterMarshal create(int arg, 62 Property property, 63 QName name, 64 WebParam.Mode mode, 65 Marshaller marshaller, 66 Unmarshaller unmarshaller) 67 { 68 switch (mode) { 69 case IN: 70 return new InParameterMarshal(arg, property, name, 71 marshaller, unmarshaller); 72 case OUT: 73 return new OutParameterMarshal(arg, property, name, 74 marshaller, unmarshaller); 75 default: 76 throw new UnsupportedOperationException (); 77 } 78 } 79 80 public int getArg() 81 { 82 return _arg; 83 } 84 85 89 public void serializeCall(XMLStreamWriter out, Object []args) 90 throws IOException , XMLStreamException, JAXBException 91 { 92 } 93 94 public Object deserializeReply(XMLStreamReader in) 95 throws IOException , XMLStreamException, JAXBException 96 { 97 return null; 98 } 99 100 public void deserializeReply(XMLStreamReader in, Object [] args) 101 throws IOException , XMLStreamException, JAXBException 102 { 103 } 104 105 109 public void deserializeCall(XMLStreamReader in, Object []args) 110 throws IOException , XMLStreamException, JAXBException 111 { 112 } 113 114 public void deserializeCallDefault(Object []args) 115 { 116 } 117 118 public void serializeReply(XMLStreamWriter out, Object ret) 119 throws IOException , XMLStreamException, JAXBException 120 { 121 } 122 123 public void serializeReply(XMLStreamWriter out, Object []args) 124 throws IOException , XMLStreamException, JAXBException 125 { 126 } 127 } 128 | Popular Tags |