Examples of UnmarshalledExtension


Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

   {
      for (Extension extension : extensions)
      {
         try
         {
            final UnmarshalledExtension unmarshalledExtension = PayloadUtils.unmarshallExtension(extension.getAny());
            ExtensionAccess.getProducerExtensionAccessor().addRequestExtension(paramsClass, unmarshalledExtension);
         }
         catch (Exception e)
         {
            log.debug("Couldn't unmarshall extension from consumer, ignoring it.", e);
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

      final List<Extension> extensions = WSRPUtils.replaceByEmptyListIfNeeded(getExtensionsFrom(response));
      for (Extension extension : extensions)
      {
         try
         {
            final UnmarshalledExtension unmarshalledExtension = PayloadUtils.unmarshallExtension(extension.getAny());
            ExtensionAccess.getConsumerExtensionAccessor().addResponseExtension(response.getClass(), unmarshalledExtension);
         }
         catch (Exception e)
         {
            log.debug("Couldn't unmarshall extension from producer, ignoring it.", e);
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

            }

            value = converter.parseFromXML(element.getTextContent());
         }

         return new UnmarshalledExtension(tagName, value, namespace);
      }
      throw new IllegalArgumentException("Cannot unmarshall extension '" + object + "'");
   }
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

         final List<UnmarshalledExtension> requestExtensions = ExtensionAccess.getProducerExtensionAccessor().getRequestExtensionsFor(MarkupParams.class);

         if (!requestExtensions.isEmpty())
         {
            // ideally, you should check here that you really got the extension you expected but we're assuming here that we got exactly what we're expecting
            final UnmarshalledExtension unmarshalledExtension = requestExtensions.get(0);
            if (unmarshalledExtension.isElement())
            {
               // get the text content which should be the session id that the consumer passed
               final Element element = (Element)unmarshalledExtension.getValue();
               final String textContent = element.getTextContent();

               // and put the value in the session so that the portlet the invocation targets can use it
               invocation.getRequest().getSession().setAttribute("consumerSaid", textContent);
            }
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

   {
      if (response instanceof ContentResponse)
      {
         // Get the extension attached to MarkupResponse
         final List<UnmarshalledExtension> extensions = ExtensionAccess.getConsumerExtensionAccessor().getResponseExtensionsFrom(MarkupResponse.class);
         final UnmarshalledExtension unmarshalledExtension = extensions.get(0);

         // check that the retrieved extension does indeed contain a DOM element with the producer's response... Ideally, you would check here that you're really getting what you're expecting
         if (unmarshalledExtension.isElement())
         {
            final Element element = (Element)unmarshalledExtension.getValue();
            final String textContent = element.getTextContent();

            log.info("Got response: " + textContent);

            // put the response value in the session so that portlets use it
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

   {
      for (Extension extension : extensions)
      {
         try
         {
            final UnmarshalledExtension unmarshalledExtension = PayloadUtils.unmarshallExtension(extension.getAny());
            ExtensionAccess.getProducerExtensionAccessor().addRequestExtension(paramsClass, unmarshalledExtension);
         }
         catch (Exception e)
         {
            log.debug("Couldn't unmarshall extension from consumer, ignoring it.", e);
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

      final List<Extension> extensions = WSRPUtils.replaceByEmptyListIfNeeded(getExtensionsFrom(response));
      for (Extension extension : extensions)
      {
         try
         {
            final UnmarshalledExtension unmarshalledExtension = PayloadUtils.unmarshallExtension(extension.getAny());
            ExtensionAccess.getConsumerExtensionAccessor().addResponseExtension(response.getClass(), unmarshalledExtension);
         }
         catch (Exception e)
         {
            log.debug("Couldn't unmarshall extension from producer, ignoring it.", e);
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

      final List<Extension> extensions = WSRPUtils.replaceByEmptyListIfNeeded(getExtensionsFrom(response));
      for (Extension extension : extensions)
      {
         try
         {
            final UnmarshalledExtension unmarshalledExtension = PayloadUtils.unmarshallExtension(extension.getAny());
            ExtensionAccess.getConsumerExtensionAccessor().addResponseExtension(response.getClass(), unmarshalledExtension);
         }
         catch (Exception e)
         {
            log.debug("Couldn't unmarshall extension from producer, ignoring it.", e);
View Full Code Here

Examples of org.gatein.wsrp.api.extensions.UnmarshalledExtension

            }

            value = converter.parseFromXML(element.getTextContent());
         }

         return new UnmarshalledExtension(tagName, value, namespace);
      }
      throw new IllegalArgumentException("Cannot unmarshall extension '" + object + "'");
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.