Hate to keep bugging you, but I have to be doing something wrong.  I looked
up in the docs, the JSR181 proxy element.  I tried to set it up in my
xbean.xml, in the service unit for my WaterGaugeService which wants to use
my AlertService.  In my xbean.xml for my WaterGaugeService, I defined the
namespace that is in my AlertService SU, then added a proxy configuration.
I also added a property to my WaterGaugeService using the interface for the
AlertService.  When I run my maven build, I get this error:

[ERROR] BUILD ERROR
[INFO]
------------------------------------------------------------------------
[INFO] Failed to generate jbi.xml

Embedded error: Unable to generate service unit descriptor!
com.bae.gse.flare.service.alert.AlertServiceProxy
[INFO]
------------------------------------------------------------------------

Doesn't the Proxy class get generated on the fly?  Or do I need to create
it?

 Here is how I configured my xbean.xml (the relevant snippet):

<jsr181:endpoint pojoClass="
com.bae.gse.flare.service.watergauge.WaterGaugeServiceImpl"
                   wsdlResource="classpath:WaterGaugeService.wsdl"
                   style="document" />

  <jsr181:endpoint serviceInterface="
com.bae.gse.flare.alertservice.AlertServicePort">
    <jsr181:pojo>
      <bean class="com.bae.gse.flare.service.alert.AlertServiceProxy">
        <property name="alert">
          <jsr181:proxy service="alertservice:AlertService"
context="#context" type="com.bae.gse.flare.alertservice.AlertServicePort" />
        </property>
      </bean>
    </jsr181:pojo>
  </jsr181:endpoint>


On 8/29/07, Ryan Moquin <[EMAIL PROTECTED]> wrote:
>
> While I'm thinking about it, is there any reason for going through the NMR
> vs. just using the bean directly?  Is it only to be loosely coupled or are
> there any other advantages?
>
> On 8/29/07, Ryan Moquin <[EMAIL PROTECTED]> wrote:
> >
> > Ah, so that is different than what I thought I was supposed to do.  I'll
> > give it a try, thanks!!
> >
> > On 8/29/07, Nodet Guillaume < [EMAIL PROTECTED]> wrote:
> > >
> > >
> > > Let's say you have two beans foo.bar.AImpl and foo.bar.BImpl that
> > > implement
> > > the foor.bar.A and foo.bar.B interfaces.  Then you would have
> > >
> > > package foo.bar;
> > > @WebService(..)
> > > class AImpl implements A {
> > >     private B b;
> > >     public void setB(B b) {
> > >       this.b = b;
> > >     }
> > >     ...
> > > }
> > >
> > > and you can wire together using the <jsr181:proxy /> if you want to
> > > go through
> > > the NMR and be independent of B location and implementation, or using
> > > spring
> > > just inject an instance of the second service into the first one:
> > >
> > > <bean id="a" class="foo.bar.AImpl">
> > >    <property name="b" value-ref="b" />
> > >    ..
> > > </bean>
> > >
> > > <bean id="b" class="foo.bar.BImpl">
> > >    ...
> > > </bean>
> > >
> > > You can still expose those beans (one ore both) as jsr181 endpoints
> > > in the
> > > usual way...
> > >
> > > Cheers,
> > > Guillaume Nodet
> > >
> > > On Aug 29, 2007, at 2:41 AM, Ryan Moquin wrote:
> > >
> > > > I'm sorry if there is something really obvious somewhere about how
> > > > this is
> > > > done, but I was wondering if someone can tell me or point me to
> > > > where I can
> > > > find out how to make two JSR181 services in servicemix talk to each
> > > > other.
> > > > I would just have one call the other as if they weren't hooked to
> > > > the NMR,
> > > > but I'm assuming that's not the most efficient and that there is a
> > > > better
> > > > way.  I saw some various pieces of code that sound kind of like
> > > > what I want,
> > > > but since I'm a bit new still to how to interact with Servicemix
> > > > (other than
> > > > deploy to and call a service externally) so I'm a little bit unsure
> > > > of what
> > > > I need to do.  Can anyone point me in the right direction?
> > > >
> > > > Thanks!
> > > >
> > > > Ryan
> > >
> > >
> >
>

Reply via email to