Package org.uddi.api_v2

Examples of org.uddi.api_v2.Address


    /**
     * Create an instance of {@link Address }
     *
     */
    public Address createAddress() {
        return new Address();
    }
View Full Code Here


        assertEquals( "Wrong array size", 4, root.size() );

        // note that the array is in popped order (rather than pushed)

        Address add = root.get( 0 );
        Address addressOne = add;
        assertEquals( "(1) Street attribute", "New Street", addressOne.getStreet() );
        assertEquals( "(1) City attribute", "Las Vegas", addressOne.getCity() );
        assertEquals( "(1) State attribute", "Nevada", addressOne.getState() );

        add = root.get( 1 );
        Address addressTwo = add;
        assertEquals( "(2) Street attribute", "Old Street", addressTwo.getStreet() );
        assertEquals( "(2) City attribute", "Portland", addressTwo.getCity() );
        assertEquals( "(2) State attribute", "Oregon", addressTwo.getState() );

        add = root.get( 2 );
        Address addressThree = add;
        assertEquals( "(3) Street attribute", "4th Street", addressThree.getStreet() );
        assertEquals( "(3) City attribute", "Dayton", addressThree.getCity() );
        assertEquals( "(3) State attribute", "US", addressThree.getState() );

        add = root.get( 3 );
        Address addressFour = add;
        assertEquals( "(4) Street attribute", "6th Street", addressFour.getStreet() );
        assertEquals( "(4) City attribute", "Cleveland", addressFour.getCity() );
        assertEquals( "(4) State attribute", "Ohio", addressFour.getState() );
    }
View Full Code Here

 
    /**
     * Get UDDI Address given JAXR Postal Address
     */
  public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
    Address address = objectFactory.createAddress();

    AddressLine[] addarr = new AddressLine[6];

        String stnum = postalAddress.getStreetNumber();
        String st = postalAddress.getStreet();
        String city = postalAddress.getCity();
        String country = postalAddress.getCountry();
        String code = postalAddress.getPostalCode();
        String state = postalAddress.getStateOrProvince();

    AddressLine stnumAL = objectFactory.createAddressLine();
        stnumAL.setKeyName("STREET_NUMBER");
    if (stnum != null) {
        stnumAL.setKeyValue(stnum);
    }

    AddressLine stAL = objectFactory.createAddressLine();
        stAL.setKeyName("STREET");
    if (st != null) {
        stAL.setKeyValue(st);
    }

    AddressLine cityAL = objectFactory.createAddressLine();
        cityAL.setKeyName("CITY");
    if (city != null) {
        cityAL.setKeyValue(city);
    }

    AddressLine countryAL = objectFactory.createAddressLine();
        countryAL.setKeyName("COUNTRY");
    if (country != null) {
        countryAL.setKeyValue(country);
    }

    AddressLine codeAL = objectFactory.createAddressLine();
        codeAL.setKeyName("POSTALCODE");
    if (code != null) {
        codeAL.setKeyValue(code);
    }

    AddressLine stateAL = objectFactory.createAddressLine();
        stateAL.setKeyName("STATE");
    if (state != null) {
        stateAL.setKeyValue(state);
    }

    // Add the AddressLine to vector
    addarr[0] = stnumAL;
    addarr[1] = stAL;
    addarr[2] = cityAL;
    addarr[3] = countryAL;
    addarr[4] = codeAL;
    addarr[5] = stateAL;

    address.getAddressLine().addAll(Arrays.asList(addarr));

        return address;
    }
View Full Code Here

 
    /**
     * Get UDDI Address given JAXR Postal Address
     */
  public static Address getAddress(PostalAddress postalAddress) throws JAXRException {
    Address address = objectFactory.createAddress();

    AddressLine[] addarr = new AddressLine[6];

        String stnum = postalAddress.getStreetNumber();
        String st = postalAddress.getStreet();
        String city = postalAddress.getCity();
        String country = postalAddress.getCountry();
        String code = postalAddress.getPostalCode();
        String state = postalAddress.getStateOrProvince();

    AddressLine stnumAL = objectFactory.createAddressLine();
        stnumAL.setKeyName("STREET_NUMBER");
    if (stnum != null) {
        stnumAL.setKeyValue(stnum);
    }

    AddressLine stAL = objectFactory.createAddressLine();
        stAL.setKeyName("STREET");
    if (st != null) {
        stAL.setKeyValue(st);
    }

    AddressLine cityAL = objectFactory.createAddressLine();
        cityAL.setKeyName("CITY");
    if (city != null) {
        cityAL.setKeyValue(city);
    }

    AddressLine countryAL = objectFactory.createAddressLine();
        countryAL.setKeyName("COUNTRY");
    if (country != null) {
        countryAL.setKeyValue(country);
    }

    AddressLine codeAL = objectFactory.createAddressLine();
        codeAL.setKeyName("POSTALCODE");
    if (code != null) {
        codeAL.setKeyValue(code);
    }

    AddressLine stateAL = objectFactory.createAddressLine();
        stateAL.setKeyName("STATE");
    if (state != null) {
        stateAL.setKeyValue(state);
    }

    // Add the AddressLine to vector
    addarr[0] = stnumAL;
    addarr[1] = stAL;
    addarr[2] = cityAL;
    addarr[3] = countryAL;
    addarr[4] = codeAL;
    addarr[5] = stateAL;

    address.getAddressLine().addAll(Arrays.asList(addarr));

        return address;
    }
