Package org.xrace.desjardins.reponse

Examples of org.xrace.desjardins.reponse.Response


    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Response target = (Response) object;
        return target.getInput();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Response target = (Response) object;
          target.setInput((java.lang.String) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("string");
    desc.setHandler(handler);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);

    //-- validation code for: _input
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    { //-- local scope
      org.exolab.castor.xml.validators.StringValidator typeValidator;
      typeValidator = new org.exolab.castor.xml.validators.StringValidator();
      fieldValidator.setValidator(typeValidator);
      typeValidator.setWhiteSpace("preserve");
    }
    desc.setValidator(fieldValidator);
    //-- initialize element descriptors

    //-- _merchant
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.reponse.Merchant.class, "_merchant",
        "merchant", org.exolab.castor.xml.NodeType.Element);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Response target = (Response) object;
        return target.getMerchant();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Response target = (Response) object;
          target
              .setMerchant((org.xrace.desjardins.reponse.Merchant) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
      }

      @Override
      public java.lang.Object newInstance(java.lang.Object parent)
      {
        return null;
      }
    };
    desc.setSchemaType("org.xrace.desjardins.reponse.Merchant");
    desc.setHandler(handler);
    desc.setRequired(true);
    desc.setMultivalued(false);
    addFieldDescriptor(desc);
    addSequenceElement(desc);

    //-- validation code for: _merchant
    fieldValidator = new org.exolab.castor.xml.FieldValidator();
    fieldValidator.setMinOccurs(1);
    { //-- local scope
    }
    desc.setValidator(fieldValidator);
    //-- _error
    desc = new org.exolab.castor.xml.util.XMLFieldDescriptorImpl(
        org.xrace.desjardins.reponse.Error.class, "_error", "error",
        org.exolab.castor.xml.NodeType.Element);
    handler = new org.exolab.castor.xml.XMLFieldHandler()
    {
      @Override
      public java.lang.Object getValue(java.lang.Object object)
          throws IllegalStateException
      {
        Response target = (Response) object;
        return target.getError();
      }

      @Override
      public void setValue(java.lang.Object object, java.lang.Object value)
          throws IllegalStateException, IllegalArgumentException
      {
        try
        {
          Response target = (Response) object;
          target.setError((org.xrace.desjardins.reponse.Error) value);
        }
        catch (java.lang.Exception ex)
        {
          throw new IllegalStateException(ex.toString());
        }
View Full Code Here


    Validate.notNull(transaction);

    Request loginRequest = Desjardins3Helper.toLoginRequest(transaction,
        context);

    Response loginResponse = requestResponse(loginRequest);

    Desjardins3LoginContext loginContext = Desjardins3Helper
        .toLoginContext(loginResponse);

    Request purchaseRequest = Desjardins3Helper.toPurchaseRequest(
View Full Code Here

  }

  private Response requestResponse(Request request)
  {
    String responseStr = requestResponseString(request);
    Response response = XmlUtils.unmarshall(responseStr, Response.class,
        getMapping());
    return response;
  }
View Full Code Here

TOP

Related Classes of org.xrace.desjardins.reponse.Response

Copyright © 2018 www.massapicom. 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.