Ascio Web Service v2

Java Axis CreateContact

Creating a contact. The contactHandle is returned in the contact object passed by reference.

Response CreateContact(string sessionId,Contact contact)

Response codes

ResultCodeMessageValue
200OK
401Authorization failed
501Syntax error in parameters or arguments
506Required attribute missing in request

CreateContact Request

PropertyDescription
sessionIdExample: o58t9fjgw9bjarp6q7byv13e
contact

CreateContactResponse

Property
CreateContactResult
contact

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 CreateContactExample {
	public static Response main() {
		AscioConfig config = new AscioConfig();
		V2 env = config.getTesting().getV2();

		Contact contact =  new Contact();
		contact.setStatus("StatusTest");
		contact.setHandle("JD123");
		contact.setFirstName("John");
		contact.setLastName("Doe");
		contact.setOrgName("Ascio");
		contact.setAddress1("Address1Test");
		contact.setAddress2("Address2Test");
		contact.setPostalCode("888349");
		contact.setCity("CityTest");
		contact.setState("StateTest");
		contact.setCountryCode("DK");
		contact.setEmail("administrator@ascio-test-domain.com");
		contact.setPhone("+45.123456789");
		contact.setFax("+45.987654321");
		contact.setType("owner");
		contact.setDetails("DetailsTest");
		contact.setOrganisationNumber("OrganisationNumberTest");
The Handle. Please don't use Handle and contact-data. The data won't be merged!All contacts have FirstName and LastName. This is different than Registrants.All contacts have FirstName and LastName. This is different than Registrants.The Address1 is required for every Registrant/Contact. (In case no handle is used)The PostalCode is required for every Registrant/Contact. (In case no handle is used).The City is required for every Registrant/Contact. (In case no handle is used)The ISO 3166-1 code for the Country (DE,GB,DK,CH,SE,...). The CountryCode is required for every Registrant/Contact. (In case no handle is used)The Email is required for every Registrant/Contact. (In case no handle is used)Phone numbers must be in E164a format, eg. +45.123456789 (no spaces, hyphens, etc.).Fax numbers must be in E164a format, eg. +45.123456789 (no spaces, hyphens, etc.)
		try {
			/**inputs holders*/

			ContactHolder contactHolder = new ContactHolder(contact);

			Response response = env.getClient().createContact(env.getSessionId(), contactHolder);


			System.out.println("CreateContact ResultCode\t: " + response.getResultCode().toString());
			System.out.println("CreateContact Message\t: " + response.getMessage());
			System.out.println("Created Handle\t: " + contactHolder.value.getHandle());
			if(response.getResultCode() == 400) {
				for( String value : response.getValues()) {
					System.out.println("Error:	" + value);
				}
			}
			return response;
		} catch (Exception e) {
			System.out.print(e);
		}
		return new Response();package ascio.v2.examples;
import com.ascio.www._2007._01.*;
import com.ascio.www._2007._01.holders.*;
import ascio.lib.*;

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

		Contact contact =  new Contact();
		contact.setStatus("StatusTest");
		contact.setHandle("JD123");
		contact.setFirstName("John");
		contact.setLastName("Doe");
		contact.setOrgName("Ascio");
		contact.setAddress1("Address1Test");
		contact.setAddress2("Address2Test");
		contact.setPostalCode("888349");
		contact.setCity("CityTest");
		contact.setState("StateTest");
		contact.setCountryCode("DK");
		contact.setEmail("administrator@ascio-test-domain.com");
		contact.setPhone("+45.123456789");
		contact.setFax("+45.987654321");
		contact.setType("owner");
		contact.setDetails("DetailsTest");
		contact.setOrganisationNumber("OrganisationNumberTest");

		try {
			/**inputs holders*/

			ContactHolder contactHolder = new ContactHolder(contact);

			Response response = env.getClient().createContact(env.getSessionId(), contactHolder);


			System.out.println("CreateContact ResultCode\t: " + response.getResultCode().toString());
			System.out.println("CreateContact Message\t: " + response.getMessage());
			System.out.println("Created Handle\t: " + contactHolder.value.getHandle());
			if(response.getResultCode() == 400) {
				for( String value : response.getValues()) {
					System.out.println("Error:	" + value);
				}
			}
			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)
Please configure the IP-Whitelisting in the portal/demo-portal.