Java Axis CreateOrder - Register_Domain

Registers a domain. Please look at the TLD-Kit for special rules.

Response CreateOrder(string sessionId,Order order)

Response codes

ResultCodeMessageValue
200Order validated
200Order received
400Order not validatedMessages
401Authorization failed
405Access denied

CreateOrder request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
order

CreateOrderResponse

Property
CreateOrderResult
order

Java Axis example

package ascio.v2.examples;
import com.ascio.www._2007._01.*;
import com.ascio.www._2007._01.holders.*;
import ascio.lib.*;

public class Register_DomainExample {
	public static Response main() {
		AscioConfig config = new AscioConfig();
		V2 env = config.getTesting().getV2();

		Registrant registrant =  new Registrant();
		registrant.setName("John Doe");
		registrant.setAddress1("Address1Test");
		registrant.setCity("CityTest");
		registrant.setPostalCode("888349");
		registrant.setCountryCode("DK");
		registrant.setEmail(config.getEmail());
		registrant.setPhone("+45.123456789");

		Contact adminContact =  new Contact();
		adminContact.setFirstName("John");
		adminContact.setLastName("Doe");
		adminContact.setAddress1("Address1Test");
		adminContact.setPostalCode("888349");
		adminContact.setCity("CityTest");
		adminContact.setCountryCode("DK");
		adminContact.setEmail(config.getEmail());
		adminContact.setPhone("+45.123456789");

		Contact techContact =  new Contact();
		techContact.setFirstName("John");
		techContact.setLastName("Doe");
		techContact.setAddress1("Address1Test");
		techContact.setPostalCode("888349");
		techContact.setCity("CityTest");
		techContact.setCountryCode("DK");
		techContact.setEmail(config.getEmail());
		techContact.setPhone("+45.123456789");

		Contact billingContact =  new Contact();
		billingContact.setFirstName("John");
		billingContact.setLastName("Doe");
		billingContact.setAddress1("Address1Test");
		billingContact.setPostalCode("888349");
		billingContact.setCity("CityTest");
		billingContact.setCountryCode("DK");
		billingContact.setEmail(config.getEmail());
		billingContact.setPhone("+45.123456789");

		NameServer nameServer1 =  new NameServer();
		nameServer1.setHostName("ns1.ascio.com");

		NameServer nameServer2 =  new NameServer();
		nameServer2.setHostName("ns2.ascio.com");

		NameServers nameServers =  new NameServers();
		nameServers.setNameServer1(nameServer1);
		nameServers.setNameServer2(nameServer2);

		Domain domain =  new Domain();
		domain.setDomainName("ascio-test-domain"+System.currentTimeMillis()+".com");
		domain.setRegistrant(registrant);
		domain.setAdminContact(adminContact);
		domain.setTechContact(techContact);
		domain.setBillingContact(billingContact);
		domain.setNameServers(nameServers);

		Order order =  new Order();
		order.setType(OrderType.Register_Domain);
		order.setDomain(domain);

		try {
			//inputs holders

			OrderHolder orderHolder = new OrderHolder(order);

			Response response = env.getClient().createOrder(env.getSessionId(), orderHolder);


			System.out.println("CreateOrder ResultCode\t: " + response.getResultCode().toString());
			System.out.println("CreateOrder Message\t: " + response.getMessage());
			System.out.println("Created OrderId\t\t: " + orderHolder.value.getOrderId());
			if(response.getResultCode() == 400) {
				for( String value : response.getValues()) {
					System.out.println("Error:	" + value);
				}
			}
			env.repeatSync(orderHolder.value.getOrderId(), 10);
			return response;
           
		} catch (Exception e) {
			System.out.print(e);
		}
		return new Response();
	}
}
WSDL for AWS v2
https://aws.demo.ascio.com/2012/01/01/AscioService.wsdl (OTE)
https://aws.ascio.com/2012/01/01/AscioService.wsdl (Live)