Examples of DoubleItFault


Examples of org.example.contract.doubleit.DoubleItFault

    @Resource
    WebServiceContext wsContext;
   
    public int doubleIt(int numberToDouble) throws DoubleItFault {
        if (numberToDouble == 0) {
            throw new DoubleItFault("0 can't be doubled!");
        }
       
        List<WSHandlerResult> results =
            CastUtils.cast((List<?>)wsContext.getMessageContext().get(WSHandlerConstants.RECV_RESULTS));
        Assert.assertNotNull("Security Results cannot be null", results);
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

@Features(features = "org.apache.cxf.feature.LoggingFeature")             
public class DoubleItImpl implements DoubleItPortType {
   
    public int doubleIt(int numberToDouble) throws DoubleItFault {
        if (numberToDouble == 0) {
            throw new DoubleItFault("0 can't be doubled!");
        }
        return numberToDouble * 2;
    }
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

   
    @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;
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

   
    @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;
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

public class DoubleIt4Impl implements DoubleItMtomPortType {
   
    @Override
    public int doubleIt4(int numberToDouble, DataHandler imageData) throws DoubleItFault {
        if (numberToDouble == 0) {
            throw new DoubleItFault("0 can't be doubled!");
        }
       
        try {
            BufferedImage image = ImageIO.read(imageData.getInputStream());
            if (image == null) {
                throw new DoubleItFault("Error processing image data");
            }
        } catch (IOException e) {
            throw new DoubleItFault("Error processing image data: " + e.getMessage());
        }
       
        return numberToDouble * 2;
    }
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

       
        org.example.schema.doubleit.DoubleItFault internalFault =
            new org.example.schema.doubleit.DoubleItFault();
        internalFault.setMajor((short)124);
        internalFault.setMinor((short)1256);
        throw new DoubleItFault("This is a fault", internalFault);
    }
View Full Code Here

Examples of org.example.contract.doubleit.DoubleItFault

    @Resource
    WebServiceContext wsContext;
   
    public int doubleIt(int numberToDouble) throws DoubleItFault {
        if (numberToDouble == 0) {
            throw new DoubleItFault("0 can't be doubled!");
        }
       
        List<WSHandlerResult> results =
            CastUtils.cast((List<?>)wsContext.getMessageContext().get(WSHandlerConstants.RECV_RESULTS));
        Assert.assertNotNull("Security Results cannot be null", results);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.