servicemix-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gardion1 <joelwag...@gmail.com>
Subject Re: using smpp to output to the screen
Date Tue, 06 Oct 2009 22:11:43 GMT

Jean-Baptiste,

I have changed the xbean.xml to remove targetEndpoint and targetService to
the following

<?xml version="1.0"?>
<beans xmlns:smpp="http://servicemix.apache.org/smpp/1.0"
       xmlns:tut="urn:org:apache:servicemix:tutorial:testsmpp">

  <smpp:consumer service="tut:smpp_service"
                 endpoint="endpoint"
                 host="agsbd02"
                 port="2775"
                 systemId="test"
		 password="test"/>
</beans>

However, now I get an error whenever the sa loads up.  Below is the log of
what it says.  I think I need to have a targetService, targetInterface or
targetUri or it will complain.


INFO  - JBIContainer                   - ServiceMix JBI Container
(ServiceMix) s
tarted
INFO  - JDBCAdapterFactory             - Database driver recognized:
[apache_der
by_embedded_jdbc_driver]
INFO  - LogTask                        - Logging system reconfigured using
file:
 file:/C:/service_mix/apache-servicemix-3.3.1/conf/log4j.xml
INFO  - AutoDeploymentService          - Directory: hotdeploy: Archive
changed:
processing smpp-sa-1.0-SNAPSHOT.jar ...
ERROR - SmppComponent                  -
javax.jbi.management.DeploymentExceptio
n: targetInterface, targetService or targetUri should be specified
[Fatal Error] :1:1: Content is not allowed in prolog.
INFO  - DeploymentService              - UnDeployed ServiceUnit
test-smpp-camel-
su from Component: servicemix-camel
ERROR - AutoDeploymentService          - Failed to update Service Assembly:
smpp
-sa
java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0
">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result>
<component-name>servicemix-smpp</component-name>
<component-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to parse result string</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<loc-token/>
<loc-message>targetInterface, targetService or targetUri should be
specified</lo
c-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
targetInterface,
 targetService or targetUri should be specified
        at
org.apache.servicemix.common.endpoints.ConsumerEndpoint.validate(Cons
umerEndpoint.java:194)
        at
org.apache.servicemix.smpp.SmppConsumerEndpoint.validate(SmppConsumer
Endpoint.java:101)
        at
org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeploy
er.java:58)
        at
org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBe
anDeployer.java:55)
        at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(Abstr
actXBeanDeployer.java:97)
        at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServ
iceUnitManager.java:88)
        at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServic
eUnitManager.java:69)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
sembly(DeploymentService.java:520)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:349)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:255)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
ctory(AutoDeploymentService.java:658)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
AutoDeploymentService.java:63)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
eploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>
        <component-name>servicemix-camel</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>deploy</task-id>
                        <task-result>SUCCESS</task-result>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>

        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(Managem
entSupport.java:125)
        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(Managem
entSupport.java:111)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
sembly(DeploymentService.java:555)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:349)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:255)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
ctory(AutoDeploymentService.java:658)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
AutoDeploymentService.java:63)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
eploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
WARN  - AutoDeploymentService          - Directory: hotdeploy: Automatic
install
 of
C:\service_mix\apache-servicemix-3.3.1\hotdeploy\smpp-sa-1.0-SNAPSHOT.jar fa
iled
javax.jbi.management.DeploymentException: Failed to update Service Assembly:
smp
p-sa
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:364)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:255)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
ctory(AutoDeploymentService.java:658)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
AutoDeploymentService.java:63)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
eploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
Caused by: java.lang.Exception: <?xml version="1.0" encoding="UTF-8"?>
<jbi-task xmlns="http://java.sun.com/xml/ns/jbi/management-message"
version="1.0
">
<jbi-task-result>
<frmwk-task-result>
<frmwk-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
</task-result-details>
</frmwk-task-result-details>
</frmwk-task-result>
<component-task-result>
<component-name>servicemix-smpp</component-name>
<component-task-result-details>
<task-result-details>
<task-id>deploy</task-id>
<task-result>FAILED</task-result>
<message-type>ERROR</message-type>
<task-status-msg>
<msg-loc-info>
<loc-token/>
<loc-message>Unable to parse result string</loc-message>
</msg-loc-info>
</task-status-msg>
<exception-info>
<nesting-level>1</nesting-level>
<loc-token/>
<loc-message>targetInterface, targetService or targetUri should be
specified</lo
c-message>
<stack-trace><![CDATA[javax.jbi.management.DeploymentException:
targetInterface,
 targetService or targetUri should be specified
        at
org.apache.servicemix.common.endpoints.ConsumerEndpoint.validate(Cons
umerEndpoint.java:194)
        at
org.apache.servicemix.smpp.SmppConsumerEndpoint.validate(SmppConsumer
Endpoint.java:101)
        at
org.apache.servicemix.common.AbstractDeployer.validate(AbstractDeploy
er.java:58)
        at
org.apache.servicemix.common.xbean.BaseXBeanDeployer.validate(BaseXBe
anDeployer.java:55)
        at
org.apache.servicemix.common.xbean.AbstractXBeanDeployer.deploy(Abstr
actXBeanDeployer.java:97)
        at
org.apache.servicemix.common.BaseServiceUnitManager.doDeploy(BaseServ
iceUnitManager.java:88)
        at
org.apache.servicemix.common.BaseServiceUnitManager.deploy(BaseServic
eUnitManager.java:69)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
sembly(DeploymentService.java:520)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:349)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateArchi
ve(AutoDeploymentService.java:255)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.monitorDire
ctory(AutoDeploymentService.java:658)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.access$800(
AutoDeploymentService.java:63)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService$1.run(AutoD
eploymentService.java:622)
        at java.util.TimerThread.mainLoop(Timer.java:512)
        at java.util.TimerThread.run(Timer.java:462)
]]></stack-trace>
</exception-info>
</task-result-details>
</component-task-result-details>
</component-task-result>
<component-task-result
xmlns="http://java.sun.com/xml/ns/jbi/management-message"
>
        <component-name>servicemix-camel</component-name>
        <component-task-result-details>
                <task-result-details>
                        <task-id>deploy</task-id>
                        <task-result>SUCCESS</task-result>
                </task-result-details>
        </component-task-result-details>
