Package org.jboss.ws.extensions.xop.jaxws

Examples of org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult


   private void initializeAttachmentParameter(Type epType)
   {
      if (epType == Type.JAXWS)
      {
         ReflectiveAttachmentRefScanner scanner = new ReflectiveAttachmentRefScanner();
         AttachmentScanResult scanResult = scanner.scanBean(javaType);
         if (scanResult != null)
         {
            if (log.isDebugEnabled())
               log.debug("Identified attachment reference: " + xmlName + ", type=" + scanResult.getType());
            if (scanResult.getType() == AttachmentScanResult.Type.XOP)
               setXOP(true);
            else
               setSwaRef(true);
         }
      }
View Full Code Here


   private void initializeAttachmentParameter(Type epType)
   {
      if (epType == Type.JAXWS)
      {
         ReflectiveAttachmentRefScanner scanner = new ReflectiveAttachmentRefScanner();
         AttachmentScanResult scanResult = scanner.scanBean(javaType);
         if (scanResult != null)
         {
            if (log.isDebugEnabled())
               log.debug("Identified attachment reference: " + xmlName + ", type=" + scanResult.getType());
            if (scanResult.getType() == AttachmentScanResult.Type.XOP)
               setXOP(true);
            else
               setSwaRef(true);
         }
      }
View Full Code Here

      SCANNER.reset();
   }

   public void testFieldAnnotation() throws Exception
   {
      AttachmentScanResult mimeType = SCANNER.scanBean(FieldAnnotation.class);
      assertNotNull("Unable to find xop declaration", mimeType);
      assertEquals("text/xml", mimeType.getMimeType());
   }
View Full Code Here

      assertEquals("text/xml", mimeType.getMimeType());
   }

   public void testMethodAnnotation() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(MethodAnnotation.class);
      assertNotNull("Unable to find xop declaration", mimeType);
   }
View Full Code Here

      assertNotNull("Unable to find xop declaration", mimeType);
   }

   public void testAnnotationMissing() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(NoAnnotation.class);
      assertNull("There should be no mimeType available", mimeType);
   }
View Full Code Here

      Method m = AnnotatedSEI.class.getMethod("foo", new Class[] {byte[].class});
      assertNotNull(m);

      System.out.println(m.getParameterAnnotations().length);

      AttachmentScanResult  mimeType = SCANNER.scanBean( m.getParameterTypes()[0]);
      assertNotNull("Unable to find xop declaration", mimeType);
      assertEquals("text/xml", mimeType.getMimeType());
   }
View Full Code Here

      assertEquals("text/xml", mimeType.getMimeType());
   }

   public void testSimpleRecursion() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(SimpleRecursion.class);
      assertNull(mimeType);
   }
View Full Code Here

      assertNull(mimeType);
   }

   public void testComplexRecursion() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(ComplexRecursion.class);
      assertNotNull("Unable to find xop declaration", mimeType);
      assertEquals("text/plain", mimeType.getMimeType());
   }
View Full Code Here

      assertFalse("MTOM should be disabled", XOPContext.isMTOMEnabled());
   }

   public void testNestedArray() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(NestedArray.class);
      assertNotNull("Unable to find xop declaration", mimeType);
      assertEquals("text/plain", mimeType.getMimeType());
   }
View Full Code Here

      assertEquals("text/plain", mimeType.getMimeType());
   }

   public void testNestedList() throws Exception
   {
      AttachmentScanResult  mimeType = SCANNER.scanBean(NestedList.class);
      assertNotNull("Unable to find xop declaration", mimeType);
      assertEquals("text/plain", mimeType.getMimeType());
   }
View Full Code Here

TOP

Related Classes of org.jboss.ws.extensions.xop.jaxws.AttachmentScanResult

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.