Subversion Repositories SmartDukaan

Rev

Rev 8224 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8224 Rev 8363
Line 41... Line 41...
41
    /**
41
    /**
42
     * Just add a few required parameters, and try the service
42
     * Just add a few required parameters, and try the service
43
     * Request Report functionality
43
     * Request Report functionality
44
     *
44
     *
45
     * @param args unused
45
     * @param args unused
-
 
46
     * @throws MarketplaceWebServiceException 
46
     */
47
     */
47
    public static void main(String... args) {
48
    public static void main(String... args) throws MarketplaceWebServiceException {
48
        
49
        
49
        /************************************************************************
50
        /************************************************************************
50
         * Access Key ID and Secret Access Key ID, obtained from:
51
         * Access Key ID and Secret Access Key ID, obtained from:
51
         * http://aws.amazon.com
52
         * http://aws.amazon.com
52
         ***********************************************************************/
53
         ***********************************************************************/
Line 154... Line 155...
154
     * Request Report  request sample
155
     * Request Report  request sample
155
     * requests the generation of a report
156
     * requests the generation of a report
156
     *   
157
     *   
157
     * @param service instance of MarketplaceWebService service
158
     * @param service instance of MarketplaceWebService service
158
     * @param request Action to invoke
159
     * @param request Action to invoke
-
 
160
     * @throws MarketplaceWebServiceException 
159
     */
161
     */
160
    public static String invokeRequestReport(MarketplaceWebService service, RequestReportRequest request) {
162
    public static String invokeRequestReport(MarketplaceWebService service, RequestReportRequest request) throws MarketplaceWebServiceException {
161
    	String requestId = null;   	
163
    	String requestId = null;   	
162
        try {
164
        try {
163
            
165
            
164
            RequestReportResponse response = service.requestReport(request);
166
            RequestReportResponse response = service.requestReport(request);
165
             
167
             
Line 240... Line 242...
240
            System.out.println("Error Code: " + ex.getErrorCode());
242
            System.out.println("Error Code: " + ex.getErrorCode());
241
            System.out.println("Error Type: " + ex.getErrorType());
243
            System.out.println("Error Type: " + ex.getErrorType());
242
            System.out.println("Request ID: " + ex.getRequestId());
244
            System.out.println("Request ID: " + ex.getRequestId());
243
            System.out.print("XML: " + ex.getXML());
245
            System.out.print("XML: " + ex.getXML());
244
            System.out.println("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
246
            System.out.println("ResponseHeaderMetadata: " + ex.getResponseHeaderMetadata());
-
 
247
            throw(ex);
245
        }
248
        }
246
		return requestId;
249
		return requestId;
247
    }
250
    }
248
                                                
251
                                                
249
}
252
}