use of org.example.schema.doubleit.DoubleItResponse in project cxf by apache.
the class DoubleIt3Impl method doubleIt3.
@Override
public DoubleItResponse doubleIt3(DoubleIt3 parameters, byte[] attachment) throws DoubleItFault {
int numberToDouble = parameters.getNumberToDouble();
if (numberToDouble == 0) {
throw new DoubleItFault("0 can't be doubled!");
}
if (!Arrays.equals(attachment, "12345".getBytes())) {
throw new DoubleItFault("Unexpected attachment value!");
}
DoubleItResponse response = new DoubleItResponse();
response.setDoubledNumber(numberToDouble * 2);
return response;
}
use of org.example.schema.doubleit.DoubleItResponse in project cxf by apache.
the class DoubleIt3Impl method doubleIt3.
@Override
public DoubleItResponse doubleIt3(DoubleIt3 parameters, byte[] attachment) throws DoubleItFault {
int numberToDouble = parameters.getNumberToDouble();
if (numberToDouble == 0) {
throw new DoubleItFault("0 can't be doubled!");
}
if (!Arrays.equals(attachment, "12345".getBytes())) {
throw new DoubleItFault("Unexpected attachment value!");
}
DoubleItResponse response = new DoubleItResponse();
response.setDoubledNumber(numberToDouble * 2);
return response;
}
Aggregations