Package org.jboss.ws.core.soap

Examples of org.jboss.ws.core.soap.XMLFragment


/*     */         {
/* 187 */           ser = this.nullSerializer;
/*     */         }
/*     */
/* 190 */         Result result = ser.serialize(new QName("item"), xmlType, compValue, serContext, null);
/* 191 */         this.buffer.append(new XMLFragment(result).toXMLString());
/*     */       }
/*     */     }
/*     */   }
View Full Code Here


/*     */         {
/*  93 */           reqMsg = (SOAPMessageImpl)factory.createMessage();
/*  94 */           SOAPBodyImpl soapBody = (SOAPBodyImpl)reqMsg.getSOAPBody();
/*  95 */           SOAPContentElement bodyElement = new SOAPBodyElementDoc(SOAPBodyElementDoc.GENERIC_PARAM_NAME);
/*  96 */           bodyElement = (SOAPContentElement)soapBody.addChildElement(bodyElement);
/*  97 */           XMLFragment xmlFragment = new XMLFragment(source);
/*  98 */           bodyElement.setXMLFragment(xmlFragment);
/*     */
/* 101 */           if (this.validateDispatch)
/*     */           {
/* 104 */             xmlFragment.toElement();
/*     */           }
/*     */         }
/*     */
/* 108 */         if (this.mode == Service.Mode.MESSAGE)
/*     */         {
/* 110 */           TransformerFactory tf = TransformerFactory.newInstance();
/* 111 */           ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
/* 112 */           tf.newTransformer().transform(source, new StreamResult(baos));
/* 113 */           reqMsg = (SOAPMessageImpl)factory.createMessage(null, new ByteArrayInputStream(baos.toByteArray()));
/*     */         }
/*     */       }
/* 116 */       else if (this.jaxbContext != null)
/*     */       {
/* 118 */         Marshaller marshaller = this.jaxbContext.createMarshaller();
/* 119 */         marshaller.setProperty("jaxb.fragment", Boolean.valueOf(true));
/* 120 */         ByteArrayOutputStream baos = new ByteArrayOutputStream(1024);
/* 121 */         marshaller.marshal(obj, baos);
/*     */
/* 123 */         reqMsg = (SOAPMessageImpl)factory.createMessage();
/* 124 */         SOAPBodyImpl soapBody = (SOAPBodyImpl)reqMsg.getSOAPBody();
/* 125 */         SOAPContentElement bodyElement = new SOAPBodyElementDoc(SOAPBodyElementDoc.GENERIC_PARAM_NAME);
/* 126 */         bodyElement = (SOAPContentElement)soapBody.addChildElement(bodyElement);
/* 127 */         StreamSource source = new StreamSource(new ByteArrayInputStream(baos.toByteArray()));
/* 128 */         bodyElement.setXMLFragment(new XMLFragment(source));
/*     */       }
/*     */     }
/*     */     catch (RuntimeException rte)
/*     */     {
/* 133 */       throw rte;
View Full Code Here

           "http://schemas.xmlsoap.org/soap/envelope/"
         );

         //Do we even need this part?
         SOAPContentElement soapEl = new SOAPContentElement(name);
         soapEl.setXMLFragment(new XMLFragment(soapXml));

         sharedElement = soapEl;

         if(!printNodeNames())
            allRunsSuccessful = false;
View Full Code Here

/*     */   private XMLFragment xmlFragment;
/*     */
/*     */   public HTTPMessageImpl(MimeHeaders mimeHeaders, InputStream inputStream)
/*     */   {
/*  51 */     this.mimeHeaders = mimeHeaders;
/*  52 */     this.xmlFragment = new XMLFragment(new StreamSource(inputStream));
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public HTTPMessageImpl(Source source)
/*     */   {
/*  57 */     this.mimeHeaders = new MimeHeaders();
/*  58 */     this.xmlFragment = new XMLFragment(source);
/*     */
/*  60 */     initDefaultMimeHeaders();
/*     */   }
View Full Code Here

/*     */   }
/*     */
/*     */   public HTTPMessageImpl(Result result)
/*     */   {
/*  65 */     this.mimeHeaders = new MimeHeaders();
/*  66 */     this.xmlFragment = new XMLFragment(result);
/*     */
/*  68 */     initDefaultMimeHeaders();
/*     */   }
View Full Code Here

/*     */     }
/*     */     try
/*     */     {
/* 311 */       SerializerSupport ser = serFactory.getSerializer();
/* 312 */       Result result = ser.serialize(xmlName, xmlType, faultObject, serContext, null);
/* 313 */       XMLFragment xmlFragment = new XMLFragment(result);
/* 314 */       String xmlStr = xmlFragment.toXMLString();
/* 315 */       log.debug("Fault detail: " + xmlStr);
/*     */
/* 317 */       Element domElement = xmlFragment.toElement();
/* 318 */       SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
/* 319 */       return soapFactory.createElement(domElement);
/*     */     }
/*     */     catch (BindingException e) {
/*     */     }
View Full Code Here

/* 134 */       SOAPBodyImpl soapBody = (SOAPBodyImpl)resMessage.getSOAPBody();
/* 135 */       SOAPContentElement bodyElement = new SOAPBodyElementDoc(xmlName);
/* 136 */       bodyElement = (SOAPContentElement)soapBody.addChildElement(bodyElement);
/*     */
/* 138 */       Source payload = (Source)epInv.getReturnValue();
/* 139 */       bodyElement.setXMLFragment(new XMLFragment(payload));
/*     */
/* 141 */       return resMessage;
/*     */     }
/*     */     catch (Exception e)
/*     */     {
View Full Code Here

/*     */           }
/*     */         }
/*     */         else
/*     */         {
/* 127 */           SOAPContentElement contentElement = (SOAPContentElement)bodyElement;
/* 128 */           contentElement.setXMLFragment(new XMLFragment(source));
/*     */         }
/*     */       }
/*     */       catch (SOAPException ex)
/*     */       {
/* 133 */         throw new WebServiceException("Cannot set xml payload", ex);
/*     */       }
/*     */     }
/* 136 */     else if ((this.message instanceof HTTPMessageImpl))
/*     */     {
/* 138 */       HTTPMessageImpl httpMessage = (HTTPMessageImpl)this.message;
/* 139 */       httpMessage.setXmlFragment(new XMLFragment(source));
/*     */     }
/*     */
/* 142 */     MessageContextAssociation.peekMessageContext().setModified(true);
/*     */   }
View Full Code Here

/*     */         }
/*     */         try
/*     */         {
/* 275 */           SerializerSupport ser = serFactory.getSerializer();
/* 276 */           Result result = ser.serialize(xmlName, xmlType, faultCause, serContext, null);
/* 277 */           XMLFragment xmlFragment = new XMLFragment(result);
/*     */
/* 279 */           Element domElement = xmlFragment.toElement();
/* 280 */           SOAPFactoryImpl soapFactory = new SOAPFactoryImpl();
/* 281 */           SOAPElement soapElement = soapFactory.createElement(domElement);
/*     */
/* 283 */           detail = soapFault.addDetail();
/* 284 */           detail.addChildElement(soapElement);
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.soap.XMLFragment

Copyright © 2018 www.massapicom. 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.