产品动态
产品公告
@Overridepublic DocJobResponse describeDocProcessJob(DocJobRequest request) {this.checkCIRequestCommon(request);CosHttpRequest<DocJobRequest> httpRequest = this.createRequest(request.getBucketName(), "/doc_jobs/" + request.getJobId(), request, HttpMethodName.GET);return this.invoke(httpRequest, new Unmarshallers.DescribeDocJobUnmarshaller());}
public static void processCINotifyResponse(String response) throws Exception {Unmarshallers.DescribeDocJobUnmarshaller describeDocJobUnmarshaller = new Unmarshallers.DescribeDocJobUnmarshaller();InputStream is = new ByteArrayInputStream(response.getBytes());DocJobResponse docJobResponse = describeDocJobUnmarshaller.unmarshall(is);}
@Overridepublic ImageAuditingResponse describeAuditingImageJob(DescribeImageAuditingRequest imageAuditingRequest) {rejectNull(imageAuditingRequest.getBucketName(),"The bucketName parameter must be specified setting the object tags");rejectNull(imageAuditingRequest.getJobId(),"The jobId parameter must be specified setting the object tags");CosHttpRequest<DescribeImageAuditingRequest> request = createRequest(imageAuditingRequest.getBucketName(), "/image/auditing/" + imageAuditingRequest.getJobId(), imageAuditingRequest, HttpMethodName.GET);return invoke(request, new Unmarshallers.ImageAuditingDescribeJobUnmarshaller());}
//回调demopublic static void processJsonCINotifyResponse(String jsonResponse) throws Exception {JSONObject response = new JSONObject(jsonResponse);JSONObject json = new JSONObject();json.put("Response",response);String xml = XML.toString(json);Unmarshallers.ImageAuditingDescribeJobUnmarshaller imageJobUnmarshaller = new Unmarshallers.ImageAuditingDescribeJobUnmarshaller();InputStream is = new ByteArrayInputStream(xml.getBytes());ImageAuditingResponse imageAuditingResponse = imageJobUnmarshaller.unmarshall(is);}
<dependency><groupId>org.json</groupId><artifactId>json</artifactId><version>20180130</version></dependency>
文档反馈