We register web service with xfire and register the implementation object
with the service. As long as the service is registered, xfire can show the
wsdl. But invocations on the service need to be routed to the
implementation. If no implementation is available with the service, xfire
will report the error. Decoupling allows you to change implementations at
runtime without bringing the service down (instead of saying service not
available, it will say implementation not available ;)

 

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: [email protected]
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