io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of powerauth-java-client-axis Show documentation
Show all versions of powerauth-java-client-axis Show documentation
PowerAuth Server SOAP Service Client - Axis
/**
* PowerAuthPortV2ServiceStub.java
*
* This file was auto-generated from WSDL
* by the Apache Axis2 version: 1.7.9 Built on : Nov 16, 2018 (12:05:37 GMT)
*/
package io.getlime.powerauth.soap.v2;
/*
* PowerAuthPortV2ServiceStub java implementation
*/
public class PowerAuthPortV2ServiceStub extends org.apache.axis2.client.Stub {
private static int counter = 0;
protected org.apache.axis2.description.AxisOperation[] _operations;
//hashmaps to keep the fault mapping
private java.util.HashMap faultExceptionNameMap = new java.util.HashMap();
private java.util.HashMap faultExceptionClassNameMap = new java.util.HashMap();
private java.util.HashMap faultMessageMap = new java.util.HashMap();
private javax.xml.namespace.QName[] opNameArray = null;
/**
*Constructor that takes in a configContext
*/
public PowerAuthPortV2ServiceStub(
org.apache.axis2.context.ConfigurationContext configurationContext,
java.lang.String targetEndpoint) throws org.apache.axis2.AxisFault {
this(configurationContext, targetEndpoint, false);
}
/**
* Constructor that takes in a configContext and useseperate listner
*/
public PowerAuthPortV2ServiceStub(
org.apache.axis2.context.ConfigurationContext configurationContext,
java.lang.String targetEndpoint, boolean useSeparateListener)
throws org.apache.axis2.AxisFault {
//To populate AxisService
populateAxisService();
populateFaults();
_serviceClient = new org.apache.axis2.client.ServiceClient(configurationContext,
_service);
_serviceClient.getOptions()
.setTo(new org.apache.axis2.addressing.EndpointReference(
targetEndpoint));
_serviceClient.getOptions().setUseSeparateListener(useSeparateListener);
}
/**
* Default Constructor
*/
public PowerAuthPortV2ServiceStub(
org.apache.axis2.context.ConfigurationContext configurationContext)
throws org.apache.axis2.AxisFault {
this(configurationContext,
"http://localhost:8080/powerauth-java-server/soap");
}
/**
* Default Constructor
*/
public PowerAuthPortV2ServiceStub() throws org.apache.axis2.AxisFault {
this("http://localhost:8080/powerauth-java-server/soap");
}
/**
* Constructor taking the target endpoint
*/
public PowerAuthPortV2ServiceStub(java.lang.String targetEndpoint)
throws org.apache.axis2.AxisFault {
this(null, targetEndpoint);
}
private static synchronized java.lang.String getUniqueSuffix() {
// reset the counter if it is greater than 99999
if (counter > 99999) {
counter = 0;
}
counter = counter + 1;
return java.lang.Long.toString(java.lang.System.currentTimeMillis()) +
"_" + counter;
}
private void populateAxisService() throws org.apache.axis2.AxisFault {
//creating the Service with a unique name
_service = new org.apache.axis2.description.AxisService(
"PowerAuthPortV2Service" + getUniqueSuffix());
addAnonymousOperations();
//creating the operations
org.apache.axis2.description.AxisOperation __operation;
_operations = new org.apache.axis2.description.AxisOperation[6];
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "prepareActivation"));
_service.addOperation(__operation);
_operations[0] = __operation;
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "createActivation"));
_service.addOperation(__operation);
_operations[1] = __operation;
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "createToken"));
_service.addOperation(__operation);
_operations[2] = __operation;
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getNonPersonalizedEncryptionKey"));
_service.addOperation(__operation);
_operations[3] = __operation;
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getPersonalizedEncryptionKey"));
_service.addOperation(__operation);
_operations[4] = __operation;
__operation = new org.apache.axis2.description.OutInAxisOperation();
__operation.setName(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "vaultUnlock"));
_service.addOperation(__operation);
_operations[5] = __operation;
}
//populates the faults
private void populateFaults() {
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#prepareActivation
* @param prepareActivationRequest0
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse prepareActivation(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest prepareActivationRequest0)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/PrepareActivationRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
prepareActivationRequest0,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"prepareActivation")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"PrepareActivationRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "PrepareActivation"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "PrepareActivation"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "PrepareActivation"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startprepareActivation
* @param prepareActivationRequest0
*/
public void startprepareActivation(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest prepareActivationRequest0,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[0].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/PrepareActivationRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
prepareActivationRequest0,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"prepareActivation")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"PrepareActivationRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse.class);
callback.receiveResultprepareActivation((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorprepareActivation(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"PrepareActivation"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"PrepareActivation"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"PrepareActivation"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorprepareActivation(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorprepareActivation(f);
}
} else {
callback.receiveErrorprepareActivation(f);
}
} else {
callback.receiveErrorprepareActivation(f);
}
} else {
callback.receiveErrorprepareActivation(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorprepareActivation(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[0].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[0].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#createActivation
* @param createActivationRequest2
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse createActivation(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest createActivationRequest2)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/CreateActivationRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
createActivationRequest2,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"createActivation")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"CreateActivationRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateActivation"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateActivation"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateActivation"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startcreateActivation
* @param createActivationRequest2
*/
public void startcreateActivation(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest createActivationRequest2,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[1].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/CreateActivationRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
createActivationRequest2,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"createActivation")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"CreateActivationRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse.class);
callback.receiveResultcreateActivation((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorcreateActivation(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"CreateActivation"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"CreateActivation"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"CreateActivation"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorcreateActivation(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateActivation(f);
}
} else {
callback.receiveErrorcreateActivation(f);
}
} else {
callback.receiveErrorcreateActivation(f);
}
} else {
callback.receiveErrorcreateActivation(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorcreateActivation(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[1].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[1].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#createToken
* @param createTokenRequest4
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse createToken(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest createTokenRequest4)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/CreateTokenRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
createTokenRequest4,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"createToken")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"CreateTokenRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateToken"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateToken"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateToken"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startcreateToken
* @param createTokenRequest4
*/
public void startcreateToken(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest createTokenRequest4,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[2].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/CreateTokenRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
createTokenRequest4,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "createToken")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"CreateTokenRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse.class);
callback.receiveResultcreateToken((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorcreateToken(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "CreateToken"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"CreateToken"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"CreateToken"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorcreateToken(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorcreateToken(f);
}
} else {
callback.receiveErrorcreateToken(f);
}
} else {
callback.receiveErrorcreateToken(f);
}
} else {
callback.receiveErrorcreateToken(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorcreateToken(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[2].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[2].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#getNonPersonalizedEncryptionKey
* @param getNonPersonalizedEncryptionKeyRequest6
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse getNonPersonalizedEncryptionKey(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest getNonPersonalizedEncryptionKeyRequest6)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/GetNonPersonalizedEncryptionKeyRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
getNonPersonalizedEncryptionKeyRequest6,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getNonPersonalizedEncryptionKey")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"GetNonPersonalizedEncryptionKeyRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startgetNonPersonalizedEncryptionKey
* @param getNonPersonalizedEncryptionKeyRequest6
*/
public void startgetNonPersonalizedEncryptionKey(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest getNonPersonalizedEncryptionKeyRequest6,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[3].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/GetNonPersonalizedEncryptionKeyRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
getNonPersonalizedEncryptionKeyRequest6,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getNonPersonalizedEncryptionKey")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"GetNonPersonalizedEncryptionKeyRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse.class);
callback.receiveResultgetNonPersonalizedEncryptionKey((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorgetNonPersonalizedEncryptionKey(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetNonPersonalizedEncryptionKey"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorgetNonPersonalizedEncryptionKey(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetNonPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetNonPersonalizedEncryptionKey(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorgetNonPersonalizedEncryptionKey(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[3].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[3].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#getPersonalizedEncryptionKey
* @param getPersonalizedEncryptionKeyRequest8
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse getPersonalizedEncryptionKey(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest getPersonalizedEncryptionKeyRequest8)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/GetPersonalizedEncryptionKeyRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
getPersonalizedEncryptionKeyRequest8,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getPersonalizedEncryptionKey")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"GetPersonalizedEncryptionKeyRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startgetPersonalizedEncryptionKey
* @param getPersonalizedEncryptionKeyRequest8
*/
public void startgetPersonalizedEncryptionKey(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest getPersonalizedEncryptionKeyRequest8,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[4].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/GetPersonalizedEncryptionKeyRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
getPersonalizedEncryptionKeyRequest8,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"getPersonalizedEncryptionKey")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"GetPersonalizedEncryptionKeyRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse.class);
callback.receiveResultgetPersonalizedEncryptionKey((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorgetPersonalizedEncryptionKey(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"GetPersonalizedEncryptionKey"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorgetPersonalizedEncryptionKey(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorgetPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetPersonalizedEncryptionKey(f);
}
} else {
callback.receiveErrorgetPersonalizedEncryptionKey(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorgetPersonalizedEncryptionKey(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[4].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[4].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
/**
* Auto generated method signature
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#vaultUnlock
* @param vaultUnlockRequest10
*/
public io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse vaultUnlock(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest vaultUnlockRequest10)
throws java.rmi.RemoteException {
org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
try {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/VaultUnlockRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
vaultUnlockRequest10,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"vaultUnlock")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"VaultUnlockRequest"));
//adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// set the message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message contxt to the operation client
_operationClient.addMessageContext(_messageContext);
//execute the operation client
_operationClient.execute(true);
org.apache.axis2.context.MessageContext _returnMessageContext = _operationClient.getMessageContext(org.apache.axis2.wsdl.WSDLConstants.MESSAGE_LABEL_IN_VALUE);
org.apache.axiom.soap.SOAPEnvelope _returnEnv = _returnMessageContext.getEnvelope();
java.lang.Object object = fromOM(_returnEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse.class);
return (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse) object;
} catch (org.apache.axis2.AxisFault f) {
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "VaultUnlock"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "VaultUnlock"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "VaultUnlock"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex, new java.lang.Object[] { messageObject });
throw new java.rmi.RemoteException(ex.getMessage(), ex);
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
throw f;
}
} else {
throw f;
}
} else {
throw f;
}
} finally {
if (_messageContext.getTransportOut() != null) {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
}
}
}
/**
* Auto generated method signature for Asynchronous Invocations
*
* @see io.getlime.powerauth.soap.v2.PowerAuthPortV2Service#startvaultUnlock
* @param vaultUnlockRequest10
*/
public void startvaultUnlock(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest vaultUnlockRequest10,
final io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceCallbackHandler callback)
throws java.rmi.RemoteException {
org.apache.axis2.client.OperationClient _operationClient = _serviceClient.createClient(_operations[5].getName());
_operationClient.getOptions()
.setAction("http://getlime.io/security/powerauth/v2/PowerAuthPortV2/VaultUnlockRequest");
_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);
addPropertyToOperationClient(_operationClient,
org.apache.axis2.description.WSDL2Constants.ATTR_WHTTP_QUERY_PARAMETER_SEPARATOR,
"&");
// create SOAP envelope with that payload
org.apache.axiom.soap.SOAPEnvelope env = null;
final org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
//Style is Doc.
env = toEnvelope(getFactory(_operationClient.getOptions()
.getSoapVersionURI()),
vaultUnlockRequest10,
optimizeContent(
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "vaultUnlock")),
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"VaultUnlockRequest"));
// adding SOAP soap_headers
_serviceClient.addHeadersToEnvelope(env);
// create message context with that soap envelope
_messageContext.setEnvelope(env);
// add the message context to the operation client
_operationClient.addMessageContext(_messageContext);
_operationClient.setCallback(new org.apache.axis2.client.async.AxisCallback() {
public void onMessage(
org.apache.axis2.context.MessageContext resultContext) {
try {
org.apache.axiom.soap.SOAPEnvelope resultEnv = resultContext.getEnvelope();
java.lang.Object object = fromOM(resultEnv.getBody()
.getFirstElement(),
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse.class);
callback.receiveResultvaultUnlock((io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse) object);
} catch (org.apache.axis2.AxisFault e) {
callback.receiveErrorvaultUnlock(e);
}
}
public void onError(java.lang.Exception error) {
if (error instanceof org.apache.axis2.AxisFault) {
org.apache.axis2.AxisFault f = (org.apache.axis2.AxisFault) error;
org.apache.axiom.om.OMElement faultElt = f.getDetail();
if (faultElt != null) {
if (faultExceptionNameMap.containsKey(
new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(), "VaultUnlock"))) {
//make the fault by reflection
try {
java.lang.String exceptionClassName = (java.lang.String) faultExceptionClassNameMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"VaultUnlock"));
java.lang.Class exceptionClass = java.lang.Class.forName(exceptionClassName);
java.lang.reflect.Constructor constructor = exceptionClass.getConstructor(java.lang.String.class);
java.lang.Exception ex = (java.lang.Exception) constructor.newInstance(f.getMessage());
//message class
java.lang.String messageClassName = (java.lang.String) faultMessageMap.get(new org.apache.axis2.client.FaultMapKey(
faultElt.getQName(),
"VaultUnlock"));
java.lang.Class messageClass = java.lang.Class.forName(messageClassName);
java.lang.Object messageObject = fromOM(faultElt,
messageClass);
java.lang.reflect.Method m = exceptionClass.getMethod("setFaultMessage",
new java.lang.Class[] { messageClass });
m.invoke(ex,
new java.lang.Object[] { messageObject });
callback.receiveErrorvaultUnlock(new java.rmi.RemoteException(
ex.getMessage(), ex));
} catch (java.lang.ClassCastException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (java.lang.ClassNotFoundException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (java.lang.NoSuchMethodException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (java.lang.reflect.InvocationTargetException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (java.lang.IllegalAccessException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (java.lang.InstantiationException e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
} catch (org.apache.axis2.AxisFault e) {
// we cannot intantiate the class - throw the original Axis fault
callback.receiveErrorvaultUnlock(f);
}
} else {
callback.receiveErrorvaultUnlock(f);
}
} else {
callback.receiveErrorvaultUnlock(f);
}
} else {
callback.receiveErrorvaultUnlock(error);
}
}
public void onFault(
org.apache.axis2.context.MessageContext faultContext) {
org.apache.axis2.AxisFault fault = org.apache.axis2.util.Utils.getInboundFaultFromMessageContext(faultContext);
onError(fault);
}
public void onComplete() {
try {
_messageContext.getTransportOut().getSender()
.cleanup(_messageContext);
} catch (org.apache.axis2.AxisFault axisFault) {
callback.receiveErrorvaultUnlock(axisFault);
}
}
});
org.apache.axis2.util.CallbackReceiver _callbackReceiver = null;
if ((_operations[5].getMessageReceiver() == null) &&
_operationClient.getOptions().isUseSeparateListener()) {
_callbackReceiver = new org.apache.axis2.util.CallbackReceiver();
_operations[5].setMessageReceiver(_callbackReceiver);
}
//execute the operation client
_operationClient.execute(false);
}
private boolean optimizeContent(javax.xml.namespace.QName opName) {
if (opNameArray == null) {
return false;
}
for (int i = 0; i < opNameArray.length; i++) {
if (opName.equals(opNameArray[i])) {
return true;
}
}
return false;
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.om.OMElement toOM(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse param,
boolean optimizeContent) throws org.apache.axis2.AxisFault {
try {
return param.getOMElement(io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse.MY_QNAME,
org.apache.axiom.om.OMAbstractFactory.getOMFactory());
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory,
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest param,
boolean optimizeContent, javax.xml.namespace.QName elementQName)
throws org.apache.axis2.AxisFault {
try {
org.apache.axiom.soap.SOAPEnvelope emptyEnvelope = factory.getDefaultEnvelope();
emptyEnvelope.getBody()
.addChild(param.getOMElement(
io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest.MY_QNAME,
factory));
return emptyEnvelope;
} catch (org.apache.axis2.databinding.ADBException e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
}
/* methods to provide back word compatibility */
/**
* get the default envelope
*/
private org.apache.axiom.soap.SOAPEnvelope toEnvelope(
org.apache.axiom.soap.SOAPFactory factory) {
return factory.getDefaultEnvelope();
}
private java.lang.Object fromOM(org.apache.axiom.om.OMElement param,
java.lang.Class type) throws org.apache.axis2.AxisFault {
try {
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateActivationResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.CreateTokenResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetNonPersonalizedEncryptionKeyResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.GetPersonalizedEncryptionKeyResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.PrepareActivationResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockRequest.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
if (io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse.class.equals(
type)) {
return io.getlime.powerauth.soap.v2.PowerAuthPortV2ServiceStub.VaultUnlockResponse.Factory.parse(param.getXMLStreamReaderWithoutCaching());
}
} catch (java.lang.Exception e) {
throw org.apache.axis2.AxisFault.makeFault(e);
}
return null;
}
//http://localhost:8080/powerauth-java-server/soap
public static class CreateActivationRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"CreateActivationRequest", "ns1");
/**
* field for UserId
*/
protected java.lang.String localUserId;
/**
* field for ApplicationId
*/
protected long localApplicationId;
/**
* field for TimestampActivationExpire
*/
protected java.util.Calendar localTimestampActivationExpire;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localTimestampActivationExpireTracker = false;
/**
* field for MaxFailureCount
*/
protected long localMaxFailureCount;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localMaxFailureCountTracker = false;
/**
* field for Identity
*/
protected java.lang.String localIdentity;
/**
* field for ActivationOtp
*/
protected java.lang.String localActivationOtp;
/**
* field for ActivationName
*/
protected java.lang.String localActivationName;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localActivationNameTracker = false;
/**
* field for Extras
*/
protected java.lang.String localExtras;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localExtrasTracker = false;
/**
* field for ActivationNonce
*/
protected java.lang.String localActivationNonce;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localEphemeralPublicKeyTracker = false;
/**
* field for EncryptedDevicePublicKey
*/
protected java.lang.String localEncryptedDevicePublicKey;
/**
* field for ApplicationKey
*/
protected java.lang.String localApplicationKey;
/**
* field for ApplicationSignature
*/
protected java.lang.String localApplicationSignature;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getUserId() {
return localUserId;
}
/**
* Auto generated setter method
* @param param UserId
*/
public void setUserId(java.lang.String param) {
this.localUserId = param;
}
/**
* Auto generated getter method
* @return long
*/
public long getApplicationId() {
return localApplicationId;
}
/**
* Auto generated setter method
* @param param ApplicationId
*/
public void setApplicationId(long param) {
this.localApplicationId = param;
}
public boolean isTimestampActivationExpireSpecified() {
return localTimestampActivationExpireTracker;
}
/**
* Auto generated getter method
* @return java.util.Calendar
*/
public java.util.Calendar getTimestampActivationExpire() {
return localTimestampActivationExpire;
}
/**
* Auto generated setter method
* @param param TimestampActivationExpire
*/
public void setTimestampActivationExpire(java.util.Calendar param) {
localTimestampActivationExpireTracker = param != null;
this.localTimestampActivationExpire = param;
}
public boolean isMaxFailureCountSpecified() {
return localMaxFailureCountTracker;
}
/**
* Auto generated getter method
* @return long
*/
public long getMaxFailureCount() {
return localMaxFailureCount;
}
/**
* Auto generated setter method
* @param param MaxFailureCount
*/
public void setMaxFailureCount(long param) {
// setting primitive attribute tracker to true
localMaxFailureCountTracker = param != java.lang.Long.MIN_VALUE;
this.localMaxFailureCount = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getIdentity() {
return localIdentity;
}
/**
* Auto generated setter method
* @param param Identity
*/
public void setIdentity(java.lang.String param) {
this.localIdentity = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationOtp() {
return localActivationOtp;
}
/**
* Auto generated setter method
* @param param ActivationOtp
*/
public void setActivationOtp(java.lang.String param) {
this.localActivationOtp = param;
}
public boolean isActivationNameSpecified() {
return localActivationNameTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationName() {
return localActivationName;
}
/**
* Auto generated setter method
* @param param ActivationName
*/
public void setActivationName(java.lang.String param) {
localActivationNameTracker = param != null;
this.localActivationName = param;
}
public boolean isExtrasSpecified() {
return localExtrasTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getExtras() {
return localExtras;
}
/**
* Auto generated setter method
* @param param Extras
*/
public void setExtras(java.lang.String param) {
localExtrasTracker = param != null;
this.localExtras = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationNonce() {
return localActivationNonce;
}
/**
* Auto generated setter method
* @param param ActivationNonce
*/
public void setActivationNonce(java.lang.String param) {
this.localActivationNonce = param;
}
public boolean isEphemeralPublicKeySpecified() {
return localEphemeralPublicKeyTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
localEphemeralPublicKeyTracker = param != null;
this.localEphemeralPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedDevicePublicKey() {
return localEncryptedDevicePublicKey;
}
/**
* Auto generated setter method
* @param param EncryptedDevicePublicKey
*/
public void setEncryptedDevicePublicKey(java.lang.String param) {
this.localEncryptedDevicePublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationKey() {
return localApplicationKey;
}
/**
* Auto generated setter method
* @param param ApplicationKey
*/
public void setApplicationKey(java.lang.String param) {
this.localApplicationKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationSignature() {
return localApplicationSignature;
}
/**
* Auto generated setter method
* @param param ApplicationSignature
*/
public void setApplicationSignature(java.lang.String param) {
this.localApplicationSignature = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":CreateActivationRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"CreateActivationRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "userId", xmlWriter);
if (localUserId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"userId cannot be null!!");
} else {
xmlWriter.writeCharacters(localUserId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationId", xmlWriter);
if (localApplicationId == java.lang.Long.MIN_VALUE) {
throw new org.apache.axis2.databinding.ADBException(
"applicationId cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localApplicationId));
}
xmlWriter.writeEndElement();
if (localTimestampActivationExpireTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "timestampActivationExpire",
xmlWriter);
if (localTimestampActivationExpire == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"timestampActivationExpire cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localTimestampActivationExpire));
}
xmlWriter.writeEndElement();
}
if (localMaxFailureCountTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "maxFailureCount", xmlWriter);
if (localMaxFailureCount == java.lang.Long.MIN_VALUE) {
throw new org.apache.axis2.databinding.ADBException(
"maxFailureCount cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localMaxFailureCount));
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "identity", xmlWriter);
if (localIdentity == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"identity cannot be null!!");
} else {
xmlWriter.writeCharacters(localIdentity);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationOtp", xmlWriter);
if (localActivationOtp == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationOtp cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationOtp);
}
xmlWriter.writeEndElement();
if (localActivationNameTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationName", xmlWriter);
if (localActivationName == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationName cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationName);
}
xmlWriter.writeEndElement();
}
if (localExtrasTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "extras", xmlWriter);
if (localExtras == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"extras cannot be null!!");
} else {
xmlWriter.writeCharacters(localExtras);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationNonce", xmlWriter);
if (localActivationNonce == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationNonce cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationNonce);
}
xmlWriter.writeEndElement();
if (localEphemeralPublicKeyTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey",
xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptedDevicePublicKey",
xmlWriter);
if (localEncryptedDevicePublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedDevicePublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedDevicePublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationKey", xmlWriter);
if (localApplicationKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationSignature", xmlWriter);
if (localApplicationSignature == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationSignature cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationSignature);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static CreateActivationRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
CreateActivationRequest object = new CreateActivationRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"CreateActivationRequest".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (CreateActivationRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"userId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "userId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setUserId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"timestampActivationExpire").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "timestampActivationExpire" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setTimestampActivationExpire(org.apache.axis2.databinding.utils.ConverterUtil.convertToDateTime(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"maxFailureCount").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "maxFailureCount" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setMaxFailureCount(org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(
content));
reader.next();
} // End of if for expected property start element
else {
object.setMaxFailureCount(java.lang.Long.MIN_VALUE);
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"identity").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "identity" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setIdentity(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationOtp").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationOtp" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationOtp(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationName").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationName" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationName(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"extras").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "extras" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setExtras(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationNonce").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationNonce" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationNonce(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedDevicePublicKey").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptedDevicePublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedDevicePublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationSignature").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationSignature" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationSignature(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class GetPersonalizedEncryptionKeyRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"GetPersonalizedEncryptionKeyRequest", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for SessionIndex
*/
protected java.lang.String localSessionIndex;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localSessionIndexTracker = false;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
public boolean isSessionIndexSpecified() {
return localSessionIndexTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getSessionIndex() {
return localSessionIndex;
}
/**
* Auto generated setter method
* @param param SessionIndex
*/
public void setSessionIndex(java.lang.String param) {
localSessionIndexTracker = param != null;
this.localSessionIndex = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix +
":GetPersonalizedEncryptionKeyRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"GetPersonalizedEncryptionKeyRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
if (localSessionIndexTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "sessionIndex", xmlWriter);
if (localSessionIndex == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"sessionIndex cannot be null!!");
} else {
xmlWriter.writeCharacters(localSessionIndex);
}
xmlWriter.writeEndElement();
}
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static GetPersonalizedEncryptionKeyRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
GetPersonalizedEncryptionKeyRequest object = new GetPersonalizedEncryptionKeyRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"GetPersonalizedEncryptionKeyRequest".equals(
type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (GetPersonalizedEncryptionKeyRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"sessionIndex").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "sessionIndex" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setSessionIndex(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class CreateTokenRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"CreateTokenRequest", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for SignatureType
*/
protected SignatureType localSignatureType;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return SignatureType
*/
public SignatureType getSignatureType() {
return localSignatureType;
}
/**
* Auto generated setter method
* @param param SignatureType
*/
public void setSignatureType(SignatureType param) {
this.localSignatureType = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
this.localEphemeralPublicKey = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":CreateTokenRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"CreateTokenRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
if (localSignatureType == null) {
throw new org.apache.axis2.databinding.ADBException(
"signatureType cannot be null!!");
}
localSignatureType.serialize(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "signatureType"),
xmlWriter);
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey", xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static CreateTokenRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
CreateTokenRequest object = new CreateTokenRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"CreateTokenRequest".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (CreateTokenRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"signatureType").equals(reader.getName())) {
object.setSignatureType(SignatureType.Factory.parse(
reader));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class ExtensionMapper {
public static java.lang.Object getTypeObject(
java.lang.String namespaceURI, java.lang.String typeName,
javax.xml.stream.XMLStreamReader reader) throws java.lang.Exception {
if ("http://getlime.io/security/powerauth/v2".equals(namespaceURI) &&
"ActivationStatus".equals(typeName)) {
return ActivationStatus.Factory.parse(reader);
}
if ("http://getlime.io/security/powerauth/v2".equals(namespaceURI) &&
"SignatureType".equals(typeName)) {
return SignatureType.Factory.parse(reader);
}
throw new org.apache.axis2.databinding.ADBException(
"Unsupported type " + namespaceURI + " " + typeName);
}
}
public static class GetNonPersonalizedEncryptionKeyRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"GetNonPersonalizedEncryptionKeyRequest", "ns1");
/**
* field for ApplicationKey
*/
protected java.lang.String localApplicationKey;
/**
* field for SessionIndex
*/
protected java.lang.String localSessionIndex;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localSessionIndexTracker = false;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationKey() {
return localApplicationKey;
}
/**
* Auto generated setter method
* @param param ApplicationKey
*/
public void setApplicationKey(java.lang.String param) {
this.localApplicationKey = param;
}
public boolean isSessionIndexSpecified() {
return localSessionIndexTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getSessionIndex() {
return localSessionIndex;
}
/**
* Auto generated setter method
* @param param SessionIndex
*/
public void setSessionIndex(java.lang.String param) {
localSessionIndexTracker = param != null;
this.localSessionIndex = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
this.localEphemeralPublicKey = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix +
":GetNonPersonalizedEncryptionKeyRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"GetNonPersonalizedEncryptionKeyRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationKey", xmlWriter);
if (localApplicationKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationKey);
}
xmlWriter.writeEndElement();
if (localSessionIndexTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "sessionIndex", xmlWriter);
if (localSessionIndex == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"sessionIndex cannot be null!!");
} else {
xmlWriter.writeCharacters(localSessionIndex);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey", xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static GetNonPersonalizedEncryptionKeyRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
GetNonPersonalizedEncryptionKeyRequest object = new GetNonPersonalizedEncryptionKeyRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"GetNonPersonalizedEncryptionKeyRequest".equals(
type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (GetNonPersonalizedEncryptionKeyRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"sessionIndex").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "sessionIndex" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setSessionIndex(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class PrepareActivationResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"PrepareActivationResponse", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for ActivationNonce
*/
protected java.lang.String localActivationNonce;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/**
* field for EncryptedServerPublicKey
*/
protected java.lang.String localEncryptedServerPublicKey;
/**
* field for EncryptedServerPublicKeySignature
*/
protected java.lang.String localEncryptedServerPublicKeySignature;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationNonce() {
return localActivationNonce;
}
/**
* Auto generated setter method
* @param param ActivationNonce
*/
public void setActivationNonce(java.lang.String param) {
this.localActivationNonce = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
this.localEphemeralPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedServerPublicKey() {
return localEncryptedServerPublicKey;
}
/**
* Auto generated setter method
* @param param EncryptedServerPublicKey
*/
public void setEncryptedServerPublicKey(java.lang.String param) {
this.localEncryptedServerPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedServerPublicKeySignature() {
return localEncryptedServerPublicKeySignature;
}
/**
* Auto generated setter method
* @param param EncryptedServerPublicKeySignature
*/
public void setEncryptedServerPublicKeySignature(java.lang.String param) {
this.localEncryptedServerPublicKeySignature = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":PrepareActivationResponse",
xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"PrepareActivationResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationNonce", xmlWriter);
if (localActivationNonce == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationNonce cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationNonce);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey", xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptedServerPublicKey",
xmlWriter);
if (localEncryptedServerPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedServerPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedServerPublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace,
"encryptedServerPublicKeySignature", xmlWriter);
if (localEncryptedServerPublicKeySignature == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedServerPublicKeySignature cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedServerPublicKeySignature);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static PrepareActivationResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
PrepareActivationResponse object = new PrepareActivationResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"PrepareActivationResponse".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (PrepareActivationResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationNonce").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationNonce" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationNonce(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedServerPublicKey").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptedServerPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedServerPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedServerPublicKeySignature").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " +
"encryptedServerPublicKeySignature" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedServerPublicKeySignature(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class VaultUnlockRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"VaultUnlockRequest", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for ApplicationKey
*/
protected java.lang.String localApplicationKey;
/**
* field for Data
*/
protected java.lang.String localData;
/**
* field for Signature
*/
protected java.lang.String localSignature;
/**
* field for SignatureType
*/
protected SignatureType localSignatureType;
/**
* field for Reason
*/
protected java.lang.String localReason;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localReasonTracker = false;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationKey() {
return localApplicationKey;
}
/**
* Auto generated setter method
* @param param ApplicationKey
*/
public void setApplicationKey(java.lang.String param) {
this.localApplicationKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getData() {
return localData;
}
/**
* Auto generated setter method
* @param param Data
*/
public void setData(java.lang.String param) {
this.localData = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getSignature() {
return localSignature;
}
/**
* Auto generated setter method
* @param param Signature
*/
public void setSignature(java.lang.String param) {
this.localSignature = param;
}
/**
* Auto generated getter method
* @return SignatureType
*/
public SignatureType getSignatureType() {
return localSignatureType;
}
/**
* Auto generated setter method
* @param param SignatureType
*/
public void setSignatureType(SignatureType param) {
this.localSignatureType = param;
}
public boolean isReasonSpecified() {
return localReasonTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getReason() {
return localReason;
}
/**
* Auto generated setter method
* @param param Reason
*/
public void setReason(java.lang.String param) {
localReasonTracker = param != null;
this.localReason = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":VaultUnlockRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"VaultUnlockRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationKey", xmlWriter);
if (localApplicationKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "data", xmlWriter);
if (localData == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"data cannot be null!!");
} else {
xmlWriter.writeCharacters(localData);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "signature", xmlWriter);
if (localSignature == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"signature cannot be null!!");
} else {
xmlWriter.writeCharacters(localSignature);
}
xmlWriter.writeEndElement();
if (localSignatureType == null) {
throw new org.apache.axis2.databinding.ADBException(
"signatureType cannot be null!!");
}
localSignatureType.serialize(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "signatureType"),
xmlWriter);
if (localReasonTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "reason", xmlWriter);
if (localReason == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"reason cannot be null!!");
} else {
xmlWriter.writeCharacters(localReason);
}
xmlWriter.writeEndElement();
}
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static VaultUnlockRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
VaultUnlockRequest object = new VaultUnlockRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"VaultUnlockRequest".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (VaultUnlockRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"data").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "data" + " cannot be null");
}
java.lang.String content = reader.getElementText();
object.setData(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"signature").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "signature" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setSignature(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"signatureType").equals(reader.getName())) {
object.setSignatureType(SignatureType.Factory.parse(
reader));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"reason").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "reason" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setReason(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class CreateActivationResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"CreateActivationResponse", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for ActivationNonce
*/
protected java.lang.String localActivationNonce;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/**
* field for EncryptedServerPublicKey
*/
protected java.lang.String localEncryptedServerPublicKey;
/**
* field for EncryptedServerPublicKeySignature
*/
protected java.lang.String localEncryptedServerPublicKeySignature;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationNonce() {
return localActivationNonce;
}
/**
* Auto generated setter method
* @param param ActivationNonce
*/
public void setActivationNonce(java.lang.String param) {
this.localActivationNonce = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
this.localEphemeralPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedServerPublicKey() {
return localEncryptedServerPublicKey;
}
/**
* Auto generated setter method
* @param param EncryptedServerPublicKey
*/
public void setEncryptedServerPublicKey(java.lang.String param) {
this.localEncryptedServerPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedServerPublicKeySignature() {
return localEncryptedServerPublicKeySignature;
}
/**
* Auto generated setter method
* @param param EncryptedServerPublicKeySignature
*/
public void setEncryptedServerPublicKeySignature(java.lang.String param) {
this.localEncryptedServerPublicKeySignature = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":CreateActivationResponse", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"CreateActivationResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationNonce", xmlWriter);
if (localActivationNonce == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationNonce cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationNonce);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey", xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptedServerPublicKey",
xmlWriter);
if (localEncryptedServerPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedServerPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedServerPublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace,
"encryptedServerPublicKeySignature", xmlWriter);
if (localEncryptedServerPublicKeySignature == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedServerPublicKeySignature cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedServerPublicKeySignature);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static CreateActivationResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
CreateActivationResponse object = new CreateActivationResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"CreateActivationResponse".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (CreateActivationResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationNonce").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationNonce" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationNonce(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedServerPublicKey").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptedServerPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedServerPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedServerPublicKeySignature").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " +
"encryptedServerPublicKeySignature" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedServerPublicKeySignature(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class CreateTokenResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"CreateTokenResponse", "ns1");
/**
* field for EncryptedData
*/
protected java.lang.String localEncryptedData;
/**
* field for Mac
*/
protected java.lang.String localMac;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedData() {
return localEncryptedData;
}
/**
* Auto generated setter method
* @param param EncryptedData
*/
public void setEncryptedData(java.lang.String param) {
this.localEncryptedData = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getMac() {
return localMac;
}
/**
* Auto generated setter method
* @param param Mac
*/
public void setMac(java.lang.String param) {
this.localMac = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":CreateTokenResponse", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"CreateTokenResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptedData", xmlWriter);
if (localEncryptedData == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedData cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedData);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "mac", xmlWriter);
if (localMac == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"mac cannot be null!!");
} else {
xmlWriter.writeCharacters(localMac);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static CreateTokenResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
CreateTokenResponse object = new CreateTokenResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"CreateTokenResponse".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (CreateTokenResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedData").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptedData" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedData(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2", "mac").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "mac" + " cannot be null");
}
java.lang.String content = reader.getElementText();
object.setMac(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class ActivationStatus implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"ActivationStatus", "ns1");
private static java.util.HashMap _table_ = new java.util.HashMap();
public static final java.lang.String _CREATED = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"CREATED");
public static final java.lang.String _PENDING_COMMIT = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"PENDING_COMMIT");
public static final java.lang.String _ACTIVE = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"ACTIVE");
public static final java.lang.String _BLOCKED = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"BLOCKED");
public static final java.lang.String _REMOVED = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"REMOVED");
public static final ActivationStatus CREATED = new ActivationStatus(_CREATED,
true);
public static final ActivationStatus PENDING_COMMIT = new ActivationStatus(_PENDING_COMMIT,
true);
public static final ActivationStatus ACTIVE = new ActivationStatus(_ACTIVE,
true);
public static final ActivationStatus BLOCKED = new ActivationStatus(_BLOCKED,
true);
public static final ActivationStatus REMOVED = new ActivationStatus(_REMOVED,
true);
/**
* field for ActivationStatus
*/
protected java.lang.String localActivationStatus;
// Constructor
protected ActivationStatus(java.lang.String value,
boolean isRegisterValue) {
localActivationStatus = value;
if (isRegisterValue) {
_table_.put(localActivationStatus, this);
}
}
public java.lang.String getValue() {
return localActivationStatus;
}
public boolean equals(java.lang.Object obj) {
return (obj == this);
}
public int hashCode() {
return toString().hashCode();
}
public java.lang.String toString() {
return localActivationStatus.toString();
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
//We can safely assume an element has only one type associated with it
java.lang.String namespace = parentQName.getNamespaceURI();
java.lang.String _localName = parentQName.getLocalPart();
writeStartElement(null, namespace, _localName, xmlWriter);
// add the type details if this is used in a simple type
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":ActivationStatus", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"ActivationStatus", xmlWriter);
}
}
if (localActivationStatus == null) {
throw new org.apache.axis2.databinding.ADBException(
"ActivationStatus cannot be null !!");
} else {
xmlWriter.writeCharacters(localActivationStatus);
}
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
public static ActivationStatus fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
ActivationStatus enumeration = (ActivationStatus) _table_.get(value);
// handle unexpected enumeration values properly
if (enumeration == null) {
throw new java.lang.IllegalArgumentException();
}
return enumeration;
}
public static ActivationStatus fromString(java.lang.String value,
java.lang.String namespaceURI)
throws java.lang.IllegalArgumentException {
try {
return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
value));
} catch (java.lang.Exception e) {
throw new java.lang.IllegalArgumentException();
}
}
public static ActivationStatus fromString(
javax.xml.stream.XMLStreamReader xmlStreamReader,
java.lang.String content) {
if (content.indexOf(":") > -1) {
java.lang.String prefix = content.substring(0,
content.indexOf(":"));
java.lang.String namespaceUri = xmlStreamReader.getNamespaceContext()
.getNamespaceURI(prefix);
return ActivationStatus.Factory.fromString(content,
namespaceUri);
} else {
return ActivationStatus.Factory.fromString(content, "");
}
}
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static ActivationStatus parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
ActivationStatus object = null;
// initialize a hash map to keep values
java.util.Map attributeMap = new java.util.HashMap();
java.util.List extraAttributeList = new java.util.ArrayList();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
while (!reader.isEndElement()) {
if (reader.isStartElement() || reader.hasText()) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ActivationStatus" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
if (content.indexOf(":") > 0) {
// this seems to be a Qname so find the namespace and send
prefix = content.substring(0,
content.indexOf(":"));
namespaceuri = reader.getNamespaceURI(prefix);
object = ActivationStatus.Factory.fromString(content,
namespaceuri);
} else {
// this seems to be not a qname send and empty namespace incase of it is
// check is done in fromString method
object = ActivationStatus.Factory.fromString(content,
"");
}
} else {
reader.next();
}
} // end of while loop
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class VaultUnlockResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"VaultUnlockResponse", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for UserId
*/
protected java.lang.String localUserId;
/**
* field for ActivationStatus
*/
protected ActivationStatus localActivationStatus;
/**
* field for BlockedReason
*/
protected java.lang.String localBlockedReason;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localBlockedReasonTracker = false;
/**
* field for RemainingAttempts
*/
protected java.math.BigInteger localRemainingAttempts;
/**
* field for SignatureValid
*/
protected boolean localSignatureValid;
/**
* field for EncryptedVaultEncryptionKey
*/
protected java.lang.String localEncryptedVaultEncryptionKey;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localEncryptedVaultEncryptionKeyTracker = false;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getUserId() {
return localUserId;
}
/**
* Auto generated setter method
* @param param UserId
*/
public void setUserId(java.lang.String param) {
this.localUserId = param;
}
/**
* Auto generated getter method
* @return ActivationStatus
*/
public ActivationStatus getActivationStatus() {
return localActivationStatus;
}
/**
* Auto generated setter method
* @param param ActivationStatus
*/
public void setActivationStatus(ActivationStatus param) {
this.localActivationStatus = param;
}
public boolean isBlockedReasonSpecified() {
return localBlockedReasonTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getBlockedReason() {
return localBlockedReason;
}
/**
* Auto generated setter method
* @param param BlockedReason
*/
public void setBlockedReason(java.lang.String param) {
localBlockedReasonTracker = param != null;
this.localBlockedReason = param;
}
/**
* Auto generated getter method
* @return java.math.BigInteger
*/
public java.math.BigInteger getRemainingAttempts() {
return localRemainingAttempts;
}
/**
* Auto generated setter method
* @param param RemainingAttempts
*/
public void setRemainingAttempts(java.math.BigInteger param) {
this.localRemainingAttempts = param;
}
/**
* Auto generated getter method
* @return boolean
*/
public boolean getSignatureValid() {
return localSignatureValid;
}
/**
* Auto generated setter method
* @param param SignatureValid
*/
public void setSignatureValid(boolean param) {
this.localSignatureValid = param;
}
public boolean isEncryptedVaultEncryptionKeySpecified() {
return localEncryptedVaultEncryptionKeyTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedVaultEncryptionKey() {
return localEncryptedVaultEncryptionKey;
}
/**
* Auto generated setter method
* @param param EncryptedVaultEncryptionKey
*/
public void setEncryptedVaultEncryptionKey(java.lang.String param) {
localEncryptedVaultEncryptionKeyTracker = param != null;
this.localEncryptedVaultEncryptionKey = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":VaultUnlockResponse", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"VaultUnlockResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "userId", xmlWriter);
if (localUserId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"userId cannot be null!!");
} else {
xmlWriter.writeCharacters(localUserId);
}
xmlWriter.writeEndElement();
if (localActivationStatus == null) {
throw new org.apache.axis2.databinding.ADBException(
"activationStatus cannot be null!!");
}
localActivationStatus.serialize(new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationStatus"), xmlWriter);
if (localBlockedReasonTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "blockedReason", xmlWriter);
if (localBlockedReason == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"blockedReason cannot be null!!");
} else {
xmlWriter.writeCharacters(localBlockedReason);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "remainingAttempts", xmlWriter);
if (localRemainingAttempts == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"remainingAttempts cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localRemainingAttempts));
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "signatureValid", xmlWriter);
if (false) {
throw new org.apache.axis2.databinding.ADBException(
"signatureValid cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localSignatureValid));
}
xmlWriter.writeEndElement();
if (localEncryptedVaultEncryptionKeyTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace,
"encryptedVaultEncryptionKey", xmlWriter);
if (localEncryptedVaultEncryptionKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedVaultEncryptionKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedVaultEncryptionKey);
}
xmlWriter.writeEndElement();
}
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static VaultUnlockResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
VaultUnlockResponse object = new VaultUnlockResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"VaultUnlockResponse".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (VaultUnlockResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"userId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "userId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setUserId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationStatus").equals(reader.getName())) {
object.setActivationStatus(ActivationStatus.Factory.parse(
reader));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"blockedReason").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "blockedReason" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setBlockedReason(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"remainingAttempts").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "remainingAttempts" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setRemainingAttempts(org.apache.axis2.databinding.utils.ConverterUtil.convertToInteger(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"signatureValid").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "signatureValid" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setSignatureValid(org.apache.axis2.databinding.utils.ConverterUtil.convertToBoolean(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedVaultEncryptionKey").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " +
"encryptedVaultEncryptionKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedVaultEncryptionKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class GetNonPersonalizedEncryptionKeyResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"GetNonPersonalizedEncryptionKeyResponse", "ns1");
/**
* field for ApplicationKey
*/
protected java.lang.String localApplicationKey;
/**
* field for ApplicationId
*/
protected long localApplicationId;
/**
* field for EncryptionKey
*/
protected java.lang.String localEncryptionKey;
/**
* field for EncryptionKeyIndex
*/
protected java.lang.String localEncryptionKeyIndex;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationKey() {
return localApplicationKey;
}
/**
* Auto generated setter method
* @param param ApplicationKey
*/
public void setApplicationKey(java.lang.String param) {
this.localApplicationKey = param;
}
/**
* Auto generated getter method
* @return long
*/
public long getApplicationId() {
return localApplicationId;
}
/**
* Auto generated setter method
* @param param ApplicationId
*/
public void setApplicationId(long param) {
this.localApplicationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptionKey() {
return localEncryptionKey;
}
/**
* Auto generated setter method
* @param param EncryptionKey
*/
public void setEncryptionKey(java.lang.String param) {
this.localEncryptionKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptionKeyIndex() {
return localEncryptionKeyIndex;
}
/**
* Auto generated setter method
* @param param EncryptionKeyIndex
*/
public void setEncryptionKeyIndex(java.lang.String param) {
this.localEncryptionKeyIndex = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
this.localEphemeralPublicKey = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix +
":GetNonPersonalizedEncryptionKeyResponse", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"GetNonPersonalizedEncryptionKeyResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationKey", xmlWriter);
if (localApplicationKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationId", xmlWriter);
if (localApplicationId == java.lang.Long.MIN_VALUE) {
throw new org.apache.axis2.databinding.ADBException(
"applicationId cannot be null!!");
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
localApplicationId));
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptionKey", xmlWriter);
if (localEncryptionKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptionKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptionKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptionKeyIndex", xmlWriter);
if (localEncryptionKeyIndex == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptionKeyIndex cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptionKeyIndex);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey", xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static GetNonPersonalizedEncryptionKeyResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
GetNonPersonalizedEncryptionKeyResponse object = new GetNonPersonalizedEncryptionKeyResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"GetNonPersonalizedEncryptionKeyResponse".equals(
type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (GetNonPersonalizedEncryptionKeyResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToLong(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptionKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptionKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptionKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptionKeyIndex").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptionKeyIndex" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptionKeyIndex(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class PrepareActivationRequest implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"PrepareActivationRequest", "ns1");
/**
* field for ActivationIdShort
*/
protected java.lang.String localActivationIdShort;
/**
* field for ActivationName
*/
protected java.lang.String localActivationName;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localActivationNameTracker = false;
/**
* field for Extras
*/
protected java.lang.String localExtras;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localExtrasTracker = false;
/**
* field for ActivationNonce
*/
protected java.lang.String localActivationNonce;
/**
* field for EphemeralPublicKey
*/
protected java.lang.String localEphemeralPublicKey;
/* This tracker boolean wil be used to detect whether the user called the set method
* for this attribute. It will be used to determine whether to include this field
* in the serialized XML
*/
protected boolean localEphemeralPublicKeyTracker = false;
/**
* field for EncryptedDevicePublicKey
*/
protected java.lang.String localEncryptedDevicePublicKey;
/**
* field for ApplicationKey
*/
protected java.lang.String localApplicationKey;
/**
* field for ApplicationSignature
*/
protected java.lang.String localApplicationSignature;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationIdShort() {
return localActivationIdShort;
}
/**
* Auto generated setter method
* @param param ActivationIdShort
*/
public void setActivationIdShort(java.lang.String param) {
this.localActivationIdShort = param;
}
public boolean isActivationNameSpecified() {
return localActivationNameTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationName() {
return localActivationName;
}
/**
* Auto generated setter method
* @param param ActivationName
*/
public void setActivationName(java.lang.String param) {
localActivationNameTracker = param != null;
this.localActivationName = param;
}
public boolean isExtrasSpecified() {
return localExtrasTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getExtras() {
return localExtras;
}
/**
* Auto generated setter method
* @param param Extras
*/
public void setExtras(java.lang.String param) {
localExtrasTracker = param != null;
this.localExtras = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationNonce() {
return localActivationNonce;
}
/**
* Auto generated setter method
* @param param ActivationNonce
*/
public void setActivationNonce(java.lang.String param) {
this.localActivationNonce = param;
}
public boolean isEphemeralPublicKeySpecified() {
return localEphemeralPublicKeyTracker;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEphemeralPublicKey() {
return localEphemeralPublicKey;
}
/**
* Auto generated setter method
* @param param EphemeralPublicKey
*/
public void setEphemeralPublicKey(java.lang.String param) {
localEphemeralPublicKeyTracker = param != null;
this.localEphemeralPublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptedDevicePublicKey() {
return localEncryptedDevicePublicKey;
}
/**
* Auto generated setter method
* @param param EncryptedDevicePublicKey
*/
public void setEncryptedDevicePublicKey(java.lang.String param) {
this.localEncryptedDevicePublicKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationKey() {
return localApplicationKey;
}
/**
* Auto generated setter method
* @param param ApplicationKey
*/
public void setApplicationKey(java.lang.String param) {
this.localApplicationKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getApplicationSignature() {
return localApplicationSignature;
}
/**
* Auto generated setter method
* @param param ApplicationSignature
*/
public void setApplicationSignature(java.lang.String param) {
this.localApplicationSignature = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":PrepareActivationRequest", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"PrepareActivationRequest", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationIdShort", xmlWriter);
if (localActivationIdShort == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationIdShort cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationIdShort);
}
xmlWriter.writeEndElement();
if (localActivationNameTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationName", xmlWriter);
if (localActivationName == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationName cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationName);
}
xmlWriter.writeEndElement();
}
if (localExtrasTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "extras", xmlWriter);
if (localExtras == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"extras cannot be null!!");
} else {
xmlWriter.writeCharacters(localExtras);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationNonce", xmlWriter);
if (localActivationNonce == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationNonce cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationNonce);
}
xmlWriter.writeEndElement();
if (localEphemeralPublicKeyTracker) {
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "ephemeralPublicKey",
xmlWriter);
if (localEphemeralPublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"ephemeralPublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEphemeralPublicKey);
}
xmlWriter.writeEndElement();
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptedDevicePublicKey",
xmlWriter);
if (localEncryptedDevicePublicKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptedDevicePublicKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptedDevicePublicKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationKey", xmlWriter);
if (localApplicationKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "applicationSignature", xmlWriter);
if (localApplicationSignature == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"applicationSignature cannot be null!!");
} else {
xmlWriter.writeCharacters(localApplicationSignature);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static PrepareActivationRequest parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
PrepareActivationRequest object = new PrepareActivationRequest();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"PrepareActivationRequest".equals(type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (PrepareActivationRequest) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationIdShort").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationIdShort" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationIdShort(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationName").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationName" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationName(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"extras").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "extras" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setExtras(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationNonce").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationNonce" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationNonce(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"ephemeralPublicKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "ephemeralPublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEphemeralPublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptedDevicePublicKey").equals(
reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptedDevicePublicKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptedDevicePublicKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"applicationSignature").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "applicationSignature" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setApplicationSignature(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class GetPersonalizedEncryptionKeyResponse implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"GetPersonalizedEncryptionKeyResponse", "ns1");
/**
* field for ActivationId
*/
protected java.lang.String localActivationId;
/**
* field for EncryptionKey
*/
protected java.lang.String localEncryptionKey;
/**
* field for EncryptionKeyIndex
*/
protected java.lang.String localEncryptionKeyIndex;
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getActivationId() {
return localActivationId;
}
/**
* Auto generated setter method
* @param param ActivationId
*/
public void setActivationId(java.lang.String param) {
this.localActivationId = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptionKey() {
return localEncryptionKey;
}
/**
* Auto generated setter method
* @param param EncryptionKey
*/
public void setEncryptionKey(java.lang.String param) {
this.localEncryptionKey = param;
}
/**
* Auto generated getter method
* @return java.lang.String
*/
public java.lang.String getEncryptionKeyIndex() {
return localEncryptionKeyIndex;
}
/**
* Auto generated setter method
* @param param EncryptionKeyIndex
*/
public void setEncryptionKeyIndex(java.lang.String param) {
this.localEncryptionKeyIndex = param;
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
java.lang.String prefix = null;
java.lang.String namespace = null;
prefix = parentQName.getPrefix();
namespace = parentQName.getNamespaceURI();
writeStartElement(prefix, namespace, parentQName.getLocalPart(),
xmlWriter);
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix +
":GetPersonalizedEncryptionKeyResponse", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"GetPersonalizedEncryptionKeyResponse", xmlWriter);
}
}
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "activationId", xmlWriter);
if (localActivationId == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"activationId cannot be null!!");
} else {
xmlWriter.writeCharacters(localActivationId);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptionKey", xmlWriter);
if (localEncryptionKey == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptionKey cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptionKey);
}
xmlWriter.writeEndElement();
namespace = "http://getlime.io/security/powerauth/v2";
writeStartElement(null, namespace, "encryptionKeyIndex", xmlWriter);
if (localEncryptionKeyIndex == null) {
// write the nil attribute
throw new org.apache.axis2.databinding.ADBException(
"encryptionKeyIndex cannot be null!!");
} else {
xmlWriter.writeCharacters(localEncryptionKeyIndex);
}
xmlWriter.writeEndElement();
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static GetPersonalizedEncryptionKeyResponse parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
GetPersonalizedEncryptionKeyResponse object = new GetPersonalizedEncryptionKeyResponse();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
if (reader.getAttributeValue(
"http://www.w3.org/2001/XMLSchema-instance",
"type") != null) {
java.lang.String fullTypeName = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"type");
if (fullTypeName != null) {
java.lang.String nsPrefix = null;
if (fullTypeName.indexOf(":") > -1) {
nsPrefix = fullTypeName.substring(0,
fullTypeName.indexOf(":"));
}
nsPrefix = (nsPrefix == null) ? "" : nsPrefix;
java.lang.String type = fullTypeName.substring(fullTypeName.indexOf(
":") + 1);
if (!"GetPersonalizedEncryptionKeyResponse".equals(
type)) {
//find namespace for the prefix
java.lang.String nsUri = reader.getNamespaceContext()
.getNamespaceURI(nsPrefix);
return (GetPersonalizedEncryptionKeyResponse) ExtensionMapper.getTypeObject(nsUri,
type, reader);
}
}
}
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
reader.next();
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"activationId").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "activationId" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setActivationId(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptionKey").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptionKey" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptionKey(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement() &&
new javax.xml.namespace.QName(
"http://getlime.io/security/powerauth/v2",
"encryptionKeyIndex").equals(reader.getName())) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "encryptionKeyIndex" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
object.setEncryptionKeyIndex(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
content));
reader.next();
} // End of if for expected property start element
else {
// 1 - A start element we are not expecting indicates an invalid parameter was passed
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
if (reader.isStartElement()) {
// 2 - A start element we are not expecting indicates a trailing invalid property
throw new org.apache.axis2.databinding.ADBException(
"Unexpected subelement " + reader.getName());
}
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
public static class SignatureType implements org.apache.axis2.databinding.ADBBean {
public static final javax.xml.namespace.QName MY_QNAME = new javax.xml.namespace.QName("http://getlime.io/security/powerauth/v2",
"SignatureType", "ns1");
private static java.util.HashMap _table_ = new java.util.HashMap();
public static final java.lang.String _POSSESSION = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"POSSESSION");
public static final java.lang.String _KNOWLEDGE = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"KNOWLEDGE");
public static final java.lang.String _BIOMETRY = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"BIOMETRY");
public static final java.lang.String _POSSESSION_KNOWLEDGE = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"POSSESSION_KNOWLEDGE");
public static final java.lang.String _POSSESSION_BIOMETRY = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"POSSESSION_BIOMETRY");
public static final java.lang.String _POSSESSION_KNOWLEDGE_BIOMETRY = org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
"POSSESSION_KNOWLEDGE_BIOMETRY");
public static final SignatureType POSSESSION = new SignatureType(_POSSESSION,
true);
public static final SignatureType KNOWLEDGE = new SignatureType(_KNOWLEDGE,
true);
public static final SignatureType BIOMETRY = new SignatureType(_BIOMETRY,
true);
public static final SignatureType POSSESSION_KNOWLEDGE = new SignatureType(_POSSESSION_KNOWLEDGE,
true);
public static final SignatureType POSSESSION_BIOMETRY = new SignatureType(_POSSESSION_BIOMETRY,
true);
public static final SignatureType POSSESSION_KNOWLEDGE_BIOMETRY = new SignatureType(_POSSESSION_KNOWLEDGE_BIOMETRY,
true);
/**
* field for SignatureType
*/
protected java.lang.String localSignatureType;
// Constructor
protected SignatureType(java.lang.String value, boolean isRegisterValue) {
localSignatureType = value;
if (isRegisterValue) {
_table_.put(localSignatureType, this);
}
}
public java.lang.String getValue() {
return localSignatureType;
}
public boolean equals(java.lang.Object obj) {
return (obj == this);
}
public int hashCode() {
return toString().hashCode();
}
public java.lang.String toString() {
return localSignatureType.toString();
}
/**
*
* @param parentQName
* @param factory
* @return org.apache.axiom.om.OMElement
*/
public org.apache.axiom.om.OMElement getOMElement(
final javax.xml.namespace.QName parentQName,
final org.apache.axiom.om.OMFactory factory)
throws org.apache.axis2.databinding.ADBException {
return factory.createOMElement(new org.apache.axis2.databinding.ADBDataSource(
this, MY_QNAME));
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
serialize(parentQName, xmlWriter, false);
}
public void serialize(final javax.xml.namespace.QName parentQName,
javax.xml.stream.XMLStreamWriter xmlWriter, boolean serializeType)
throws javax.xml.stream.XMLStreamException,
org.apache.axis2.databinding.ADBException {
//We can safely assume an element has only one type associated with it
java.lang.String namespace = parentQName.getNamespaceURI();
java.lang.String _localName = parentQName.getLocalPart();
writeStartElement(null, namespace, _localName, xmlWriter);
// add the type details if this is used in a simple type
if (serializeType) {
java.lang.String namespacePrefix = registerPrefix(xmlWriter,
"http://getlime.io/security/powerauth/v2");
if ((namespacePrefix != null) &&
(namespacePrefix.trim().length() > 0)) {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
namespacePrefix + ":SignatureType", xmlWriter);
} else {
writeAttribute("xsi",
"http://www.w3.org/2001/XMLSchema-instance", "type",
"SignatureType", xmlWriter);
}
}
if (localSignatureType == null) {
throw new org.apache.axis2.databinding.ADBException(
"SignatureType cannot be null !!");
} else {
xmlWriter.writeCharacters(localSignatureType);
}
xmlWriter.writeEndElement();
}
private static java.lang.String generatePrefix(
java.lang.String namespace) {
if (namespace.equals("http://getlime.io/security/powerauth/v2")) {
return "ns1";
}
return org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
/**
* Utility method to write an element start tag.
*/
private void writeStartElement(java.lang.String prefix,
java.lang.String namespace, java.lang.String localPart,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeStartElement(writerPrefix, localPart, namespace);
} else {
if (namespace.length() == 0) {
prefix = "";
} else if (prefix == null) {
prefix = generatePrefix(namespace);
}
xmlWriter.writeStartElement(prefix, localPart, namespace);
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
}
/**
* Util method to write an attribute with the ns prefix
*/
private void writeAttribute(java.lang.String prefix,
java.lang.String namespace, java.lang.String attName,
java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String writerPrefix = xmlWriter.getPrefix(namespace);
if (writerPrefix != null) {
xmlWriter.writeAttribute(writerPrefix, namespace, attName,
attValue);
} else {
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
xmlWriter.writeAttribute(prefix, namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeAttribute(java.lang.String namespace,
java.lang.String attName, java.lang.String attValue,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attValue);
} else {
xmlWriter.writeAttribute(registerPrefix(xmlWriter, namespace),
namespace, attName, attValue);
}
}
/**
* Util method to write an attribute without the ns prefix
*/
private void writeQNameAttribute(java.lang.String namespace,
java.lang.String attName, javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String attributeNamespace = qname.getNamespaceURI();
java.lang.String attributePrefix = xmlWriter.getPrefix(attributeNamespace);
if (attributePrefix == null) {
attributePrefix = registerPrefix(xmlWriter, attributeNamespace);
}
java.lang.String attributeValue;
if (attributePrefix.trim().length() > 0) {
attributeValue = attributePrefix + ":" + qname.getLocalPart();
} else {
attributeValue = qname.getLocalPart();
}
if (namespace.equals("")) {
xmlWriter.writeAttribute(attName, attributeValue);
} else {
registerPrefix(xmlWriter, namespace);
xmlWriter.writeAttribute(attributePrefix, namespace, attName,
attributeValue);
}
}
/**
* method to handle Qnames
*/
private void writeQName(javax.xml.namespace.QName qname,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
java.lang.String namespaceURI = qname.getNamespaceURI();
if (namespaceURI != null) {
java.lang.String prefix = xmlWriter.getPrefix(namespaceURI);
if (prefix == null) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
xmlWriter.writeCharacters(prefix + ":" +
org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
} else {
// i.e this is the default namespace
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
} else {
xmlWriter.writeCharacters(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qname));
}
}
private void writeQNames(javax.xml.namespace.QName[] qnames,
javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException {
if (qnames != null) {
// we have to store this data until last moment since it is not possible to write any
// namespace data after writing the charactor data
java.lang.StringBuffer stringToWrite = new java.lang.StringBuffer();
java.lang.String namespaceURI = null;
java.lang.String prefix = null;
for (int i = 0; i < qnames.length; i++) {
if (i > 0) {
stringToWrite.append(" ");
}
namespaceURI = qnames[i].getNamespaceURI();
if (namespaceURI != null) {
prefix = xmlWriter.getPrefix(namespaceURI);
if ((prefix == null) || (prefix.length() == 0)) {
prefix = generatePrefix(namespaceURI);
xmlWriter.writeNamespace(prefix, namespaceURI);
xmlWriter.setPrefix(prefix, namespaceURI);
}
if (prefix.trim().length() > 0) {
stringToWrite.append(prefix).append(":")
.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
} else {
stringToWrite.append(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
qnames[i]));
}
}
xmlWriter.writeCharacters(stringToWrite.toString());
}
}
/**
* Register a namespace prefix
*/
private java.lang.String registerPrefix(
javax.xml.stream.XMLStreamWriter xmlWriter,
java.lang.String namespace)
throws javax.xml.stream.XMLStreamException {
java.lang.String prefix = xmlWriter.getPrefix(namespace);
if (prefix == null) {
prefix = generatePrefix(namespace);
javax.xml.namespace.NamespaceContext nsContext = xmlWriter.getNamespaceContext();
while (true) {
java.lang.String uri = nsContext.getNamespaceURI(prefix);
if ((uri == null) || (uri.length() == 0)) {
break;
}
prefix = org.apache.axis2.databinding.utils.BeanUtil.getUniquePrefix();
}
xmlWriter.writeNamespace(prefix, namespace);
xmlWriter.setPrefix(prefix, namespace);
}
return prefix;
}
/**
* Factory class that keeps the parse method
*/
public static class Factory {
private static org.apache.commons.logging.Log log = org.apache.commons.logging.LogFactory.getLog(Factory.class);
public static SignatureType fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
SignatureType enumeration = (SignatureType) _table_.get(value);
// handle unexpected enumeration values properly
if (enumeration == null) {
throw new java.lang.IllegalArgumentException();
}
return enumeration;
}
public static SignatureType fromString(java.lang.String value,
java.lang.String namespaceURI)
throws java.lang.IllegalArgumentException {
try {
return fromValue(org.apache.axis2.databinding.utils.ConverterUtil.convertToString(
value));
} catch (java.lang.Exception e) {
throw new java.lang.IllegalArgumentException();
}
}
public static SignatureType fromString(
javax.xml.stream.XMLStreamReader xmlStreamReader,
java.lang.String content) {
if (content.indexOf(":") > -1) {
java.lang.String prefix = content.substring(0,
content.indexOf(":"));
java.lang.String namespaceUri = xmlStreamReader.getNamespaceContext()
.getNamespaceURI(prefix);
return SignatureType.Factory.fromString(content,
namespaceUri);
} else {
return SignatureType.Factory.fromString(content, "");
}
}
/**
* static method to create the object
* Precondition: If this object is an element, the current or next start element starts this object and any intervening reader events are ignorable
* If this object is not an element, it is a complex type and the reader is at the event just after the outer start element
* Postcondition: If this object is an element, the reader is positioned at its end element
* If this object is a complex type, the reader is positioned at the end element of its outer element
*/
public static SignatureType parse(
javax.xml.stream.XMLStreamReader reader)
throws java.lang.Exception {
SignatureType object = null;
// initialize a hash map to keep values
java.util.Map attributeMap = new java.util.HashMap();
java.util.List extraAttributeList = new java.util.ArrayList();
int event;
javax.xml.namespace.QName currentQName = null;
java.lang.String nillableValue = null;
java.lang.String prefix = "";
java.lang.String namespaceuri = "";
try {
while (!reader.isStartElement() && !reader.isEndElement())
reader.next();
currentQName = reader.getName();
// Note all attributes that were handled. Used to differ normal attributes
// from anyAttributes.
java.util.Vector handledAttributes = new java.util.Vector();
while (!reader.isEndElement()) {
if (reader.isStartElement() || reader.hasText()) {
nillableValue = reader.getAttributeValue("http://www.w3.org/2001/XMLSchema-instance",
"nil");
if ("true".equals(nillableValue) ||
"1".equals(nillableValue)) {
throw new org.apache.axis2.databinding.ADBException(
"The element: " + "SignatureType" +
" cannot be null");
}
java.lang.String content = reader.getElementText();
if (content.indexOf(":") > 0) {
// this seems to be a Qname so find the namespace and send
prefix = content.substring(0,
content.indexOf(":"));
namespaceuri = reader.getNamespaceURI(prefix);
object = SignatureType.Factory.fromString(content,
namespaceuri);
} else {
// this seems to be not a qname send and empty namespace incase of it is
// check is done in fromString method
object = SignatureType.Factory.fromString(content,
"");
}
} else {
reader.next();
}
} // end of while loop
} catch (javax.xml.stream.XMLStreamException e) {
throw new java.lang.Exception(e);
}
return object;
}
} //end of factory class
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy