Package org.jboss.ws.core.soap

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


         SOAPElement soapBodyElement = soapBody;
         if (style == Style.RPC)
         {
            QName opQName = opMetaData.getResponseName();

            Name opName = new NameImpl(namespaceRegistry.registerQName(opQName));
            soapBodyElement = new SOAPBodyElementRpc(opName);
            soapBodyElement = (SOAPBodyElement)soapBody.addChildElement(soapBodyElement);

            // Add soap encodingStyle
            if (opMetaData.getUse() == Use.ENCODED)
View Full Code Here


         CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
         NamespaceRegistry namespaceRegistry = msgContext.getNamespaceRegistry();
         xmlName = namespaceRegistry.registerQName(xmlName);
      }

      Name soapName = new NameImpl(xmlName.getLocalPart(), xmlName.getPrefix(), xmlName.getNamespaceURI());

      SOAPContentElement contentElement;
      if (soapElement instanceof SOAPHeader)
      {
         contentElement = new SOAPHeaderElementImpl(soapName);
View Full Code Here

   }

   /** Unmarshall a message element and add it to the parameter list */
   private SOAPContentElement getParameterFromMessage(ParameterMetaData paramMetaData, SOAPElement soapElement, boolean optional) throws BindingException
   {
      Name xmlName = new NameImpl(paramMetaData.getXmlName());

      SOAPContentElement soapContentElement = null;
      Iterator childElements = soapElement.getChildElements();
      while (childElements.hasNext())
      {
         Object childNode = childElements.next();
         if (childNode instanceof SOAPElement)
         {
            SOAPElementImpl childElement = (SOAPElementImpl)childNode;
            // If this message was manipulated by a handler the child may not be a content element
            if (!(childElement instanceof SOAPContentElement))
               childElement = (SOAPContentElement)soapElement.replaceChild(new SOAPContentElement(childElement), childElement);

            // The parameters are expected to be lazy
            SOAPContentElement aux = (SOAPContentElement)childElement;
            Name elName = aux.getElementName();

            if (xmlName.equals(elName))
            {
               soapContentElement = aux;
               soapContentElement.setParamMetaData(paramMetaData);
               break;
            }
View Full Code Here

      QName faultCode = faultEx.getFaultCode();
      if (faultCode.getNamespaceURI().length() > 0)
         faultCode = nsRegistry.registerQName(faultCode);

      String faultString = getValidFaultString(faultEx);
      SOAPFault soapFault = soapBody.addFault(new NameImpl(faultCode), faultString);

      String faultActor = faultEx.getFaultActor();
      if (faultActor != null)
      {
         SOAPElement soapElement = soapFault.addChildElement("faultactor");
View Full Code Here

         // Get the corresponding wrapper type
         if (JavaUtils.isPrimitive(value.getClass()))
            value = JavaUtils.getWrapperValueArray(value);

         String nodeName = new NameImpl(compXmlName).getQualifiedName();

         buffer = new StringBuilder("<" + nodeName + " xmlns:" + Constants.PREFIX_SOAP11_ENC + "='" + Constants.URI_SOAP11_ENC + "' ");

         if (!(value instanceof Object[]))
            throw new WSException("Unsupported array type: " + javaType);
View Full Code Here

      QName faultCode = faultEx.getFaultCode();
      if (faultCode.getNamespaceURI().length() > 0)
         faultCode = nsRegistry.registerQName(faultCode);

      String faultString = getValidFaultString(faultEx);
      SOAPFault soapFault = soapBody.addFault(new NameImpl(faultCode), faultString);

      String faultActor = faultEx.getFaultActor();
      if (faultActor != null)
      {
         SOAPElement soapElement = soapFault.addChildElement("faultactor");
View Full Code Here

   {
      String contentType = xopElement.getAttributeNS(NS_XOP_JBOSSWS, "content-type");
      if (contentType != null && contentType.length() > 0)
      {
         replaceBase64Representation(xopElement, contentType);
         xopElement.removeAttribute(new NameImpl(new QName(NS_XOP_JBOSSWS, "content-type")));
      }
      else
      {
         Iterator it = DOMUtils.getChildElements(xopElement);
         while (it.hasNext())
View Full Code Here

      assertFalse(soapHeader.getChildElements().hasNext());

      try
      {
         Name name = new NameImpl("Foo");
         soapHeader.addHeaderElement(name);
         fail("Invalid name: " + name);
      }
      catch (SOAPException e)
      {
         // ignore
      }

      Name name = new NameImpl("Foo", "ns1", "http://org.jboss.ws/header");
      soapHeader.addHeaderElement(name);
      SOAPHeaderElement shElement = (SOAPHeaderElement)soapHeader.getChildElements(name).next();
      shElement.setValue("SomeHeaderValue");
      assertEquals(name, shElement.getElementName());
View Full Code Here

      Iterator it = soapHeader.examineAllHeaderElements();
      SOAPHeaderElement foo = (SOAPHeaderElement)it.next();
      SOAPHeaderElement bar = (SOAPHeaderElement)it.next();
      assertFalse(it.hasNext());

      Name fooName = new NameImpl("Foo", "ns1", "http://org.jboss.ws/header");
      Name barName = new NameImpl("Bar", "ns2", "http://org.jboss.ws/header2");

      assertEquals(fooName, foo.getElementName());
      assertEquals(barName, bar.getElementName());

      assertEquals("SomeHeaderValue", foo.getValue());
View Full Code Here

      Iterator it = soapHeader.examineHeaderElements("BradPitt");
      SOAPHeaderElement bar = (SOAPHeaderElement)it.next();
      assertFalse(it.hasNext());

      Name barName = new NameImpl("Bar", "ns2", "http://org.jboss.ws/header2");
      assertEquals(barName, bar.getElementName());

      assertEquals("SomeOtherValue", bar.getValue());

      assertTrue(soapHeader.getChildElements().hasNext());
View Full Code Here

TOP

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

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.