Hi I am testing juddiv3 and I am having trouble with the keygenerator
behavior when registering a businessEntity.

I am using the custom_juddi_install_data provided with the juddiv3-tomcat
distribution - specifically the marketing node.

I am attempting to register a businessEntity with AuthInfo for the marketing
publisher/user. I am allowing the server to set the businessKey, but instead
of using the marketing keygenerator it is using the root keygenerator. How
can I get it to use the marketing keygenerator?

i get the AuthInfo like so:

                org.uddi.api_v3.GetAuthToken ga = new
org.uddi.api_v3.GetAuthToken();
                ga.setUserID("marketing");
                ga.setCred("");
                authToken = uddiSecurityService.getAuthToken(ga);

and then register a BusinessEntity:

                    bsIn = new BusinessEntity();
                    DiscoveryURLs urls = new DiscoveryURLs();
                    DiscoveryURL url = new DiscoveryURL();
                    url.setValue("http://www.Xsoftware.com";);
                    urls.getDiscoveryURL().add(url);
                    bsIn.setDiscoveryURLs(urls);
                    Name name = new Name();

                    name.setValue("X");
                    bsIn.getName().add(name);
                 SaveBusiness sb = new SaveBusiness();

                sb.setAuthInfo(authToken.getAuthInfo());
                sb.getBusinessEntity().add(bsIn);
                uddiPublishService.saveBusiness(sb);

The businessKey generated looks like :
uddi:juddi.apache.org:3fb43e0e-5e22-4aa3-8eda-5f473eef19d5

Shouldn't it use the marketing keygenerator? which has the form :
uddi:marketing.apache.org:keygenerator

I have configured my juddiv3-tomcat to use HSQLDB in memory, if that makes a
difference:

3) add hsqldb.jar to lib/
4) update webapps\juddiv3\WEB-INF\classes\META-INF\persistence.xml so it is
using hsql
    <properties>
      <property name="hibernate.archive.autodetection" value="class"/>
      <property name="hibernate.hbm2ddl.auto" value="create"/>
      <property name="hibernate.show_sql" value="false"/>

      <property name="hibernate.dialect"
value="org.hibernate.dialect.HSQLDialect"/>
      <property name="hibernate.cache.provider_class"
value="org.hibernate.cache.HashtableCacheProvider"/>
    </properties>
5) update webapps\juddiv3\META-INF\context.xml so it is configured with hsql
resource for JUDDI
     <Resource name="jdbc/JuddiDS" auth="Container"
            type="javax.sql.DataSource" username="sa" password=""
            driverClassName="org.hsqldb.jdbcDriver"
            url="jdbc:hsqldb:mem:juddi-derby-test-db"
            maxActive="8"
            />

Thanks
Gabe T

Reply via email to