You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by dgoodine <dm...@gmail.com> on 2007/01/22 14:16:31 UTC

A few questions about SEs and WSDL

1. It seems that alot of people start with the JSR181 service unit and HTTP
since it's a bit simpler model, but there's very little
discussion/documentation/demos for implementing your services in a Service
Engine.  I'd prefer the latter, since it allows better abstraction (you can
build abstract classes for all the Endpoint, Component, etc., requiring
minimal coding for new engines and allowing common functionality).  It also
seems a little more natural to the JBI spec to expose services directly to
the NMR rather than burying them inside another component.

It this really the best practice?

2. Also, it would seem natural to deploy WSDL (or *some* sort of description
of the service engine contract) with the Service Unit (or even the Engine
itself).  But there's nothing in the documentation or FUSE demos that
indicates you can do that.  I blindly tried using the wsdlResource attribute
on the my:endpoint bean in the Service Unit, but that didn't seem to have
any effect.

3. I've built my message definitions as complex types completely in XSD then
expose them into WSDL using xsd:include.  But I'm having problems with the
HTTP consumer endpoint loading them on deployment.  In fuse (1.2.2), it
can't find them on the classpath.  Also, in the Web Services explorer, it's
getting errors trying to load in the included XSDs, but I'm more concerned
about the former issue.

Here's the xbean.xml file:

<beans xmlns:http="http://servicemix.apache.org/http/1.0"
xmlns:ucsa="http://services.mtvi.com/ucsa"
	xmlns:acq="http://services.mtvi.com/ucsa/acquisition">
	<http:endpoint service="ucsa:AcquisitionService" endpoint="post"
targetEndpoint="internal" role="consumer"
		locationURI="http://0.0.0.0:8192/ucsa/acquisition/post"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
		wsdlResource="classpath:AcquisitionService.wsdl" />
</beans>

Thanks for any help.
-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8488590
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by wizard <an...@gmail.com>.
Ok! So now we put the .wsdl in our SE's SU deployment, and setDescription()
in our SE. Using jconsole we are able to load the wsdl in our SE's internal
endpoint, but not in our HTTP's external endpoint. This is our HTTP's
endpoint xbean.xml:

	  <http:endpoint service="person:personService"
                 endpoint="soap"
                 role="consumer" 
                 locationURI="http://0.0.0.0:8192/PersonService/"
                 defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
                 soap="true" 
                 soapAction="getPerson"
                 >

Missing something?


