You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@juddi.apache.org by Computer Learning Inst <cl...@yahoo.com> on 2011/06/29 20:48:52 UTC

UDDIClerk.findBusiness fine, but UDDIClerk.findService runs into Exception

Hi,

UDDIClerk.findBusiness works fine.  
However, very similar code that uses UDDIClerk.findService throws exception: [org.apache.juddi.v3.client.transport.TransportException: unknown protocol: authtoken].  Please see below for details, and please suggest a solution!

Environment:
=========
jUDDI v3.0.4
Java(TM) SE Runtime Environment (build 1.6.0_16-b01)
Windows XP Pro x64
In juddiv3.properties: juddi.authenticate.Inquiry=true

Code:
====
...

objClerks = UDDIClientContainer.getUDDIClerkManager(JUDDIv3Communication.CLERK_MANAGER_NAME).getClientConfig().getUDDIClerks();
...
Node n = new Node();
n.setName(JUDDIv3Communication.MYORG_UDDI_NODE_NAME);       // "default" node
try {
    AuthToken myPubAuthToken = null;
    myPubAuthToken = this.getAuthToken(JUDDIv3Communication.PUBLISHER_AUTHORIZED_NAME);
    n.setSecurityUrl(myPubAuthToken.getAuthInfo());

    objTheOnlyServiceInUDDI = objUDDIClerk.findService(pstrSvcKey, n);
}
catch (Exception e) {
    e.printStackTrace();
}
...


Exception:
========
JUDDIv3Communication.findServiceByKeyAsString(): pstrSvcKey=~uddi:juddi.apache.org:5c5d1518-bfa5-4aff-83c8-92c8e582758f~ - INFO
JUDDIv3Communication.getAuthToken(): PUBLISHER=~myorg-publisher~ and AUTHTOKEN=~authtoken:caaa8d27-64de-418e-951e-6ce370f75ef8~ - INFO
org.apache.juddi.v3.client.transport.TransportException: unknown protocol: authtoken
        at org.apache.juddi.v3.client.transport.JAXWSTransport.getUDDISecurityService(JAXWSTransport.java:104)
        at org.apache.juddi.v3.client.config.UDDIClerk.getAuthToken(UDDIClerk.java:375)
        at org.apache.juddi.v3.client.config.UDDIClerk.findService(UDDIClerk.java:252)
        at net.myorg.uddiv3.util.JUDDIv3Communication.findServiceByKeyAsString(JUDDIv3Communication.java:861)
        at net.myorg.uddiv3.util.JUDDIv3Communication.main(JUDDIv3Communication.java:1305)
Caused by: java.net.MalformedURLException: unknown protocol: authtoken
        at java.net.URL.<init>(URL.java:574)
        at java.net.URL.<init>(URL.java:464)
        at java.net.URL.<init>(URL.java:413)
        at org.apache.juddi.v3.client.transport.JAXWSTransport.getUDDISecurityService(JAXWSTransport.java:101)
        ... 4 more

Note:
====
Again, note that a very similar code that uses UDDIClerk.findBusiness works just fine.

Any help is much appreciated!