createPrinter();//create printer
testUpdateResourceProperties_SCENARIO_B1();//set accepting job state to true
String response = sendPrinterRequest("Set_UpdateDocFormat.soap");
response = createJob(); //create Job
EnvelopeDocument responseEnvelope = loadResponseEnvelope(response);
setJobURL(responseEnvelope);
EnvelopeDocument setTerminationDoc = loadDocument("SetTerminationTime.soap");
addReferencePropsToEnvelope(setTerminationDoc, getJobEndpointReference(responseEnvelope).getReferenceProperties());
Calendar newTermTime = Calendar.getInstance();
newTermTime.set(Calendar.MINUTE, newTermTime.get(Calendar.MINUTE) + 1);
System.out.println("Setting termination time on JOB: ");
Envelope requestEnvelope = setTerminationDoc.getEnvelope();
XmlObject[] termElems = XmlBeanUtils.getChildElements(requestEnvelope.getBody());
SetTerminationTimeDocument.SetTerminationTime childElement = (SetTerminationTimeDocument.SetTerminationTime) termElems[0];
childElement.setRequestedTerminationTime(newTermTime);
response = sendJobRequest( setTerminationDoc );
//send a document
EnvelopeDocument envelopeDocument = loadDocument("SendDocument.soap");
addReferencePropsToEnvelope(envelopeDocument, getJobEndpointReference(responseEnvelope).getReferenceProperties());
response = sendJobRequest( envelopeDocument );
assertTrue(response.indexOf("Fault") == -1);
try