gnodet wrote:
> 
> This is the responsability of your own SE to provide a WSDL.
> If you use servicemix-common, your endpoint must initialize
> the endpoint description (setDescription method on the endpoint).
> In such a case, the HTTP BC will be able to expose this wsdl.
> Another way is to deploy the wsdl in the HTTP SU directly.
> 
> On 1/31/07, wizard <an...@gmail.com> wrote:
>>
>> The only difference between our current client and the desired WS client,
>> is
>> that our current client sends a xml message via a SSL Socket to HTTP BC
>> which is then processed by our SEs. We'd like to supply our clients with
>> a
>> wsdl with the available functions (call it our JBI services), so that
>> Client
>> creation would be as easy as creating any other WS client.
>>
>> I can't get our HTTP BC to retrieve a wsdl... :(
>> In wsdl-first, the wsdl file is inside the JSR181 SU.
>>
>>
>> gnodet wrote:
>> >
>> > I don't understand what the difference between WSclient and
>> > your soap request.  What do you mean  ?  I don't understand
>> > the difference between WS and http/soap in your schema.
>> >
>> > The HTTP BC will handle incoming http request (either soap
>> > or not, depending on the configuration), and you can route
>> > exchanges to any other JBI endpoint you want: it could also
>> > be another HTTP BC which would send another HTTP request,
>> > or a JMS endpoint, or any SE ...
>> >
>> >
>> > On 1/31/07, wizard <an...@gmail.com> wrote:
>> >>
>> >> I see what you mean. We have this up and running:
>> >>
>> >> |--Client--||------------SMIX----------|
>> >>
>> >> (request)
>> >> soap(ssl)--->http(BC)----->ourSEs
>> >>
>> >> (answer)
>> >> soap(ssl)<---http(BC)<-----ourSEs
>> >>
>> >> Working flawlessly! :D
>> >>
>> >> What we are trying to implement now is:
>> >>
>> >> |--Client--||------------SMIX------------|
>> >> (request)
>> >> WSclient----->WS(http/etc?)-->ourSEs
>> >>
>> >> (...and then answer...)
>> >>
>> >> Is it possible? JSR181 (wsdl-first example) seems to be:
>> >>
>> >> |--Client--||----------------SMIX-----------------|
>> >> (request)
>> >> WSclient----->WS(http)-->JSR181(with POJO)
>> >>
>> >> I'm I wrong?
>> >>
>> >>
>> >> gnodet wrote:
>> >> >
>> >> > I guess i'm a bit lost here.
>> >> > THere's no relationship between the jsr181 component and soap/http.
>> >> > You can expose any service you want provided that you put
>> >> > an http endpoint in front of it.
>> >> > What kind of problem do you have ?
>> >> >
>> >> > On 1/31/07, wizard <an...@gmail.com> wrote:
>> >> >>
>> >> >>
>> >> >>
>> >> >> Anyone have any hints on these questions?
>> >> >>
>> >> >>
>> >> >> dgoodine wrote:
>> >> >> >
>> >> >> > 1. It seems that alot of people start with the JSR181 service
>> unit
>> >> and
>> >> >> > HTTP since it's a bit simpler model, but there's very little
>> >> >> > discussion/documentation/demos for implementing your services in
>> a
>> >> >> Service
>> >> >> > Engine.  I'd prefer the latter, since it allows better
>> abstraction
>> >> (you
>> >> >> > can build abstract classes for all the Endpoint, Component, etc.,
>> >> >> > requiring minimal coding for new engines and allowing common
>> >> >> > functionality).  It also seems a little more natural to the JBI
>> spec
>> >> to
>> >> >> > expose services directly to the NMR rather than burying them
>> inside
>> >> >> > another component.
>> >> >> >
>> >> >>
>> >> >> It this really the best practice?
>> >> >>
>> >> >> I believe it is, but I'm dealing with the same question. We have
>> >> created
>> >> >> SE's that are used by our SAs/SUs. Whenever I try to expose some
>> >> >> functionality through WebServices, the only solution I find is
>> using
>> >> >> JSR181... This only leads to a POJO inside a component, without
>> using
>> >> >> JBI.
>> >> >> To achieve that, why not use a standalone WS in a J2EE server?
>> >> Shouldn't
>> >> >> ServiceMix take advantage of JBI in some way, and already created
>> SEs?
>> >> >> --
>> >> >> View this message in context:
>> >> >>
>> >>
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
>> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >> >>
>> >> >>
>> >> >
>> >> >
>> >> > --
>> >> > Cheers,
>> >> > Guillaume Nodet
>> >> > ------------------------
>> >> > Architect, LogicBlaze (http://www.logicblaze.com/)
>> >> > Blog: http://gnodet.blogspot.com/
>> >> >
>> >> >
>> >>
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728500
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Architect, LogicBlaze (http://www.logicblaze.com/)
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728805
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8749539
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
This is the responsability of your own SE to provide a WSDL.
If you use servicemix-common, your endpoint must initialize
the endpoint description (setDescription method on the endpoint).
In such a case, the HTTP BC will be able to expose this wsdl.
Another way is to deploy the wsdl in the HTTP SU directly.

On 1/31/07, wizard <an...@gmail.com> wrote:
>
> The only difference between our current client and the desired WS client, is
> that our current client sends a xml message via a SSL Socket to HTTP BC
> which is then processed by our SEs. We'd like to supply our clients with a
> wsdl with the available functions (call it our JBI services), so that Client
> creation would be as easy as creating any other WS client.
>
> I can't get our HTTP BC to retrieve a wsdl... :(
> In wsdl-first, the wsdl file is inside the JSR181 SU.
>
>
> gnodet wrote:
> >
> > I don't understand what the difference between WSclient and
> > your soap request.  What do you mean  ?  I don't understand
> > the difference between WS and http/soap in your schema.
> >
> > The HTTP BC will handle incoming http request (either soap
> > or not, depending on the configuration), and you can route
> > exchanges to any other JBI endpoint you want: it could also
> > be another HTTP BC which would send another HTTP request,
> > or a JMS endpoint, or any SE ...
> >
> >
> > On 1/31/07, wizard <an...@gmail.com> wrote:
> >>
> >> I see what you mean. We have this up and running:
> >>
> >> |--Client--||------------SMIX----------|
> >>
> >> (request)
> >> soap(ssl)--->http(BC)----->ourSEs
> >>
> >> (answer)
> >> soap(ssl)<---http(BC)<-----ourSEs
> >>
> >> Working flawlessly! :D
> >>
> >> What we are trying to implement now is:
> >>
> >> |--Client--||------------SMIX------------|
> >> (request)
> >> WSclient----->WS(http/etc?)-->ourSEs
> >>
> >> (...and then answer...)
> >>
> >> Is it possible? JSR181 (wsdl-first example) seems to be:
> >>
> >> |--Client--||----------------SMIX-----------------|
> >> (request)
> >> WSclient----->WS(http)-->JSR181(with POJO)
> >>
> >> I'm I wrong?
> >>
> >>
> >> gnodet wrote:
> >> >
> >> > I guess i'm a bit lost here.
> >> > THere's no relationship between the jsr181 component and soap/http.
> >> > You can expose any service you want provided that you put
> >> > an http endpoint in front of it.
> >> > What kind of problem do you have ?
> >> >
> >> > On 1/31/07, wizard <an...@gmail.com> wrote:
> >> >>
> >> >>
> >> >>
> >> >> Anyone have any hints on these questions?
> >> >>
> >> >>
> >> >> dgoodine wrote:
> >> >> >
> >> >> > 1. It seems that alot of people start with the JSR181 service unit
> >> and
> >> >> > HTTP since it's a bit simpler model, but there's very little
> >> >> > discussion/documentation/demos for implementing your services in a
> >> >> Service
> >> >> > Engine.  I'd prefer the latter, since it allows better abstraction
> >> (you
> >> >> > can build abstract classes for all the Endpoint, Component, etc.,
> >> >> > requiring minimal coding for new engines and allowing common
> >> >> > functionality).  It also seems a little more natural to the JBI spec
> >> to
> >> >> > expose services directly to the NMR rather than burying them inside
> >> >> > another component.
> >> >> >
> >> >>
> >> >> It this really the best practice?
> >> >>
> >> >> I believe it is, but I'm dealing with the same question. We have
> >> created
> >> >> SE's that are used by our SAs/SUs. Whenever I try to expose some
> >> >> functionality through WebServices, the only solution I find is using
> >> >> JSR181... This only leads to a POJO inside a component, without using
> >> >> JBI.
> >> >> To achieve that, why not use a standalone WS in a J2EE server?
> >> Shouldn't
> >> >> ServiceMix take advantage of JBI in some way, and already created SEs?
> >> >> --
> >> >> View this message in context:
> >> >>
> >> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
> >> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >> >>
> >> >>
> >> >
> >> >
> >> > --
> >> > Cheers,
> >> > Guillaume Nodet
> >> > ------------------------
> >> > Architect, LogicBlaze (http://www.logicblaze.com/)
> >> > Blog: http://gnodet.blogspot.com/
> >> >
> >> >
> >>
> >> --
> >> View this message in context:
> >> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728500
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728805
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: A few questions about SEs and WSDL

Posted by wizard <an...@gmail.com>.
The only difference between our current client and the desired WS client, is
that our current client sends a xml message via a SSL Socket to HTTP BC
which is then processed by our SEs. We'd like to supply our clients with a
wsdl with the available functions (call it our JBI services), so that Client
creation would be as easy as creating any other WS client.

I can't get our HTTP BC to retrieve a wsdl... :( 
In wsdl-first, the wsdl file is inside the JSR181 SU.


gnodet wrote:
> 
> I don't understand what the difference between WSclient and
> your soap request.  What do you mean  ?  I don't understand
> the difference between WS and http/soap in your schema.
> 
> The HTTP BC will handle incoming http request (either soap
> or not, depending on the configuration), and you can route
> exchanges to any other JBI endpoint you want: it could also
> be another HTTP BC which would send another HTTP request,
> or a JMS endpoint, or any SE ...
> 
> 
> On 1/31/07, wizard <an...@gmail.com> wrote:
>>
>> I see what you mean. We have this up and running:
>>
>> |--Client--||------------SMIX----------|
>>
>> (request)
>> soap(ssl)--->http(BC)----->ourSEs
>>
>> (answer)
>> soap(ssl)<---http(BC)<-----ourSEs
>>
>> Working flawlessly! :D
>>
>> What we are trying to implement now is:
>>
>> |--Client--||------------SMIX------------|
>> (request)
>> WSclient----->WS(http/etc?)-->ourSEs
>>
>> (...and then answer...)
>>
>> Is it possible? JSR181 (wsdl-first example) seems to be:
>>
>> |--Client--||----------------SMIX-----------------|
>> (request)
>> WSclient----->WS(http)-->JSR181(with POJO)
>>
>> I'm I wrong?
>>
>>
>> gnodet wrote:
>> >
>> > I guess i'm a bit lost here.
>> > THere's no relationship between the jsr181 component and soap/http.
>> > You can expose any service you want provided that you put
>> > an http endpoint in front of it.
>> > What kind of problem do you have ?
>> >
>> > On 1/31/07, wizard <an...@gmail.com> wrote:
>> >>
>> >>
>> >>
>> >> Anyone have any hints on these questions?
>> >>
>> >>
>> >> dgoodine wrote:
>> >> >
>> >> > 1. It seems that alot of people start with the JSR181 service unit
>> and
>> >> > HTTP since it's a bit simpler model, but there's very little
>> >> > discussion/documentation/demos for implementing your services in a
>> >> Service
>> >> > Engine.  I'd prefer the latter, since it allows better abstraction
>> (you
>> >> > can build abstract classes for all the Endpoint, Component, etc.,
>> >> > requiring minimal coding for new engines and allowing common
>> >> > functionality).  It also seems a little more natural to the JBI spec
>> to
>> >> > expose services directly to the NMR rather than burying them inside
>> >> > another component.
>> >> >
>> >>
>> >> It this really the best practice?
>> >>
>> >> I believe it is, but I'm dealing with the same question. We have
>> created
>> >> SE's that are used by our SAs/SUs. Whenever I try to expose some
>> >> functionality through WebServices, the only solution I find is using
>> >> JSR181... This only leads to a POJO inside a component, without using
>> >> JBI.
>> >> To achieve that, why not use a standalone WS in a J2EE server?
>> Shouldn't
>> >> ServiceMix take advantage of JBI in some way, and already created SEs?
>> >> --
>> >> View this message in context:
>> >>
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>> >>
>> >>
>> >
>> >
>> > --
>> > Cheers,
>> > Guillaume Nodet
>> > ------------------------
>> > Architect, LogicBlaze (http://www.logicblaze.com/)
>> > Blog: http://gnodet.blogspot.com/
>> >
>> >
>>
>> --
>> View this message in context:
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728500
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728805
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
I don't understand what the difference between WSclient and
your soap request.  What do you mean  ?  I don't understand
the difference between WS and http/soap in your schema.

The HTTP BC will handle incoming http request (either soap
or not, depending on the configuration), and you can route
exchanges to any other JBI endpoint you want: it could also
be another HTTP BC which would send another HTTP request,
or a JMS endpoint, or any SE ...


On 1/31/07, wizard <an...@gmail.com> wrote:
>
> I see what you mean. We have this up and running:
>
> |--Client--||------------SMIX----------|
>
> (request)
> soap(ssl)--->http(BC)----->ourSEs
>
> (answer)
> soap(ssl)<---http(BC)<-----ourSEs
>
> Working flawlessly! :D
>
> What we are trying to implement now is:
>
> |--Client--||------------SMIX------------|
> (request)
> WSclient----->WS(http/etc?)-->ourSEs
>
> (...and then answer...)
>
> Is it possible? JSR181 (wsdl-first example) seems to be:
>
> |--Client--||----------------SMIX-----------------|
> (request)
> WSclient----->WS(http)-->JSR181(with POJO)
>
> I'm I wrong?
>
>
> gnodet wrote:
> >
> > I guess i'm a bit lost here.
> > THere's no relationship between the jsr181 component and soap/http.
> > You can expose any service you want provided that you put
> > an http endpoint in front of it.
> > What kind of problem do you have ?
> >
> > On 1/31/07, wizard <an...@gmail.com> wrote:
> >>
> >>
> >>
> >> Anyone have any hints on these questions?
> >>
> >>
> >> dgoodine wrote:
> >> >
> >> > 1. It seems that alot of people start with the JSR181 service unit and
> >> > HTTP since it's a bit simpler model, but there's very little
> >> > discussion/documentation/demos for implementing your services in a
> >> Service
> >> > Engine.  I'd prefer the latter, since it allows better abstraction (you
> >> > can build abstract classes for all the Endpoint, Component, etc.,
> >> > requiring minimal coding for new engines and allowing common
> >> > functionality).  It also seems a little more natural to the JBI spec to
> >> > expose services directly to the NMR rather than burying them inside
> >> > another component.
> >> >
> >>
> >> It this really the best practice?
> >>
> >> I believe it is, but I'm dealing with the same question. We have created
> >> SE's that are used by our SAs/SUs. Whenever I try to expose some
> >> functionality through WebServices, the only solution I find is using
> >> JSR181... This only leads to a POJO inside a component, without using
> >> JBI.
> >> To achieve that, why not use a standalone WS in a J2EE server? Shouldn't
> >> ServiceMix take advantage of JBI in some way, and already created SEs?
> >> --
> >> View this message in context:
> >> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
> >>
> >>
> >
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728500
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: A few questions about SEs and WSDL

Posted by wizard <an...@gmail.com>.
I see what you mean. We have this up and running:

|--Client--||------------SMIX----------|

(request)
soap(ssl)--->http(BC)----->ourSEs

(answer)
soap(ssl)<---http(BC)<-----ourSEs

Working flawlessly! :D

What we are trying to implement now is:

|--Client--||------------SMIX------------|
(request)
WSclient----->WS(http/etc?)-->ourSEs

(...and then answer...)

Is it possible? JSR181 (wsdl-first example) seems to be:

|--Client--||----------------SMIX-----------------|
(request)
WSclient----->WS(http)-->JSR181(with POJO)

I'm I wrong?


gnodet wrote:
> 
> I guess i'm a bit lost here.
> THere's no relationship between the jsr181 component and soap/http.
> You can expose any service you want provided that you put
> an http endpoint in front of it.
> What kind of problem do you have ?
> 
> On 1/31/07, wizard <an...@gmail.com> wrote:
>>
>>
>>
>> Anyone have any hints on these questions?
>>
>>
>> dgoodine wrote:
>> >
>> > 1. It seems that alot of people start with the JSR181 service unit and
>> > HTTP since it's a bit simpler model, but there's very little
>> > discussion/documentation/demos for implementing your services in a
>> Service
>> > Engine.  I'd prefer the latter, since it allows better abstraction (you
>> > can build abstract classes for all the Endpoint, Component, etc.,
>> > requiring minimal coding for new engines and allowing common
>> > functionality).  It also seems a little more natural to the JBI spec to
>> > expose services directly to the NMR rather than burying them inside
>> > another component.
>> >
>>
>> It this really the best practice?
>>
>> I believe it is, but I'm dealing with the same question. We have created
>> SE's that are used by our SAs/SUs. Whenever I try to expose some
>> functionality through WebServices, the only solution I find is using
>> JSR181... This only leads to a POJO inside a component, without using
>> JBI.
>> To achieve that, why not use a standalone WS in a J2EE server? Shouldn't
>> ServiceMix take advantage of JBI in some way, and already created SEs?
>> --
>> View this message in context:
>> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728500
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
I guess i'm a bit lost here.
THere's no relationship between the jsr181 component and soap/http.
You can expose any service you want provided that you put
an http endpoint in front of it.
What kind of problem do you have ?

On 1/31/07, wizard <an...@gmail.com> wrote:
>
>
>
> Anyone have any hints on these questions?
>
>
> dgoodine wrote:
> >
> > 1. It seems that alot of people start with the JSR181 service unit and
> > HTTP since it's a bit simpler model, but there's very little
> > discussion/documentation/demos for implementing your services in a Service
> > Engine.  I'd prefer the latter, since it allows better abstraction (you
> > can build abstract classes for all the Endpoint, Component, etc.,
> > requiring minimal coding for new engines and allowing common
> > functionality).  It also seems a little more natural to the JBI spec to
> > expose services directly to the NMR rather than burying them inside
> > another component.
> >
>
> It this really the best practice?
>
> I believe it is, but I'm dealing with the same question. We have created
> SE's that are used by our SAs/SUs. Whenever I try to expose some
> functionality through WebServices, the only solution I find is using
> JSR181... This only leads to a POJO inside a component, without using JBI.
> To achieve that, why not use a standalone WS in a J2EE server? Shouldn't
> ServiceMix take advantage of JBI in some way, and already created SEs?
> --
> View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/

Re: A few questions about SEs and WSDL

Posted by wizard <an...@gmail.com>.


Anyone have any hints on these questions?


dgoodine wrote:
> 
> 1. It seems that alot of people start with the JSR181 service unit and
> HTTP since it's a bit simpler model, but there's very little
> discussion/documentation/demos for implementing your services in a Service
> Engine.  I'd prefer the latter, since it allows better abstraction (you
> can build abstract classes for all the Endpoint, Component, etc.,
> requiring minimal coding for new engines and allowing common
> functionality).  It also seems a little more natural to the JBI spec to
> expose services directly to the NMR rather than burying them inside
> another component.
> 

