Substring in mapping

Hi All,
I have to use the substring function in my mapping.
The mapping requirement is like this
Source field:CustomerName
Target field:3036_2
If the total length of the CustomerName is greated than 35,then the next 35 characters should be assigned to the 3036_2.
But the exact length of the source may not be 70,possibley less than 70.
So the problem occures,I need to mention 2 parameters in the substring function,that is the Start Position and the Character Count.I mention Start Position  as 35 but  if I mention Characte Count as 34 to make the total  length 70,and if the total length of the source is less than 70 then it gives me an exception.
Means what do I need to mention in the Character Count?For the testing payload ,the total source length is 46, so I mention 11.
Please help me.
Thanks in advance

Hello,
I was thinking that customername is part of the output Apologies for the confusion. Here is the new mapping
UDF type is of context
Argument: input
Result: result
if(input[0].length()<35){
result.addValue(input[0]);
else{
result.addValue(input[0].substring(0,35));
result.addValue(input[0].substring(35));
CustomerName -> UDF -> SplitByValue:eachValue -> 3036_2
Hope this helps,
Mark

Similar Messages

  • How to keep the original sequence of a map

    I want the equivalent of a Hashtable or Map class (I need keys and corresponding objects) which, once fully populated, will guarantee to get the key/object pairs back out using the order in which they were added, rather than by sort order of the keys.
    ( The bigger objective is to compare two such collections, A and B, to see which key/object pairs exist in A but not B, and which exist in B but not A. However, for presentation purposes, I need to keep the original order in which everything was read.)
    What's the most efficient way to do this ? I'm sure I've missed something really simplistic but, hey, it's Monday......

    There is no way to retrieve objects from any map in the order they were incerted unless you add some logic to the way you are incering it.
    Here is an example of such logic, where I want to retrieve "states" in the same order as I put them:
         public static void main(String[] args){
              HashMap map = new HashMap();
              map.put("1" + "PA", "Pensylvania");
              map.put("2" + "NJ", "New Jersey");
              map.put("3" + "CA", "California");
              map.put("4" + "TX", "Texas");
              LinkedList ls = new LinkedList(map.keySet());
              Collections.sort(ls);
              Iterator iter = ls.iterator();
             String stAbbrv = null;
              while (iter.hasNext()){
                   stAbbrv = (String)iter.next();
                   System.out.println(stAbbrv.substring(1) + " - " + map.get(stAbbrv));
         }the output is:
    PA - Pensylvania
    NJ - New Jersey
    CA - California
    TX - TexasHope it helps
    Alex
    [email protected]

  • Passing request of file input type to a jsp

    Hi i m using this script for file uploading the form is.... <html > <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>Untitled Document</title> </head> <body> <form action="uploadscript.jsp" name="filesForm" enctype="multipart/form-data" method="post">
    Please specify a file, or a set of files:
    <input type="file" name="userfile_parent" value="userfile_parent" >
    <input type="submit" value="submit" value="Send">
    </form> </body> </html> And i am tring to get the url on uploadscript.jsp by using String parentPath=request.getParameter("userfile_parent"); but i foud that its value is NULL it is not working what should i do to get the userfile_parent on uploadscript.jsp help me!!! Message was edited by: UDAY Message was edited by: UDAY
    avajain      
    Posts: 135
    From: Noida , India
    Registered: 5/10/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 2:43 AM in response to: UDAY in response to: UDAY      
         Click to reply to this thread      Reply
    Use method="GET" in place of method="post" .
    Thanks
    UDAY      
    Posts: 26
    From: JAIPUR
    Registered: 8/14/06
    Read      Re: Passing response but getting NULL
    Posted: Sep 20, 2006 3:18 AM in response to: avajain in response to: avajain      
    Click to edit this message...           Click to reply to this thread      Reply
    now it is giving this error message by e.getMessage()
    [br]the request doesn't contain a multipart/form-data or multipart/mixed stream, content type header is null
    the uploadscript is this....
    http://www.one.esmartstudent.com
    can u please help me.

    Here is sample code which we have used in one of our projects with org.apache.commons.fileupload.*.
    You can find String fullName = (String) formValues.get("FULLNAMES"); at the end that gives name of file.
    <%@ page import="java.util.*"%>
    <%@ page import="java.util.List"%>
    <%@ page import="java.util.Iterator"%>
    <%@ page import="java.io.File"%>
    <%@ page import="java.io.*"%>
    <%@ page import="org.apache.commons.fileupload.*"%>
    <%@ page import="org.apache.commons.fileupload.disk.*"%>
    <%@ page import="org.apache.commons.fileupload.servlet.*"%>
    <%!     
         //method to return file extension
         String getFileExt(String xPath){ 
                   //Find extension
                   int dotindex = 0;     //extension character position
                   dotindex = xPath.lastIndexOf('.');
                   if (dotindex == -1){     // no extension      
                        return "";
                   int slashindex = 0;     //seperator character position
                   slashindex = Math.max(xPath.lastIndexOf('/'),xPath.lastIndexOf('\\'));
                   if (slashindex == -1){     // no seperator characters in string 
                        return xPath.substring(dotindex);
                   if (dotindex < slashindex){     //check last "." character is not before last seperator 
                        return "";
                   return xPath.substring(dotindex);
    %>
    <%           
    Map formValues = new HashMap();
    String fileName = "";
    boolean uploaded = false;
         // Check that we have a file upload request
         boolean isMultipart = FileUpload.isMultipartContent(request);
         //Create variables for path, filename and extension
         String newFilePath = CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH");//application.getRealPath("/")+"temp";
         String newFileName ="";
         String FileExt = "";      
         //System.out.println(" newFilePath"+newFilePath+"/");
         //out.println(" newFilePath"+newFilePath+"<br>");
         // Create a factory for disk-based file items
         FileItemFactory factory = new DiskFileItemFactory();
         // Create a new file upload handler
         ServletFileUpload upload = new ServletFileUpload(factory);
         // Parse the request
         List /* FileItem */ items = upload.parseRequest(request);
         // System.out.println(" newFilePath"+newFilePath+"/");
         // Process the uploaded items
         Iterator iter = items.iterator();
         //Form fields
         while (iter.hasNext()) { 
         //System.out.println("in iterator");
              FileItem item = (FileItem) iter.next();
              if (item.isFormField()) { 
                   String name = item.getFieldName();
                   String value = item.getString();
                   if (name.equals("newFileName")) { 
                        newFileName = value;
                   //System.out.println("LOADING");
                   formValues.put(name,value);
              else { 
              //System.out.println("in iterator----");
                   String fieldName = item.getFieldName();
                   fileName = item.getName();
                   int index = fileName.lastIndexOf("\\");
              if(index != -1)
                        fileName = fileName.substring(index + 1);
              else
                        fileName = fileName;
                   FileExt = getFileExt(fileName);
                   String contentType = item.getContentType();
                   boolean isInMemory = item.isInMemory();
                   long sizeInBytes = item.getSize();
                   if (fileName.equals("") || sizeInBytes==0){ 
                        out.println("Not a valid file.<br>No upload attempted.<br><br>");
                   } else { 
                   // out.println("ACTUAL fileName= " newFilePath"\\"+fileName+ "<br>");
                        //File uploadedFile = new File(newFilePath+"\\", newFileName+FileExt);
                        File uploadedFile = new File(newFilePath+"/",fileName);
                        File oldFile = new File(CoeResourceBundle.getEmailProperties("FILE_UPLOAD_PATH")+"/"+fileName);
                        File oldFileApproved = new File(CoeResourceBundle.getEmailProperties("APPROVED_FILE_LOCATION")+"/"+fileName);
                        try{ 
                             if (!oldFile.exists()&&!oldFileApproved.exists())
                                  item.write(uploadedFile);
                                  uploaded = true;
                             //out.println(fileName+" was successfully uploaded as "+ newFileName+FileExt +".<br><br>");
                        catch (java.lang.Exception e) { 
                             out.println("Errors prevented the file upload.<br>"+fileName+ " was not uploaded.<br><br>");
         String userid = (String) formValues.get("USERID");
         String fullName = (String) formValues.get("FULLNAMES");
         String email = (String) formValues.get("EMAILID");
         String empno = (String) formValues.get("EMPNO");
         String docType = (String) formValues.get("DOCTYPE");
         String desc = (String) formValues.get("MYTEXT");
         String title = (String) formValues.get("TITLEBOX");
         String module = (String) formValues.get("MODULE");
         String techfunctype = (String) formValues.get("TECHFUNCTYPE");
    %>

  • Message reprocess from SXMB_MONI

    Hi Friends,
    We had a scenario like file sender to JDBC receiver and in Message mapping we read the file name and from file name we will take the country code with substring and map to target field.
    Now the problem is: when message failed at PI, we are not able to restart the same from SXMB_MONI and also not able to reprocess from RTW because if we process from RTW, we will not get file name at runtime which fails at Mapping.
    So please let me know how to reprocess the failed message from SXMB_MONI or some another options if have.
    message is synchronous and QOS is EO. Mesage status at SXMB_MONI: system error-manual restart possible
    Thanks in Advance.
    Regards,SARAN

    Mesage status at SXMB_MONI: system error-manual restart possible
    why are you not able to restart the message from SXMB_MONI?
    the message clearly says you can.

  • About selectInput popup page?

    i want to add filter function to the table in the popupp age?
    i noticed that tp4 has provide a function to disable the search region,but how can i add filter function to the table?

    Hi,
    you can add a query listener to the table. This allows you to specify query conditions: The following code sample is used on a filterable table to ensure the user provided valid search criteria. You should be able to modify it such that you add a new query filter instead of checking the existing for validness
        public void onQuery(QueryEvent queryEvent) {
            // pre-processing code here       
            boolean invokeQuery = true;
            FilterableQueryDescriptor fqd = (FilterableQueryDescriptor) queryEvent.getDescriptor();
            Map map = fqd.getFilterCriteria();
            // ensure DepartmentId contains a Number
            String departmentId = (String) map.get("DepartmentId");
            if (departmentId != null && departmentId.length()>0){
                try {
                  // try to parse String to integer
                   Long.parseLong(departmentId);
                } catch (Exception ex) {
                    // not a string
                    System.out.println("Not a string");
                    // add some error message here
                    // unset selection
                    map.remove("DepartmentId");
                    invokeQuery = false;
            // ensure the initial character is in uppercase
            String departmentName = (String) map.get("DepartmentName");
            if (departmentName != null && departmentName.length()>0){
                StringBuffer sbuf = new StringBuffer();
                sbuf.append(departmentName.substring(0,1).toUpperCase());
                sbuf.append(departmentName.substring(1));
                map.put("DepartmentName",sbuf.toString());           
            // you can add additional filter criteria here
            fqd.setFilterCriteria(map);
            if (invokeQuery) {
                invokeMethodExpression("#{bindings.DepartmentsView1Query.processQuery}",
                                                       Object.class,QueryEvent.class,
                                                       queryEvent);
            // post processing code here
        }Frank

  • Mapping string to n substring and then to m subsubstrings

    Hi,
    I need some advice/input for a mapping.
    MT_Source            Occurence
       ROW                  1
          Customer         1
          Article              1
    MT_Target
       ROW                   1:n
          Customer          1
          field1                 1
          field2                 1
          field3                      1
    Article field from source is a string of N-times 5 characters
    Requirements for mapping are:
    The target structure must have N rows
    Then the string must be substringed to N-strings
    Each field1,2,3 is substring of one substring.
    Example
    MT_Source looks like:
    <row>
    customer is X
    article is string "12345ABCDE"
    </row>
    MT_Target must be like:
    <row>
    customer X
    field1       12
    field2       34
    field3       5
    </row>
    <row>
    customer X
    field1       AB
    field2       CD
    field3       E
    </row>
    Can it be done with graphical mapping and udf?
    Or is it better to do it all in one XSLT or JAVA or ABAP mapping?
    Any coding examples u can give are much appreciated.
    Kr
    Robert

    Hi Anand, Sarvesh,
    First of all: thx a lot for all your valuable inputs.
    The only issue left for me was the customer. Just Copyvalue never worked because in source structure there is one and only one value, and it never became two.
    I've solved this also inside my UDF now. I've added one input (var2) and one output (result5) it and looks like this now:
    public void allinONE(String[] var1, String[] var2, ResultList result1, ResultList result2, ResultList result3, ResultList result4, ResultList result5, Container container) throws StreamTransformationException{
    int test=var1[0].length();
    test=test/5;
    for(int i=0;i<test;i++){
         result1.addValue("");
        result5.addValue(var2[0]);
        result5.addContextChange();
    String str="";
    for(int j=0;j<test;j++)
    str=var1[0].substring(j*5,(j*5)+5);
    result2.addValue(str.substring(0,2));
    result3.addValue(str.substring(2,4));
    result4.addValue(str.substring(4,5));
    result2.addContextChange();
    result3.addContextChange();
    result4.addContextChange();
    This gets me exactly the output i need.
    Again thx for the input
    I'll keep exploring
    kr
    Robert

  • Message Mapping (Substring)

    Hi All,
    I am using a standard substring in my message mapping to get the first 4 characters of the incoming text. This work fine except when the incoming text is less than 4. I get an error.
    Is there a way that i can accomplish the above despite the length of the word?
    Thank you in Advance,
    Danny

    Swarup,
    I think it won't work. If his string length is 3 or more than 3, then ur solution is good. What happens if the input string length is 1 or 2? do u think will it work? Please correct me if I misunderstood ur code..
    Danny,
    I would say as suggested as Prateek, write a simple UDF and check for the length and return if it's less than length <=4 or substring if length is >4 . If you don't want to write UDF then
    Use Stadard functions
    Input -
    >length--->greater & Constant(4) ->and ->If then else-->Output
    In if then else then part do substring, else part pass input directlty.
    And function Accepts two input, first parameter is output of greater, second parameter is Constant(4).
    Hope it helps!
    raj.

  • Mapping help - substring calculations

    Hi,
    I need to do mapping like below
    for eg., if my source is coming 12345.000 then my target should remove the decimal and the value should be 12345000
    also it the source is 0.000 then target should be 0000.
    how can we maintain this at runtime...pls help me out

    Hi,
    you can use the replaceString function (replace "." with "" (empty string)).
    Regards,
    Koen

  • XSLT Mapping - Getting current date in XSLT version 1.0

    Hi,
    I want to fetch the system date and compare it with another date, say 06.04.2010.
    How can I do this in XSLT 1.0?
    Thanks & Regards,
    Aditi Naik

    Hi,
    I tried using the following code:
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:cal="java:java.util.GregorianCalendar">
         <xsl:output method="xml"/>
         <xsl:template name="currentDate" xmlns:cal="java:java.util.GregorianCalendar">
              <xsl:variable name="now" select="cal:getInstance()"/>
              <xsl:variable name="day" select="cal:get($now, 5)"/>
              <xsl:variable name="month" select="cal:get($now, 2)"/>
              <xsl:variable name="year" select="substring(string(cal:get($now, 1)), 3, 2)"/>
         </xsl:template>
    <Body>
              <xsl:choose>
              <xsl:when test="boolean(//*[local-name() = 'IRenvelope']/node()) and boolean($year = 2009) and boolean($month &gt; 11) and boolean($day &gt; 05))">
              </xsl:when>
              </xsl:choose>
    </Body>
    However, when I try to run this mapping I get the error "Invalid XPath Expression" in Altova.
    Can you please tell me exactly what is wrong with this code and how I can get around this?
    Thanks & Regards,
    Aditi Naik

  • Substract one day to a date in a XSLT mapping

    Hi,
    I need to map a ENDDA field to a new field but subtracting a day, and reformatting the date, e.g
    from:
    <ENDDA>20090213</ENDDA>
    I need:
    <ENDDA>12.02.2009</ENDDA>
    For reformatting, sub string and concat with . is working, but how can I substract a day, including the handling where the date is the first day of the month?
    thx for your inputs

    I think this will help you.
    Create one UDF and insert 2 parameters.
    First parameter as your date
    second is number of hours 24:00:00
    Code:
       //write your code here
    SimpleDateFormat sd = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
    SimpleDateFormat sdTarget = new SimpleDateFormat("MM/dd/yyyy");
    try {
    Date currentDate = sd.parse(a);
    Date compareDate = sd.parse(a.substring(0,10) + " " + b);
    if (currentDate.after(compareDate)  )
        Calendar c = Calendar.getInstance();
    c.setTime(sdTarget.parse(a));
    c.add(Calendar.DATE,1);
    a = sdTarget.format(c.getTime());     
    else
    //a = "before"
    a =  a.substring(0,10) ;
    catch(Exception e)
    return a;
    This might need little modification as your need.
    After that use Date Transformation function which will convert date in your required format.
    Thanks,
    Hetal
    Edited by: hetal shah on Feb 17, 2009 9:43 PM

  • Unable to deploy a mapping causing ORA, PLS error

    I have a simple mapping, sourec is a table and target is flat file. I have a transformation expression and my expression is as follows :
    ORA-06550: line 799, column 7:
    PLS-00103: Encountered the symbol "|" when expecting one of the following:
    INGRP1.COMPANY_ID ||','||
    INGRP1.ADSI_AGENT_ID ||','||
    INGRP1.DISTRIBUTION_CHANNEL ||','||
    INGRP1.PRODUCT_CODE ||','||
    INGRP1.CONTRACT_ID ||','||
    INGRP1.EVENT_ID ||','||
    INGRP1.COMM_EVENT_CODE ||','||
    TO_CHAR(INGRP1.PRICE_DATE,'MM/DD/RRRR') ||','||
    TO_CHAR(INGRP1.CYCLE_DATE,'MM/DD/RRRR') ||','||
    TO_CHAR(INGRP1.COMM_AMOUNT,'999,999,999.99')||','||
    TO_CHAR(INGRP1.COMM_RATE,'99.9999')||','||
    SUBSTR(INGRP1.EVENT_DESC,1,10) ||','||
    TO_CHAR(INGRP1.STATEMENT_DATE ,'MM/DD/RRRR')||','||
    DECODE(INGRP1.NSCC_IND,'Y','Yes','N','No')
    When I deploy this mapping, I am getting foloowing error:
    ( - + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable> avg
    count current exists max min prior sql stddev sum variance
    execute forall merge time timestamp interval date
    <a string literal with character set specification>
    <a number> <a single-quoted SQL string> pipe
    If I take out the DECODE function from the Expression builder and then deploy , it works OK. Coudl anyone sugegst me what is the problem here.
    Thanks
    Suhail

    Suhail,
    Just thought about something else that is not ideal, but should work: use the decode as a standalone operation in one attribute, and in the next expression, concatenate the result of two previous expression attributes. This should work also (but I know it is not ideal).
    Thanks,
    Mark.

  • Need help on mapping of obsolete and new function module

    Hi Expert,
    We are working on a  upgradation tool in which i have to repace the obsolete function module "HELP_VALUES_GET_WITH_CHECKTAB
    " by "F4IF_FIELD_VALUE_REQUEST
    ". I am not sure about the functionalities of these function modules as i have never used it. Can anyone please help me  by providing some information abt  these FMs. Also i need to do the mapping of parameters of old and new function module. So please provide the details of mapping also. Any pointers on this will be highly appreciated.
    Thanks & Regards,
    P Sharma
    Moderator message : Duplicate post locked.  Continue with [Parameter mapping of FMs|Parameter mapping of FMs;.
    Edited by: Vinod Kumar on Jul 8, 2011 9:40 AM

    Hey Enivass,
    you can ckeck the input field "Account Number" whether it is numeric or Alphabet using *"Conversions ->Fixvalues"*
    Steps:
    1.  Extract first character of input using *" Text -> substring"*  -- start position 0 , char count 1 
    2. In Fix Value table you have to give following values:
    Dafault value : Alphabet
    key----
    value
    0----
    Number
    1----
    Number
    2----
    Number
    9----
    Number
    3.  Write logic IF "number" than  "Arithmatic -> FormatNumber   (0000000000)   -
    // for leading zeros
             ELSE
         concat with extra space        -
    Thanks

  • Receiver determination using substring in filename in file adapter

    Hi
    In PI 7.11 I would like to determine the receiver based on a substring in the filename in a file receiver adapter. I am planning on using a context object but am having trouble entering the correct code in the "Right Operand" field.
    I have tried selecting Context Object = Filename http://sap.com/xi/XI/System/File and entering this code in the Right Operand: "contains(substring('_4000_'))"   and an "=" in the as I am looking for a filename, that contains the substring "_4000_".
    I would like to avoid using an extra map and using Dynamic Configuration, as I thing this would be the most elegant way of fixing it
    Is there a way of referencing the context object if I chose xpath in stead of context object?
    MIkael

    Hi Mikael,
    I have the same scenario like you , could you please tell me about the condition how to you use XPath for Context Object
    I need to check the file name and according to that I have to put the file in the different directory.
    Source File: XXXX_IN_xxxx
                       XXXX_PH_xxxx
    I have to check the 7th and 8th Char of the file and according to that I have to place the file in the folder
    Target: DGE008\IN\Inbound
                DGE008PH\Inbound
    I don't know how to used the XPATH for file and specially how to use the substring in that.
    Could you please help.
    Thanks,

  • Java mapping or UDF required for a requirement!!!

    I am doing idoc to file scenario and stuck with the mapping in the following case. I think an UDF or JAVA mapping will do the bill. can some one help me in this regard please.
    IDoc message type, IDoc basic type, IDoc extension
    PAYEXT.PEXR2002.ZEXR2002.
    <u><b>conditions:</b></u>
    IF E1IDB02 BA-FIIKWAER = CNY
          then MID(E1EDKA1 BE-NAME1,12,11)
    IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)<=35
         then MID(E1EDKA1 BE-STRAS,1,35)
    IF E1IDB02 BA-FIIKWAER <> CNY and LEN(E1EDKA1 BE-NAME1)>35
         then MID(E1EDKA1 BE-NAME1,36,35)
    This will be mapped to "Info Line 1" field in file.
    Thanks,
    Kiran

    Hi Mr.Kiran,
    here is the code
    pass the following fields to Context UDF
    1.E1IDB02-FIIKWAER
    2.E1EDKA1-NAME1
    3.E1EDKA1-STRAS
      for(int k = 0;k<FIIKWAER.length;k++)
         if(FIIKWEAR[k].equalsIgnoreCase("CNY"))
            result.addValue(NAME1[k].substring(11,12));
         else if(!(FIIKWEAR[k].equalsIgnoreCase("CNY"))&&(NAME1[k].length() <= 35))
           result.addValue(STRAS[k].substring(1,35));
         else if(!(FIIKWEAR[k].equalsIgnoreCase("CNY"))&&(NAME1[k].length() > 35))
          result.addValue(NAME1[k].substring(35,36));

  • XSLT Mapping: how to add one day to TimeStamp

    Hello Experts,
    My requirement is to add one day to current timestamp. Used $TimeSent to get the currenttimestamp. In Expired field, the need to add one day
    say Created= 2011-03-30T20:29:13Z
           Expired = 2011-03-31T20:29:13Z
         <xsl:param name="TimeSent"/>
         <created><xsl:value-of select="$TimeSent"/></created>
         <expired>2011-03-31T20:29:13Z</expired>
    How to add one day to the current timestamp. I am new to XSLT mapping and need some help with the code.
    Thanks
    Shikha Jain
    Edited by: Jain Shikha on Mar 30, 2011 8:34 PM
    Edited by: Jain Shikha on Mar 30, 2011 8:36 PM

    Hello All,
    Thanks for your reply. i tried the function and the code is working when i am testing in stylus studio. But the same code gives error when i  tested the xslt mapping in PI (Error: TransformerConfigurationException triggered while loading XSLT mapping).
    $TimeSent function is working when code is tested in PI , but it doesnot give value in stylus studio. Also Current-dateTime() function is doesnot give value in PI but works in stylus studio. Is there any difference in the functions used in stylus studio and XSLT mapping in PI?
    Also if i remove the code used for function(to add one day to timestamp), and use constant value(2011-04-02T23:24:56.763Z)the code is working fine in PI. Please help me to find out where the code is going wrong when tested in PI.
    Below is the XSLT code i am using
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ds="http://xsltsl.org/date-time" xmlns:functx="http://www.functx.com" xmlns:xs="http://www.w3.org/2001/XMLSchema">
       <xsl:function name="functx:next-day" as="xs:date?">
          <xsl:param name="TimeSent" as="xs:anyAtomicType?"/>
          <xsl:sequence select="xs:date(current-date()) + xs:dayTimeDuration(&apos;P1D&apos;) "/>
       </xsl:function> 
    <xsl:template match="/">
          <xsl:param name="TimeSent"/>
          <soapenv:Envelope xmlns:olsa="http://www.skillsoft.com/services/olsa_v1_0/" xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
             <soapenv:Header>
                <wsse:Security soapenv:mustUnderstand="1" xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd">
                   <wsu:Timestamp wsu:Id="Timestamp-191900" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
            <wsu:Created>
                         <xsl:value-of select="$TimeSent"/>
               </wsu:Created>
    <wsu:Expires>
         <xsl:value-of select="concat(substring(functx:next-day($TimeSent) ,1,10) ,&apos;T&apos;, current-time())"/>                  </wsu:Expires>
                   </wsu:Timestamp>
                   <wsse:UsernameToken wsu:Id="UsernameToken-19030197" xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
                      <wsse:Username>ABC</wsse:Username>
                      <wsse:Password Type="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-username-token-profile-1.0#PasswordDigest">XYZ</wsse:Password>
                      <wsse:Nonce>erDTBNoUWv7GdHDaErrLwA==</wsse:Nonce>
                      <wsu:Created>2011-02-15T23:24:56.763Z</wsu:Created>
                   </wsse:UsernameToken>
                </wsse:Security>
             </soapenv:Header>
             <soapenv:Body>
                <olsa:GetMultiActionSignOnUrlRequest>
                   <olsa:customerId>ABC</olsa:customerId>
                   <olsa:userName>XYZ</olsa:userName>
                   <olsa:actionType>launch</olsa:actionType>
                   <olsa:assetId>222499_eng</olsa:assetId>
                   <olsa:groupCode>testgrp</olsa:groupCode>
                </olsa:GetMultiActionSignOnUrlRequest>
             </soapenv:Body>
          </soapenv:Envelope>
       </xsl:template>
    </xsl:stylesheet>
    Thanks
    Shikha Jain
    Edited by: Jain Shikha on Apr 2, 2011 9:51 PM

Maybe you are looking for