Package com.acme.purchaseOrder.x2005.x08

Examples of com.acme.purchaseOrder.x2005.x08.Address


            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();
       
        Address add = Address.Factory.newInstance();
        add.setName("Jane Doe");
        add.setStreet("123 Main St");
        add.setCountry("USA");
       
        po.setBillTo(add);
        po.setShipTo(add);
       
        po.setOrderDate(Calendar.getInstance());
View Full Code Here


        Service serviceModel = xsf.create(OrderService.class);
       
        OrderService client =
            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();
       
        Address add = Address.Factory.newInstance();
        add.setName("Jane Doe");
        add.setStreet("123 Main St");
        add.setCountry("USA");
View Full Code Here

        throws XFireFault
    {
        PurchaseOrderType order = purchaseOrder.getPurchaseOrder();
        order.setPurchaseOrderId(count++);

        PurchaseOrderIdDocument pid = PurchaseOrderIdDocument.Factory.newInstance();
        pid.setPurchaseOrderId(order.getPurchaseOrderId());

        return pid;
    }
View Full Code Here

       
        OrderService client =
            (OrderService) new XFireProxyFactory().create(serviceModel, url);
       
        PurchaseOrderDocument poDoc = PurchaseOrderDocument.Factory.newInstance();
        PurchaseOrderType po = poDoc.addNewPurchaseOrder();
       
        Address add = Address.Factory.newInstance();
        add.setName("Jane Doe");
        add.setStreet("123 Main St");
        add.setCountry("USA");
       
        po.setBillTo(add);
        po.setShipTo(add);
       
        po.setOrderDate(Calendar.getInstance());
       
        System.out.println("Purchase Order ID: " + client.receiveOrder(poDoc).getPurchaseOrderId());
    }
View Full Code Here

    }

    public PurchaseOrderIdDocument receiveOrder(PurchaseOrderDocument purchaseOrder)
        throws XFireFault
    {
        PurchaseOrderType order = purchaseOrder.getPurchaseOrder();
        order.setPurchaseOrderId(count++);

        PurchaseOrderIdDocument pid = PurchaseOrderIdDocument.Factory.newInstance();
        pid.setPurchaseOrderId(order.getPurchaseOrderId());

        return pid;
    }
View Full Code Here

      // address info
      String[] addrTypes = getChannelRuntimeData().getParameterValues("Address@type");
      for (int i=0; i<addrTypes.length; i++) {
        String type = addrTypes[i];
        if (type == null || type.length() == 0) { continue; }
        Address addr = bp.newAddress();
        addr.setType(addrTypes[i]);
        addr.setStreet1(getChannelRuntimeData().getParameterValues("Street1")[i]);
        addr.setCityOrLocality(getChannelRuntimeData().getParameterValues("CityOrLocality")[i]);
        addr.setStateOrProvince(getChannelRuntimeData().getParameterValues("StateOrProvince")[i]);
        /*
        String stateFormValue = getChannelRuntimeData().getParameterValues("StateOrPovince")[i];
        if (stateFormValue != null) {
          addr.setStateOrProvince(stateFormValue);
        }
        */
        com.any_erp_vendor.moa.objects.resources.v1_0.Date effDate = addr.newEffectiveDate();
        effDate.setMonth(getChannelRuntimeData().getParameterValues("EffectiveDate/Month")[i]);
        effDate.setDay(getChannelRuntimeData().getParameterValues("EffectiveDate/Day")[i]);
        effDate.setYear(getChannelRuntimeData().getParameterValues("EffectiveDate/Year")[i]);
        addr.setEffectiveDate(effDate);
        bp.addAddress(addr);
      }

      bp.getXmlEnterpriseObject().setBaseline(baselineBp.getXmlEnterpriseObject());
     
View Full Code Here

          // get the addresses associated to the basic person
          java.util.List addrs = bp.getAddress();
          java.util.Vector vAddr = new java.util.Vector();
          if (addrs.size() > 0) {
            for (int j=0; j<addrs.size(); j++) {
              Address addr = bp.getAddress(j);
              vAddr.add(addr);
            }
          }
          bp_addressList.setListData(vAddr);
          bp_addressList.updateUI();
