Sample XML

This topic includes sample XML responses and a full XML Request:

You can also download a Job API Soap UI Test Harness.

Example: Success Response (No Errors)

The following is a sample Success Response. While this response means that the data was submitted, errors may exist in the data that was submitted.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<Success xmlns="http://www.smashfly.com/services/simplepost/v2">true</Success>

</s:Body>

</s:Envelope>

Example: Invalid Credential Response XML (Error)

In the case that invalid credentials are submitted, an error like the following would be the XML response.

<s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/">

<s:Body>

<s:Fault>

<faultcode xmlns:a="http://schemas.microsoft.com/net/2005/12/windowscommunicationfoundation/dispatcher">a:InternalServiceFault</faultcode>

<faultstring xml:lang="en-US">Invalid Credentials</faultstring>

<detail>

<ExceptionDetail xmlns="http://schemas.datacontract.org/2004/07/System.ServiceModel" xmlns:i="http://www.w3.org/2001/XMLSchema-instance">

<HelpLink i:nil="true"/>

<InnerException i:nil="true"/>

<Message>Invalid Credentials</Message>

<StackTrace>

at SmashFly.WebServices.SimplePostService.SimplePostServiceBase.Authenticate(String UserName, String Password) in m:\Builds\65562\SmashFly\SimplePostWCFService ps\src\SmashFly Services\SimplePostService_Solution\SimplePostWCFService\SimplePostServiceBase.cs:line 492

at SmashFly.WebServices.SimplePostService.v2.SimplePostService.BulkImportJobs(BulkImportJobsRequest request) in m:\Builds\65562\SmashFly\SimplePostWCFService ps\src\SmashFly Services\SimplePostService_Solution\SimplePostWCFService\v2\SimplePostService2.cs:line 74

at SyncInvokeBulkImportJobs(Object , Object[] , Object[] )

at System.ServiceModel.Dispatcher.SyncMethodInvoker.Invoke(Object instance, Object[] inputs,
Object[]&amp; outputs)

at System.ServiceModel.Dispatcher.DispatchOperationRuntime.InvokeBegin(MessageRpc&amp; rpc)

at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage5(MessageRpc&amp; rpc)

at System.ServiceModel.Dispatcher.ImmutableDispatchRuntime.ProcessMessage31(MessageRpc&amp; rpc)

at System.ServiceModel.Dispatcher.MessageRpc.Process(Boolean isOperationContextSet)

</StackTrace>

<Type>SF.WebHelpers.AuthenticationException</Type>

</ExceptionDetail>

</detail>

</s:Fault>

</s:Body>

</s:Envelope>

Example: Bad Request HTTP Response (Error)

When a bad request is submitted (that is, if the SmashFly system cannot understand the SOAP request), XML is not returned; instead, the HTTP header indicates a bad request.

HTTP/1.1 400 Bad Request

Server: Microsoft-IIS/8.5

X-Powered-By: ASP.NET

Date: Wed, 07 Oct 2015 19:45:59 GMT

Content-Length: 0

Example: Full XML Request

SmashFly can provide you with a SOAP UI project that you can leverage as a test harness for initial testing. This sample project contains the full SOAP envelope (with placeholder for credentials), sample data, and the Web service URL. For more information, reach out to your SmashFly Technical Services Consultant.

The following XML file includes samples of Add, Updates, and Deletes for a single job. Typically, a single call would not take multiple actions on the same job ID; this example leverages this single job ID to demonstrate the sort of data you’d submit when adding, then updating and finally deleting or deactivating a job.

Values that include special characters must be wrapped in beginning and ending CDATA tags.

<?xml version='1.0' encoding='utf-8'?>

<Jobs>

<Job>

<JobAction><![CDATA[Add]]]]><![CDATA[></JobAction>

<ATSJobID><![CDATA[ATSJOBID_SAMPLE123]]]]><![CDATA[></ATSJobID>

<JobTitle><![CDATA[Senior Launch Commander]]]]><![CDATA[></JobTitle>

<JobDescription><![CDATA[Pilot spacecraft during launch, trans-lunar coast, and earth return coast, and pilot Lunar Module for descent to moon and ascent to spacecraft. Must ensure safety of crew and spacecraft while piloting spacecraft and Lunar Module.]]]]><![CDATA[></JobDescription>

<JobCity><![CDATA[Jacksonville]]]]><![CDATA[></JobCity>

<JobState><![CDATA[FL]]]]><![CDATA[></JobState>

<JobCountry><![CDATA[US]]]]><![CDATA[></JobCountry>

<JobZipCode><![CDATA[32256]]]]><![CDATA[></JobZipCode>

<ApplyURL><![CDATA[https://training.smashfly.com/applyhere/jobID=ATSJOBID_SAMPLE123]]]]><![CDATA[></ApplyURL>

<JobType><![CDATA[FullTime]]]]><![CDATA[></JobType>

<JobCode>19</JobCode>

<JobDescription><![CDATA[<strong>Job Description:</strong><br />Customer Success Manager<br /><br />GENERAL SUMMARY<br />A Senior Launch Commander (SLC) is a key launch leader within our organization whose mission is to drive...<br />FULL HTML DESCRIPTION]]]]><![CDATA[></JobDescription>

<JobCategory_Custom><![CDATA[Launch Consulting]]]]><![CDATA[></JobCategory_Custom>

<Recruiter_Custom><![CDATA[Mary Sourcer]]]]><![CDATA[></Recruiter_Custom>

</Job>

<Job>

<JobAction><![CDATA[Update]]]]><![CDATA[></JobAction>

<ATSJobID><![CDATA[ATSJOBID_SAMPLE123]]]]><![CDATA[></ATSJobID>

<JobTitle><![CDATA[Senior Launch Commander-Updated]]]]><![CDATA[></JobTitle>

<Job-City><![CDATA[Concord]]]]><![CDATA[></JobCity>

<JobState><![CDATA[MA]]]]><![CDATA[></JobState>

<JobCountry><![CDATA[US]]]]><![CDATA[></JobCountry>

<JobZipCode><![CDATA[01742]]]]><![CDATA[></JobZipCode>

</Job>

<Job>

<JobAction><![CDATA[Delete]]]]><![CDATA[></JobAction>

<ATSJobID><![CDATA[ATSJOBID_SAMPLE123]]]]><![CDATA[></ATSJobID>

</Job>

</Jobs>