Hi all.
Let me begin by saying that I have spent the better part of Friday and some
of the weekend looking in these archives to see if I could find a similar
problem and solution, but I did not, no solution anyways.
I have deployed jUDDI on my local maachine with Tomcat-6, MySQL-5, Java-5,
and the validate page (happyjuddi.jsp) returns everything is fine. But,
when I run my client app to connect to, query, or update jUDDI, it all falls
apart, but I don't know if it is the configuration of the previously
mentioned components, my client code, or a problem with jUDDI.
1) This is when I try to query the registry for a business. No
authentication is needed for this, so I don't do it. The query is the
wildcard "%", supposed to return all businesses.
// Create the connection, passing it the configuration properties
ConnectionFactory factory = ConnectionFactory.newInstance();
Properties props = new Properties();
props.setProperty("javax.xml.registry.queryManagerURL ", WS_QUERY_URI);
factory.setProperties(props);
conn = factory.createConnection();
// Get registry service and query manager
RegistryService rs = conn.getRegistryService();
BusinessQueryManager bqm = rs.getBusinessQueryManager();
// Define the find qualifiers and name patterns
Collection<String> qualifiers = new ArrayList<String>();
qualifiers.add(FindQualifier.SORT_BY_NAME_DESC);
Collection<String> namePatterns = new ArrayList<String>();
namePatterns.add("%");
// submit a request to find the orgainzation(s) using the qualifiers
BulkResponse response = bqm.findOrganizations(qualifiers, namePatterns,
null, null, null, null);
...
java.lang.IllegalArgumentException
at
com.sun.xml.registry.uddi.bindings_v2.impl.runtime.UnmarshallerImpl.unmarshal(Unknown
Source)
at com.sun.xml.registry.common.util.MarshallerUtil.jaxbUnmarshalObject(Unknown
Source)
at com.sun.xml.registry.uddi.Processor.processResponseJAXB (Unknown Source)
at com.sun.xml.registry.uddi.Processor.processRequestJAXB(Unknown Source)
at com.sun.xml.registry.uddi.UDDIMapper.findOrganizations(Unknown Source)
at com.sun.xml.registry.uddi.BusinessQueryManagerImpl.findOrganizations(Unknown
Source)
at RegisterWS.doQuery(RegisterWS.java:222)
at RegisterWS.main(RegisterWS.java:32)
2) This is the stack trace when I try to set the username and password
security credentials to the connection. This is straightforward and just
like all the examples online I have seen. The username is in the publish
table. The password I use is just "password" b/c I have not seen any place
for a password in the table or a file and I think I read that it doesn't
matter b/c jUDDI isn't really an authenticator.
// create authorization credentials based on username and password
PasswordAuthentication passwdAuth = new PasswordAuthentication(username,
password.toCharArray());
// add the set of credentials to the connection
Set<PasswordAuthentication> creds = new HashSet<PasswordAuthentication>();
creds.add(passwdAuth);
conn.setCredentials(creds); // this is causing the exception to be thrown
...
java.lang.IllegalArgumentException
at
com.sun.xml.registry.uddi.bindings_v2.impl.runtime.UnmarshallerImpl.unmarshal(Unknown
Source)
at com.sun.xml.registry.common.util.MarshallerUtil.jaxbUnmarshalObject(Unknown
Source)
at com.sun.xml.registry.uddi.Processor.processResponseJAXB(Unknown Source)
at com.sun.xml.registry.uddi.Processor.processRequestJAXB(Unknown Source)
at com.sun.xml.registry.uddi.UDDIMapper.getAuthorizationToken (Unknown
Source)
at com.sun.xml.registry.uddi.ConnectionImpl.setCredentials(Unknown Source)
at GetWSInfo.authenticateUsernameAndPassword(GetWSInfo.java:63)
at GetWSInfo.tryToConnectToRegistry(GetWSInfo.java:41)
at GetWSInfo.main(GetWSInfo.java:126)
As you can see from the stack traces, they are the same from the top down,
until my classes and the uddi class that gets called. This kind of leads me
to believe that the problem could be linked to a single source, but I don't
know enough about jUDDI (been using it for only a couple of days). It is
very possible I could have not done something because I simply did not know.
If anyone can help me out, I would appreciate it.
Jeff G.