It this really the best practice?

I believe it is, but I'm dealing with the same question. We have created
SE's that are used by our SAs/SUs. Whenever I try to expose some
functionality through WebServices, the only solution I find is using
JSR181... This only leads to a POJO inside a component, without using JBI.
To achieve that, why not use a standalone WS in a J2EE server? Shouldn't
ServiceMix take advantage of JBI in some way, and already created SEs?
-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8728254
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by dgoodine <dm...@gmail.com>.
Anyone have any hints on these questions?


dgoodine wrote:
> 
> 1. It seems that alot of people start with the JSR181 service unit and
> HTTP since it's a bit simpler model, but there's very little
> discussion/documentation/demos for implementing your services in a Service
> Engine.  I'd prefer the latter, since it allows better abstraction (you
> can build abstract classes for all the Endpoint, Component, etc.,
> requiring minimal coding for new engines and allowing common
> functionality).  It also seems a little more natural to the JBI spec to
> expose services directly to the NMR rather than burying them inside
> another component.
> 
> It this really the best practice?
> 
> 2. Also, it would seem natural to deploy WSDL (or *some* sort of
> description of the service engine contract) with the Service Unit (or even
> the Engine itself).  But there's nothing in the documentation or FUSE
> demos that indicates you can do that.  I blindly tried using the
> wsdlResource attribute on the my:endpoint bean in the Service Unit, but
> that didn't seem to have any effect.
> 
> 3. I've built my message definitions as complex types completely in XSD
> then expose them into WSDL using xsd:include.  But I'm having problems
> with the HTTP consumer endpoint loading them on deployment.  In fuse
> (1.2.2), it can't find them on the classpath.  Also, in the Web Services
> explorer, it's getting errors trying to load in the included XSDs, but I'm
> more concerned about the former issue.
> 
> Here's the xbean.xml file:
> 
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> xmlns:ucsa="http://services.mtvi.com/ucsa"
> 	xmlns:acq="http://services.mtvi.com/ucsa/acquisition">
> 	<http:endpoint service="ucsa:AcquisitionService" endpoint="post"
> targetEndpoint="internal" role="consumer"
> 		locationURI="http://0.0.0.0:8192/ucsa/acquisition/post"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
> 		wsdlResource="classpath:AcquisitionService.wsdl" />
> </beans>
> 
> Thanks for any help.
> 