</component-task-result>
</jbi-task-result>
</jbi-task>

        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(Managem
entSupport.java:125)
        at
org.apache.servicemix.jbi.framework.ManagementSupport.failure(Managem
entSupport.java:111)
        at
org.apache.servicemix.jbi.framework.DeploymentService.deployServiceAs
sembly(DeploymentService.java:555)
        at
org.apache.servicemix.jbi.framework.AutoDeploymentService.updateServi
ceAssembly(AutoDeploymentService.java:349)
        ... 6 more



Jean-Baptiste Onofré wrote:
> 
> By careful, your targetEndpoint refers the same endpoint. Using camel, 
> you can avoid targetService and targetEndpoint (the routing will be made 
> by Camel using from routing).
> 
> Regards
> JB
> 
> gardion1 wrote:
>> Hello,
>> 
>> I am trying to get use servicemix to receive messages via smpp and output
>> them to the terminal.  I am using servicemix-smpp and servicemix-camel
>> compenents.  
>> 
>> Here is the xbeans.xml file that I used for servicemix-smpp
>> 
>> <?xml version="1.0"?>
>> <beans xmlns:smpp="http://servicemix.apache.org/smpp/1.0"
>>        xmlns:tut="urn:org:apache:servicemix:tutorial:testsmpp">
>> 
>>   <smpp:consumer service="tut:smpp_service"
>>                  endpoint="endpoint"
>>                  host="agsbd02"
>>                  port="2775"
>>                  systemId="test"
>> 		 password="test"
>> 		 targetService="tut:smpp_service"
>> 	         targetEndpoint="endpoint"/>
>> </beans>
>> 
>> With this configuration I can receive sms's from an smsc simulator.  The
>> smpp component seems to give the appropriate responses to the smsc
>> simulator
>> 
>> However, if I want to forward messages from smpp component in servicemix
>> to
>> the console with camel routing I have problems.  Here is my camel
>> configuration.
>> 
>> Under my camel su configuration I have the following java file
>> (MyRouteBuilder.java)
>> 
>> package org.apache.servicemix.aegis.smpp;
>> import javax.xml.transform.dom.DOMSource; 
>> import org.apache.camel.Exchange;
>> import org.apache.camel.Processor;
>> import org.apache.camel.builder.RouteBuilder;
>> 
>> /**
>>  * A Camel Router
>>  *
>>  * @version $Revision: 1.1 $
>>  */
>> public class MyRouteBuilder extends RouteBuilder {
>> 
>>     public void configure() {
>>     
>> from("jbi:endpoint:urn:org:apache:servicemix:tutorial:testsmpp:smpp:consumer")  
  
>> // 1
>>     	    .to("log:tutorial-jbi")                                                
   
>> // 2
>>     	    .convertBodyTo(DOMSource.class)                                        
   
>> // 3  
>>     	    .to("log:tutorial-domsource")                                          
   
>> // 2
>>     	    .convertBodyTo(String.class)                                           
   
>> // 3
>>     	    .to("log:tutorial-string");
>> 	/*
>>     	from("timer://tutorial?fixedRate=true&delay=3000&period=10000")   //
>> 1
>>             .setBody(constant("Hello world!"))                           
>> //
>> 2 
>>     	    .to("log:tutorial");  
>> 	*/    
>>     }
>> }
>> 
>> The problems is I don't see anything from smpp on the console.  If I
>> comment
>> the first from statement and uncomment the second from timer section I
>> see
>> hello world on the terminal.  Can you see why I am not getting any
>> messages
>> from smpp to the terminal?
>> 
>> In case it matters my camel-context.xml file looks like this
>> 
>> <beans xmlns="http://www.springframework.org/schema/beans"
>>        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>        xsi:schemaLocation="
>>        http://www.springframework.org/schema/beans
>> http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
>>        http://activemq.apache.org/camel/schema/spring
>> http://activemq.apache.org/camel/schema/spring/camel-spring.xsd
>>     ">
>> 
>>   <!--
>>      from("seda:a").to("seda:b");
>>   -->
>>   <camelContext id="camel"
>> xmlns="http://activemq.apache.org/camel/schema/spring">
>>     <package>org.apache.servicemix.aegis.smpp</package>
>>  
>>   </camelContext>
>> 
>> </beans>
>> <!-- END SNIPPET: camel -->
>> 
>> Thank you for any help you can offer.
>> 
>> Joel.
> 
> 

-- 
View this message in context: http://www.nabble.com/using-smpp-to-output-to-the-screen-tp25758143p25777427.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Mime
View raw message