Package org.jboss.ws.core.binding

Examples of org.jboss.ws.core.binding.SerializationContext


/* 102 */     SOAPFaultException faultEx = new SOAPFaultException(faultCode, faultString, faultActor, detail);
/*     */
/* 104 */     CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/* 105 */     if ((detail != null) && (msgContext != null))
/*     */     {
/* 107 */       SerializationContext serContext = msgContext.getSerializationContext();
/* 108 */       TypeMapping typeMapping = serContext.getTypeMapping();
/*     */
/* 110 */       Iterator it = detail.getDetailEntries();
/* 111 */       while (it.hasNext())
/*     */       {
/* 113 */         DetailEntry deElement = (DetailEntry)it.next();
View Full Code Here


/*     */     throws SOAPException
/*     */   {
/* 221 */     assertFaultCode(faultEx.getFaultCode());
/*     */
/* 223 */     CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
/* 224 */     SerializationContext serContext = msgContext != null ? msgContext.getSerializationContext() : new SerializationContextJAXRPC();
/* 225 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/*     */
/* 227 */     MessageFactory factory = new MessageFactoryImpl();
/* 228 */     SOAPMessageImpl soapMessage = (SOAPMessageImpl)factory.createMessage();
/*     */
/* 230 */     SOAPEnvelopeImpl soapEnvelope = (SOAPEnvelopeImpl)soapMessage.getSOAPPart().getEnvelope();
/* 231 */     SOAPBody soapBody = soapEnvelope.getBody();
/*     */
/* 233 */     QName faultCode = faultEx.getFaultCode();
/* 234 */     if (faultCode.getNamespaceURI().length() > 0) {
/* 235 */       faultCode = nsRegistry.registerQName(faultCode);
/*     */     }
/* 237 */     String faultString = getValidFaultString(faultEx);
/* 238 */     SOAPFault soapFault = soapBody.addFault(new NameImpl(faultCode), faultString);
/*     */
/* 240 */     String faultActor = faultEx.getFaultActor();
/* 241 */     if (faultActor != null)
/*     */     {
/* 243 */       SOAPElement soapElement = soapFault.addChildElement("faultactor");
/* 244 */       soapElement.addTextNode(faultActor);
/*     */     }
/*     */
/* 247 */     Exception faultCause = (Exception)faultEx.getCause();
/* 248 */     Detail detail = faultEx.getDetail();
/* 249 */     if (detail != null)
/*     */     {
/* 251 */       soapFault.addChildElement(detail);
/*     */     }
/* 253 */     else if ((faultCause != null) && (!(faultCause instanceof RuntimeException)))
/*     */     {
/* 255 */       Class javaType = faultCause.getClass();
/*     */
/* 257 */       TypeMapping typeMapping = serContext.getTypeMapping();
/*     */
/* 259 */       OperationMetaData opMetaData = msgContext.getOperationMetaData();
/* 260 */       if ((opMetaData != null) && (opMetaData.getFaultMetaData(javaType) != null))
/*     */       {
/* 262 */         FaultMetaData faultMetaData = opMetaData.getFaultMetaData(javaType);
View Full Code Here

TOP

Related Classes of org.jboss.ws.core.binding.SerializationContext

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.