@Test public void testSendWakeUpSms() throws Exception { final Source requestPayload = new StringSource( "<ns2:SendSMSRequest " + "xmlns:ns2=\"http: + "<ns2:messageId>" + WKAEWUPSMS_CORRID + "</ns2:messageId>" + "<ns2:version>" + API_VERSION + "</ns2:version>" + "<ns2:licenseKey>" + LICENSEKEY + "</ns2:licenseKey>" + "<ns2:sentToIccid>" + ICC_ID + "</ns2:sentToIccid>" + "<ns2:messageText/>" + "</ns2:SendSMSRequest>"); final Source responsePayload = new StringSource( "<ns2:SendSMSResponse " + "ns2:requestId=\"IfBlIDGkzgTkWqa3\" xmlns:ns2=\"http: + "<ns2:correlationId>" + WKAEWUPSMS_CORRID + "</ns2:correlationId>" + "<ns2:version>" + API_VERSION + "</ns2:version>" + "<ns2:build>jasper_release_6.29-160108-154179</ns2:build>" + "<ns2:timestamp>2016-01-18T12:22:05.082Z</ns2:timestamp>" + "<ns2:smsMsgId>" + SMS_MSG_ID + "</ns2:smsMsgId>" + "</ns2:SendSMSResponse>"); when(this.correlationIdProviderService.getCorrelationId("wakeupsms", ICC_ID)).thenReturn(WKAEWUPSMS_CORRID); this.mockServer.expect(payload(requestPayload)).andRespond(withPayload(responsePayload)); final SendSMSResponse response = this.wsClientService.sendWakeUpSMS(ICC_ID); this.mockServer.verify(); assertThat(String.valueOf(response.getSmsMsgId())).isEqualTo(SMS_MSG_ID); }
public SendSMSResponse sendWakeUpSMS(final String iccId) { final SendSMSRequest sendSMSRequest = WS_CLIENT_FACTORY.createSendSMSRequest(); sendSMSRequest.setLicenseKey(this.jasperWirelessAccess.getLicenseKey()); sendSMSRequest.setMessageId(this.correlationIdProviderService.getCorrelationId(WAKEUPSMS_TYPE, iccId)); sendSMSRequest.setMessageText(""); sendSMSRequest.setMessageTextEncoding(""); sendSMSRequest.setSentToIccid(iccId); sendSMSRequest.setVersion(this.jasperWirelessAccess.getApiVersion()); this.setInterceptorUsernameTokens(); this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessAccess.getUri()); return (SendSMSResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(sendSMSRequest, new SoapActionCallback(SERVICE_SMS_SEND_SMS)); }
JasperWirelessSmsClient { public SendSMSResponse sendWakeUpSMS(final String iccId) { final SendSMSRequest sendSMSRequest = WS_CLIENT_FACTORY.createSendSMSRequest(); sendSMSRequest.setLicenseKey(this.jasperWirelessAccess.getLicenseKey()); sendSMSRequest.setMessageId(this.correlationIdProviderService.getCorrelationId(WAKEUPSMS_TYPE, iccId)); sendSMSRequest.setMessageText(""); sendSMSRequest.setMessageTextEncoding(""); sendSMSRequest.setSentToIccid(iccId); sendSMSRequest.setVersion(this.jasperWirelessAccess.getApiVersion()); this.setInterceptorUsernameTokens(); this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessAccess.getUri()); return (SendSMSResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(sendSMSRequest, new SoapActionCallback(SERVICE_SMS_SEND_SMS)); } }
JasperWirelessSmsClient { public SendSMSResponse sendWakeUpSMS(final String iccId) { final SendSMSRequest sendSMSRequest = WS_CLIENT_FACTORY.createSendSMSRequest(); sendSMSRequest.setLicenseKey(this.jasperWirelessAccess.getLicenseKey()); sendSMSRequest.setMessageId(this.correlationIdProviderService.getCorrelationId(WAKEUPSMS_TYPE, iccId)); sendSMSRequest.setMessageText(""); sendSMSRequest.setMessageTextEncoding(""); sendSMSRequest.setSentToIccid(iccId); sendSMSRequest.setVersion(this.jasperWirelessAccess.getApiVersion()); this.setInterceptorUsernameTokens(); this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessAccess.getUri()); return (SendSMSResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(sendSMSRequest, new SoapActionCallback(SERVICE_SMS_SEND_SMS)); }  }
JasperWirelessSmsClient { public SendSMSResponse sendWakeUpSMS(final String iccId) { final SendSMSRequest sendSMSRequest = WS_CLIENT_FACTORY.createSendSMSRequest(); sendSMSRequest.setLicenseKey(this.jasperWirelessAccess.getLicenseKey()); sendSMSRequest.setMessageId(this.correlationIdProviderService.getCorrelationId(WAKEUPSMS_TYPE, iccId)); sendSMSRequest.setMessageText(""); sendSMSRequest.setMessageTextEncoding(""); sendSMSRequest.setSentToIccid(iccId); sendSMSRequest.setVersion(this.jasperWirelessAccess.getApiVersion()); this.setInterceptorUsernameTokens(); this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessAccess.getUri()); return (SendSMSResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(sendSMSRequest, new SoapActionCallback(SERVICE_SMS_SEND_SMS)); }  SendSMSResponse sendWakeUpSMS(final String iccId); }
JasperWirelessSmsClient { public SendSMSResponse sendWakeUpSMS(final String iccId) { final SendSMSRequest sendSMSRequest = WS_CLIENT_FACTORY.createSendSMSRequest(); sendSMSRequest.setLicenseKey(this.jasperWirelessAccess.getLicenseKey()); sendSMSRequest.setMessageId(this.correlationIdProviderService.getCorrelationId(WAKEUPSMS_TYPE, iccId)); sendSMSRequest.setMessageText(""); sendSMSRequest.setMessageTextEncoding(""); sendSMSRequest.setSentToIccid(iccId); sendSMSRequest.setVersion(this.jasperWirelessAccess.getApiVersion()); this.setInterceptorUsernameTokens(); this.jasperWebServiceTemplate.setDefaultUri(this.jasperWirelessAccess.getUri()); return (SendSMSResponse) this.jasperWebServiceTemplate.marshalSendAndReceive(sendSMSRequest, new SoapActionCallback(SERVICE_SMS_SEND_SMS)); }  SendSMSResponse sendWakeUpSMS(final String iccId);  }