Thanks Kurt, I'll deploy this a war and see if I can get it working. Cheers,
James -----Original Message----- From: Kurt T Stam [mailto:[email protected]] Sent: 27 May 2011 16:22 To: [email protected] Subject: Re: Registering via annotations Hi James, I'm not really familiar with GlassFish, but when deploying webservices and/or servlets you typically deploy in a war, to involve the webcontainer. I take it you are 'exposing ejb's as webservices, hence the jar. In that case we'd need to hook into the ejb deploy/undeploy event to run the registration process. Maybe you can figure out some sort of post-deploy/undeploy hook we can tie into. Once you figure that out, then all you need to do is call UDDIClerkManager manager = UDDIClientContainer.getUDDIClerkManager(managerName); manager.start() where the managerName should correspond to the one given in your uddi.xml and on undeploy: manager.stop() Cheers, --Kurt --K On 5/27/11 10:57 AM, James Burton wrote: > Hi Kurt, thanks for your reply. I'm deploying the webservice as a jar, so > there's no web.xml in that project, the config is in a sun-ejb.xml > file...where should I define the clerk servlet? In the web.xml of the admin > app on glassfish ($GLASSFISH\lib\install\applications\adminapp\adminapp_war)? > I haven't tried deploying the samples war, I'll give that a try and let you > know. > > -----Original Message----- > From: Kurt T Stam [mailto:[email protected]] > Sent: 27 May 2011 15:27 > To: [email protected] > Subject: Re: Registering via annotations > > Hi James, > > That all looks good to me. Are you deploying in a jar or a war? Sounds > like a jar. The thing is that something needs to go read the > annotations.. So this is done by adding > > <servlet> > <servlet-name>UDDIClerkServlet</servlet-name> > <display-name>Clerk Servlet</display-name> > <servlet-class>org.apache.juddi.v3.client.config.UDDIClerkServlet</servlet-class> > <load-on-startup>1</load-on-startup> > </servlet> > > to the web.xml. > > Does the juddib3-samples.war work for you? > > Cheers, > > -Kurt > On 5/27/11 6:38 AM, James Burton wrote: >> Hi, I've installed the juddi portal bundle 3.0.4 and can register services >> OK (just using the root user and jUDDI authentication for now, and I've >> registered services through soapUI and with a client). I want to set up >> registration via annotations when services are deployed on Glassfish 2.1.1. >> Glassfish and the portal bundle are both running locally. I added the >> juddi-client and uddi-ws jars to glassfish and I can deploy annotated >> services using netbeans 7.0, but nothing is registered. There are a couple >> of warnings at the end of the glassfish output, which I've attached, along >> with the webservice bean and my uddi.xml (which is in META-INF when the jar >> is deployed). Any ideas where I'm going wrong or how to troubleshoot this? >> Couple of things I'm not sure about -- do I need to do anything to set up >> the clerk (BobCratchit) or the department referred to in uddi.xml? Thanks, >> >> ///glassfish output >> Container com.sun.enterprise.webservice.JAXWSContainer@17b9ff2 doesn't >> support class com.sun.xml.ws.api.server.Module >> LDR5010: All ejb(s) of [PeopleWS] loaded successfully! >> com.sun.webui.jsf.component.DropDown::The current value of component >> propertyForm:propertyContentPage:propertySheet:propertSectionTextField:instanceNameProp:logFile >> does not match any of the selections. >> Did you forget to reset the value after changing the options? >> JSFT0003: VariableResolver was unable to find key (logEntryDetail) in >> ResourceBundle (help). >> com.sun.webui.jsf.component.DropDown::The current value of component >> propertyForm:propertyContentPage:propertySheet:propertSectionTextField:instanceNameProp:logFile >> does not match any of the selections. >> Did you forget to reset the value after changing the options? >> >> //uddi.xml -- I used the same uddi.xml (minus the clerks entry) successfully >> with a client based on the SimplePublish example >> <?xml version="1.0" encoding="ISO-8859-1" ?> >> <uddi> >> <reloadDelay>5000</reloadDelay> >> <manager name="people-ws"> >> <nodes> >> <node> >> <name>default</name> >> <description>Main jUDDI node</description> >> <properties> >> <property name="serverName" value="localhost"/> >> <property name="serverPort" value="8888"/> >> <property name="keyDomain" value="juddi.apache.org"/> >> <property name="department" value="businesses" /> >> </properties> >> <!-- JAX-WS Transport --> >> >> <proxyTransport>org.apache.juddi.v3.client.transport.JAXWSTransport</proxyTransport> >> <custodyTransferUrl> >> >> http://${serverName}:${serverPort}/juddiv3/services/custody-transfer?wsdl >> </custodyTransferUrl> >> <inquiryUrl> >> http://${serverName}:${serverPort}/juddiv3/services/inquiry?wsdl >> </inquiryUrl> >> <publishUrl> >> http://${serverName}:${serverPort}/juddiv3/services/publish?wsdl >> </publishUrl> >> <securityUrl> >> http://${serverName}:${serverPort}/juddiv3/services/security?wsdl >> </securityUrl> >> <subscriptionUrl> >> http://${serverName}:${serverPort}/juddiv3/services/subscription?wsdl >> </subscriptionUrl> >> <subscriptionListenerUrl> >> >> http://${serverName}:${serverPort}/juddiv3/services/subscription-listener?wsdl >> </subscriptionListenerUrl> >> <juddiApiUrl> >> http://${serverName}:${serverPort}/juddiv3/services/juddi-api?wsdl >> </juddiApiUrl> >> </node> >> </nodes> >> <clerks registerOnStartup="true"> >> <clerk name="BobCratchit" node="default" publisher="root" >> password=""> >> <class>uk.ac.susx.peoplews.session.PeopleWSServiceBean</class> >> </clerk> >> </clerks> >> </manager> >> </uddi> >> >> //part of the webservice bean >> >> package uk.ac.susx.peoplews.session; >> >> //imports >> >> /** >> * >> * @author jb453 >> */ >> @Stateless >> @UDDIService( >> businessKey="uddi:juddi.apache.org:cis", /* this business is registered >> */ >> serviceKey="uddi:cis-peoplews", >> description = "The People service") >> @UDDIServiceBinding( >> bindingKey="uddi:cis-peoplews-binding", >> description="WSDL endpoint for the PeopleWS Service. This service is >> used for " >> + "stuff.", >> accessPointType="wsdlDeployment", >> >> accessPoint="https://localhost:8181/PeopleWSBean_0_0_1/PeopleWSServiceBean?wsdl") >> @WebService(serviceName = "PeopleWSBean_0_0_1") >> @RolesAllowed(value = "webTeamUser") >> public class PeopleWSServiceBean implements PeopleWSServiceBeanLocal { >> >> >> //constructor >> >> /* >> * Web methods >> */ >> >> @WebMethod >> public Collection<PeopleDTO> getPeopleBySurname(@WebParam(name = >> "surname") String surname) { >> //etc >> } >> >> } >> >> >> >> >>
