Package org.jboss.ws.core.soap

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


         // necessary in order to parse ref params
         EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));

         String subscriptionID = response.getSubscriptionId();
         SOAPElementImpl element = new SOAPElementImpl(
            "Identifier",
            "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
         );
         element.setValue(subscriptionID);
         epr.getReferenceParameters().addElement(element);

         followupProps.initializeAsDestination(epr);

         return followupProps;
View Full Code Here


      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.getLocalName().equals("") || xmlName.equals(elName))
            {
               soapContentElement = aux;
               soapContentElement.setParamMetaData(paramMetaData);
               break;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
         if (childElements.hasNext() && opMetaData.getStyle() == Style.DOCUMENT)
         {
            SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();

            // The parameters are expected to be lazy
            SOAPContentElement aux = (SOAPContentElement)childElement;
            Name elName = aux.getElementName();
            QName elType = null;
View Full Code Here

      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;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
         if (childElements.hasNext() && opMetaData.getStyle() == Style.DOCUMENT)
         {
            SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();

            // The parameters are expected to be lazy
            SOAPContentElement aux = (SOAPContentElement)childElement;
            Name elName = aux.getElementName();
            QName elType = null;
View Full Code Here

         // necessary in order to parse ref params
         EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));

         String subscriptionID = response.getSubscriptionId();
         SOAPElementImpl element = new SOAPElementImpl(
            "Identifier",
            "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
         );
         element.setValue(subscriptionID);
         epr.getReferenceParameters().addElement(element);

         followupProps.initializeAsDestination(epr);

         return followupProps;
View Full Code Here

         // necessary in order to parse ref params
         EndpointReference epr = addrBuilder.newEndpointReference(new URI(wsaTo));

         String subscriptionID = response.getSubscriptionId();
         SOAPElementImpl element = new SOAPElementImpl(
            "Identifier",
            "wse", "http://schemas.xmlsoap.org/ws/2004/08/eventing"
         );
         element.setValue(subscriptionID);
         epr.getReferenceParameters().addElement(element);

         followupProps.initializeAsDestination(epr);

         return followupProps;
View Full Code Here

      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.getLocalName().equals("") || xmlName.equals(elName))
            {
               soapContentElement = aux;
               soapContentElement.setParamMetaData(paramMetaData);
               break;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
        
         SOAPElementImpl childElement = null;
         while (childElement == null && childElements.hasNext())
         {
            Object current = childElements.next();
            if (current instanceof SOAPElementImpl)
            {
View Full Code Here

   }
  
   private SOAPContentElement getSOAPContentElement(final SOAPMessage soapMessage) throws Exception
   {
      SOAPBodyImpl soapBody = (SOAPBodyImpl)soapMessage.getSOAPBody();
      SOAPElementImpl bodyElement = null;
      NodeList nodes = soapBody.getChildNodes();
      for (int i = 0; i < nodes.getLength() && bodyElement == null; i++)
      {
         Node current = nodes.item(i);
         if (current instanceof SOAPElementImpl)
View Full Code Here

      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.getLocalName().equals("") || xmlName.equals(elName))
            {
               soapContentElement = aux;
               soapContentElement.setParamMetaData(paramMetaData);
               break;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
        
         SOAPElementImpl childElement = null;
         while (childElement == null && childElements.hasNext())
         {
            Object current = childElements.next();
            if (current instanceof SOAPElementImpl)
            {
View Full Code Here

      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.getLocalName().equals("") || xmlName.equals(elName))
            {
               soapContentElement = aux;
               soapContentElement.setParamMetaData(paramMetaData);
               break;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
         if (childElements.hasNext() && opMetaData.getStyle() == Style.DOCUMENT)
         {
            SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();

            // The parameters are expected to be lazy
            SOAPContentElement aux = (SOAPContentElement)childElement;
            Name elName = aux.getElementName();
            QName elType = null;
View Full Code Here

      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;
            }

            if (SOAP_ARRAY_NAME.equals(elName))
            {
               CommonMessageContext msgContext = MessageContextAssociation.peekMessageContext();
               msgContext.put(CommonMessageContext.ALLOW_EXPAND_TO_DOM, Boolean.TRUE);
               try
               {
                  QName compXMLName = paramMetaData.getXmlName();
                  Element compElement = DOMUtils.getFirstChildElement(aux);
                  // NPE when the soap encoded array size is 0 on the return path
                  // http://jira.jboss.org/jira/browse/JBWS-1285
                  if (compElement == null || compElement.getNodeName().equals(compXMLName.getLocalPart()))
                  {
                     soapContentElement = aux;
                     soapContentElement.setParamMetaData(paramMetaData);
                     break;
                  }
               }
               finally
               {
                  msgContext.remove(CommonMessageContext.ALLOW_EXPAND_TO_DOM);
               }
            }
         }
      }

      // If matching by name fails, try to match by xmlType
      // This maybe necessary when wsa:Action dispatches to the operation
      if (soapContentElement == null)
      {
         childElements = soapElement.getChildElements();
         OperationMetaData opMetaData = paramMetaData.getOperationMetaData();
         TypesMetaData typesMetaData = opMetaData.getEndpointMetaData().getServiceMetaData().getTypesMetaData();
         if (childElements.hasNext() && opMetaData.getStyle() == Style.DOCUMENT)
         {
            SOAPElementImpl childElement = (SOAPElementImpl)childElements.next();

            // The parameters are expected to be lazy
            SOAPContentElement aux = (SOAPContentElement)childElement;
            Name elName = aux.getElementName();
            QName elType = null;
View Full Code Here

TOP

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

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.