-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8559952
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
This is just a configuration problem.
The servicemix-http BC will generate a wsdl based on the wsdl
from the target endpoint if available.
This means:
  * the target endpoint must have a wsdl description
  * the target endpoint must be activated before the http BC endpoint.

On 4/18/07, ib22841 <ew...@sneakemail.com> wrote:
>
>
> What kind of problem is it? Is it a natural limitation of JBI spec? Hard
> to
> believe. It might be a limitation of jbi implementation of
> servicemix/fuse.
> In this case it should be filed as bug/enhancement. Does anybody know more
> about that?
>
> Regards,
> Ilja
>
>
> gnodet wrote:
> >
> >
> >> 3. I've built my message definitions as complex types completely in XSD
> >> then
> >> expose them into WSDL using xsd:include.  But I'm having problems with
> >> the
> >> HTTP consumer endpoint loading them on deployment.  In fuse (1.2.2), it
> >> can't find them on the classpath.  Also, in the Web Services explorer,
> >> it's
> >> getting errors trying to load in the included XSDs, but I'm more
> >> concerned
> >> about the former issue.
> >
> > Importing xsds / wsdls may lead to problems, as one limitation of jbi,
> is
> > that
> > endpoint description must be standalone (no imports at all), which is
> > actually
> > not always possible.
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a10055985
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
This is a limitation of the JBI spec.
However, ServiceMix usually handle such wsdls and "flatten" them,
so that they become standalone to comply with the JBI spec.
This means that the wsdl you will obtain is not exactly the same
as the one you supplied, but is semantically equivalent.
The only limitation of flattenned wsdl is that the service and portType
have to belong to the same namespace, but this is not really a big deal
because:
  * inside the JBI bus, only the PortType is necessary
  * outside the JBI bus (http BC for example), this limitation does not
