I have been trying to use servicemix to do the following:
Poll for a PGP encrypted file using FilePoller on local system directory. 
Once the file arrives read it as binary and do the following processing:
- Decrypt the file
- Use the resulted cleartext file and transform into an XML file.
- Send the XML file to external WEB Service.
- Archive the original file on local system.

Here is the approach I have taken:
- FilePoller is used to poll for the file along with BinaryFileMarshaler to
read the file.
- The FilePoller sends NMR message to pipline which in trurn forwards that
to static-recipient-list (fileWriter for archiving and static-routing-slip
for various processing).

I am getting followig error message, if some one can help, that would be
great.

21:34:09,725 | DEBUG | Thread-16  | SedaFlow                 |
emix.jbi.nmr.flow.AbstractFlow  115 | Called Flow send
21:34:09,725 | DEBUG | Thread-17  | SedaQueue                |
.jbi.nmr.flow.seda.SedaQueue$1  224 |
[EMAIL PROTECTED] dequeued
exchange: MessageExchange[
  id: ID:skadakia-3509-1152506049304-5:0
  status: Error
  role: consumer
  service: {http://servicemix.org/demo/}pipeline
  endpoint: endpoint
  in: 
  error: java.lang.UnsupportedOperationException: Use an InOnly or
RobustInOnly MEP
]

Here is the servicemix.xml:
<?xml version="1.0" encoding="UTF-8"?> 
<beans   
  xmlns="http://xbean.org/schemas/spring/1.0"; 
        xmlns:spring="http://xbean.org/schemas/spring/1.0"; 
        xmlns:sm="http://servicemix.apache.org/config/1.0"; 
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
        xsi:schemaLocation="http://xbean.org/schemas/spring/1.0
../../conf/spring-beans.xsd http://servicemix.org/config/1.0
../../conf/servicemix.xsd" 
        xmlns:foo="http://servicemix.org/demo/";
       xmlns:eip="http://servicemix.apache.org/eip/1.0";>

<sm:container id="jbi" flowName="seda" useMBeanServer="true"
createMBeanServer="true" dumpStats="true"  statsInterval="10"> 
  <sm:activationSpecs>
    <sm:activationSpec> 
      <sm:component> 
        <eip:component> 
           <eip:endpoints> 
              <eip:pipeline service="foo:pipeline" endpoint="endpoint"> 
                <eip:transformer> 
                  <eip:exchange-target service="foo:recipients" /> 
                </eip:transformer> 
                <eip:target> 
                  <eip:exchange-target service="foo:trace" /> 
                </eip:target> 
              </eip:pipeline> 
            </eip:endpoints> 
          </eip:component> 
        </sm:component> 
      </sm:activationSpec> 

      <sm:activationSpec> 
        <sm:component> 
          <eip:component> 
            <eip:endpoints> 
             <eip:static-recipient-list service="foo:recipients"
endpoint="endpoint"> 
              <eip:recipients>
        <eip:exchange-target service="foo:fileWriter" /> // archive
        <eip:exchange-target service="foo:routingSlip" /> // series of targets
              </eip:recipients> 
             </eip:static-recipient-list> 
           </eip:endpoints> 
         </eip:component> 
        </sm:component> 
       </sm:activationSpec>

       <sm:activationSpec> 
        <sm:component> 
          <eip:component> 
            <eip:endpoints> 
              <eip:static-routing-slip service="foo:routingSlip"
endpoint="endpoint"> 
         <eip:targets> 
           <eip:exchange-target service="foo:xmltransformer" /> // transformer
           <!-- <eip:exchange-target service="foo:httpsender" /> --> // SOAP RPC
          </eip:targets> 
               </eip:static-routing-slip> 
             </eip:endpoints> 
           </eip:component> 
         </sm:component> 
       </sm:activationSpec> 

       <sm:activationSpec componentName="fileWriter"
service="foo:fileWriter">
        <sm:component> 
         <bean class="org.apache.servicemix.components.file.FileWriter">
          <property name="directory" value="c:/projects/archive/vendor"/>
          <property name="autoCreateDirectory" value="true"/>
          <property name="marshaler" ref="marshaler"/> 
         </bean>
        </sm:component> 
       </sm:activationSpec>

       <sm:activationSpec componentName="filePoller"
service="foo:filePoller" destinationService="foo:pipeline">
        <sm:component>
         <bean class="org.apache.servicemix.components.file.FilePoller"> 
          <property name="workManager" ref="workManager"/> 
          <property name="deleteFile" value="false"/>
          <property name="file" value="c:/projects/incoming/vendor"/>
          <property name="period" value="6000000"/>
          <property name="marshaler" ref="marshaler"/> 
         </bean>
        </sm:component> 
       </sm:activationSpec>

  <!-- Route the event to a trace component that just outputs the event to
the console --> 
        <sm:activationSpec componentName="trace" service="foo:trace"> 
          <sm:component> 
            <bean
class="org.apache.servicemix.components.util.TraceComponent" /> 
           </sm:component> 
         </sm:activationSpec>
                        
         <sm:activationSpec componentName="xmltransformer"
service="foo:xmltransformer" destinationService="foo:trace"> 
           <sm:component>
            <bean class="com.test.servicemix.VendorDataTransformer">
              <property name="configFileName"
value="C:/settings.properties"/>
              <property name="disableOutput" value="true"/>
             </bean>
            </sm:component> 
          </sm:activationSpec>

                </sm:activationSpecs> 
      </sm:container> 
              
            <!-- the work manager (thread pool) for this container --> 
            <bean id="workManager"
class="org.jencks.factory.WorkManagerFactoryBean"> 
            <property name="threadPoolSize" value="30"/> 
            </bean> 
            <bean id="marshaler"
class="org.apache.servicemix.components.util.BinaryFileMarshaler"
singleton="true"/> 
</beans>

Thank You.
Sundeep
-- 
View this message in context: 
http://www.nabble.com/servicemix-eip-error%3A-Use-an-InOnly-or-RobustInOnly-MEP-tf1916514.html#a5246743
Sent from the ServiceMix - User forum at Nabble.com.

Reply via email to