You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by Ri...@directline.com on 2006/09/05 17:07:45 UTC

quick question on XFire and SM


I have SM 3.0M2 running in Tomcat on port 8080.

My appcontext has the entries like so:


<import resource="classpath:org/codehaus/xfire/spring/xfire.xml"/>

<bean id="stream" class="streamServiceBean" singleton="true"/>
<bean name="streamService" class="org.codehaus.xfire.spring.ServiceBean">
        <property name="serviceBean" ref="stream"/>
        <property name="serviceFactory" ref="xfire.serviceFactory"/>
        <property name="xfire" ref="xfire"/>
</bean> 

.....

<sm:activationSpec componentName="binding" service="xfire:stream">
  <sm:component>
          <bean class="org.apache.servicemix.components.xfire.XFireBinding">
                  <property name="xfire" ref="xfire"/>
          </bean>
  </sm:component>
</sm:activationSpec>

<sm:activationSpec componentName="httpBinding" service="foo:httpBinding" destinationService="xfire:stream">
        <sm:component>
                <bean class="org.apache.servicemix.components.http.HttpInOutBinding"
                        abstract="false"
                        singleton="true"
                        lazy-init="default"
                        autowire="default"
                        dependency-check="default" />
        </sm:component>
</sm:activationSpec> 

.....

Everything seems to compile and run okay, my only question really is how 
do I actually access my Service Bean?
Whats the the http URL call?
Also is MOTM supported in the M2 snapshot?


Regards Rick

Direct Line Group Limited, registered in England 
with number 2811437, registered office 3 Edridge 
Road, Croydon, Surrey  CR9 1AG.  The following 
companies are members of the Direct Line Group: 
Direct Line Insurance plc, Direct Line Life 
Insurance Company Limited, Direct Line Unit 
Trusts Limited and Direct Line Financial 
Services Limited, all of which are authorised 
and regulated by the Financial Services Authority.
All are members of The Royal Bank of Scotland Group.

This email is intended for the addressee only and 
may contain confidential, proprietary or legally 
privileged information.  If you are not the 
intended recipient of this email you should 
notify us immediately and delete it.  You should 
not copy, print, distribute, disclose or use any 
part of it.  We reserve the right to monitor and 
record all electronic communications through our 
networks.  We cannot accept any liability for 
viruses transmitted via this email once it has 
left our network.

Problem using ServiceMixClient

Posted by "Griffin, Charles (NIH/NCI) [C]" <gr...@mail.nih.gov>.
I want to use the ServiceMixClient Junit test to send test messages to a
service I have deployed into the lightweight SE container.  When I
execute the testRequestUsingJbiAPIsByServiceName() test method in the
ServiceMixClientTest from within my Eclipse IDE I get a
InvocationTargetException with the following detailMessage:  


Could not find route for exchange: InOut[
  id: ID:6116-griff-lp-2987-1157485892761-3:0
  status: Active
  role: provider
  service:
{http://gov.nih.nci.caxchange/services/authentication}AuthenticationServ
ice
  in: <?xml version="1.0" encoding="UTF-8"?><hello>world</hello>
] for service:
{http://gov.nih.nci.caxchange/services/authentication}AuthenticationServ
ice and interface: null


The method I'm executing from the ServiceMixClientTest class is below:

public void testRequestUsingJbiAPIsByServiceName() throws Exception {
     QName service = new
QName("http://gov.nih.nci.caxchange/services/authentication",
"AuthenticationService");
        assertRequestUsingJBIAPIs(service);
    } 


The service I've deployed has the following information that I have the
init method print out on the console when I deploy it:

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Service is:
{http://gov.nih.nci.caxchange/services/authentication}AuthenticationServ
ice
Service local part: AuthenticationServiceService namespace:
http://gov.nih.nci.caxchange/services/authenticat
Prefix: authentication
 Endpoint is: authentication:AuthenticationComponent
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Does anybody know why I'm not able to send a message to this service?

Thanks,
Charles 

Re: quick question on XFire and SM

Posted by Guillaume Nodet <gn...@gmail.com>.
You need to use a BindingServlet and configure it in your web.xml
to point to the httpBinding component.

If you want to use MIME and attachements, you need to use
the servicemix-http component with a recent snapshot.
If you want to use MTOM, look at the jsr181 component:
http://servicemix.goopen.org/site/servicemix-jsr181.html#MTOM+support

On 9/5/06, Rick.Jones@directline.com <Ri...@directline.com> wrote:
>
>
>
> I have SM 3.0M2 running in Tomcat on port 8080.
>
> My appcontext has the entries like so:
>
>
> <import resource="classpath:org/codehaus/xfire/spring/xfire.xml"/>
>
> <bean id="stream" class="streamServiceBean" singleton="true"/>
> <bean name="streamService" class="org.codehaus.xfire.spring.ServiceBean">
>         <property name="serviceBean" ref="stream"/>
>         <property name="serviceFactory" ref="xfire.serviceFactory"/>
>         <property name="xfire" ref="xfire"/>
> </bean>
>
> .....
>
> <sm:activationSpec componentName="binding" service="xfire:stream">
>   <sm:component>
>           <bean class="org.apache.servicemix.components.xfire.XFireBinding
> ">
>                   <property name="xfire" ref="xfire"/>
>           </bean>
>   </sm:component>
> </sm:activationSpec>
>
> <sm:activationSpec componentName="httpBinding" service="foo:httpBinding"
> destinationService="xfire:stream">
>         <sm:component>
>                 <bean class="
> org.apache.servicemix.components.http.HttpInOutBinding"
>                         abstract="false"
>                         singleton="true"
>                         lazy-init="default"
>                         autowire="default"
>                         dependency-check="default" />
>         </sm:component>
> </sm:activationSpec>
>
> .....
>
> Everything seems to compile and run okay, my only question really is how
> do I actually access my Service Bean?
> Whats the the http URL call?
> Also is MOTM supported in the M2 snapshot?
>
>
> Regards Rick
>
> Direct Line Group Limited, registered in England
> with number 2811437, registered office 3 Edridge
> Road, Croydon, Surrey  CR9 1AG.  The following
> companies are members of the Direct Line Group:
> Direct Line Insurance plc, Direct Line Life
> Insurance Company Limited, Direct Line Unit
> Trusts Limited and Direct Line Financial
> Services Limited, all of which are authorised
> and regulated by the Financial Services Authority.
> All are members of The Royal Bank of Scotland Group.
>
> This email is intended for the addressee only and
> may contain confidential, proprietary or legally
> privileged information.  If you are not the
> intended recipient of this email you should
> notify us immediately and delete it.  You should
> not copy, print, distribute, disclose or use any
> part of it.  We reserve the right to monitor and
> record all electronic communications through our
> networks.  We cannot accept any liability for
> viruses transmitted via this email once it has
> left our network.
>



-- 
Cheers,
Guillaume Nodet