Examples of AttachmentType


Examples of org.apache.axis2.jaxws.description.AttachmentType

                    }
                    index++;
                }
            } else {
                // The parameter is an attachment
                AttachmentType type = pde.getParam().
                   getAttachmentDescription().getAttachmentType();
                if (type == AttachmentType.SWA) {
                    // All we need to do is set the data handler on the message. 
                    // For SWA attachments, the message does not reference the attachment.
                    message.addDataHandler(attachment.getDataHandler(),
View Full Code Here

Examples of org.apache.axis2.jaxws.description.AttachmentType

                      ((value == null)? "null":value.getClass().getName()));
            log.debug("ParameterDescription = " + pd.toString());
        }
        AttachmentDescription attachmentDesc = pd.getAttachmentDescription();
       
        AttachmentType attachmentType = attachmentDesc.getAttachmentType();
        if (attachmentType == AttachmentType.SWA) {
            // Create an Attachment object with the signature value
            Attachment attachment = new Attachment(value,
                                                   formalType,
                                                   attachmentDesc,
View Full Code Here

Examples of org.apache.axis2.jaxws.description.AttachmentType

                    }
                    index++;
                }
            } else {
                // The parameter is an attachment
                AttachmentType type = pde.getParam().
                   getAttachmentDescription().getAttachmentType();
                if (type == AttachmentType.SWA) {
                    // All we need to do is set the data handler on the message. 
                    // For SWA attachments, the message does not reference the attachment.
                    message.addDataHandler(attachment.getDataHandler(),
View Full Code Here

Examples of org.apache.ws.axis2.mtomsample.AttachmentType

  public org.apache.ws.axis2.mtomsample.AttachmentResponse attachment(
      org.apache.ws.axis2.mtomsample.AttachmentRequest param0)
      throws Exception

  {
    AttachmentType attachmentRequest = param0.getAttachmentRequest();
    Base64Binary binaryData = attachmentRequest.getBinaryData();
    DataHandler dataHandler = binaryData.getBase64Binary();
    File file = new File(
        attachmentRequest.getFileName());
    FileOutputStream fileOutputStream = new FileOutputStream(file);
    dataHandler.writeTo(fileOutputStream);
    fileOutputStream.flush();
    fileOutputStream.close();
   
View Full Code Here

Examples of org.apache.ws.axis2.mtomsample.AttachmentType

  public org.apache.ws.axis2.mtomsample.AttachmentResponse attachment(
      org.apache.ws.axis2.mtomsample.AttachmentRequest param0)
      throws Exception

  {
    AttachmentType attachmentRequest = param0.getAttachmentRequest();
    Base64Binary binaryData = attachmentRequest.getBinaryData();
    DataHandler dataHandler = binaryData.getBase64Binary();
    File file = new File(
        attachmentRequest.getFileName());
    FileOutputStream fileOutputStream = new FileOutputStream(file);
    dataHandler.writeTo(fileOutputStream);
    fileOutputStream.flush();
    fileOutputStream.close();
   
View Full Code Here

Examples of org.cedj.geekseek.web.rest.attachment.test.model.AttachmentType

    @Test @InSequence(1)
    public void shouldBeAbleToCreateAttachment() throws Exception {
        // Attachment is not a top level resource, so in the test we hardcode the known location
        uri_attachment = new URL(base, "api/attachment").toExternalForm();

        AttachmentType conf = getCreateAttachment();

        uri_attachmentInstance =
              given().
                  contentType(ATTACHMENT_MEDIA_TYPE).
                  body(conf).
View Full Code Here

Examples of org.cedj.geekseek.web.rest.attachment.test.model.AttachmentType

    @Test @InSequence(3)
    public void shouldBeAbleToUpdateAttachment() throws Exception {
        assertNotNull("Previous step failed", uri_attachmentInstance);

        AttachmentType conf = getUpdateAttachment();

        given().
            contentType(ATTACHMENT_MEDIA_TYPE).
            body(conf).
        then().
View Full Code Here

Examples of org.cedj.geekseek.web.rest.attachment.test.model.AttachmentType

    @Test @InSequence(4)
    public void verifyUpdatedAttachment() throws Exception {
        assertNotNull("Previous step failed", uri_attachmentInstance);

        AttachmentType conf = getUpdateAttachment();

        given().
        then().
           contentType(ATTACHMENT_MEDIA_TYPE).
           statusCode(Status.OK.getStatusCode()).
           root("attachment").
               body("title", equalTo(conf.getTitle())).
               body("mimeType", equalTo(conf.getMimeType())).
        when().
           get(uri_attachmentInstance);
    }
View Full Code Here

Examples of org.cedj.geekseek.web.rest.attachment.test.model.AttachmentType

        when().
           get(uri_attachmentInstance);
    }

    private AttachmentType getCreateAttachment() throws Exception {
        AttachmentType attachment = new AttachmentType()
                                .setTitle("Test")
                                .setMimeType("text/plain")
                                .setUrl(new URL("http://geekseek.org"));
        return attachment;
    }
View Full Code Here

Examples of org.cedj.geekseek.web.rest.attachment.test.model.AttachmentType

                                .setUrl(new URL("http://geekseek.org"));
        return attachment;
    }

    private AttachmentType getUpdateAttachment() throws Exception {
        AttachmentType attachment = new AttachmentType()
                                .setTitle("Test 2")
                                .setMimeType("text/html")
                                .setUrl(new URL("http://geekseek2.org"));
        return attachment;
    }
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.