Package org.jboss.xb.binding

Examples of org.jboss.xb.binding.NamespaceRegistry


/*     */   {
/*  57 */     if (log.isDebugEnabled()) log.debug("deserialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*     */
/*  59 */     QName value = null;
/*     */
/*  61 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/*  62 */     String valueStr = unwrapValueStr(xmlFragment, nsRegistry);
/*  63 */     if (valueStr != null)
/*     */     {
/*  65 */       value = SimpleTypeBindings.unmarshalQName(valueStr, nsRegistry);
/*     */     }
View Full Code Here


/* 389 */         this.nsimap.put(sns, ni);
/* 390 */         ni.setNamespaceRegistry(this.namespaceRegistry);
/*     */       }
/*     */     }
/*     */
/* 394 */     NamespaceRegistry xsmRegistry = xsm.getNamespaceRegistry();
/* 395 */     Iterator iter = xsmRegistry.getRegisteredPrefixes();
/* 396 */     while (iter.hasNext())
/*     */     {
/* 398 */       String prefix = (String)iter.next();
/* 399 */       String ns = xsmRegistry.getNamespaceURI(prefix);
/* 400 */       this.namespaceRegistry.registerURI(ns, prefix);
/*     */     }
/*     */
/* 403 */     this.anonymousMapper.rebuild();
/*     */   }
View Full Code Here

/*  48 */       throw new IllegalArgumentException("The element argument must not be null!");
/*     */     }
/*     */
/*  51 */     ch.startDocument();
/*     */
/*  53 */     process(e, ch, new NamespaceRegistry());
/*     */
/*  55 */     ch.endDocument();
/*     */   }
View Full Code Here

/* 61 */       value = cal;
/*    */     }
/*    */
/* 64 */     String valueStr = SimpleTypeBindings.marshalDateTime((Calendar)value);
/*    */
/* 66 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/* 67 */     String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
/* 68 */     return new BufferedStreamResult(xmlFragment);
/*    */   }
View Full Code Here

/* 53 */     if (log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*    */
/* 55 */     value = JavaUtils.getPrimitiveValueArray(value);
/* 56 */     String valueStr = SimpleTypeBindings.marshalHexBinary((byte[])(byte[])value);
/*    */
/* 58 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/* 59 */     String xmlFragment = wrapValueStr(xmlName, valueStr, nsRegistry, null, attributes, true);
/* 60 */     return new BufferedStreamResult(xmlFragment);
/*    */   }
View Full Code Here

