Package com.dotcms.repackage.com.sun.jersey.api.client

Examples of com.dotcms.repackage.com.sun.jersey.api.client.WebResource.type()


                //Sending bundle to endpoint
                WebResource resource = client.resource(endpoint.toURL()+"/api/bundlePublisher/publish");

                ClientResponse response =
                    resource.type(MediaType.MULTIPART_FORM_DATA).post(ClientResponse.class, form);


                if(response.getClientResponseStatus().getStatusCode() == HttpStatus.SC_OK)
                {
                  detail.setStatus(PublishAuditStatus.Status.BUNDLE_SENT_SUCCESSFULLY.getCode());
View Full Code Here


    form.field( "ENDPOINT_ID", receivingFromEndpoint.getId() );
    form.bodyPart( new FileDataBodyPart( "bundle", newBundleFile, MediaType.MULTIPART_FORM_DATA_TYPE ) );

    //Sending bundle to endpoint
    WebResource resource = client.resource( receivingFromEndpoint.toURL() + "/api/bundlePublisher/publish" );
    ClientResponse clientResponse = resource.type( MediaType.MULTIPART_FORM_DATA ).post( ClientResponse.class, form );
    //Validations
    assertEquals( clientResponse.getClientResponseStatus().getStatusCode(), HttpStatus.SC_OK );

    //Get current status dates
    status = PublishAuditAPI.getInstance().getPublishAuditStatus( newBundleId );//Get the audit records related to this new bundle
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.