Error using Message Transform Bean in SimplePlain2XML in file sender

Hi guys.
Im using  Message Transform Bean to convert from file to xml in file sender.
My structure look like this:
ROW (1..n)
>TRANSPORTES (1)
>ENTREGAS (1..n)
And I have configured the module like this:
AF_Modules/MessageTransformBean - transform
transform - Transform.Class - com.sap.aii.messaging.adapter.Conversion
transform - xml.ENTREGAS.endSeparator - 'nl'
transform - xml.ENTREGAS.fieldFixedLengths - 1,30
transform - xml.ENTREGAS.fieldNames - TIPO,NUM_ENTREGA
transform - xml.ENTREGAS.keyFieldValue - E
transform - xml.TRANSPORTES.endSeparator - 'nl'
transform - xml.TRANSPORTES.fieldFixedLengths - 1,30
transform - xml.TRANSPORTES.fieldNames - TIPO,NUM_TRANSPORTE
transform - xml.TRANSPORTES.keyFieldValue - T
transform - xml.conversionType - SimplePlain2XML
transform - xml.documentName - MPrueba_Zip
transform - xml.documentNamespace - http:/XXXXXX.es/XXXX/sap/prueba
transform - xml.keyFieldName - TIPO
transform - xml.processFieldNames - fromConfiguration
transform - xml.recordsetName - row
transform - xml.recordsetStructure - TRANSPORTES,1,ENTREGAS,*
Im getting this error and I don´t know why:
Error: com.sap.aii.messaging.adapter.trans.TransformException: Transformer Conversion3.0.5227 Error initializing Class: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: (4408) Parameter 'xml.fieldFixedLengths' or 'xml.fieldSeparator' is missing (4409) Parameter 'xml.fieldNames' is missing (4403) ; nested exception caused by: java.lang.Exception: java.lang.Exception: java.lang.Exception: Error(s) in XML conversion parameters found: (4408) Parameter 'xml.fieldFixedLengths' or 'xml.fieldSeparator' is missing (4409) Parameter 'xml.fieldNames' is missing (4403)
Why am i doing wrong?????
Thanks a lot!!!

Hi
For Complex conversion you have to use xml.conversionType as "StructPlain2XML"
http://help.sap.com/saphelp_nw04/helpdata/en/24/4cad3baabd4737bab64d0201bc0c6c/content.htm
Regards
Ramg

