Passing XML payload from Servlet to JMS

Hi All,
My requirement is that servlet will receive the HTTP request , convert it into XML format and publish it to JMS queue.
Now, I am stuck at the part where I need to publish the XML payload to JMS queue.
Is it possible to send the XML payload from servlet to JMS queue? Is yes, please let me know how can we achieve this.
Thanks

I suggest you go to the following page: [http://edocs.bea.com/wls/docs103/pdf.html] .
In the "Programming" section, download and read at least "Programming WebLogic JMS" and perhaps "Developing Web Applications, Servlets, and JSPs for WebLogic Server" and "Developing Applications with WebLogic Server".

Similar Messages

  • Hi How to get XML file from servlet that XI sent to my J2EE appl?

    Hi All!
    I have a scenario like XI sends xml file to j2ee application. In my J2EE application my servlet receives this xml. Will the xml file be in my HTTPServletRequest object? if so how to get that file from Request object.
    Please help me its urgent, Any code help is highly appreciated.
    My xml file will be like this:
    <ns0:Http_Message_Type_Demo
    xmlns:ns0="http://abcdemo.com">
    <Name>ABC</Name>
    <RollNo>123</RollNo>
    <Address>a-4</Address>
    </ns0:Http_Message_Type_Demo>
    somebody should help me!please
    Thanks

    Hi,
    You can use HTTPServletRequest object to get the XML payload.
    BufferedReader reader = request.getReader(); //gets XML payload
    String line = reader.readLine(); // to read the XML payload line by line
    (request is the HTTPServletRequest object)
    Regards,
    Uma

  • How to pass a JavaBean from servlet to JSP?

    Hi there,
    I am working on a project that needs to handle quite a few client requests and I want to use the Front Controller pattern that is described in the J2EE pattern page.
    The steps described in the front controller pattern is that:
    1. A servlet (controller) process the client request.
    2. It calls the appropriate cammand object and the cammand object gets the data from the data source and returns a JavaBean that contains the required data.
    3. The servlet dispatch to the appropriate View (jsp page)
    4. The JSP page displays the data in the JavaBean to the user.
    However, I don't know how to pass the JavaBean from the servlet to the JSP page when the servlet forwards the control to the JSP page. Should I make the JavaBean with a request scope or higher? If so, how to uses it in the JSP page? Just refer by the ID of the JavaBean.
    If any one knows there is an example or tutorial on how to use this pattern, please let me know.
    Thank you !
    Regards
    Edmund

    Could you please give more info? i tried to do this, but always get a "Class not found exception":
    response$jsp.java:65: Class org.apache.jsp.TestBean not found. TestBean bean = null;
    although the class TestBean (no package name => defalt package) is in the WAR file and the Servlet seems to instantiate it (otherwise an exception would occur sooner in the TestServlet code).
    my JSP code is:
    <%@ page language="java" info="Response page" %>
    <jsp:useBean id="bean" class="TestBean" />
    <%
    TestBean bean2 = (TestBean) request.getAttribute("TheBean");
    %>
    <html>
    <body>
    Your value: <%= bean2.getValue() %><BR>
    My val: <%= bean2.getNewValue() %><BR>
    <P>
    Date: <%= new Date() %>
    <P>
    Neuen Wert eingeben
    </body>
    </html>
    --------------

  • Retreive xml payload from Orabpel meta table.

    Hi guys,
    I am trying to trace where does the invoking xml payload get persisted for gor each bpel invocation
    By analyzing the orabpel meta tables at a high level i thought i might have to join tables cube_instance, invoke_message, xml_document on conversation_id and message_guid. But on some more investigation, it seems its not that simple.
    For each invocation of a "HelloWorld" program, a row is getting added to cube_instance but nothing gets into invoke_message & xml_document tables.
    So, how can i drill down to my actual payload for EACH invocation?
    Anybody tried this before?
    Thanks in advance
    Sumit

    Edit your posting and copy and paste the following two tags before and after your PL/SQL code.. [code] and [/code]
    This will properly format your PL/SQL code and make it a lot more readable. Remember that none here gets paid to read code and assist - so by making code easier to read ensures that it is easier to provide assistance and suggestions.
    A couple of comments.
    It seems like the code is confused about whether it is a web server process responding to a HTTP request, or a web browser initiating a HTTP request.
    It mixes HTP (web browser) calls with UTL_HTTP (web server) calls.
    I have posted sample code for a PL/SQL web browser in [url http://forums.oracle.com/forums/thread.jspa?messageID=1925304#1925297]this thread. Perhaps that will assist on the web browser side (using PL/SQL as a web browser to retrieve XML from a web server via a HTTP command).
    If you're intention is to be the actual web server process supplying the XML, then the code seems all wrong to me. You need to use OWA calls and mod_plsql to interface the PL/SQL procedure with a web server.

  • OSB: Retrieve non XML Payload from a service that returns status code 500

    Hello,
    I'm using OSB 11g.
    I have a Business Service that invokes a REST based service (AnyXML). The service I'm calling may return a 500 status code and some JSON-encoded information in the response body containing the remote service error information.
    From a Proxy Service, I invoke the Biz Service using a standard Service Call Out. The Call Out works fine if the service doesn't return any error (status code 200).
    The problem starts when the service returns a 500 status error: it seems that there is no way to to get hold of the error information (string) that are in the response body. The $fault variable contains some info, but not the actual payload.
    I have also tried to "resume" the flow (using a resume action) but no luck.
    Is there a way to retrieve a NON-XML payload of a service even if the service returns a 500 status code?
    Thanks
    Luciano

    Hi,
    I have same problem, any idea?
    I created several Proxy Services between SOA (BPEL) and JDE. Proxy Service works correct, but if interface response has an error (fault) from JDE side, we get high level error message from OSB and we lost error information from endpoints. I want to get following error information from response body, which containing the remote service error information.
    e.g. <SOAP-ENV:Fault>:
    <SOAP-ENV:Body>
    <SOAP-ENV:Fault>
    <faultcode>SOAP-ENV:Client</faultcode>
    <faultstring>[ISS.0088.9134] Exception occurred while processing the body of the message</faultstring>
    <faultactor>http://HOST/soap/default</faultactor>
    <detail xmlns:webM="http://www.webMethods.com/2001/10/soap/encoding">
    <webM:exception> </webM:exception>
    </detail>
    </SOAP-ENV:Fault>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Until now, I solved errorhandling for Proxy Service with single route node, but if I use Proxy Service for “Failover” and OSB connect to Endpoint 2, BPEL-instances with "fault" state get OSB error message and WSG-Response will be lost from $body of messages.--> error-propagation to client is NOT OK.
    Regards,
    Moh

  • Passing an integer from servlet  to PERL

    Hi,
    I have a one problem. Iam having an film database(SQLPLUS) table and can get particular information from the database using filmId(using servlets).
    Now I have to use Perl to know more information about the specific film. So Iam passing the filid to Perl and every time Iam using a different filmID I can see the URL in the perl page change to specific id's so I know the filmid is correctly passed. But for some reason the perl is not able to fetch the information from the database like the servlets. the perl is simply giving a blank HTML Page.
    AM I PASSING THE filmis CORRECTLY IN TO PERL FROM SERVLET??
    Thanks
    The part of the servlet program is below.//Passing the ID(filmsid)
    try
    //Loop through results of query.
    while(rs1.next())
    String filmids = rs1.getString("ID");
    out.println("<TR>");
    out.println("<TD>" + rs1.getString("ID") + "</TD>");
    out.println ("<TD><a href=cgi-bin/'trial2.pl?filmids="+filmids+"'>Click here to view comments </a></TD>");
    out.println("</TR>");
    the perl program is below too.//Getting the filmid's
    $reg = "SELECT ID,Title,Price,Availability FROM FILMS1 WHERE ID =
    /$filmsid/i
    my $sql = $dbh->prepare($reg);
    $sql->execute();
    while (@row = $sql->fetchrow_array){
    print "<TR align = center bgcolor=white> <TD>",$row[0],"</TD> </TR>";
    print "</TABLE>";
    #$exist=$sql->fetchrow_array();
    #print "<H3> $exist is the value </H3>";
    $sql->finish();
    $dbh->disconnect();
    print "</font>";
    print "</body>\n";
    print "</html>\n";

    It doesn't seem to be that you're passing anything to Perl, at least not directly. Rather, you're creating a web page that has a link to a resource on a web server, and the resource is being serviced by a perl script.
    This means that you can debug the two separately. First, confirm that the java servlet is producing the page, and in particular the link, correctly.
    Then, fix the perl script as a separate step. I notice that you only quoted a fragment from your perl script; what you posted msy not run at all.
    If you want help with a perl script, you're better off on a perl-centric forum. Put on your flame-retardant suit and head on over to comp.lang.perl.misc.

  • Problem in Passing JTree object from Servlet pgm to browser

    Dear all:
    Can anybody help to resolve the problem - pass the JTree obejct from servlet (Tomcat) to IE 6.0. The JTree oject alway shows invalid charcter in IE. Following is my coding.
    import java.io.*;
    import java.awt.*;
    import javax.servlet.*;
    import javax.servlet.http.*;
    import javax.swing.*;
    import java.net.URL;
    import java.sql.*;
    import java.lang.*;
    import java.util.*;
    import javax.swing.tree.*;
    //* Testing1 give it null
    public class SimpleServer extends HttpServlet
    DefaultMutableTreeNode top;
    DefaultMutableTreeNode EX01;
    DefaultMutableTreeNode EX02;
    DefaultMutableTreeNode QB01;
    DefaultMutableTreeNode QB02;
    DefaultMutableTreeNode N2BS;
    DefaultMutableTreeNode N2TS;
    //StringTokenizer st2, st1;
    String query;
    Connection con ;
    Statement statm;
    ResultSet res, backupRes;
    //RowSet res, backupRes;
    TreeSet treeset ;
    String [] tempArray;
    //ServletContext sc ;
    ObjectOutputStream out ;
    DefaultMutableTreeNode temp_node;
         public void doGet(HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
    resp.setContentType("text/html");
    // resp.setContentType("application/octet-stream");
    System.out.println("create main node") ;
              out = new ObjectOutputStream(resp.getOutputStream());
              out.writeObject(this.set_NodeMain()); //no DB access,
         public void doPost(HttpServletRequest req, HttpServletResponse resp)
         throws ServletException, IOException
         try
         System.out.println("doPost " );
         doGet(req,resp);
              finally
         public DefaultMutableTreeNode set_NodeMain()
    top = new DefaultMutableTreeNode("Tandem");
    EX01 = new DefaultMutableTreeNode("EX01");
    EX02 = new DefaultMutableTreeNode("EX02");
    QB01 = new DefaultMutableTreeNode("QB01");
    QB02 = new DefaultMutableTreeNode("QB02");
    N2BS = new DefaultMutableTreeNode("N2BS");
    N2TS = new DefaultMutableTreeNode("N2TS");
    top.add(EX01);
    top.add(EX02);
    top.add(QB01);
    top.add(QB02);
    top.add(N2BS);
    top.add(N2TS);
    return top;
    }

    JMO - I hate seeing things like this in code:
    Just use whitespace to separate the methods.
    You can't just send a JTree to a browser. A browser has no idea how to render a Java object.
    Put that JTree inside an applet and make it part of a JSP. That'll work.
    MOD

  • Reading XML payload from text file

    Hello,
    I have a text file with XML payload in it. The text file has some header information and then the XML payload. How do I read only the XML payload for processing in PI?
    the structure of the text file is something like this..
    Header Information
    Payload
    Sample:
    #Datetime: 20140318-09:28:50.129
    #MessageID: sample123
    #Sender: TEST
    #SenderParty: TEST
    #ReceiverService:
    #ReceiverParty: Test
    #Interface: Test123
    #InterfaceNamespace: http://test.com
    <?xml version="1.0" encoding="UTF-8"?>
    <Sample ><Header>......
    Please advise.
    Thank you.
    Larry.

    package com.learning.utils;
    import java.io.BufferedReader;
    import java.io.IOException;
    import java.io.InputStream;
    import java.io.InputStreamReader;
    import java.io.Reader;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class FetchPayload extends AbstractTransformation {
      String strData = null;
      @Override
      public void transform(TransformationInput arg0, TransformationOutput arg1)
      throws StreamTransformationException {
      // TODO Auto-generated method stub
      getTrace().addInfo("File Reading started ");
      String strData = convertStreamToString(arg0.getInputPayload()
      .getInputStream());
      getTrace().addInfo("File Reading successfully completed ");
      try {
      getTrace().addInfo("Generating XML started");
      strData.substring(strData.indexOf("<?xml"), strData.length());
      arg1.getOutputPayload().getOutputStream().write(
      strData.getBytes("UTF-8"));
      getTrace().addInfo("Generating XML started");
      } catch (IOException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
      public String convertStreamToString(InputStream in) {
      StringBuffer sb = new StringBuffer();
      try {
      InputStreamReader isr = new InputStreamReader(in);
      Reader reader = new BufferedReader(isr);
      int ch;
      while ((ch = in.read()) > -1) {
      sb.append((char) ch);
      reader.close();
      } catch (Exception exception) {
      return sb.toString();
    and u can get  the xml as a resultant which  u can use as input for next message mapping.
    thanks and regards,
    Praveen T

  • How to pass XML payload to HTTP POST Service.

    Hi All,
    I am calling a RestFul service using Http Post method.
    If the payload type is "url-encoded" then my directly assignment of values using assign activity is working fine.
    But when i change the payload type to "xml" , It's erroring out saying the value is not provided for the parameters..
    You can also try this using below details to reproduce the issue.
    Details:
    =====
    URL : http://api.geonames.org/postalCodeSearch
    Used HttpBinding as reference in composite.
    XSD :
    <?xml version= '1.0' encoding= 'UTF-8' ?>
    <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.example.org" targetNamespace="http://www.example.org"
    elementFormDefault="qualified">
    <xsd:element name="geonames">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="totalResultsCount" type="xsd:integer"/>
    <xsd:element name="code" maxOccurs="unbounded">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="name" type="xsd:string"/>
    <xsd:element name="countryCode" type="xsd:string"/>
    <xsd:element name="lat" type="xsd:float"/>
    <xsd:element name="lng" type="xsd:float"/>
    <xsd:element name="adminCode1" type="xsd:string"/>
    <xsd:element name="adminName1" type="xsd:string"/>
    <xsd:element name="adminCode2" type="xsd:integer"/>
    <xsd:element name="adminName2" type="xsd:string"/>
    <xsd:element name="adminCode3" type="xsd:integer"/>
    <xsd:element name="adminName3" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="Input">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="postalcode" type="xsd:string"/>
    <xsd:element name="username" type="xsd:string"/>
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    </xsd:schema>
    We need to send following input values to the service.
    postalcode = 90110
    username =siddhardha
    Can someone let me know how to make it work with XML payload.Looks like i am not constructing the XML payload correctly in assign.
    Please send me the sample to [email protected].
    Thanks in advance,
    Siddhardha.

    Sid,
    I am still trying the same, here we need to change the input type to mimeXml
    have a look at this link....
    https://blogs.oracle.com/reynolds/entry/oracle_http_adapter
    I am trying multiple ways, everytime i get the same below error...
    <messages>
    <Invoke1_Request-Response_InputVariable_2>
    <part name="Input">
    <Input>
    <postalcode>90110</postalcode>
    <username>siddhardha</username>
    </Input>
    </part>
    </Invoke1_Request-Response_InputVariable_2>
    <Invoke1_Request-Response_OutputVariable>
    <part name="geonames">
    <geonames>
    <status message="Please add a username to each call in order for geonames to be able to identify the calling application and count the credits usage." value="10"/>
    </geonames>
    </part>
    </Invoke1_Request-Response_OutputVariable>
    </messages>
    Thanks,
    N

  • Returning XML String From Servlet

              Is there a simple way to disable the HTML character escaping when returning
              a string from a servlet. The returned string contains well formed XML, and
              I don't want the tags converted to > and < meta characters in the
              HTTP reply.
              The code is basically "hello world", version 7.0 SP2.
              Thanks
              > package xxx.servlet;
              >
              > import weblogic.jws.control.JwsContext;
              >
              >
              > /**
              > * @jws:protocol http-xml="true" form-get="false" form-post="false"
              > */
              > public class HelloWorld
              > {
              > /** @jws:context */
              > JwsContext context;
              >
              > /**
              > * @jws:operation
              > * @jws:protocol http-xml="false" form-post="true" form-get="false" soap-s
              tyle="document"
              > * @jws:return-xml xml-map::
              > * <HelloWorldResponse xmlns="http://www.xxx.com/">
              > * {return}
              > * </HelloWorldResponse>
              >
              > * ::
              > * @jws:parameter-xml xml-map::
              > * <HelloWorld xmlns="http://www.xxx.com/">
              > * <ix>{ix}</ix>
              > * <contents>{contents}</contents>
              > * </HelloWorld>
              >
              > * ::
              > */
              > public String HelloWorld(String s)
              > {
              > return "<a> xyz </a>";
              > }
              > }
              

              Radha,
              We have a client/server package which speaks SOAP over a
              streaming HTTP channel for which we are writing a WebLogic
              servlet. For reasons of efficiency, we want to deserialize
              only the very top-level tags of the messages as they pass
              through the servlet. Yes, in theory, we should probably
              deserialize and validate the entire message contents...
              When we add support for other clients, we will fully
              deserialize inside those servlets.
              I have not looked any further into how to stop the inner
              tags from being escaped yet -- it is an annoyance more than
              a disaster, since the client handle meta escapes.
              My current guess is to use ECMAScript mapping...
              -Tony
              "S.Radha" <[email protected]> wrote:
              >
              >"Tony Hawkins" <[email protected]> wrote:
              >>
              >>Is there a simple way to disable the HTML character escaping when returning
              >>a string from a servlet. The returned string contains well formed XML,
              >>and
              >>I don't want the tags converted to > and < meta characters in the
              >>HTTP reply.
              >>
              >>The code is basically "hello world", version 7.0 SP2.
              >
              >>
              >>Thanks
              >>
              >>> package xxx.servlet;
              >>>
              >>> import weblogic.jws.control.JwsContext;
              >>>
              >>>
              >>> /**
              >>> * @jws:protocol http-xml="true" form-get="false" form-post="false"
              >>> */
              >>> public class HelloWorld
              >>> {
              >>> /** @jws:context */
              >>> JwsContext context;
              >>>
              >>> /**
              >>> * @jws:operation
              >>> * @jws:protocol http-xml="false" form-post="true" form-get="false"
              >>soap-s
              >>tyle="document"
              >>> * @jws:return-xml xml-map::
              >>> * <HelloWorldResponse xmlns="http://www.xxx.com/">
              >>> * {return}
              >>> * </HelloWorldResponse>
              >>>
              >>> * ::
              >>> * @jws:parameter-xml xml-map::
              >>> * <HelloWorld xmlns="http://www.xxx.com/">
              >>> * <ix>{ix}</ix>
              >>> * <contents>{contents}</contents>
              >>> * </HelloWorld>
              >>>
              >>> * ::
              >>> */
              >>> public String HelloWorld(String s)
              >>> {
              >>> return "<a> xyz </a>";
              >>> }
              >>> }
              >>
              >>
              >Hi Tony,
              >
              > Can you let me know for what purpose you want to disable the
              >HTML character
              >escaping.In case if you
              >
              >have tried this using someway,pl. let me know.
              >
              >rgds
              >Radha
              >
              >
              

  • Passing a variable from servlet to WML

    i need to send a variable to my wml content from java servlet.Is there any possibility of doing so?
    Thanks in advance

    Check out Help for loadVariables.
    Dave -
    Head Developer
    http://www.blurredistinction.com
    Adobe Community Expert
    http://www.adobe.com/communities/experts/

  • Please help how to pass a JavaBean from servlet to jsp?

    Hi there,
    I have got a dispatch servlet and I want the dispatch servlet to get the data and store it in a JavaBean before dispatching to the appropriate JSP page. However, I don't know how to pass the javabean to the JSP when the servlet forward the request to the JSP. Is ServletContext.setAttribute() the only way to pass the javabean to the JSP page?
    Thank you very much!
    Edmund

    You can use HttpServletRequest.setAttribute(String name, Object javabean) to set the javabean into the HTTP request that you are forwarding to the JSP.
    In the JSP, you can access the Javabean using request.getAttribute(String name) and cast it to the right class.

  • Passing database results from servlets to jsp

    Hi everyone,
    I have been trying to do what i thought would be a very simple thing...perform a search based on some criteria, and return the query result back to be displayed on a jsp page.
    I have a jsp page where some dropdown lists are populated on entry to the page. This works fine. I want to (eventually!) perform the search based on what is selected in these dropdowns. When i click the search button, i invoke a servlet called "SearchInventory.java" which gets the result. I then store this result in an ArrayList object. I then set a bean property (bean name->SearchBean, property->inventory) from within the servlet, and redirect back to the search page. This works if the query only gets back one column.
    Unfortunately, when i ask for more than one column in the query, i get a "java.lang.NullPointerException" error.
    Here is my code for all segments:
    JSP:
    <%@ page language="java" import="java.util.ArrayList,java.lang.*,java.sql.*,javax.sql.*,PopLists.PopInvLists,beans.SearchBean"%>
    <%
    SearchBean sbean=new SearchBean();
    ArrayList myAry=sbean.getInventory();
    int size=myAry.size();
    %>
    <%
              for(int i=0;i<size;i++){
                   String pname=(String)myAry.get(i);
         %>               
    <%}%>
    Servlet:
    String QueryStr="select ProdName,ManufName from products";// where ProdID="+ProdID;
    Statement stmt=conn.createStatement();
    rs=stmt.executeQuery(QueryStr);
    while(rs.next()){
         rowAry.add(rs.getString(1));
         rowAry.add(rs.getString(2));
         rowSetAry.add(rowAry.clone());
    sbean.setInventory(rowSetAry);
    req.getSession(true).setAttribute("s_resbean",sbean);
    res.sendRedirect("/DBTest/SearchInventory.jsp");
    In the servlet, i have also tried the following method of redirecting back to jsp page:
    String url="/SearchInventory.jsp";
    RequestDispatcher dispatcher=getServletContext().getRequestDispatcher(url);
    dispatcher.forward(req,res);
    ...this gives me a java.lang.ClassCastException
    here is my "bean" class:
    public class SearchBean extends HttpServlet{
         private int searchFlag=0;
         private static ArrayList inventory;
         public static ArrayList getInventory(){
              return inventory;
         public void setInventory(ArrayList rs){
              this.inventory=rs;
    When i perform a query that selects just one column, and doesn't use any sort of search fields for selecting, it does seem to work. for eg, : "select ProdName from products" as the query will return the product names successfully.
    Now, i realize what i'm doing is not correct....however, i don't know what the correct way of doing this is. Can someone please please show me how i should be going about doing all of this? It really shouldn't be difficult, but I just can't seem to get it to work.
    Thanks in advance,
    Aditya

    U have instantiated a search bean and populated its member variable i.e Array list , and added that bean to the session as an attribute. Then again why u need to instantiate the search bean in the jsp page.
    What has to be done.
    In the jsp page instead of instantiating the search bean ,get the search bean from the session attribute.
    statement to be removed : SearchBean bean=new SearchBean()
    statement to be added : SearchBean bean = session.getAttribute("bean");

  • How can we pass the control from servlet to portlet ?

    Hi,
    we use PortletRequestDispatcher.include method to call the servlet.
    In my servlet, I have the following form information.
    out.println("<form method=\"post\" action=\"http://abc 40acce5.3a.com/portal/dt?display=Command\">");
    out.println("Enter value: ");
    out.println("<input type=\"text\" name=\"UserName\" value=\"\">");
    out.println("<center> "); out.println("<input type=\"submit\" value=\"Go Back Portlet\"> ");
    out.println("</center> ");
    out.println("</form>");
    When user click the submit button, the servlet will go to portlet first, then go to another page.
    is the url (action="http://abc40acce5.3a.com/portal/dt?display=Command) correct ?
    if not, what url we should use ?
    Can you help ?
    Thanks!

    Oh I thought that you have selection-screen and again you are working on dialog programming.
    if you want to use select-option directly in module pool then it is not possible.
    but you can do other way.
    create two varaiables
    data : v_kun_low like kna1-kunnr,
             v_kun_high like kna1-kunnr.
    use these two variables in layout ,let user knows that he can not give options like gt,lt,eq ,it will be always BT.
    and also when you see normal report program,you can use multiple values in either low or high,but here it is not possibel.
    use can enter only low value and high value.
    when you come to program point of view
    declare one range
    ranges r_kunnr for kna1-kunnr.
    do the coding like
    r_kunnr-low = v_kun_low.
    r_kunnr-high = v_kun_high.
    r_kunnr-options = 'BT'.
    r_kunnr-sign = 'I'.
    append r_kunnr.
    now you can use r_kunnr in select query ,it will work like select-option.
    other than this there is no option.
    Thanks
    Seshu

  • Xml payload encoding from utf to iso

    Hi Experts,
    Could you please let me know how can I encode he xml payload from utf-8 to ISO-8859-1.
    its bit urgent any help is appreciated.
    Thanks & Regards,
    Ranganath.

    Hi Ranganath,
    Here is the java mapping for PI 7.1 and above which will transform encoding type from utf-8 to ISO-8859-1.
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.AbstractTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    import com.sap.aii.mapping.api.TransformationInput;
    import com.sap.aii.mapping.api.TransformationOutput;
    public class addAttributeToTag2 extends AbstractTransformation {
          * @param args
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              // TODO Auto-generated method stub
              try
                   int c;
                   int count=0;
                   String s="";
                   while(1>0)
                        c=in.read();
                        if(c<0)
                             break;
                        if(count<=2 && (char)c=='?')
                             count++;
                        if(count<=2)
                             s=s+(char)c;
                             if(count==2)
                                  s=s.replaceAll("utf-8","ISO-8859-1");
                                  s=s.replaceAll("UTF-8","ISO-8859-1");
                                  count=3;
                                  out.write(s.getBytes());
                             continue;
                        out.write(c);
                        //System.out.print((char)c);
                   in.close();
                   out.close();
              catch(Exception e)
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              try{
                   addAttributeToTag2 genFormat=new addAttributeToTag2();
                   FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
         public void transform(TransformationInput arg0, TransformationOutput arg1)
                   throws StreamTransformationException {
              this.execute(arg0.getInputPayload().getInputStream(), arg1.getOutputPayload().getOutputStream());
    if you are working in PI 7.0 the you need following code
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.InputStream;
    import java.io.OutputStream;
    import java.util.Map;
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.StreamTransformationException;
    public class addAttributeToTag2 implements StreamTransformation {
          * @param args
         public void execute(InputStream in, OutputStream out)
                   throws StreamTransformationException {
              // TODO Auto-generated method stub
              try
                   int c;
                   int count=0;
                   String s="";
                   while(1>0)
                        c=in.read();
                        if(c<0)
                             break;
                        if(count<=2 && (char)c=='?')
                             count++;
                        if(count<=2)
                             s=s+(char)c;
                             if(count==2)
                                  s=s.replaceAll("utf-8","ISO-8859-1");
                                  s=s.replaceAll("UTF-8","ISO-8859-1");
                                  count=3;
                                  out.write(s.getBytes());
                             continue;
                        out.write(c);
                        //System.out.print((char)c);
                   in.close();
                   out.close();
              catch(Exception e)
         public void setParameter(Map arg0) {
              // TODO Auto-generated method stub
         public static void main(String[] args) {
              // TODO Auto-generated method stub
              try{
                   addAttributeToTag2 genFormat=new addAttributeToTag2();
                   FileInputStream in=new FileInputStream("C:\\Apps\\my folder\\sdn\\copy.xml");
                   FileOutputStream out=new FileOutputStream("C:\\Apps\\my folder\\sdn\\copy1.xml");
                   genFormat.execute(in,out);
                   catch(Exception e)
                   e.printStackTrace();
    However as Krish has pointedf out file adapter has option to set encoding type, you can try that option first.
    regards
    Anupam

Maybe you are looking for

  • Problem with installing the drivers from cd-rom CTREG

    I have the following problems. st.. this one is the most urgent.. the problem is I can't seem to install from a drivers cd.. the error I get is like CTREGSVR.. it says it cannot find differnt applications on dri've c... there is like a whole bunch an

  • Sequence settings misunderstanding

    Hello everybody. I have searched the forums and have went back to the manual for FCP but cant seem to find the answer to my questions. Any help would be appreciated. I am curious about the sequence settings in FCP. I believe that a mistake was made i

  • Adobe Acrobat X Standard Install Question

    I purchased Adobe Acrobat X Standard with my computer from Dell.  I have the serial number.  How do I download the software??

  • Based on dimension aggregation

    I have a fact table with 2 sources. One of these sources has only one measure and I am having problems with it. This measure must use based on dimension aggregation, but it don't work. When I set this option, the measure shows a blank value in Answer

  • Sharing files between Leopard and Panther

    I have two iMac's running Panther (10.3.9) that are networked wirelessly and living happy together. Today I wanted to add a new iMac that his running Leopard into the network that is also wireless. I have no problem accessing the internet using the w