Hi there,

We have some data publishers set up that publish database schemas via
XFire.  These work great and we have some clients that can connect to
these services and view the schemas successfully.

However, we seem to have found a problem whereby we package up a jsp
with the deployed publisher service that is designed to let a user
visiting the parent URL browse the schema directly from the publisher,
i.e.

http://publisherurl/ - takes you to the index.jsp to browse the schema
http://publisherurl/services/datapublisher?wsdl - web service url to
view wsdl

So, we can view the wsdl with no problems and the services seem to be
registered fine with the ServiceRegistry.

To browse the db schema, we need to retrieve it from the Service
registered to the XFire instance.  This code is in our index.jsp.

<snip>
XFire xfire = XFireFactory.newInstance().getXFire();
        
for (Object o : xfire.getServiceRegistry().getServices())
{
   org.codehaus.xfire.service.Service s =
(org.codehaus.xfire.service.Service)o;
            
   FluxionService fs =
(FluxionService)((AbstractInvoker)s.getInvoker()).getServiceObject(new
MessageContext());
            
   if (fs != null)
   {
        for (URI datasource : fs.getDataSources())
        {
           ontology = fs.getSchema(datasource);
           session.setAttribute("ontology", ontology);
        }
   }
   else
   {
       html.append("Error: Cannot access null service.");
   }
}
</snip>

The xfire instance returned from the XFireFactory appears to have no
services registered, and this is shown by the
xfire.getServiceRegistry().getServices() set having a size of 0.

Can anyone shed any light as to why the wsdl is available for this
service, yet a jsp packaged up with the publisher WAR cannot seem to
access the correct xfire instance to retrieve services?

Cheers

Rob

-- 
---------------------------------------
Dr. Rob Davey
NCYC / Institute of Food Research
Computational Biology / John Innes Centre
Norwich Research Park
Norwich, Norfolk, NR4 7HU

http://www.comparagrid.org/
http://cbr.jic.ac.uk/dicks/
---------------------------------------


---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to