On Tue, Mar 3, 2009 at 2:34 PM, Dave Sowerby <[email protected]> wrote:

> Ok, I've played around with this some more.
>
> It looks like there's two issues here....
>
> The first is that the error messages I'm seeing from binding.ws are
> misleading "- No JMS connection factories are defined.Will not listen
> for any JMS messages" is not an indication that the SOAP/JMS service
> is not bound and listening, the service is in fact working.
>
> Also, with this second entry, I definitely don't see the jms binding
> within the generated WSDL, despite the service itself functioning -
> I've raised TUSCANY-2900 to reflect this.
>
> Cheers,
>
> Dave.
> - Show quoted text -
>
> On Tue, Mar 3, 2009 at 7:16 AM, Dave Sowerby <[email protected]>
> wrote:
> > Hey Simon,
> >
> > Thanks for the reply.
> >
> > I've updated my composite to read:
> >
> >   <service name="HelloWorldService">
> >     <interface.java interface="helloworld.HelloWorldService" />
> >     <binding.ws name="SOAPJMSBinding" uri="jms:/..." />
> >     <binding.ws name="SOAPHTTPBinding" />
> >   </service>
> >
> > Upon startup the node initialisation outputs the following:
> >
> > 03-Mar-2009 07:03:00
> > org.apache.tuscany.sca.binding.ws.axis2.Axis2ServiceProvider start
> > INFO: Axis2 JMS
> >
> URL=jms:/jms/HelloWorldRequestQueue?transport.jms.ConnectionFactoryJNDIName=HelloWorldConnectionFactory&java.naming.factory.initial=weblogic.jndi.WLInitialContextFactory&java.naming.provider.url=t3://localhost:10402
> > - Mapping JNDI name : jms/HelloWorldRequestQueue and JMS Destination
> > name : hwResMod!HelloWorldRequestQueue against service :
> > jms/HelloWorldRequestQueue
> > - JMS Transport Receiver (Listener) initialized...
> > - Connection factory : TuscanyQueueConnectionFactory initialized...
> > - No JMS connection factories are defined.Will not listen for any JMS
> messages
> > 03-Mar-2009 07:03:00
> > org.apache.tuscany.sca.host.webapp.WebAppServletHost addServletMapping
> > INFO: Added Servlet mapping: /helloworld/HelloWorldServiceComponent
> > - No JMS connection factories are defined.Will not listen for any JMS
> messages
> >
> > From the output it appears that it's getting confused about the
> > ConnectionFactory still.  The ?wsdl service is still available, but
> > with only one wsdl:binding present in the generated wsdl.
> >
> > If I remove the <binding.ws name="SOAPHTTPBinding" /> entry, the
> > SOAP/JMS service starts absolute fine, without any of the complaints
> > about the Connection Factory.
> >
> > Any ideas?
> >
> > Cheers,
> >
> > Dave.
> >
> >
> > On Mon, Mar 2, 2009 at 6:26 PM, Simon Laws <[email protected]>
> wrote:
> >>
> >>
> >> On Mon, Mar 2, 2009 at 5:41 PM, Dave Sowerby <[email protected]>
> wrote:
> >>>
> >>> Hi all,
> >>>
> >>> I have a functional service which is already accessible with
> >>> binding.ws, I'd like to make the same service available with SOAP/JMS
> >>> too.
> >>>
> >>> I've tried this (as an example) with helloworld-ws-reference-jms by
> >>> changing the service tag as follows:
> >>>
> >>>    <service name="HelloWorldService">
> >>>      <interface.java interface="helloworld.HelloWorldService" />
> >>>      <binding.ws uri="jms:/..." />
> >>>      <binding.ws />
> >>>    </service>
> >>>
> >>> When I attempt to start this, I get the following error:
> >>>
> >>> WARNING: Multiple bindings with the same name for a service: Service =
> >>> HelloWorldService Binding name = HelloWorldService
> >>>
> >>> Then I get the JMS bound service attempting to start but issues then
> >>> occur whilst it attempts to locate the Connection Factory.  In the end
> >>> the only service which is available is the SOAP/HTTP service, so that
> >>> I can see the service running and the wsdl in the usual ?wsdl URI.
> >>>
> >>> This behaviour leads me to believe that multiple bindings of the same
> >>> type cannot be used - is this so?  Ideally I'd like to have the two
> >>> bindings from the same service - I'd hope to see both bindings in the
> >>> generated wsdl.
> >>>
> >>> Does anyone have any thoughts on whether this should work?
> >>>
> >>> Cheers,
> >>>
> >>> Dave.
> >>
> >> HI Dave
> >>
> >> This should work but the spec defined rules for how the bindings are
> named
> >> and hence distinguished. This kicks in when multiple bindings share the
> same
> >> scheme which doesn't appear the case here. So we'll have to have a look
> at
> >> how the binding name is being calculated as it would appear that they
> are
> >> both adopting the default which is the service name. Can you try giving
> the
> >> bindings an explicit name="" attribute with different names and see what
> >> happens.
> >>
> >> Regards
> >>
> >> Simon
> >>
> >
>