/*    */   {
/* 56 */     if (log.isDebugEnabled()) {
/* 57 */       log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*    */     }
/* 59 */     String xmlFragment = null;
/* 60 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/*    */
/* 62 */     if (XOPContext.isXOPMessage())
/*    */     {
/* 64 */       XOPMarshaller xopMarshaller = new XOPMarshallerImpl();
/* 65 */       XOPObject xopObject = new XOPObject(value);
View Full Code Here

/*    */     throws BindingException
/*    */   {
/* 58 */     if (log.isDebugEnabled()) log.debug("serialize: [xmlName=" + xmlName + ",xmlType=" + xmlType + "]");
/*    */
/* 61 */     String typeName = xmlType.getLocalPart();
/* 62 */     NamespaceRegistry nsRegistry = serContext.getNamespaceRegistry();
/*    */
/* 64 */     if ("base64Binary".equals(typeName))
/*    */     {
/* 66 */       throw new NotImplementedException();
/*    */     }
View Full Code Here

/*     */
/* 159 */       SOAPEnvelope soapEnvelope = reqMessage.getSOAPPart().getEnvelope();
/* 160 */       SOAPBody soapBody = soapEnvelope.getBody();
/* 161 */       SOAPHeader soapHeader = soapEnvelope.getHeader();
/*     */
/* 164 */       NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
/*     */
/* 166 */       Style style = opMetaData.getStyle();
/* 167 */       SOAPElement soapBodyElement = soapBody;
/* 168 */       if (style == Style.RPC)
/*     */       {
/* 170 */         QName opQName = opMetaData.getQName();
/* 171 */         Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
/*     */
/* 173 */         if (this.log.isDebugEnabled()) {
/* 174 */           this.log.debug("Create RPC body element: " + opName);
/*     */         }
/* 176 */         soapBodyElement = new SOAPBodyElementRpc(opName);
/* 177 */         soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
/*     */
/* 180 */         if (opMetaData.getUse() == Use.ENCODED)
/*     */         {
/* 182 */           String envURI = soapEnvelope.getNamespaceURI();
/* 183 */           String envPrefix = soapEnvelope.getPrefix();
/* 184 */           soapBodyElement.setAttributeNS(envURI, envPrefix + ":encodingStyle", "http://schemas.xmlsoap.org/soap/encoding/");
/*     */         }
/*     */       }
/*     */
/* 188 */       for (ParameterMetaData paramMetaData : opMetaData.getInputParameters())
/*     */       {
/* 190 */         QName xmlName = paramMetaData.getXmlName();
/* 191 */         Object value = epInv.getRequestParamValue(xmlName);
/*     */
/* 193 */         if (paramMetaData.isSwA())
/*     */         {
/* 196 */           CIDGenerator cidGenerator = reqMessage.getCidGenerator();
/* 197 */           AttachmentPart part = createAttachmentPart(paramMetaData, value, cidGenerator);
/* 198 */           reqMessage.addAttachmentPart(part);
/*     */
/* 201 */           if (((value instanceof DataHandler)) && ((msgContext instanceof MessageContextJAXWS)))
/*     */           {
/* 203 */             DataHandler dataHandler = (DataHandler)value;
/* 204 */             Map attachments = (Map)msgContext.get("javax.xml.ws.binding.attachments.outbound");
/* 205 */             attachments.put(dataHandler.getContentType(), dataHandler);
/*     */           }
/*     */         }
/*     */         else
/*     */         {
/* 210 */           SOAPElement soapElement = paramMetaData.isInHeader() ? soapHeader : soapBodyElement;
/* 211 */           addParameterToMessage(paramMetaData, value, soapElement);
/*     */         }
/*     */
/*     */       }
/*     */
/* 216 */       if (unboundHeaders != null)
/*     */       {
/* 218 */         Iterator it = unboundHeaders.values().iterator();
/* 219 */         while (it.hasNext())
/*     */         {
/* 221 */           UnboundHeader unboundHeader = (UnboundHeader)it.next();
/* 222 */           if (unboundHeader.getMode() != ParameterMode.OUT)
/*     */           {
/* 224 */             QName xmlName = unboundHeader.getXmlName();
/* 225 */             Object value = unboundHeader.getHeaderValue();
/*     */
/* 227 */             xmlName = namespaceRegistry.registerQName(xmlName);
/* 228 */             Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());
/*     */
/* 230 */             this.log.debug("Add unboundHeader element: " + soapName);
/* 231 */             SOAPContentElement contentElement = new SOAPHeaderElementImpl(soapName);
/* 232 */             contentElement.setParamMetaData(unboundHeader.toParameterMetaData(opMetaData));
View Full Code Here

/*     */
/* 283 */       if (opMetaData.isRPCEncoded()) {
/* 284 */         msgContext.put("org.jboss.ws.mtom.enabled", Boolean.FALSE);
/*     */       }
/*     */
/* 287 */       NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
/*     */
/* 289 */       if (!opMetaData.isMessageEndpoint())
/*     */       {
/* 291 */         Style style = opMetaData.getStyle();
/* 292 */         SOAPElement payloadParent = soapBody;
/* 293 */         if (style == Style.RPC)
/*     */         {
/* 295 */           payloadParent = null;
/* 296 */           Iterator it = soapBody.getChildElements();
/* 297 */           while ((payloadParent == null) && (it.hasNext()))
/*     */           {
/* 299 */             Object childNode = it.next();
/* 300 */             if ((childNode instanceof SOAPElement))
/*     */             {
/* 302 */               payloadParent = (SOAPElement)childNode;
/*     */             }
/*     */           }
/*     */
/* 306 */           if (payloadParent == null) {
/* 307 */             throw new SOAPException("Cannot find RPC element in");
/*     */           }
/* 309 */           QName elName = payloadParent.getElementQName();
/* 310 */           elName = namespaceRegistry.registerQName(elName);
/*     */         }
/*     */
/* 313 */         int numParameters = 0;
/* 314 */         for (ParameterMetaData paramMetaData : opMetaData.getParameters())
/*     */         {
View Full Code Here

/*     */
/* 411 */       SOAPEnvelope soapEnvelope = resMessage.getSOAPPart().getEnvelope();
/* 412 */       SOAPHeader soapHeader = soapEnvelope.getHeader();
/* 413 */       SOAPBody soapBody = soapEnvelope.getBody();
/*     */
/* 416 */       NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
/*     */
/* 418 */       Style style = opMetaData.getStyle();
/* 419 */       SOAPElement soapBodyElement = soapBody;
/* 420 */       if (style == Style.RPC)
/*     */       {
/* 422 */         QName opQName = opMetaData.getResponseName();
/*     */
/* 424 */         Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
/* 425 */         soapBodyElement = new SOAPBodyElementRpc(opName);
/* 426 */         soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);
/*     */
/* 429 */         if (opMetaData.getUse() == Use.ENCODED)
/*     */         {
View Full Code Here

TOP

Related Classes of org.jboss.xb.binding.NamespaceRegistry

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.