apply
   because the wsdls can use imports.

On 4/18/07, ib22841 <ew...@sneakemail.com> wrote:
>
>
> What kind of problem is it? Is it a natural limitation of JBI spec? Hard
> to
> believe. It might be a limitation of jbi implementation of
> servicemix/fuse.
> In this case it should be filed as bug/enhancement. Does anybody know more
> about that?
>
> Regards,
> Ilja
>
>
> gnodet wrote:
> >
> >
> >> 3. I've built my message definitions as complex types completely in XSD
> >> then
> >> expose them into WSDL using xsd:include.  But I'm having problems with
> >> the
> >> HTTP consumer endpoint loading them on deployment.  In fuse (1.2.2), it
> >> can't find them on the classpath.  Also, in the Web Services explorer,
> >> it's
> >> getting errors trying to load in the included XSDs, but I'm more
> >> concerned
> >> about the former issue.
> >
> > Importing xsds / wsdls may lead to problems, as one limitation of jbi,
> is
> > that
> > endpoint description must be standalone (no imports at all), which is
> > actually
> > not always possible.
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > ------------------------
> > Architect, LogicBlaze (http://www.logicblaze.com/)
> > Blog: http://gnodet.blogspot.com/
> >
> >
>
> --
> View this message in context:
> http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a10055985
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Principal Engineer, IONA
Blog: http://gnodet.blogspot.com/

Re: A few questions about SEs and WSDL

Posted by ib22841 <ew...@sneakemail.com>.
What kind of problem is it? Is it a natural limitation of JBI spec? Hard to
believe. It might be a limitation of jbi implementation of servicemix/fuse.
In this case it should be filed as bug/enhancement. Does anybody know more
about that?

Regards,
Ilja


gnodet wrote:
> 
> 
>> 3. I've built my message definitions as complex types completely in XSD
>> then
>> expose them into WSDL using xsd:include.  But I'm having problems with
>> the
>> HTTP consumer endpoint loading them on deployment.  In fuse (1.2.2), it
>> can't find them on the classpath.  Also, in the Web Services explorer,
>> it's
>> getting errors trying to load in the included XSDs, but I'm more
>> concerned
>> about the former issue.
> 
> Importing xsds / wsdls may lead to problems, as one limitation of jbi, is
> that
> endpoint description must be standalone (no imports at all), which is
> actually
> not always possible.
> 
> -- 
> Cheers,
> Guillaume Nodet
> ------------------------
> Architect, LogicBlaze (http://www.logicblaze.com/)
> Blog: http://gnodet.blogspot.com/
> 
> 

-- 
View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a10055985
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: A few questions about SEs and WSDL

Posted by Guillaume Nodet <gn...@gmail.com>.
On 1/22/07, dgoodine <dm...@gmail.com> wrote:
>
> 1. It seems that alot of people start with the JSR181 service unit and HTTP
> since it's a bit simpler model, but there's very little
> discussion/documentation/demos for implementing your services in a Service
> Engine.  I'd prefer the latter, since it allows better abstraction (you can
> build abstract classes for all the Endpoint, Component, etc., requiring
> minimal coding for new engines and allowing common functionality).  It also
> seems a little more natural to the JBI spec to expose services directly to
> the NMR rather than burying them inside another component.
>
> It this really the best practice?

If you want to write a service, you may want to use jsr181, whereas writing
a full SE means that you write an "engine", where you will deploy service units.
Though you can also write a SE for a single service ...  The jsr181 component
is the best tool if you want to avoid using the JBI API.

>
> 2. Also, it would seem natural to deploy WSDL (or *some* sort of description
> of the service engine contract) with the Service Unit (or even the Engine
> itself).  But there's nothing in the documentation or FUSE demos that
> indicates you can do that.  I blindly tried using the wsdlResource attribute
> on the my:endpoint bean in the Service Unit, but that didn't seem to have
> any effect.

This has not been factored.  If you write your own SE, you need to add
the wsdlResource property yourself (take a look at the existing components
to see how it's done).

>
> 3. I've built my message definitions as complex types completely in XSD then
> expose them into WSDL using xsd:include.  But I'm having problems with the
> HTTP consumer endpoint loading them on deployment.  In fuse (1.2.2), it
> can't find them on the classpath.  Also, in the Web Services explorer, it's
> getting errors trying to load in the included XSDs, but I'm more concerned
> about the former issue.

Importing xsds / wsdls may lead to problems, as one limitation of jbi, is that
endpoint description must be standalone (no imports at all), which is actually
not always possible.

>
> Here's the xbean.xml file:
>
> <beans xmlns:http="http://servicemix.apache.org/http/1.0"
> xmlns:ucsa="http://services.mtvi.com/ucsa"
>         xmlns:acq="http://services.mtvi.com/ucsa/acquisition">
>         <http:endpoint service="ucsa:AcquisitionService" endpoint="post"
> targetEndpoint="internal" role="consumer"
>                 locationURI="http://0.0.0.0:8192/ucsa/acquisition/post"
> defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
>                 wsdlResource="classpath:AcquisitionService.wsdl" />
> </beans>
>
> Thanks for any help.
> --
> View this message in context: http://www.nabble.com/A-few-questions-about-SEs-and-WSDL-tf3053641s12049.html#a8488590
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>


-- 
Cheers,
Guillaume Nodet
------------------------
Architect, LogicBlaze (http://www.logicblaze.com/)
Blog: http://gnodet.blogspot.com/