Sorry. I might have misunderstood the problem.

Maybe you are getting the xfire instance from the wrong xfirefactory object.
Can you send the code you use to get the xfire instance?

Regards
Mayank Thakore
Huawei Technologies
 
****************************************************************************
****************************
 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!


-----Original Message-----
From: Robert Davey [mailto:[EMAIL PROTECTED] 
Sent: Friday, September 21, 2007 19-22
To: user@xfire.codehaus.org
Subject: [xfire-user] ServiceRegistry empty, but wsdl available

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




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

    http://xircles.codehaus.org/manage_email

Reply via email to