Hi Dave

Thanks for doing some more prodding.

On the first issue, we have a JMS transport defined by default in our Axis
config regardless of whether JMS is in use so it's complaining that no
connection factories are specified for the transport in the case where
binding.ws is used with no JMS configuration. I've made a small change
locally that moves this configuration to the code so the message doesn't
appear. Testing now.

Re. the WSDL problem. I've been thinking about this a bit and need to
discuss with the others here. I see the same effect as you do in that a
component defined as follows:

    <component name="HelloWorldServiceComponent">
        <implementation.java class="helloworld.HelloWorldImpl" />
        <service name="HelloWorldService">
            <interface.wsdl interface="
http://helloworld#wsdl.interface(HelloWorld)" />
            <binding.ws wsdlElement="
http://helloworld#wsdl.binding(HelloWorldSoapJmsBinding)"

uri="jms:/queue.sample?transport.jms.ConnectionFactoryJNDIName=QueueConnectionFactory&amp;java.naming.factory.initial=org.apache.activemq.jndi.ActiveMQInitialContextFactory&amp;java.naming.provider.url=tcp://localhost:61619"/>
            <binding.ws/>
        </service>
    </component>

Where the WSDL in the cntribution has both WS and JMS bindings. When I ping

http://l3aw203:8080/HelloWorldServiceComponent?wsdl

What I see is

<?xml version="1.0" encoding="UTF-8"?>
<wsdl:definitions name="HelloWorldServiceComponent.HelloWorldService"
targetNamespace="http://helloworld/HelloWorldServiceComponent/HelloWorldService";
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
xmlns:tns="http://helloworld/HelloWorldServiceComponent/HelloWorldService";
xmlns:ns0="http://helloworld";
xmlns:SOAP11="http://schemas.xmlsoap.org/wsdl/soap/";>
  <wsdl:import namespace="http://helloworld";
location="/HelloWorldServiceComponent?wsdl=wsdl/helloworld.wsdl">
    </wsdl:import>
  <wsdl:binding name="HelloWorldBinding" type="ns0:HelloWorld">
    <SOAP11:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
    <wsdl:operation name="getGreetings">
      <SOAP11:operation soapAction="urn:getGreetings"/>
      <wsdl:input name="getGreetingsRequest">
        <SOAP11:body use="literal"/>

      </wsdl:input>
      <wsdl:output name="getGreetingsResponse">
        <SOAP11:body use="literal"/>
      </wsdl:output>
    </wsdl:operation>
  </wsdl:binding>
  <wsdl:service name="HelloWorldService">
    <wsdl:port name="HelloWorldPort" binding="tns:HelloWorldBinding">
      <SOAP11:address
location="http://192.168.247.1:8080/HelloWorldServiceComponent"/>

    </wsdl:port>
  </wsdl:service>
</wsdl:definitions>


Now this is interesting as the address I'm pointing my browser at, i.e.
http://l3aw203:8080/HelloWorldServiceComponent, is the endpoint exposed by
binding.ws (rather than binding.ws uri="jms:/...") so maybe I would expect
just to see the WSDL ws binding information.

Asking the question in a slightly different way. If I have just
<binding.wsuri="jms:/..."/> where would I have to point my browser at
to get the WSDL.
Maybe you would expect some proper meta-data exchange protocol for the
component service as a whole but we don't have that at the moment. I'll have
a chat with the spec people.

Regards

Simon

Reply via email to