juddi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Anil Saldhana <anilsaldh...@yahoo.com>
Subject Re: ClassCastException in scout
Date Wed, 10 Nov 2004 17:34:46 GMT
Dims,
   where did you get the samples from?  Are they the
samples I wrote (because I had tested them against
jUDDI)?

I am very new to maven.  I am trying to use maven and
I am getting the following download error:
------------------------
Apache Scout Implementation
+----------------------------------------
| Executing multiproject:install-callback JAXR API
Classes
| Memory: 3M/4M
+----------------------------------------
Attempting to download
geronimo-spec-activation-1.0.2-SNAPSHOT.jar.
WARNING: Failed to download
geronimo-spec-activation-1.0.2-SNAPSHOT.jar.

BUILD FAILED
------------------------


How do I turn off this geronimo download from maven,
so I can build and check your issue?

Cheers,
A

--- Davanum Srinivas <davanum@gmail.com> wrote:

> Anil, Steve,
> 
> Am getting a ClassCastException inside juddi with
> this test case. Can
> you please help. I think we need to get all the
> samples working as
> soon as possible to do any meaningful testing for
> JAXR in J2EE CTS
> (for geronimo)
> 
> java.lang.ClassCastException
> 	at
>
org.apache.juddi.handler.FindBusinessHandler.marshal(FindBusinessHandler.java:147)
> 	at
>
org.apache.juddi.proxy.RegistryProxy.execute(RegistryProxy.java:434)
> 	at
>
org.apache.juddi.AbstractRegistry.findBusiness(AbstractRegistry.java:243)
> 	at
>
org.apache.ws.scout.registry.BusinessQueryManagerImpl.findOrganizations(BusinessQueryManagerImpl.java:61)
> 	at
>
org.apache.ws.JAXRQueryTest.testQuery(JAXRQueryTest.java:63)
> 
> thanks,
> dims
> 
> -- 
> Davanum Srinivas -
> http://webservices.apache.org/~dims/
> > package org.apache.ws;
> 
> import junit.framework.TestCase;
> 
> import javax.xml.registry.BulkResponse;
> import javax.xml.registry.BusinessQueryManager;
> import javax.xml.registry.Connection;
> import javax.xml.registry.ConnectionFactory;
> import javax.xml.registry.FindQualifier;
> import javax.xml.registry.JAXRException;
> import javax.xml.registry.RegistryService;
> import javax.xml.registry.infomodel.EmailAddress;
> import javax.xml.registry.infomodel.Organization;
> import javax.xml.registry.infomodel.PersonName;
> import javax.xml.registry.infomodel.RegistryObject;
> import javax.xml.registry.infomodel.Service;
> import javax.xml.registry.infomodel.ServiceBinding;
> import javax.xml.registry.infomodel.TelephoneNumber;
> import javax.xml.registry.infomodel.User;
> import java.util.ArrayList;
> import java.util.Collection;
> import java.util.Iterator;
> import java.util.Properties;
> 
> /**
>  * Created by IntelliJ IDEA.
>  * User: srida01
>  * Date: Nov 10, 2004
>  * Time: 7:34:15 AM
>  * To change this template use File | Settings |
> File Templates.
>  */
> public class JAXRQueryTest extends TestCase {
>     public void testQuery() throws Exception {
>         String queryString = "IBM";
>         Connection connection = null;
> 
>         // Define connection configuration
> properties
>         // To query, you need only the query URL
>         Properties props = new Properties();
>        
>
props.setProperty("javax.xml.registry.queryManagerURL",
>                
> "http://uddi.microsoft.com:80/inquire");
>        
> props.setProperty("javax.xml.registry.factoryClass",
>                
>
"org.apache.ws.scout.registry.ConnectionFactoryImpl");
> 
>         // Create the connection, passing it the
> configuration properties
>         ConnectionFactory factory =
> ConnectionFactory.newInstance();
>         factory.setProperties(props);
>         connection = factory.createConnection();
> 
>         // Get registry service and business query
> manager
>         RegistryService rs =
> connection.getRegistryService();
>         BusinessQueryManager bqm =
> rs.getBusinessQueryManager();
>         System.out.println("We have the Business
> Query Manager");
> 
>         // Define find qualifiers and name patterns
>         Collection findQualifiers = new ArrayList();
>        
> findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);
>         Collection namePatterns = new ArrayList();
>         namePatterns.add("%" + queryString + "%");
> 
>         // Find based upon qualifier type and values
>         System.out.println("\n-- searching the
> registry --\n");
>         BulkResponse response =
>                
> bqm.findOrganizations(findQualifiers,
>                         namePatterns,
>                         null,
>                         null,
>                         null,
>                         null);
> 
>         // check how many organisation we have
> matched
>         Collection orgs = response.getCollection();
>         System.out.println("\n-- Matched " +
> orgs.size() + " organisations --\n");
> 
>         // then step through them
>         for (Iterator orgIter = orgs.iterator();
> orgIter.hasNext();) {
>             Organization org = (Organization)
> orgIter.next();
>             System.out.println("Org name: " +
> getName(org));
>             System.out.println("Org description: " +
> getDescription(org));
>             System.out.println("Org key id: " +
> getKey(org));
> 
>             // Display primary contact information
>             User pc = org.getPrimaryContact();
>             if (pc != null) {
>                 PersonName pcName =
> pc.getPersonName();
>                 System.out.println(" Contact name: "
> + pcName.getFullName());
>                 Collection phNums =
> pc.getTelephoneNumbers(pc.getType());
>                 for (Iterator phIter =
> phNums.iterator(); phIter.hasNext();) {
>                     TelephoneNumber num =
> (TelephoneNumber) phIter.next();
>                     System.out.println("  Phone
> number: " + num.getNumber());
>                 }
>                 Collection eAddrs =
> pc.getEmailAddresses();
>                 for (Iterator eaIter =
> eAddrs.iterator(); eaIter.hasNext();) {
>                     System.out.println("  Email
> Address: " + (EmailAddress) eaIter.next());
>                 }
>             }
> 
>             // Display service and binding
> information
>             Collection services = org.getServices();
>             for (Iterator svcIter =
> services.iterator(); svcIter.hasNext();) {
>                 Service svc = (Service)
> svcIter.next();
>                 System.out.println(" Service name: "
> + getName(svc));
>                 System.out.println(" Service
> description: " + getDescription(svc));
>                 Collection serviceBindings =
> svc.getServiceBindings();
>                 for (Iterator sbIter =
> serviceBindings.iterator(); sbIter.hasNext();) {
>                     ServiceBinding sb =
> (ServiceBinding) sbIter.next();
>                     System.out.println("  Binding
> Description: " + getDescription(sb));
>                     System.out.println("  Access
> URI: " + sb.getAccessURI());
>                 }
>             }
>             // Print spacer between organizations
>             System.out.println(" --- ");
>         }
>         connection.close();
>     }
> 
>     private static String getName(RegistryObject ro)
> throws JAXRException {
>         if (ro != null && ro.getName() != null) {
>             return ro.getName().getValue();
>         }
>         return "";
>     }
> 
>     private static String
> getDescription(RegistryObject ro) throws
> JAXRException {
>         if (ro != null && ro.getDescription() !=
> null) {
>             return ro.getDescription().getValue();
>         }
>         return "";
>     }
> 
>     private static String getKey(RegistryObject ro)
> throws JAXRException {
>         if (ro != null && ro.getKey() != null) {
>             return ro.getKey().getId();
>         }
>         return "";
>     }
> }
> 



		
__________________________________ 
Do you Yahoo!? 
Check out the new Yahoo! Front Page. 
www.yahoo.com 
 


Mime
View raw message