Similar Messages

  • Error while using Message transform Bean

    Hi All,
    I am using message transform bean in the receiver channel. The structure I have used is as follows.
    Transform.Class    com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType    text/xml;charset=utf-8
    xml.conversionType   SimplePlain2XML
    xml.documentName      MT_DataExtract
    xml.documentNamespace    http://ce.corp.com/xi/ACA/HR_INT_XXX/EmployerReporting
    xml.endSeperator   'nl'
    xml.fieldNames     pernr,l_name,f_name,m_name,perid,p_subarea,e_group,e_subgroup,status,c_code,pa_text,str_add,h_city,h_state,h_zcode,z1_org,z2_org,rep_hours
    xml.fieldSeperator   ,
    xml.singleRecordType      Employee_Details
    XML structure would be as
    <Employee_Details> 
    <pernr></pernr>
    - <l_name></l_name>  <f_name></f_name>
    <m_name />
    <perid></perid>
    <p_subarea></p_subarea>
    <e_group></e_group>
    <e_subgrp></e_subgrp>
    <status></status>
    <c_code></c_code>
    <pa_text></pa_text>
    <str_add></str_add>
    <h_city></h_city>
    <h_state></h_state>
    <h_zcode></h_zcode>
    <z1_org></z1_org>
    <z2_org></z2_org>
    <rep_hours></rep_hours>
    </Employee_Details>
    I am getting error as Delivering the message to the application using connection File_http://sap.com/xi/XI/System failed, due to: com.sap.engine.interfaces.messaging.api.exception.MessagingException: com.sap.aii.af.lib.util.configuration.ConfigurationExceptionSet: The following configuration errors were detected: - Either recordTypes or singleRecordType needs to be set .
    Please help me to resolve this error.
    Thanks,
    Shankul

    It's not just that parameter, Please change your configuration as explained in the blog i shared.
    There is a example which has expected structure and the conversion parameters.
    Your target xml should be like below.
    The XML structure of the source file should follow the same structure as the result of the SimplePlain2XML conversion.
    <resultset>
    <row>
    <column-name1>ABC</column-name1>
    <column-name2>12345</column-name2>
    <column-name3>Text1</column-name3>
    </row>
    <row>
    <column-name1>XYZ</column-name1>
    <column-name2>67890</column-name2>
    <column-name3>Text2 Text3</column-name3>
    </row>
    </resultset>
    Examples of Content Conversion Using MessageTransformBean (SAP Library - SAP Exchange Infrastructure)

  • Seeburger SFTP - Message Transformation Bean Issue

    Using Seeburger SFTP adapter to read a tab delimited file. File is being successfully read; however, content conversion need to be performed to convert the file content to XML.  Thus, using Message Transformation Bean with the following module parameters.  
    Issue: It is reading the file as is u2013 there is not content conversion is being performed. 
    Processing Sequence:
    1      localejbs/Seeburger/solution/sftp                Local Enterprise Bean     solutionid
    2     localejbs/AF_Modules/MessageTransformBean          Local Enterprise Bean     mtb
    3     localejbs/CallSapAdapter                    Local Enterprise Bean     exit
    Module Configuration:
    mtb          Transform.Class                          com.sap.aii.messaging.adapter.Conversion
    mtb           Transform.ContentType               text/xml;charset=utf-8
    mtb          xml.conversionType               SimplePlain2XML
    mtb          xml.documentName               XXX_EXPENSES_mt
    mtb          xml.fieldContentFormatting     trim    
    mtb          xml.fieldNames                    FIELD1,FIELD2,FIELD3,FIELD4
    mtb          xml.fieldSeparator               '0x09'
    mtb          xml.processFieldNames               fromConfiguration
    mtb          xml.structureTitle               RECORD
    The following the noticeable details on CC:
    Error type: TASK_ERROR >> Error date: 12/5/10 12:42 PM >> Description: Polling finished with errors. 1 file initiated. 1 file not polled due to errors.
    Message initiated succesfully
    Error type: TASK_ERROR >> Error date:  >> Description: File <amex.dat> could not be polled  from directory </usr/sap/interfaces/FTP1/send> on host <sapdv1ci>; Reason: removeFile: File xxx.dat could not be removed. SftpStatusCode: SSH_FX_NO_SUCH_FILE; Reason: No such file
    Any help is greatly appreciated.
    Thanks

    Check the following...
    1. Make sure you don't have any scripts running at your target folder.
    Example: If you are reading your file from TEST folder make sure you don't have any scripts running here.
    2. In File Setting section make sure you uncheck Delete file checkbok.
    Regards
    Srikanth Baki

  • Standard Adapter Module "Message Transform Bean" in Seeburger AS2 Adapter

    Hi,
        I am calling standard adapter module "Message Transform Bean" in seeburger AS2 Sender adapter where I am getting the following error :
    ClassNotFoundException:com.sap.aii.messaging.adapter.Conversion . Can anybody help me on this. Appreciate for your respoinse.
    Thank you,
    Mallikarjuna Rao M

    Hi,
    Thank you for your replies I manage to get NWA dump for this issue.. Here is the log
    Could not call backend system: Error in ???-module:Transform: failed to set up the transformer for channel 6857fd15f84d3e23a7b0f51ca1851b20; modkey TXT2XML; caused by java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
    Living status: alive
    Direct parent loaders:
       [system:Frame]
       [service:servlet_jsp]
       [service:ejb]
       [library:engine.j2ee14.facade]
       [library:com.sap.base.technology.facade]
       [library:com.sap.aii.af.lib]
       [library:com.sap.aii.af.sdk.lib]
       [service:com.sap.aii.af.cpa.svc]
       [service:com.sap.aii.af.svc]
       [service:com.sap.aii.adapter.xi.svc]
       [library:com.sap.aii.adapter.lib]
    Resources:
       D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
    [LOC: com.seeburger.as2.impl.SHCInitiatorProcessor.initiateToBackend] Caused by: Error in ???-module:Transform: failed to set up the transformer for channel 6857fd15f84d3e23a7b0f51ca1851b20; modkey TXT2XML; caused by java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
    Living status: alive
    Direct parent loaders:
       [system:Frame]
       [service:servlet_jsp]
       [service:ejb]
       [library:engine.j2ee14.facade]
       [library:com.sap.base.technology.facade]
       [library:com.sap.aii.af.lib]
       [library:com.sap.aii.af.sdk.lib]
       [service:com.sap.aii.af.cpa.svc]
       [service:com.sap.aii.af.svc]
       [service:com.sap.aii.adapter.xi.svc]
       [library:com.sap.aii.adapter.lib]
    Resources:
       D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
    at com.seeburger.xi.api.module.impl.nw71.SeeModuleProcessorLocal71.process(SeeModuleProcessorLocal71.java:55)
    at com.seeburger.xi.connector.fw.InitiationThread.run(InitiationThread.java:101)
    at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
    at java.security.AccessController.doPrivileged(Native Method)
    at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:152)
    at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:247)
    Caused by: java.lang.ClassNotFoundException: com.sap.aii.messaging.adapter.Conversion
    Loader Info -
    ClassLoader name: [sap.com/com.sap.aii.af.mod.trans.app]
    Living status: alive
    Direct parent loaders:
       [system:Frame]
       [service:servlet_jsp]
       [service:ejb]
       [library:engine.j2ee14.facade]
       [library:com.sap.base.technology.facade]
       [library:com.sap.aii.af.lib]
       [library:com.sap.aii.af.sdk.lib]
       [service:com.sap.aii.af.cpa.svc]
       [service:com.sap.aii.af.svc]
       [service:com.sap.aii.adapter.xi.svc]
       [library:com.sap.aii.adapter.lib]
    Resources:
       D:\usr\sap\BWD\DVEBMGS00\j2ee\cluster\apps\sap.com\com.sap.aii.af.mod.trans.app\EJBContainer\applicationjars\com.sap.aii.af.mod.trans.ejb.jar
    at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:259)
    at com.sap.engine.boot.loader.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:228)
    at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:353)
    at java.lang.Class.forName0(Native Method)
    at java.lang.Class.forName(Class.java:164)
    at com.sap.aii.af.modules.trans.MessageTransformBean.loadClass(MessageTransformBean.java:121)
    at com.sap.aii.af.modules.trans.MessageTransformBean.setup(MessageTransformBean.java:178)
    at com.sap.aii.af.modules.trans.MessageTransformBean.process(MessageTransformBean.java:346)
    at sun.reflect.GeneratedMethodAccessor484_10002.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
    at $Proxy2674_10002.process(Unknown Source)
    at com.sap.aii.af.app.mp.ejb.ModuleProcessorBean.process(ModuleProcessorBean.java:249)
    at sun.reflect.GeneratedMethodAccessor311_10002.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:585)
    at com.sap.engine.services.ejb3.runtime.impl.RequestInvocationContext.proceedFinal(RequestInvocationContext.java:43)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:166)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatesTransition.invoke(Interceptors_StatesTransition.java:19)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Resource.invoke(Interceptors_Resource.java:71)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.doWorkWithAttribute(Interceptors_Transaction.java:38)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_Transaction.invoke(Interceptors_Transaction.java:22)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:189)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_StatelessInstanceGetter.invoke(Interceptors_StatelessInstanceGetter.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_SecurityCheck.invoke(Interceptors_SecurityCheck.java:21)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.Interceptors_ExceptionTracer.invoke(Interceptors_ExceptionTracer.java:16)
    at com.sap.engine.services.ejb3.runtime.impl.AbstractInvocationContext.proceed(AbstractInvocationContext.java:177)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultInvocationChainsManager.startChain(DefaultInvocationChainsManager.java:133)
    at com.sap.engine.services.ejb3.runtime.impl.DefaultEJBProxyInvocationHandler.invoke(DefaultEJBProxyInvocationHandler.java:164)
    at $Proxy102_10002.process(Unknown Source)
    at com.seeburger.xi.api.module.impl.nw71.SeeModuleProcessorLocal71.process(SeeModuleProcessorLocal71.java:43)
    Waiting for your valuable inputs on this.
    Thank you,
    Mallikarjuna Rao M

  • Messenger service using message driven beans

    I need to implement a implement a messenger service. (using Messaging server, Message Queue, Message Clients and Message Driven Beans)
    using netbeans 5.5
    it should develop using EJB 3.0 architeture.
    Can pls tell...how should i start this.(Basic steps of doing this)
    Where should we write the Messaging server.(in a EJB 3.0 application...Is it?)
    Any tutorial regrading this....!

    EJBs and Message Driven Part.
    what should i develop first. Messaging server OR Message Queue
    How can i develop the Messaging Server. Do i need to use Message driven beans there?
    Message was edited by:
    jugp

  • Error using XSLt Transformation

    Hi,
    I am using a servlet to get some results from the web which will be a XML file pass it to a XSLT Processor to covert it into a html doc .The code is compiling but when I run the servlet,i am getting following error.
    Can anybody tell me how to solve it .its very urgent
    type Exception report
    message
    description The server encountered an internal error () that prevented it from fulfilling this request.
    exception
    javax.servlet.ServletException: Servlet execution threw an exception
    root cause
    java.lang.NoSuchMethodError: org.apache.xerces.framework.XMLParser.setSendCharDataAsCharArray(Z)V
         org.apache.xalan.xpath.dtm.DTM.<init>(DTM.java:222)
         org.apache.xalan.xpath.dtm.DTMLiaison.parse(DTMLiaison.java:197)
         org.apache.xalan.xslt.XSLTEngineImpl.getSourceTreeFromInput(XSLTEngineImpl.java:838)
         org.apache.xalan.xslt.XSLTEngineImpl.process(XSLTEngineImpl.java:552)
         SearchServlet.doGet(SearchServlet.java:90)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
         javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.
    Following is the code I am using
    // importing
    import java.net.*;
    import java.io.*;
    import java.net.URLEncoder;
    import java.util.Enumeration;
    import java.util.*;
    import java.net.MalformedURLException;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.servlet.http.HttpServletRequest.*;
    import javax.servlet.http.HttpServletResponse.*;
    import java.io.OutputStream;
    import org.xml.sax.InputSource;
    import org.apache.xalan.xslt.XSLTProcessorFactory;
    import org.apache.xalan.xslt.XSLTInputSource;
    import org.apache.xalan.xslt.XSLTResultTarget;
    import org.apache.xalan.xslt.XSLTProcessor;
    import org.apache.xml.serialize.BaseMarkupSerializer.*;
    import org.apache.xerces.xni.QName;
    import org.apache.xerces.xni.XMLAttributes;
    import org.apache.xerces.xni.XMLDocumentHandler;
    import org.apache.xerces.xni.XMLLocator;
    import org.apache.xerces.xni.XMLString;
    import org.apache.xerces.xni.XNIException;
    import org.apache.xerces.xni.XMLResourceIdentifier;
    import org.apache.xerces.xni.Augmentations;
    public class SearchServlet extends HttpServlet
    //Class SearchServlet
    //doGet Method
    public void doGet(HttpServletRequest request,HttpServletResponse response) throws
    IOException,ServletException,MalformedURLException
    //try
              try
    String resultHere=new PageRequestor().sendGETMessageThroughSocket();
    File testFile = new File("C:\\Program Files\\Apache Software Foundation\\Tomcat 5.5\\webapps\\MyApp\\WEB-INF\\classes\\hoz.xsl");
    ReadMyFile obj=new ReadMyFile();
    String xslResult=obj.getContents(testFile);
         OutputStream outcome=response.getOutputStream();
         String xmlSystemId = new File(resultHere).toURL().toExternalForm();
    String xsltSystemId = new File(xslResult).toURL().toExternalForm();
    XSLTProcessor processor =XSLTProcessorFactory.getProcessor();
         XSLTInputSource xmlInputSource =new      XSLTInputSource(xmlSystemId);
         XSLTInputSource xsltInputSource =new XSLTInputSource(xsltSystemId);
         XSLTResultTarget resultTree =new XSLTResultTarget(outcome);
    processor.process(xmlInputSource, xsltInputSource, resultTree);
              PrintWriter out=response.getWriter();
              response.setContentType("text/HTML");
              out.println("<html>");
              out.println("<title>SearchServlet</title>");
              out.println("<body>");
              out.println("<p>"+resultHere+"</p>");
              out.print("<p>"+"AFTER RESULT"+outcome+"</p>");
              out.println("</body>");     
              out.flush();
    //try end
              catch (Exception e)
    //catch
         e.printStackTrace();
    // catch end
    //doGet Method ends
    // class SearchServlet ends

    You will need Xalan (from xml.apache.org) for this to work properly, and to create an instance of TransformationException and ConfigurationException:
    static public void serialize(Document document, OutputStream target, boolean indent)
              throws IOException, ConfigurationException, TransformationException {
              try {
                   Transformer transformer = TransformerFactory.newInstance().newTransformer();
                   if (indent)
                        transformer.setOutputProperty(OutputKeys.INDENT, "yes");
                   transformer.transform(new DOMSource(document), new StreamResult(target));
              catch (TransformerConfigurationException configure) {
                   throw new ConfigurationException("Error instantiating XML transformer", configure);
              catch (TransformerException transform) {
                   /** @todo Need to write a generic transformation or serialization exception */
                   throw new TransformationException("Error transforming XML", transform);
         }- Saish

  • Message Transformation Bean - Usage of external classes

    Hi SDNers,
    I am planning to write an external Java class to be loaded from AF_Modules/MessageTransformBean . The idea is simple, I want my class to handle an extra level of hierarchy in FCC process. I know writing the Java class which is as generic as the one provided by SAP is too complex. But I just want it for some specific requirements, so I dont intend to make it as a generic class.
    Should the external class that I write implement the interface Transform? If so, what is the jar file that contains this interface and where can I find this jar file in my XI installation?
    Also, what is the jar file that contains the standard class com.sap.aii.messaging.adapter.Conversion that gets loaded by default while using the MessageTransformBean?
    If you have already tried with similar requirements, please share your experience on the same.
    Thanks
    Jaishankar

    You can use the same module in J2SE and J2EE adapter without change.
    I recommend to install a J2SE adapter engine on a local PC for testing.
    I have found a sample code from previous tests:
    package sample;
    import com.sap.aii.messaging.adapter.Parameter;
    import com.sap.aii.messaging.adapter.trans.Transform;
    import com.sap.aii.messaging.adapter.trans.*;
    import java.io.*;
    public class MyModule extends Transform {
    Parameter parameter;
    String filename;
         public void init(TransformConfig config) throws TransformException{
                   super.init(config);
                   parameter = (Parameter) config.getParameters("Parameter");
                   filename = (String) parameter.get("filename");
         // obligatory method service
         public void service(TransformRequest request, TransformResponse response) throws TransformException {
              // Get the input stream for request message
              InputStream in = (InputStream) request.getMessage();
              // Get output stream for response message
              OutputStream out = (OutputStream) response.getMessage(Transform.MT_OutputStream);
              try{
                   execute(in,out);
              } catch (Exception e) {
                   throw new TransformException("TransformException: Error converting Message " + e.getMessage(), e);
         public void execute(InputStream in, OutputStream out) throws Exception{
              String filename = (String) transformConfig.getParameters("FileName");
              if (filename == null){
                   filename = "notfound.txt";
              // open file stream
              OutputStream fileOut = new FileOutputStream(new File(filename));
              // copy input stream to output stream and to file
              int c;
              while ((c = in.read()) != -1) {
                        fileOut.write(c);
                        out.write(c);
    //     main Methode, for local testing. A local XML file is expected.
          public static void main (String[] args) {
               try {
                    // Define Input stream and output stream from file
                    InputStream in = new FileInputStream(new File("source.xml"));
                    OutputStream out = new FileOutputStream(new File("target.xml"));
                    // call Mapping
                    MyModule map = new MyModule();
                    map.execute(in,out);
               } catch (Throwable t) {
                    t.printStackTrace();
               System.exit(0);

  • Error deploying Message driven beans

    hi everyone,
    I am getting the following error while migrating an application from Websphere to SAP Web AS.
    I am trying to used XSD(ejb-jar_2_1.xsd) instead of DTD(ejb-jar_2_0.dtd).
    The error is --
    Cannot parse persistent.xml or storage.xml
    Reason: com.sap.engine.services.deploy.exceptions.BaseWrongStructureException: <b>Incorrect element. Expected: entity | session, found: message-driven..</b>
    It seems it is not expecting a message-driven tag.
    Why is this happening?
    Can anyone please help..
    thanks in advance,
    Abhijit

    hi Myriana,
    Thanks for your response..
    Yes it is a strange error.
    It seems it is not able to recognise the "message-driven" error. Looking at the error it also seems that it is able to find and parse the XSD.
    When i tried with DTD it works fine.
    Is it so that SAP WebAS that comes with with Netweaver 4 does not support message-driven beans while using XSD?
    From this error i think it is so..
    Also I got some similar problem while using <local> and <local-home> tags.
    regards,
    Abhi

  • Message Driven Beans: how to receive and send in a single session?

    Hello
    How to receive and send JMS messages in a message driven bean using a single session?
    Thanks.

    Are you referring to writing code within the onMessage method itself to receive JMS messages?
    If so, that is not a pattern that is recommended, especially not in the case of a blocking JMS
    receieve. If you must write an explicit JMS receive within an EJB component it's best to use
    a "check the queue" approach where you give a very small timeout for the receive. That way
    if the message is there it will be returned but if not the call will not block.
    You'll also need to take the transactional settings of the onMessage method into account.
    If your are sending a message and then waiting for a response, those two actions can
    not be done within the same global transaction. For that, you'll need to either use
    BMT and perform each in its own transaction or just not use global transactions at all,
    in which case each send and receive operation will be atomic.
    --ken                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Using Message Driven bean in JDev 9.0.3.2

    Hi all,
    I'm trying to create a Message bean in JDeveloper 9.0.3.2. I've used the wizard which has (very nicely) created me the bean files, i have also set up OC4J server and deployed to it and it seems to run fine.
    Now, i'm trying to create a class (in the same project) that sends a message to the bean but i'm having problems. Session beans in JDev have a very nice option to create a Sample Java Client but there is no equivalent "Sample Message Creator" for message beans.
    Anyway, my code is as follows...
    Context ctx = new InitialContext();
    TopicConnectionFactory factory = (TopicConnectionFactory)ctx.lookup("javax.jms.TopicConnectionFactory");
    ....more code to create and send message
    However, i don't know where to lookup the factory from, this line gives me an error presumably because javax.jms.TopicConnectionFactory is incorrect. What is the Oracle lookup for this ? Where do i find it out from ?
    Any advice would be appreciated, sorry this is not a posting on 10g which i haven't had chance to look at yet (though i hear it's very nice).
    Alistair

    You might find the sample code which is part of OC4J-howto's useful.
    http://otn.oracle.com/tech/java/oc4j/904/index.html
    http://otn.oracle.com/tech/java/oc4j/904/how_to/how-to-ejb-mdb.zip
    raghu
    JDev Team

  • Error using XMLType.transform() parammap argument

    Hello;
    I've hit a snag trying to pass top-level XSLT parameter via XMLType.transform's parammap argument.
    Whenever I run the code sample at the end of this message on 9.2.0.1.0, I get the following error:
    ORA-00600: internal error code, arguments: [KGHAL02], [0x0], [], [], [], [], [], []
    This error does not occur if you remove the 'name=value' parammap value.
    Any ideas?
    Brian.
    set serveroutput on
    declare
         stylesheet xmltype;
         result xmltype;
         xmldoc xmltype;
    begin
         stylesheet := XMLType(
    '<?xml version="1.0"?>
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
    >
    <xsl:param name="name"/>
    <xsl:output
    method="xml"
    />
    <xsl:template match="hello" >
         <xsl:value-of select="text()"/>
    </xsl:template>
    </xsl:stylesheet>'
         xmldoc := XMLType('<hello>world </hello>');
         result := xmldoc.transform(stylesheet,'name=value');
         dbms_output.put_line(result.getStringVal());
    end;
    /

    I've worked around this bug successfully by using dbms_xslprocessor package directly - but yuck. The dbms_xslprocessor and related packages is pretty messy to work with.
    I also ran into problems implementing the workaround as dbms_xmldom.getDocumentElement could not find the root element on the resulting DOMDocumentFragment (converted appropriately using dbms_xmldom.makeDocument - sigh). I had to write the fragment (converted to a node first using dbms_xmldom.makeNode - heavy sigh) to a clob (dbms_xmldom.writeToClob), and then reload it using dbms_xmldom.newDOMDocument). Not to mention having to remember to freeXXX all the things I had to create.
    Gross... 4 times the code with lots more opportunities for bugs & leaks.
    Brian.

  • Message transform bean

    Need assistance for this structure :
    header
            node
                    string (repeats numerous times)
    need a content conversion using MTB for this for receiver file adapter
    Thanks

    Hi Kiran,
    Try this
    Transform.Class          ---          com.sap.aii.messaging.adapter.Conversion
    Transform.ContentType      -
              text/plain;charset=utf-8
    xml.Detail.endSeparator     -
              'nl'
    xml.Detail.fieldFixedLengths     -
         <String lenghts>
    xml.conversionType     ---     StructXML2Plain
    xml.recordsetStructure     ---          node

  • Distributed Garbage Collector (DGC)  messages in cluster when using Message Driven Beans

    Version: Weblogic 6.1 SP2
              I'm seeing a lot of messages output on the node ** hosting my JMS
              server/destination ** in the cluster
              <Jun 4, 2002 5:35:03 PM EDT> <Info> <DGCserver> <Tried to renew lease on
              lost reference: '448'>
              Unfortunately, this message coincides with my MDB's ** on other nodes ** not
              being able to lookup the JMS destination that they are configured for.
              MDB's on the same node as the JMS server/destination are able to do lookups
              fine.
              Checking the JNDI tree on all nodes, I see the destinations replicated to
              all nodes. The MDB's use the default (i.e WebLogic's) connection factory
              (weblogic.jms.MessageDrivenBeanConnectionFactory) and I've bumped up the
              polling interval to 5 minutes from the default of 10 seconds.
              Any guidance on this would be greatly appreciated.
              I see that there is a patch available to fix the DCC info messages (April
              ,2002) on dev2dev. Anyone know if this addresses the MDB problem?
              Thanks in advance
              

    FYI - in case anyone else sees this problem - it has been fixed in WLS 6.1
              SP3.
              If you are seeing this problem then you will see a log of
              NoSuchObjectException's in your console.
              Regards
              "Prashant Nayak" <[email protected]> wrote in message
              news:[email protected]...
              > Version: Weblogic 6.1 SP2
              >
              > I'm seeing a lot of messages output on the node ** hosting my JMS
              > server/destination ** in the cluster
              >
              > <Jun 4, 2002 5:35:03 PM EDT> <Info> <DGCserver> <Tried to renew lease on
              > lost reference: '448'>
              >
              > Unfortunately, this message coincides with my MDB's ** on other nodes **
              not
              > being able to lookup the JMS destination that they are configured for.
              > MDB's on the same node as the JMS server/destination are able to do
              lookups
              > fine.
              >
              > Checking the JNDI tree on all nodes, I see the destinations replicated to
              > all nodes. The MDB's use the default (i.e WebLogic's) connection factory
              > (weblogic.jms.MessageDrivenBeanConnectionFactory) and I've bumped up the
              > polling interval to 5 minutes from the default of 10 seconds.
              >
              > Any guidance on this would be greatly appreciated.
              >
              > I see that there is a patch available to fix the DCC info messages (April
              > ,2002) on dev2dev. Anyone know if this addresses the MDB problem?
              >
              > Thanks in advance
              >
              >
              >
              >
              >
              

  • Error using transferTo function on VMS for long files

    Here is the code snippet that fails, as you can tell I am not giving all the code since it is not required to understand the problem.
    This occurs on OpenVMS
    Welcome to OpenVMS (TM) Alpha Operating System, Version V7.3-2
    java version "1.4.2"
    Java(TM) 2 Runtime Environment, Standard Edition
    Classic VM (build 1.4.2-5, 03/06/2006-23:29, native threads, nojit)
    The error only occurs on files with very long line lengths (20 000+ characters in the line) and file size is not an issue.
    Thanks in advance for your help in resolving this issue.
    private FileChannel fileChannelInbound;
    private SocketChannel socketChannelOutbound;
    private Socket client;
    client = new Socket(hostname,portNumber);
    socketChannelOutbound = SocketChannel.open(client.getRemoteSocketAddress());
    File fIn = new File(file);
    fileChannelInbound = new FileInputStream(fIn).getChannel();
    fileChannelInbound.transferTo(0,fileChannelInbound.size(),socketChannelOutbound);
    fileChannelInbound.close();This is the trace of the error.
    java.io.IOException: invalid buffer length
    at sun.nio.ch.FileDispatcher.write0(Native Method)
    at sun.nio.ch.SocketDispatcher.write(SocketDispatcher.java)
    at sun.nio.ch.IOUtil.writeFromNativeBuffer(IOUtil.java)
    at sun.nio.ch.IOUtil.write(IOUtil.java)
    at sun.nio.ch.SocketChannelImpl.write(SocketChannelImpl.java)
    at sun.nio.ch.FileChannelImpl.transferToTrustedChannel(FileChannelImpl.java)
    at sun.nio.ch.FileChannelImpl.transferTo(FileChannelImpl.java)
    at WebReturnResult.sendFile(WebReturnResult.java)
    at WebReturnResult.sendResults(WebReturnResult.java)
    at WebReturnResult.<init>(WebReturnResult.java)
    at WebReturnResult.main(WebReturnResult.java)

    Hi ,
    Unfortunately this is an issue in the underlying driver for the USB device. It should be fixed in the next DAQ release.
    One way you could work around this problem is by having a delay after the read and the next line of code.
    i.e
    Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)
    DAQmxErrChk DAQmxReadAnalogScalarF64(taskHandle, 10#, data, ByVal 0&
    Sleep(250)
    acquisitionDataTextBox.Text = CStr(data)
    Hope this helps...
    Nandan Dharwadker
    Staff Software Engineer
    Measurement Studio Hardware Team

  • Error with the data format in the TXT file, sending as an Email attachment

    Hi all,
    I have an problem in the data formating in the TXT file while sending as an attachment via an email by using the FM "SO_DOCUMENT_SEND_API1".
    For eg:
    The data in the TXT file is looking like as follows:
    0 0 0 0 2        L O U D S P E A K R   O T H E R   3 8 W h i t e                  0 0
    0031  L O U D S P E A K R   O T H E R   3 8 Black                               0 000
    38    L O U D S P E A K R   O T H E R   3 8 Brown                                  0 00040
    L O U D S P E A K R   O T H E R   3 8 Brown                                         0 00042
    and so on
    But it should come as :
    0 0 0 0 2  L O U D S P E A K R   O T H E R   3 8 W h i t e
    0 0 0031   L O U D S P E A K R   O T H E R   3 8 Black
    0 00038    L O U D S P E A K R   O T H E R   3 8 Brown
    0 00040    L O U D S P E A K R   O T H E R   3 8 Brown
    All the internal tables are correctly filled.
    The code is as follows:
    gwa_objtxt = 'Please find attached DATA EXTRACT Sheet'.
      append gwa_objtxt to git_objtxt.
    describe table git_objtxt lines gv_cnt.
      clear git_doc_data.
      read table git_objtxt index gv_cnt.
      git_doc_data-doc_size = ( gv_cnt - 1 ) * 255 + strlen( gwa_objtxt ).
      git_doc_data-obj_langu = sy-langu.
      git_doc_data-obj_descr = lv_mtitle.
      append git_doc_data.
      clear git_packing_list.
      refresh git_packing_list.
    git_packing_list-transf_bin = space.
      git_packing_list-head_start = 1.
      git_packing_list-head_num = 0.
      git_packing_list-body_start = 1.
      git_packing_list-body_num   = gv_cnt.
      git_packing_list-doc_type = 'RAW'.
      append git_packing_list.
      Clear : gv_cnt.
      Describe table git_objbin lines gv_cnt.
      git_packing_list-transf_bin = 'X'.
      git_packing_list-head_start = 1.
      git_packing_list-head_num = 1.
      git_packing_list-body_start = 1.
      git_packing_list-body_num = gv_cnt.
      git_packing_list-doc_type = 'TXT'.
      git_packing_list-obj_descr = 'ATTACH.TXT'.
      git_packing_list-obj_name = 'book'.
      git_packing_list-doc_size = gv_cnt * 255.
      APPEND git_packing_list.
      clear git_receivers.
      refresh git_receivers.
      git_receivers-receiver = gv_eid.
      git_receivers-rec_type = 'U'.
      append git_receivers.
    CALL FUNCTION 'SO_DOCUMENT_SEND_API1'
        EXPORTING
          DOCUMENT_DATA              = git_doc_data
          PUT_IN_OUTBOX              = 'X'
          COMMIT_WORK                = 'X'
        TABLES
          PACKING_LIST               = git_packing_list
          CONTENTS_BIN               = git_objbin
          CONTENTS_TXT               = git_objtxt
          RECEIVERS                  = git_receivers
        EXCEPTIONS
          TOO_MANY_RECEIVERS              = 1
          DOCUMENT_NOT_SENT                = 2
          DOCUMENT_TYPE_NOT_EXIST      = 3
          OPERATION_NO_AUTHORIZATION = 4
          PARAMETER_ERROR                    = 5
          X_ERROR                                      = 6
          ENQUEUE_ERROR                        = 7
          OTHERS                                        = 8.

    please give the code of
    contents bin =  git_objbin " how  this is getting populated.
    0 0 0 0 2 L O U D S P E A K R O T H E R 3 8 W h i t e <b>0 0</b>
    0031 L O U D S P E A K R O T H E R 3 8 Black
    0 000
    38
    from this im not able to understand is this over population or concatenation problem
    y dont u make a append to the final table
    like
    data : begin of itxt occurs 0, ,
    s1(132) type c ,
    end of itxt.
    loop at itab.
    itxt-s1+0(4) = itab-f1.
    itxt-s1+4(6) = itab-f2.
    itxt-s1+10(8) = itab-f3.
    itxts1+18(4) = itab-f4.
    append itxt.
    clear itxt.
    endloop.
    exchange this to the contents bin of hte Fm .
    regards,
    vijay.
    can u please mail the text file and the expected o/p to my mail id [email protected]  so that i can see the same from the data provided i m not able to check the result properly .

Maybe you are looking for

  • File association issue with PictureView 7.2

    Unlike Apple QuickTime 7.16, QT 7.2 use 2 profiles to log per user setting info: File1 \C:\Documents and Settings\%current user%\Application Data\Apple Computer\QuickTime\QTPlayerSession.xml File2 \C:\Documents and Settings\%current user%\Local Setti

  • What happens when the Flex 2 builder trial expires?

    Here in South Africa bandwidth is quite expensive and I would like to know if I can still use Eclipse for other purposes after the Flex 2 builder trial has expired. If it totally disables Eclipse it means that I have to download the standard version

  • Corrupt Library - how to resync iPhone & iPad

    My iTunes library is corrupt - I have some issues with podcasts not being deleted properly. I know how to rebuild my library via the Apple Knowledge base article http://support.apple.com/kb/ht1451. I know that that works and solves my issue. All my c

  • Premiere Pro CS4 crashes on startup after installation (Win XP x64)

    Hello, I've had no such luck getting PP working on Win XP x64, I've installed everything else and checked to make sure its working correctly from the master collection, but PP is giving me a hard time.  After reading much of the other discussion on t

  • When copying to NAS, "..an unexpected error occurred (error code -51)"

    I'm using Mac OSX 10.6.8 on a macbook pro, copying files to a media NAS server via wifi (n), which I've done countless times before, for about 2 years. In this last week or so, whenever I copy a file, be it 15 MB or 1.5 GB to the NAS, I've consistent