On Fri, Aug 29, 2008 at 2:53 PM, Abraham Washington <[EMAIL PROTECTED]>wrote:
> hi simon...not sure what you're saying (confused). i'm modeling my > reference using the helloworld-ws-reference composite (see below). it uses > a reference in both. > > > > <component name="HelloTuscanyServiceComponent"> > > <implementation.java class="helloworld.HelloWorldServiceComponent"/> > > <reference name="helloWorldService"> > > <binding.ws wsdlElement=" > http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)<http://helloworld#wsdl.port%28HelloWorldService/HelloWorldSoapPort%29> > "/> > > </reference> > > </component> > > <!-- A component with a reference promoted as a composite reference --> > > <component name="HelloWorldServiceComponent"> > > <implementation.java class="helloworld.HelloWorldServiceComponent"/> > > </component> > > <reference name="HelloWorldService" > promote="HelloWorldServiceComponent/helloWorldService"> > > <interface.java interface="helloworld.HelloWorldService" /> > > <binding.ws wsdlElement=" > http://helloworld#wsdl.port(HelloWorldService/HelloWorldSoapPort)<http://helloworld#wsdl.port%28HelloWorldService/HelloWorldSoapPort%29> > "/> > > </reference> > > i must not be understanding something...thx abe > > > > > ----- Original Message ---- > From: Simon Laws <[EMAIL PROTECTED]> > To: [email protected] > Sent: Friday, August 29, 2008 4:37:14 AM > Subject: Re: invoking reference > > > > On Fri, Aug 29, 2008 at 1:24 AM, Abraham Washington <[EMAIL PROTECTED]>wrote: > >> hi all, i have a webapp, that has a composite with a single reference >> (see below). the binding.ws uri is up and working (i have a test case >> that invokes it). in my OrganizationServiceImpl class, the >> organizationServiceClient is being injected (verified). i print out the >> organizationServiceClient and it's a valid Proxy class. but, the referenced >> service is never invoked. no debug comes up from that service. no error >> messages come up from jboss console, so, it's tough debugging. i'm hoping >> someone has an idea on where i can start (since there's no errors, i'm >> confused on where to go). >> >> here's my composite that has the reference: >> >> >> < >> composite xmlns="http://www.osoa.org/xmlns/sca/1.0" >> >> targetNamespace="http://org.soa.services" >> >> xmlns:soa="http://org.soa.services" >> >> name="Organization-Service-Composite"> >> >> <!-- A component with an embedded reference definition connecting to an >> external webservice >> >> The wsdl interface for the reference is derived from the information >> specified by 'uri' >> >> --> >> >> <component name="OrganizationServiceComponent"> >> >> <implementation.java class="org.soa.services.OrganizationServiceImpl"/> >> >> <reference name="organizationServiceClient" > >> >> <binding.ws uri=" >> http://192.168.1.7:8087/organization-service-composite/OrganizationService >> "/> >> >> </reference> >> >> </component> >> >> <!-- A component with a reference promoted as a composite reference --> >> >> <component name="OrganizationComponent"> >> >> <implementation.java class="org.soa.services.OrganizationServiceImpl"/> >> >> </component> >> >> <reference name="OrganizationServiceClient" promote= >> "OrganizationComponent/organizationServiceClient"> >> >> <interface.java interface="org.soa.services.OrganizationService" /> >> >> <binding.ws uri=" >> http://192.168.1.7:8087/organization-service-composite/OrganizationService >> "/> >> >> </reference> >> >> </ >> composite> >> >> >> >> Here's my OrganizationServiceImpl class: >> >> >> >> @Service >> (OrganizationService.*class*)* >> >> public >> **class* OrganizationServiceImpl *implements* OrganizationService { >> >> >> >> //@Reference >> >> OrganizationService >> organizationServiceClient; >> >> >> >> *public* Collection<Organization> findOrganizationByName( >> >> String organizationName, SchemaInfo schemaInfo) { >> >> System. >> *out*.println("\n\nfindOrganizationByName ... " + >> organizationServiceClient); >> >> java.util.Collection<Organization> organizations = >> *null*; >> >> *try* { >> >> System. >> *out*.println("organizationServiceClient -> " + >> organizationServiceClient.getClass().getName()); >> >> >> organizations = >> organizationServiceClient.findOrganizationByName(organizationName, >> schemaInfo); >> >> System. >> *out*.println("organizations -> " + organizations); >> >> } >> >> *catch* (Exception e) { >> >> e.printStackTrace(); >> >> } >> >> *return* organizations; >> >> } >> >> *public* OrganizationService getOrganizationServiceClient() { >> >> System. >> *out*.println("OrganizationServiceImpl -> Got Injected >> organizationService"); >> >> *return* organizationServiceClient; >> >> } >> >> *public* *void* setOrganizationServiceClient(OrganizationService >> organizationServiceClient) { >> >> System. >> *out*.println("1. Injected organizationServiceClient -> " + >> organizationServiceClient.getClass().getName()); >> >> *this*.organizationServiceClient = organizationServiceClient; >> >> } >> >> >> >> and the debug from jboss: >> >> >> >> get the scaDomain... >> 14:38:02,147 INFO [STDOUT] >> >> get the org service... >> 14:38:02,176 INFO [STDOUT] >> organizationService -> [Proxy - >> [EMAIL PROTECTED] >> 14:38:02,177 INFO [STDOUT] >> >> call findOrganizations... >> 14:38:02,220 INFO [STDOUT] 1. Injected organizationServiceClient -> >> $Proxy63 >> 14:38:02,223 INFO [STDOUT] >> >> findOrganizationByName ... [Proxy - >> [EMAIL PROTECTED] >> 14:38:02,224 INFO [STDOUT] organizationServiceClient -> $Proxy63 >> 14:38:02,262 DEBUG [RepositoryClassLoader] setRepository, >> repository=org.jboss.mx.loading.HeirarchicalLoaderRepository3@ >> >> >> >> > Hi Abraham > > In your composite you seem to be definition a reference withe binding.wsfor > both OrganizationServiceClient and OrganizationServiceComponent. I would > have expected to see a <service/> defined for the > OrganizationServiceComponent in this kind of scenario. Am I missing > something? > > Regards > > Simon > > Hi Abe And you have another composite running separately that is providing the service with which you client communicates? Simon
