You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by aznmedia <di...@gmail.com> on 2008/10/23 09:54:02 UTC

Re: XMPP Servicemix Example



depstei2 wrote:
> 
> It was all so easy!
> I had it stuck in my head that there was some message format that the
> servicemix-xmpp binding component needed, but I guess it just takes in
> whatever you send it and passes all the xml as the IM.  I also did not
> realize that the destination user was set in the destination uri of the
> provider endpoint.  I was used to the open-esb xmpp-bc in which you define
> the user that you are sending the message to in the actual message.  
> Thanks for the help.
> 
> 
> gnodet wrote:
>> 
>> Sure, you need to create an http consumer and configure it so that it
>> sends exchange to an xmpp provider.  That way, you will bridge http
>> protocol and xmpp protocols.
>> 
>> On 10/9/07, depstei2 <de...@umd.edu> wrote:
>>>
>>> Is there any way to expose the xmpp endpoint as a web service just using
>>> binding components, or would I have to create a webservice in java(maybe
>>> using jsr181) that uses the client api?
>>> I was trying to create a simple servicemix example that routes a message
>>> to
>>> the xmpp service unit which would then IM it to a user.
>>>
>>>
>>> gnodet wrote:
>>> >
>>> > This method is provided to debug endpoints, but I'm not sure why you
>>> > end up with an exception.  Anyway, if you have a provider endpoint,
>>> > you need to send a JBI exchange to it (using the client api for
>>> > servicemix for example, or from any other JBI endpoint).
>>> >
>>> > On 10/8/07, depstei2 <de...@umd.edu> wrote:
>>> >>
>>> >>     I am trying to send a message out using a xmpp service unit.  The
>>> su
>>> >> is
>>> >> successfully logging into the jabber server according to the console
>>> >> output.
>>> >> How do I send a message to it?  When I look on jconsole I see that
>>> there
>>> >> is
>>> >> a send() operation with 3 message parts, but what goes in these
>>> parts?
>>> >> I tried putting a username in part1, a random port in part2 and the
>>> >> message
>>> >> in part3, but I got an exception saying:
>>> >>
>>> >> problem invoking send: java.rmi.UnmarshallException: Error
>>> unmarshalling
>>> >> return: nested exception is Java.lang.ClassNotFoundException
>>> >> javax.jbi.messaging.MessagingException (no security manager: RMI
>>> >> classloader
>>> >> disabled)
>>> >>
>>> >> Where are these messages defined?
>>> >>     Thanks you for your help
>>> >>
>>> >>
>>> >> depstei2 wrote:
>>> >> >
>>> >> > Ah, That works, the xmpp service unit deploys ok now and I can see
>>> it
>>> >> in
>>> >> > jconsole.  Now the problem is how do I send a message to that xmpp
>>> >> > service?  Is there a wsdl that gets published? I am trying to use a
>>> >> http
>>> >> > binding component to expose the xmpp service.
>>> >> >
>>> >> >
>>> >> >
>>> >> > gnodet wrote:
>>> >> >>
>>> >> >> You need to just include:
>>> >> >>    <beans>
>>> >> >>      <xmpp:endpoint ... />
>>> >> >>   </beans>
>>> >> >>
>>> >> >> The <xmpp:component> is used when not using a Service Unit.
>>> >> >>
>>> >> >> On 10/5/07, depstei2 <de...@umd.edu> wrote:
>>> >> >>>
>>> >> >>> Thanks for the links!  I am trying to get this running in a
>>> service
>>> >> >>> assembly,
>>> >> >>> but I keep getting the error that "No endpoints were found" for
>>> my
>>> >> xmpp
>>> >> >>> service unit. This is the xbean I am using (copied from the
>>> >> integration
>>> >> >>> test):
>>> >> >>> <?xml version="1.0" encoding="UTF-8"?>
>>> >> >>> <beans xmlns:xmpp="http://servicemix.apache.org/xmpp/1.0"
>>> >> >>>         xmlns:test="http://student.kuali.org/xmpptest">
>>> >> >>>         <xmpp:component user="user@host"
>>> >> >>>                 password="password">
>>> >> >>>                 <xmpp:endpoints>
>>> >> >>>                         <xmpp:privateChatEndpoint
>>> >> service="test:service"
>>> >> >>>                                 endpoint="endpoint"
>>> >> >>>                                 uri="xmpp://host/user@host" />
>>> >> >>>                 </xmpp:endpoints>
>>> >> >>>         </xmpp:component>
>>> >> >>> </beans>
>>> >> >>>
>>> >> >>>
>>> >> >>>
>>> >> >>> gnodet wrote:
>>> >> >>> >
>>> >> >>> > The unit tests comes with the source tree:
>>> >> >>> >
>>> >> >>> >
>>> >> >>>
>>> >>
>>> http://svn.apache.org/repos/asf/incubator/servicemix/trunk/deployables/bindingcomponents/servicemix-xmpp/src/test/
>>> >> >>> >
>>> >> >>> > Take a look at
>>> >> >>> >    http://incubator.apache.org/servicemix/source.html
>>> >> >>> > and
>>> >> >>> >    http://incubator.apache.org/servicemix/building.html
>>> >> >>> >
>>> >> >>> > On 10/5/07, depstei2 <de...@umd.edu> wrote:
>>> >> >>> >>
>>> >> >>> >> I am trying to create a very simple example where a call to a
>>> web
>>> >> >>> service
>>> >> >>> >> will then cause an IM to be sent out.
>>> >> >>> >> I am having trouble finding any examples of how to set up an
>>> xmpp
>>> >> >>> >> endpoint.
>>> >> >>> >> The documentation says:
>>> >> >>> >>
>>> >> >>> >> XMPP Integration Testing
>>> >> >>> >> To run the integration tests of ServiceMix XMPP you will need
>>> to
>>> >> do
>>> >> >>> the
>>> >> >>> >> following
>>> >> >>> >>     * install Wildfire
>>> >> >>> >>     * create the following users (user/pwd)
>>> >> >>> >>           o servicemix-user / servicemix-pwd
>>> >> >>> >>           o test-user / test-pwd
>>> >> >>> >> You should now be able to run the unit tests
>>> >> >>> >>
>>> >> >>> >> But where are the unit tests?
>>> >> >>> >> Could someone please post an example of using the xmpp
>>> component
>>> >> in
>>> >> >>> >> servicemix to create a service unit?
>>> >> >>> >> --
>>> >> >>> >> View this message in context:
>>> >> >>> >>
>>> >> >>>
>>> >>
>>> http://www.nabble.com/XMPP-Servicemix-Example-tf4576074s12049.html#a13062035
>>> >> >>> >> Sent from the ServiceMix - User mailing list archive at
>>> >> Nabble.com.
>>> >> >>> >>
>>> >> >>> >>
>>> >> >>> >
>>> >> >>> >
>>> >> >>> > --
>>> >> >>> > Cheers,
>>> >> >>> > Guillaume Nodet
>>> >> >>> > ------------------------
>>> >> >>> > Blog: http://gnodet.blogspot.com/
>>> >> >>> >
>>> >> >>> >
>>> >> >>>
>>> >> >>> --
>>> >> >>> View this message in context:
>>> >> >>>
>>> >>
>>> http://www.nabble.com/XMPP-Servicemix-Example-tf4576074s12049.html#a13064537
>>> >> >>> Sent from the ServiceMix - User mailing list archive at
>>> Nabble.com.
>>> >> >>>
>>> >> >>>
>>> >> >>
>>> >> >>
>>> >> >> --
>>> >> >> Cheers,
>>> >> >> Guillaume Nodet
>>> >> >> ------------------------
>>> >> >> Blog: http://gnodet.blogspot.com/
>>> >> >>
>>> >> >>
>>> >> >
>>> >> >
>>> >>
>>> >> --
>>> >> View this message in context:
>>> >>
>>> http://www.nabble.com/XMPP-Servicemix-Example-tf4576074s12049.html#a13098420
>>> >> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>> >>
>>> >>
>>> >
>>> >
>>> > --
>>> > Cheers,
>>> > Guillaume Nodet
>>> > ------------------------
>>> > Blog: http://gnodet.blogspot.com/
>>> >
>>> >
>>>
>>> --
>>> View this message in context:
>>> http://www.nabble.com/XMPP-Servicemix-Example-tf4576074s12049.html#a13123548
>>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>>
>>>
>> 
>> 
>> -- 
>> Cheers,
>> Guillaume Nodet
>> ------------------------
>> Blog: http://gnodet.blogspot.com/
>> 
>> 
> 
> 

How did you done that?
Please share your experience.
-- 
View this message in context: http://www.nabble.com/XMPP-Servicemix-Example-tp13062035p20126089.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.