Hi there,

I'm trying to use juddi-client to publish a web service. I have used the code 
in the User 
Guide<http://juddi.apache.org/docs/3.x/userguide/html_single/index.html> as a 
model. I get the following Exception:

-- Console output -------------------

org.apache.juddi.v3.client.transport.TransportException: 
{urn:juddi-apache-org:v3_service}JUDDIApiService is not a valid service. Valid 
services are: {urn:juddi-apache-org:v3_service}JUDDI_Api_Port
     at 
org.apache.juddi.v3.client.transport.JAXWSTransport.getJUDDIApiService(JAXWSTransport.java:188)
     at 
org.apache.juddi.v3.client.transport.Transport.getJUDDIApiService(Transport.java:58)
     at icoe.uddi.juddi.Main.setup(Main.java:35)
     at icoe.uddi.juddi.Main.main(Main.java:23)
Caused by: javax.xml.ws.WebServiceException: 
{urn:juddi-apache-org:v3_service}JUDDIApiService is not a valid service. Valid 
services are: {urn:juddi-apache-org:v3_service}JUDDI_Api_Port
     at 
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:220)
     at 
com.sun.xml.internal.ws.client.WSServiceDelegate.<init>(WSServiceDelegate.java:165)
     at 
com.sun.xml.internal.ws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:93)
     at javax.xml.ws.Service.<init>(Service.java:76)
     at javax.xml.ws.Service.create(Service.java:700)
     at 
org.apache.juddi.v3.client.transport.JAXWSTransport.getJUDDIApiService(JAXWSTransport.java:185)
     ... 3 more
     at icoe.uddi.juddi.Main.publish(Main.java:63)
     at icoe.uddi.juddi.Main.main(Main.java:24)

---------------------------------------

The code that causes the problem is almost identical to the code in the user 
guide. Here is the code, edited for brevity:

-- Main.java --------------------------

import org.apache.juddi.v3_service.JUDDIApiPortType;
//... several others, including ClassUtil, UDDIClientContainer, Transport, etc

public class Main {

     static JUDDIApiPortType juddiApi;

//...

     public static void main (String [] args) {

          try {
                String clazz = UDDIClientContainer.getUDDIClerkManager(null).
getClientConfig().getUDDINode("default").getProxyTransport();
Class<?> transportClass = ClassUtil.forName(clazz, Transport.class);

if (transportClass != null) {
     Transport transport = (Transport) transportClass.
getConstructor(String.class).newInstance("default");
                     juddiApi = transport.getJUDDIApiService(); //--LINE 63--
                     //...
}
          } catch (Exception e) {
                e.printStackTrace();
           }

//...

     }
}

---------------------------------------

I'm out of ideas. Is there something I'm missing?

Thanks for your help.

Griffith George
Application Developer (FSWEP Student)  |  Développeur d'application (étudiant 
PFETE)
Information Technology Division  |  Division de la technologie de l'information
Chief Information Officer Branch  |  Direction du dirigeant principal de 
l'information
Treasury Board of Canada Secretariat  |  Secrétariat du Conseil du Trésor du 
Canada
Ottawa, Canada
Government of Canada  |  Gouvernement du Canada



Reply via email to