Package org.openquark.cal.internal.runtime.lecc

Examples of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_2


     * @throws java.io.IOException for any transport errors.
     */
    public void sendSoapFault(final SoapFault soapFault, final AddressingProperties addressingProperties, final InstanceIdentifier identifier)
        throws SoapFault, IOException
    {
        final TerminationParticipantPortType port = getPort(addressingProperties, identifier, soapFaultAction);
        final ExceptionType fault = new ExceptionType();
        // we pass the fault type, reason and subcode. we cannot pass the detail and header elements as they are
        // built from Kev's element types rather than dom element types. this is all we need anyway since we only
        // see faults containing those values
        fault.setSoapFaultType(soapFault.getSoapFaultType().getValue());
        fault.setReason(soapFault.getReason());
        fault.setSubCode(soapFault.getSubcode());

        port.faultOperation(fault);
    }
View Full Code Here


     * @return
     */
    private static synchronized TerminationParticipantService getTerminationParticipantService()
    {
        if (terminationParticipantService.get() == null) {
            terminationParticipantService.set(new TerminationParticipantService());
        }
        return terminationParticipantService.get();
    }
View Full Code Here

    public static TerminationParticipantPortType getTerminationParticipantPort(W3CEndpointReference endpointReference,
                                                                               AttributedURI action,
                                                                               AddressingProperties addressingProperties)
    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        TerminationParticipantService service = getTerminationParticipantService();
        // TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
        TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannoy specify the WSAddressing feature
         */
        List<Handler> customHandlerChain = new ArrayList<Handler>();
View Full Code Here

    public static TerminationParticipantPortType getTerminationParticipantPort(InstanceIdentifier identifier,
                                                                               AttributedURI action,
                                                                               AddressingProperties addressingProperties)
    {
        // TODO - we need the 2.1 verison of Service so we can specify that we want to use the WS Addressing feature
        TerminationParticipantService service = getTerminationParticipantService();
        // TerminationParticipantPortType port = service.getPort(endpointReference, TerminationParticipantPortType.class, new AddressingFeature(true, true));
        TerminationParticipantPortType port = service.getPort(TerminationParticipantPortType.class);
        BindingProvider bindingProvider = (BindingProvider)port;
        /*
         * we have to add the JaxWS WSAddressingClientHandler because we cannoy specify the WSAddressing feature
         */
        List<Handler> customHandlerChain = new ArrayList<Handler>();
View Full Code Here

   */
  private List<String> getRequestedMethodNameList(
      final MendozaMerchantCalculation merchantCalculation) {
    log.trace("Entering getRequestedMethodNameList");
    List<String> result = new ArrayList<String>();
    Calculate calculate = getCallbackCalculate(merchantCalculation);
    if (calculate != null) {
      Calculate.Shipping shippings = calculate.getShipping();
      List<Method> shippingMethods = shippings.getMethod();
      /** Get all the shipping methods from the callback */
      for (Method method : shippingMethods) {
        result.add(method.getName());
      }
View Full Code Here

   */
  private List<String> getRequestedAddressIdList(
      final MendozaMerchantCalculation merchantCalculation) {
    log.trace("Entering getRequestedAddressIdList");
    List<String> result = new ArrayList<String>();
    Calculate calculate = getCallbackCalculate(merchantCalculation);
    if (calculate != null) {
      List<AnonymousAddress> addresses =
        calculate.getAddresses().getAnonymousAddress();
      /** Get all the address id from the callback */
      for (AnonymousAddress address : addresses) {
        result.add(address.getId());
      }
    }
View Full Code Here

      headers.put(current.getKey(), current.getValue());
    }
    request.setAdditionalHeaders(headers);
    try {
      Page page = client.getPage(request);     
      CheckoutRedirect response = (CheckoutRedirect) CartUtils.unmarshal(
          page.getWebResponse().getContentAsString()).getValue();
      URL url = new URL(URLDecoder.decode(response.getRedirectUrl(), "UTF-8"));
      String path = url.getFile();
      return path;
    } catch (Exception e) {
      throw new RuntimeException("Could not connect to " + postURL);
    }
View Full Code Here

   * contents.
   * @param response the xml response content.
   */
  private void processResponse(final String response) {
    try {
      ErrorResponse errorResponse =
        (ErrorResponse) CartUtils.unmarshal(response).getValue();
      this.responseMessage = errorResponse.getErrorMessage();
    } catch (Exception e) {
      // In case the message cannot be parsed, assign a default value to it.
      //log.warn("Could not parse message", e);
      log.warn("Could not parse message");
      log.warn("Using default value for response message");
View Full Code Here

   * @return Returns the callbak calculate.
   */
  private Calculate getCallbackCalculate(
      final MendozaMerchantCalculation merchantCalculation) {
    log.trace("Entering getCallbackCalculate");
    MerchantCalculationCallback callback =
      merchantCalculation.getMerchantCalculationCallback();
    log.trace("Leaving getCallbackCalculate");
    return callback.getCalculate();
  }
View Full Code Here

      log.debug("Merchant calculation result message: " + resultMsg);
      log.debug("The merchant calculation result message is not a valid XML: "
      + validationMessage);
    }

    MerchantCalculationCallback merchantCalculationCallback = null;
    MerchantCalculationResults merchantCalculationResult = null;
    try {
      /* Callback */
      JAXBElement callbackNode =
        (JAXBElement) CartUtils.unmarshal(callbackMsg);
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.runtime.lecc.RTPartialApp$_10$_2

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.