Subversion Repositories SmartDukaan

Rev

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

Rev 20640 Rev 20662
Line 1... Line 1...
1
package com.bluedart.impl;
1
package com.bluedart.impl;
2
 
2
 
3
import com.bluedart.stub.Consignee;
-
 
4
import com.bluedart.stub.IWayBillGeneration;
-
 
5
import com.bluedart.stub.Services;
-
 
6
import com.bluedart.stub.Shipper;
-
 
7
import com.bluedart.stub.UserProfile;
-
 
8
import com.bluedart.stub.WayBillGeneration;
-
 
9
import com.bluedart.stub.WayBillGenerationLocator;
-
 
10
import com.bluedart.stub.WayBillGenerationRequest;
-
 
11
 
-
 
12
public class BluedartTest {
3
public class BluedartTest {
13
 
4
 
14
	public static void main(String[] args) throws Exception{
5
	public static void main(String[] args) throws Exception{
15
		WayBillGeneration wbg = new WayBillGenerationLocator();
6
//		WayBillGeneration wbg = new WayBillGenerationLocator();
16
		IWayBillGeneration gen = wbg.getWSHttpBinding_IWayBillGeneration();
7
//		IWayBillGeneration gen = wbg.getWSHttpBinding_IWayBillGeneration();
17
		WayBillGenerationRequest request = new WayBillGenerationRequest();
8
//		WayBillGenerationRequest request = new WayBillGenerationRequest();
18
		Consignee consignee = new Consignee();
9
//		Consignee consignee = new Consignee();
19
		consignee.setConsigneeAddress1("Addr1");
10
//		consignee.setConsigneeAddress1("Addr1");
20
		consignee.setConsigneeMobile("9990381569");
11
//		consignee.setConsigneeMobile("9990381569");
21
		consignee.setConsigneeName("Amit");
12
//		consignee.setConsigneeName("Amit");
22
		consignee.setConsigneeAddress2("Noida");
13
//		consignee.setConsigneeAddress2("Noida");
23
		consignee.setConsigneeAddress2("Uttar Pradesh");
14
//		consignee.setConsigneeAddress2("Uttar Pradesh");
24
		consignee.setConsigneePincode("100011");
15
//		consignee.setConsigneePincode("100011");
25
		request.setConsignee(consignee);
16
//		request.setConsignee(consignee);
26
		Shipper shipper = new Shipper();
17
//		Shipper shipper = new Shipper();
27
		shipper.setCustomerAddress1("Arrd1");
18
//		shipper.setCustomerAddress1("Arrd1");
28
		shipper.setCustomerName("Amit");
19
//		shipper.setCustomerName("Amit");
29
		shipper.setCustomerEmailID("amit.gupta@shop2020.in");
20
//		shipper.setCustomerEmailID("amit.gupta@shop2020.in");
30
		request.setShipper(shipper);
21
//		request.setShipper(shipper);
31
		Services s = new Services();
22
//		Services s = new Services();
32
		s.setDeclaredValue(1000d);
23
//		s.setDeclaredValue(1000d);
33
		s.setInvoiceNo("121D");
24
//		s.setInvoiceNo("121D");
34
		s.setActualWeight(330d);
25
//		s.setActualWeight(330d);
35
		
26
//		
36
		request.setServices(s);
27
//		request.setServices(s);
37
		String customercode="316326";
28
//		String customercode="316326";
38
		String password = "";
29
//		String password = "";
39
		String isAdmin = "true";
30
//		String isAdmin = "true";
40
		String licenceKey="5f1740fdfb8196e7980faea7fe52dd0d";
31
//		String licenceKey="5f1740fdfb8196e7980faea7fe52dd0d";
41
		String api_type="T";
32
//		String api_type="T";
42
		String loginID = "FA316326";
33
//		String loginID = "FA316326";
43
		String area="FAR";
34
//		String area="FAR";
44
		String version = "1.3";
35
//		String version = "1.3";
45
		UserProfile profile = new UserProfile(api_type, area, customercode, isAdmin, licenceKey, loginID, password, version );
36
//		UserProfile profile = new UserProfile(api_type, area, customercode, isAdmin, licenceKey, loginID, password, version );
46
		System.out.println(gen.generateWayBill(request, profile));
37
//		System.out.println(gen.generateWayBill(request, profile));
47
	}
38
	}
48
}
39
}