1 57 58 package org.apache.wsif.providers.soap.apachesoap; 59 60 import java.io.IOException ; 61 import java.io.Writer ; 62 63 import org.apache.soap.rpc.SOAPContext; 64 import org.apache.soap.util.Bean; 65 import org.apache.soap.util.xml.Deserializer; 66 import org.apache.soap.util.xml.NSStack; 67 import org.apache.soap.util.xml.QName; 68 import org.apache.soap.util.xml.Serializer; 69 import org.apache.soap.util.xml.XMLJavaMappingRegistry; 70 import org.apache.wsif.logging.Trc; 71 import org.w3c.dom.Node ; 72 73 public class SOAPEncSerializerWrapper implements PartSerializer { 74 75 private Serializer targetSerializer = null; 76 private Deserializer targetDeserializer = null; 77 private Object part = null; 78 79 82 public void setPart(Object aPart) { 83 this.part = aPart; 84 } 85 86 89 public Object getPart() { 90 return this.part; 91 } 92 93 96 public Object getPart(Class partClass) { 97 return null; 98 } 99 100 103 public javax.xml.namespace.QName getPartQName() { 104 return null; 105 } 106 107 110 public void setPartQName(javax.xml.namespace.QName qName) { 111 } 112 113 117 public void marshall( 118 String inScopeEncStyle, 119 Class javaType, 120 Object src, 121 Object context, 122 Writer sink, 123 NSStack nsStack, 124 XMLJavaMappingRegistry xjmr, 125 SOAPContext ctx) 126 throws IllegalArgumentException , IOException { 127 Trc.entry( 128 this, 129 inScopeEncStyle, 130 javaType, 131 src, 132 context, 133 sink, 134 nsStack, 135 xjmr, 136 ctx); 137 if (this.targetSerializer != null) 138 this.targetSerializer.marshall( 139 inScopeEncStyle, 140 javaType, 141 this.part, 142 context, 143 sink, 144 nsStack, 145 xjmr, 146 ctx); 147 Trc.exit(); 148 } 149 150 154 public Bean unmarshall( 155 String inScopeEncStyle, 156 QName elementType, 157 Node src, 158 XMLJavaMappingRegistry xjmr, 159 SOAPContext ctx) 160 throws IllegalArgumentException { 161 Trc.entry(this, inScopeEncStyle, elementType, xjmr, ctx); 162 Bean b = null; 163 if (this.targetDeserializer != null) 164 b = 165 this.targetDeserializer.unmarshall( 166 inScopeEncStyle, 167 elementType, 168 src, 169 xjmr, 170 ctx); 171 Trc.exit(b); 172 return b; 173 } 174 175 179 public Deserializer getTargetDeserializer() { 180 return targetDeserializer; 181 } 182 183 187 public void setTargetDeserializer(Deserializer targetDeserializer) { 188 this.targetDeserializer = targetDeserializer; 189 } 190 191 195 public Serializer getTargetSerializer() { 196 return targetSerializer; 197 } 198 199 203 public void setTargetSerializer(Serializer targetSerializer) { 204 this.targetSerializer = targetSerializer; 205 } 206 207 } | Popular Tags |