View Full Code Here

       
        private static AccessPoint MapAccessPoint(org.uddi.api_v3.AccessPoint accessPoint) {
                if (accessPoint == null) {
                        return null;
                }
                return new AccessPoint(accessPoint.getValue(), MapURLType(accessPoint.getValue()));
        }
View Full Code Here

                List<Address> r = new ArrayList<Address>();
                if (address == null) {
                        return r;
                }
                for (int i = 0; i < address.size(); i++) {
                        Address x = new Address();
                        x.setSortCode(address.get(i).getSortCode());
                        x.setTModelKey(address.get(i).getTModelKey());
                        x.setUseType(address.get(i).getUseType());
                        x.getAddressLine().addAll(MapAddressLine(address.get(i).getAddressLine()));
                        r.add(x);
                }
                return r;
        }
View Full Code Here

                try {
                        org.uddi.api_v3.GetAuthToken r = new org.uddi.api_v3.GetAuthToken();
                        r.setCred(body.getCred());
                        r.setUserID(body.getUserID());
                        org.uddi.api_v3.AuthToken authToken = securityService.getAuthToken(r);
                        AuthToken ret = new AuthToken();
                        ret.setAuthInfo(authToken.getAuthInfo());
                        ret.setGeneric("2.0");
                        ret.setOperator(getNodeID());
                        return ret;
                } catch (DispositionReportFaultMessage ex) {
                        throw MapUDDIv3Tov2.MapException(ex, getNodeID());
                }
        }
View Full Code Here

        }

        @Override
        public BusinessDetail getBusinessDetail(GetBusinessDetail body) throws DispositionReport {
                try {
                        BusinessDetail MapBusinessDetail = MapUDDIv3Tov2.MapBusinessDetail(inquiryService.getBusinessDetail(MapUDDIv2Tov3.MapGetBusinessDetail(body)), getNodeID());
                       // StringWriter sw = new StringWriter();
                       // JAXB.marshal(MapBusinessDetail, sw);
                      //  logger.info(sw.toString());
                        return MapBusinessDetail;
                } catch (DispositionReportFaultMessage ex) {
View Full Code Here

               
                return r;
        }
       
        private static BusinessInfos MapBusinessInfos(org.uddi.api_v3.BusinessInfos businessInfos) {
                BusinessInfos r = new BusinessInfos();
                if (businessInfos == null || businessInfos.getBusinessInfo().isEmpty()) {
                        return r;
                }
               
                for (int i = 0; i < businessInfos.getBusinessInfo().size(); i++) {
                        BusinessInfo x = new BusinessInfo();
                        x.setBusinessKey(businessInfos.getBusinessInfo().get(i).getBusinessKey());
                        x.setServiceInfos(MapServiceInfos(businessInfos.getBusinessInfo().get(i).getServiceInfos()));
                        x.getDescription().addAll(MapDescription(businessInfos.getBusinessInfo().get(i).getDescription()));
                        x.getName().addAll(MapName(businessInfos.getBusinessInfo().get(i).getName()));
                        r.getBusinessInfo().add(x);
                }
               
                return r;
        }
View Full Code Here

                        r.setTruncated(Truncated.TRUE);
                } else {
                        r.setTruncated(Truncated.FALSE);
                }
                if (registeredInfo.getBusinessInfos() != null) {
                        r.setBusinessInfos(new BusinessInfos());
                        for (int i = 0; i < registeredInfo.getBusinessInfos().getBusinessInfo().size(); i++) {
                                BusinessInfo x = new BusinessInfo();
                                x.setBusinessKey(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getBusinessKey());
                                x.getName().addAll(MapName(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getName()));
                                x.getDescription().addAll(MapDescription(registeredInfo.getBusinessInfos().getBusinessInfo().get(i).getDescription()));
View Full Code Here

TOP

Related Classes of org.uddi.api_v2.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.