View Full Code Here

   * Retrieves the Address object stored in the List at the selected index and populates the Address
   * form items with information contained in that Address object.
   **/
  protected void bp_addressList_mouseClicked(MouseEvent e)
  {
    Address a = (Address)bp_addressList.getSelectedValue();
    if (a != null) {
      bp_addressType.setSelectedItem(a.getType());
      bp_street1.setText(a.getStreet1());
      bp_city.setText(a.getCityOrLocality());
      bp_stateList.setSelectedItem(a.getStateOrProvince());
      bp_zip.setText(a.getZipOrPostalCode());
      bp_effectiveDate.setText(a.getEffectiveDate().getMonth() + "/" +
          a.getEffectiveDate().getDay() + "/" +
          a.getEffectiveDate().getYear());
    }
   
  }
View Full Code Here

      // have to determine if we need to insert, delete or update any
      logger.info("Starting Address update process...");
      java.util.List newAddresses = newData.getAddress();
      java.util.List oldAddresses = baselinePerson.getAddress();
      for (int i=0; i<newAddresses.size(); i++) {
        Address newAddress = (Address)newAddresses.get(i);
        String newAddressKey = newAddress.getCombinedKeyValue();
        boolean foundMatch = false;
        for (int j=0; j<oldAddresses.size(); j++) {
          Address oldAddress = (Address)oldAddresses.get(j);
          String oldAddressKey = oldAddress.getCombinedKeyValue();
          if (oldAddressKey.equalsIgnoreCase(newAddressKey)) {
            // found a match, might have to update...
            foundMatch = true;
            if (newAddress.equals(oldAddress) == false) {
              // need to update individual address
              logger.info("updating existing address object.");
              updateAddress(conn, msgCategory, msgObject, msgRelease, instId, newAddress);
            }
          }
        }
        if (foundMatch == false) {
          // need to create address
          logger.info("creating new address object.");
          createAddress(conn, msgCategory, msgObject, msgRelease, instId, newAddress);
        }
      }
      // now we need to check the oldAddresses and delete any that don't
      // exist in the newAddress list
      for (int i=0; i<oldAddresses.size(); i++) {
        Address oldAddress = (Address)oldAddresses.get(i);
        String oldAddressKey = oldAddress.getCombinedKeyValue();
        boolean foundMatch = false;
        for (int j=0; j<newAddresses.size(); j++) {
          Address newAddress = (Address)newAddresses.get(j);
          String newAddressKey = newAddress.getCombinedKeyValue();
          if (oldAddressKey.equalsIgnoreCase(newAddressKey)) {
            // found a match, don't delete
            foundMatch = true;
          }
        }
View Full Code Here

  protected void bp_addressAdd_mouseClicked(MouseEvent e)
  {
    String messageObjectName = BASIC_PERSON;
    org.openeai.OpenEaiObject.logger.info("Message Object Name is: " + messageObjectName);
    try {
      Address addr = null;
      int index = bp_addressList.getSelectedIndex();
      if (index == -1) {
        BasicPerson bPerson = (BasicPerson)APP_CONFIG.getObject(messageObjectName);
        org.openeai.OpenEaiObject.logger.info("got " + messageObjectName + " from AppConfig");
        addr = bPerson.newAddress();
      }
      else {
        addr = (Address)bp_addressList.getSelectedValue();
      }
      addr.setType((String)bp_addressType.getSelectedItem());
      addr.setStreet1(bp_street1.getText());
      addr.setCityOrLocality(bp_city.getText());
      addr.setStateOrProvince((String)bp_stateList.getSelectedItem());
      addr.setZipOrPostalCode(bp_zip.getText());
     
      // get the effective date and verify it's format, then populate the
      // address' effective date information with it.
      SimpleDateFormat formatter = new SimpleDateFormat( "MM/dd/yyyy" );
      String sDate = bp_effectiveDate.getText();
      try {
        java.util.Date d = formatter.parse(sDate);
        Calendar calendar = new GregorianCalendar();
        calendar.setTime(d);
        Date effDate = new Date("EffectiveDate");
        effDate.setMonth(Integer.toString(calendar.get(Calendar.MONTH)+1));
        effDate.setDay(Integer.toString(calendar.get(Calendar.DAY_OF_MONTH)));
        effDate.setYear(Integer.toString(calendar.get(Calendar.YEAR)));
        addr.setEffectiveDate(effDate);
      } catch (Exception exc) {
        org.openeai.OpenEaiObject.logger.fatal(exc.getMessage(), exc);
        bp_resultsTextArea.setText("Invalid EffectiveDate '" + sDate + "'  " + exc.getMessage());
        return;
      }
View Full Code Here

TOP

Related Classes of com.acme.purchaseOrder.x2005.x08.Address

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.