Package org.jboss.ws.core.jaxrpc.binding

Source Code of org.jboss.ws.core.jaxrpc.binding.SOAPElementDeserializer

/*    */ package org.jboss.ws.core.jaxrpc.binding;
/*    */
/*    */ import javax.xml.namespace.QName;
/*    */ import javax.xml.soap.SOAPElement;
/*    */ import javax.xml.transform.Source;
/*    */ import org.jboss.logging.Logger;
/*    */ import org.jboss.ws.core.binding.BindingException;
/*    */ import org.jboss.ws.core.binding.DeserializerSupport;
/*    */ import org.jboss.ws.core.binding.SerializationContext;
/*    */ import org.jboss.ws.core.soap.SOAPFactoryImpl;
/*    */ import org.jboss.wsf.common.DOMUtils;
/*    */ import org.w3c.dom.Element;
/*    */
/*    */ public class SOAPElementDeserializer extends DeserializerSupport
/*    */ {
/* 47 */   private static final Logger log = Logger.getLogger(SOAPElementDeserializer.class);
/*    */
/*    */   public Object deserialize(QName xmlName, QName xmlType, Source xmlFragment, SerializationContext serContext) throws BindingException {
/* 50 */     return deserialize(xmlName, xmlType, sourceToString(xmlFragment), serContext);
/*    */   }
/*    */
/*    */   private Object deserialize(QName xmlName, QName xmlType, String xmlFragment, SerializationContext serContext) throws BindingException
/*    */   {
/* 55 */     if (log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*    */
/*    */     try
/*    */     {
/* 59 */       Element domElement = DOMUtils.parse(xmlFragment);
/* 60 */       SOAPElement soapElement = new SOAPFactoryImpl().createElement(domElement);
/* 61 */       return soapElement;
/*    */     }
/*    */     catch (RuntimeException rte)
/*    */     {
/* 65 */       throw rte;
/*    */     }
/*    */     catch (Exception ex) {
/*    */     }
/* 69 */     throw new BindingException();
/*    */   }
/*    */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.ws.core.jaxrpc.binding.SOAPElementDeserializer
* JD-Core Version:    0.6.0
*/
TOP

Related Classes of org.jboss.ws.core.jaxrpc.binding.SOAPElementDeserializer

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.