SOAP Response XSLT mapping issue

Hi,
Source XML.
<?xml version="1.0" encoding="UTF-8"?>
<ns0:Create__CompIntfc__APC_WORKER2_CIResponse xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI">
   <ns0:notification>y</ns0:notification>
   <ns0:detail>
      <ns0:keyinformation>
         <ns0:PERSON_ID/>
         <ns0:SUBMIT_DATE/>
         <ns0:ACTION/>
      </ns0:keyinformation>
      <ns0:messages>
         <ns0:type/>
         <ns0:messagesetnumber/>
         <ns0:messagenumber/>
         <ns0:messagetext/>
         <ns0:explaintext/>
      </ns0:messages>
   </ns0:detail>
</ns0:Create__CompIntfc__APC_WORKER2_CIResponse>
Target XML
<?xml version="1.0" encoding="UTF-8"?>
<ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions"><SUCCESS>y</SUCCESS></ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
XSLT Mapping
<?xml version="1.0" encoding="utf-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:ns1="http://authserv.apc.com/peoplesoft">
  <xsl:output method="xml" version="1.0" encoding="UTF-8" indent="yes" />
  <xsl:template match="/">
    <ns1:Z_HPA_357_PROVISION_USER_IMS.Response xmlns:ns1="urn:sap-com:document:sap:rfc:functions">
      <SUCCESS>
        <xsl:value-of select="soap:Create__CompIntfc__APC_WORKER2_CIResponse/a:notification" />
      </SUCCESS>
    </ns1:Z_HPA_357_PROVISION_USER_IMS.Response>
  </xsl:template>
</xsl:stylesheet>
Can somebody help to figure out the issue in higlighted area of XSLT mapping.
We just need to move "notification" value to "SUCCESS" value of RFC.
thanks.
santosh,.

Hi Santosh,
add the source namespace with a prefix:
xmlns:ns0="http://peoplesoft.com/APC_WORKER2_CI"
do it most simple generic without path
do not forget the prefix
ns0:
use xsl:value-of:
xsl:value-of select="//ns0:notification"
Regards,
Udo

Similar Messages

  • XSLT mapping issue in parent child relation

    Hi Guys,
    i have one XSLT mapping issue. Mapping scenario is from IDoc to file.
    IDoc structure is as below
    <ZLOIPRO1>
      <E1AFKOL>
         <A></A>
         <B></B>
         <E1RESBL>
             <MATNR>1</MATNR>
             <CHARG>1</CHARG>
             <ZSBL>
                 <MTART>ABC</MTART>
             </ZSB>
         </E1RESBL>
         <E1RESBL>
             <MATNR>2</MATNR>
             <CHARG>2</CHARG>
             <ZSBL>
                 <MTART>ZHA1</MTART>
             </ZSB>
         </E1RESBL>
         <E1RESBL>
             <MATNR>3</MATNR>
             <CHARG>3</CHARG>
             <ZSBL>
                 <MTART>ZHA1</MTART>
             </ZSB>
         </E1RESBL>
      </E1AFKOL>
    </ZLOIPRO1>
    As you can see 'E1RESBL' is repeatative. Now my issue is i need to select 'MATNR' and 'CHARG' from 'E1RESBL' segment when first occurance of 'ZSBL/MTART' with value 'ZHA1' appears. i.e. my output would be MATNR = 2 and CHARG = 2.
    I hope i am clear. Please let me know if any solution for this.

    Hi,
    Try this
    <xsl:if test="./ZSBL/MTART == 'ZHA1'">
    <xsl:for-each select="./E1RESBL">
      <MATNR>
       <xsl:value-of select="./MATNR"/>
      </MATNR>
      <BATCH>
       <xsl:value-of select="./CHARG"/>
      </BATCH>
    </xsl:for-each>
    </xsl:if>
    You might need to do some changes in the above.
    Thanks,
    Prakash

  • SOAP Response XSLT Transformation Error

    I am doing a webservice call and trying to transform the SOAP Response using XSLT.
    I am getting the following error when the command CALL TRANSFORMATION Executes.
    The element abap was expected for the XML-ABAP transformation
    Please let me know if anyone ave received this error before and how did you solve it.
    Regards
    Sudhir Atluru

    Hi Petra
    for this Error  com.sap.aii.af.ra.ms.api.ConfigException
    check this Link
    experts needed! com.sap.aii.af.ra.ms.api.ConfigException
    http://help.sap.com/saphelp_nw04s/helpdata/en/78/20244134a56532e10000000a1550b0/frameset.htm
    also refer SAP Note 978606
    Regards
    Abhishek

  • SOAP Header XSLT mapping

    Hi,
    I am working on Proxy to SOAP synchronous scenario.  How to create SOAP header message in XSLT mapping...I am trying but no sauces becz receiver side SOAP header and Body in different message types please see below.
    Header part is message type 1
    <CredentialsHeader xmlns="http://reuters.com/datascopeselect/ExtractionService/v1/">
          <Username>string</Username>
          <Password>string</Password>
          <AuthenticationToken>string</AuthenticationToken>
        </CredentialsHeader>
    Body part is
    message type 2
    <soap:Body>
        <Extract xmlns="http://reuters.com/datascopeselect/ExtractionService/v1/">
          <request>
            <OutputFields>
              <string>string</string>
              <string>string</string>
            </OutputFields>
          </request>
        </Extract>
      </soap:Body>
    </soap:Envelope>
    But source is single.. I try ed multi mapping but synchronous scenario it will not working. 
    I am trying to generate both message types as single message type in XSLT mapping target side and will give service interface as dummy in ESR.
    Please guide how to generate 2 message types as single message type in XSLT mapping...
    Thanks,
    Venkat

    Hi Venkat,
    I suggest to produce a complete SOAP message in message mapping. Import the SOAP XSD from [http://schemas.xmlsoap.org/soap/envelope/] as external definition and use it as target message in message mapping. You need at 2 mapping programs in order to produce the message. The first mapping creates header and body. In the second mapping use "Return as XML" to map the header and body nodes to the SOAP envelope.
    In the SOAP receiver communication channel, you need to activate the parameter "Do Not Use SOAP Envelope", see [Configuring the Receiver SOAP Adapter|http://help.sap.com/saphelp_nw04/helpdata/en/29/5bd93f130f9215e10000000a155106/content.htm].
    Regards, Martin

  • Synchronous RFC -- SOAP Scenario: problem with SOAP Response/Fault Mapping

    Hi,
    I've a synchronous RFC --> PI --> SOAP Scenario. The problem is that the message structure of the sending RFC doesn't match the Webservice Structure.
    The (SAP standard) RFC has just a Request / Response message structure. Part of the Response Message structure is a exception structure.
    The Webservice has a Request / Response message structure and in case of an error I get a SOAP:Fault.
    Problem now is that I cannot configure that scenario without usage of BPM as I will have to map SOAP:Response or SOAP:Fault to the RFC Response structure.
    Has anybody another idea to do that synchronous scenario (with usage of message mapping) without BPM?
    BR
    Holger

    1)
    you maus define 3 mapping.
    1)request
    2)response
    3)Fault
    in Interface mapping define at response boths (2-3) mapping. its clear??
    2)
    otherwise sometjhing is not clear, why do you want fault?? why dont you  get only response message. we implement this kind of response:
    <response_MT>
    <ID> (error ID)
    <system> (target system) 
    <error> (Error Description)
    </response>
    by this way fault message is not needed. but if you must have it just follow the top of message else, propose second.
    Thanks
    Rodrigo
    Thanks
    Rodrigo
    Edited by: Rodrigo Pertierra on Feb 25, 2008 11:52 AM

  • XSLT Mapping issue

    Hello Friends,
    I have got one scenario in which XSLT mapping is used.The third party file is mapped to IDoc INVOIC01.After the development of the mapping code,I got the result as below in the XML Spy
    <E1EDP01 SEGMENT="1">* first segment
                   <POSEX>0</POSEX>
                   <E1EDP02 SEGMENT="1"> Subsegment1
                        <QUALF>001</QUALF>
                   </E1EDP02>
                   <E1EDP04 SEGMENT="1"> Subsegment2
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>6.660</MWSBT>
                   </E1EDP04>
                   <E1EDP04 SEGMENT="1">Subsegment2
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>13.330</MWSBT>
                   </E1EDP04>
              </E1EDP01>
              <E1EDP01 SEGMENT="1">
                   <POSEX>0</POSEX>
                   <E1EDP02 SEGMENT="1">
                        <QUALF>001</QUALF>
                   </E1EDP02>
                   <E1EDP04 SEGMENT="1">
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>6.660</MWSBT>
                   </E1EDP04>
                   <E1EDP04 SEGMENT="1">
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>13.330</MWSBT>
                   </E1EDP04>
              </E1EDP01>
    But the expected result is as below:
                                <E1EDP01 SEGMENT="1">
                   <POSEX>0</POSEX>
                   <E1EDP02 SEGMENT="1">
                        <QUALF>001</QUALF>
                   </E1EDP02>
                   <E1EDP04 SEGMENT="1">
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>6.660</MWSBT>
                   </E1EDP04>
              </E1EDP01>
              <E1EDP01 SEGMENT="1">
                   <POSEX>0</POSEX>
                   <E1EDP02 SEGMENT="1">
                        <QUALF>001</QUALF>
                   </E1EDP02>
                   <E1EDP04 SEGMENT="1">
                        <MWSKZ></MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>13.330</MWSBT>
                   </E1EDP04>
              </E1EDP01>
    ie For each E1EDP01 segment,there should be only one E1EDP04 segment.
    Please help me in this regard how to code the xslt map for this...
    Thank you
    Sam
    Edited by: Guest on Apr 4, 2008 1:00 PM

    Hello Ashish,
    Thanks for your reply.
    The third party system is th sender and sends XSD file which contains header detail (with multiple tax details in it) and multiple line Item details (which contains one tax details per lineitem).
    ie if there are two line items then each line item should have one tax details (1st tax detail in header should match with 1st tax details of linitem, and 2nd should match with second line item tax details..etc)
    <?xml version="1.0" encoding="UTF-8"?>
    <INVOIC01 xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
         <IDOC BEGIN="1">
              <E1EDK04 SEGMENT="1">
                   <MWSKZ>VAT</MWSKZ>
                   <MSATZ>22.00</MSATZ>
                   <MWSBT>6.660</MWSBT>
              </E1EDK04>
              <E1EDK04 SEGMENT="1">
                   <MWSKZ>VAT</MWSKZ>
                   <MSATZ>22.00</MSATZ>
                   <MWSBT>13.330</MWSBT>
              </E1EDK04>
              <E1EDP01 SEGMENT="1">
                   <POSEX>0</POSEX>
                   <E1EDP04 SEGMENT="1">
                        <MWSKZ>VAT</MWSKZ>
                        <MSATZ>22.00</MSATZ>
                        <MWSBT>6.660</MWSBT>
                   </E1EDP04>
              </E1EDP01>
              <E1EDP01 SEGMENT="1">
                   <POSEX>0</POSEX>
                   <E1EDP04 SEGMENT="1">
                                   <MWSKZ>VAT</MWSKZ>
                                   <MSATZ>22.00</MSATZ>
                                   <MWSBT>13.330</MWSBT>
                   </E1EDP04>
              </E1EDP01>
         </IDOC>
    </INVOIC01>
    I thinks this is like a copying th header segment details in the item details.
    Please help me in ths regard
    Thank you
    Sam

  • XSLT Mapping issue. If condition.

    Hi,
    A and B are in Source Structure.   "C" is in Target Structure.
    If "A"  value has between 5001 and 6999 then pass "B" to C.
    How to do this in XSLT map?
    Thanks
    Deepthi

    Code:
    - <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    - <xsl:for-each select="POS/Detail">
    - <xsl:if test="(POS/Detail/FieldA > 5000) and (POS/Detail/FieldA < 7000)">
    - <xsl:call-template name="insert_E1WPF02">
      <xsl:with-param name="ReferenceNo" />
      <xsl:with-param name="ItemNo" />
      <xsl:with-param name="Amount" />
      </xsl:call-template>
      </xsl:if>
      </xsl:for-each>
    - <xsl:template name="insert_E1WPF02" match="/">
      <xsl:param name="ItemNo" />
      <xsl:param name="Amount" />
      <xsl:param name="RefernceNo" select="POS/Detail/FieldB" />
    - <ZUONR>
      <xsl:value-of select="$ReferenceNo" />
      </ZUONR>
    - <POSNR>
      <xsl:value-of select="$ItemNo" />
      </POSNR>
    - <WRBTR>
      <xsl:value-of select="$Ammount" />
      </WRBTR>
      </xsl:template>
      </xsl:stylesheet>
    I Cannot use  <xsl:template name="insert_E1WPF02> twice because it is creating 2 E1WPF02 Segments in Idoc for each transaction which is not correct.

  • Xslt map issue

    Hi ,
    any one help me , i need add one text to map  for each output .
     as per need add sample, befor generating output.
    as per  script my generate wrong out put 
    <xsl:template name ="tText">
        <xsl:param name="paramone"/>
        <xsl:variable name="text2" select="$paramone"/>
        <xsl:if test="$paramone !=''">
          <xsl:element name="ghf" >
            <xsl:value-of select="concat('sample',$text2)"/>
          </xsl:element>
        </xsl:if>
    input file:
    <F>
      <S>
            <a >sample1</a>
             <a >sample2</a>
     </s>
    </F>
     output:
    i want output like :      sample 
                                         sample1
                                         sample2
    wrong ouput :                       sample  sample1
                                                  sample  sample2

    Your sample input is not valid XML! The closing tag </s> does not match the opening tag <S>. 
    If you use the following input:
    <F>
    <S>
    <a>sample1</a>
    <a>sample2</a>
    </S>
    </F>
    And apply the following custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <xsl:element name="{.}" />
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    You get the following output:
    <sample>
    <sample1 />
    <sample2 />
    </sample>
    If however you want this output (I'm not sure by your description):
    <sample>
    <ghf>sample1</ghf>
    <ghf>sample2</ghf>
    </sample>
    You can use this custom XSLT:
    <?xml version="1.0" encoding="utf-16"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:var="http://schemas.microsoft.com/BizTalk/2003/var" xmlns:int="http://atea.com/schemas/v10" exclude-result-prefixes="xsl int var" version="1.0">
    <xsl:output omit-xml-declaration="yes" method="xml" version="1.0" />
    <xsl:template match="F">
    <sample>
    <xsl:for-each select="S/a">
    <ghf>
    <xsl:value-of select="." />
    </ghf>
    </xsl:for-each>
    </sample>
    </xsl:template>
    </xsl:stylesheet>
    Morten la Cour

  • Error while trying to load the xslt mapping

    Hi,
    while testing the xslt mapping, the following error is encountered:
    "TransformerConfigurationException occurred when loading MAP.xsl; details: Could not compile stylesheet"
    Please help me in the resolving this.
    Regards,
    Meenakshi

    Hi Meenakshi,
      Select XMLTOOLKIT option in operation mapping,and execute your XSLT Mapping.....
    Check this thread for more help...
    XSLT mapping issue
    Regds,
    Pinangshuk.

  • XSLT mapping with SOAP Envelope

    Hi
    I'm trying map SOAP response (with Envelope) to pick two values into the target. Here's the data:
    Source (with data):
    <?xml version="1.0"?>
    <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
         <soap:Body>
              <EnumerateResponse xmlns="http://www.approva.net/BizRights/Services">
                   <EnumerateResult>
                        <TaskID>-1</TaskID>
                        <Result>FinishedSuccessfully</Result>
                        <StatusInfo/>
                   </EnumerateResult>
                   <pageObject>
                        <startIndex>0</startIndex>
                        <pageSize>10</pageSize>
                        <totalRows>1</totalRows>
                        <moreRecords>false</moreRecords>
                        <rowsReturned>1</rowsReturned>
                   </pageObject>
                   <xmlObjects>(large string of valid data in here)</xmlObjects>
              </EnumerateResponse>
         </soap:Body>
    </soap:Envelope>
    Target:
    Only need Result and xmlObjects into target.
    Mapping:
    <?xml version="1.0"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:template match="/">
              <poll_status_resp_r3>
                   <Result>
                        <xsl:value-of select="EnumerateResponse/Result"/>
                   </Result>
                   <xmlObjects>
                        <xsl:value-of select="EnumerateResponse/xmlObjects"/>
                   </xmlObjects>
              </poll_status_resp_r3>
         </xsl:template>
    </xsl:stylesheet>
    The values are not getting picked-up into the target.
    What am I missing here?
    Any help is appreciated.

    Hi,
    Save the following XSL file as RSpace.xsl
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
      xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="xml" indent="no"/>
      <xsl:template match="/|comment()|processing-instruction()">
        <xsl:copy>
          <xsl:apply-templates/>
        </xsl:copy>
      </xsl:template>
      <xsl:template match="*">
        <xsl:element name="{local-name()}">
          <xsl:apply-templates select="@*|node()"/>
        </xsl:element>
      </xsl:template>
      <xsl:template match="@*">
        <xsl:attribute name="{local-name()}">
          <xsl:value-of select="."/>
        </xsl:attribute>
      </xsl:template>
    </xsl:stylesheet>
    Zip it and import it under Imported Archive.
    In the interface mapping click "+" to add one more mapping.
    Use this XSL as first mapping and your XSL mapping as the second mapping.
    In your XSLT mapping you can use the XPath as
    "Envelope/Body/EnumerateResponse/Result".
    I mean remove the namespace and use the XPATH.
    Thanks,
    Prakash

  • MIAL RECIEVER CC -- ISSUE USED XSLT MAPPING

    Hi All,
    I have a Scenario   in which  IDOC  is a sender and Mail Adaptert  is reciever .The Xi is supposed to sent the Email notification to the client . Mail adapter is SMTP configured correctly ,Reciever  Mail CC is up and running but Error  is :Delivery of the message to the application using connection Mail_http://sap.com/xi/XI/System failed, due to: com.sap.aii.af.ra.ms.api.RecoverableException: java.lang.StringIndexOutOfBoundsException: String index out of range: 0
    The Mapping here is used is XSLT mapping and in SXMB_MONITOR , Error shown is :
    SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>Application</SAP:Category>
      <SAP:Code area="MAPPING">TRANSFORMER_CONF_EX</SAP:Code>
    Could you plesae help  me this  Issue asap .
    Thanks,
    Vara

    Hi Abhi ,
    I checked in ATOVA SPY XML Check , it seems to be the issue in XSLT mapping .
    Part of XSLT mapping  Error line:
    when test="//IDOC/EDI_DC40/RCVLAD = '3157411730014'">   --There was a single  qoute missing
    Tested in Atova with payload , it worked
    Thanks for your  supprt as well.
    Best Regards,
    Vara

  • SOAP fault - How to log error in response message map

    Hi,
    I have a scenario ABAP Proxy <-> XI <-> SOAP.
    Occassionally there is an issue with communication to the destination system and an HTTP 500 Error is returned. I assume this is due to a system related error and it is returned as a SOAP Fault as opposed to a SOAP response with payload.
    How do I get this "HTTP-500" error into my message map to return to the calling system ?
    I have looked at Fault Messages but need to know if these are relevant for the SOAP Adapter and how they can be utilised ?
    Thanks for any help.
    Kind regards
    Colin.

    SOAP fault message not in correcto format to allow an application error to be caught.

  • Issue in tranforming Idoc structure using XSLT mapping

    Hi,
    I am working on the XSLT Mapping to transform the IDoc xml to the desired format.
    Source structure single Idoc:
    EDI_DC40 record
    E1EDKxx records
    E1EDPxx records
    E1EDSxx records
    suppose I have 4 E1EDP01 records, of which 2 are Original and next two are corresponding Correction E1EDP01 records.
    I want the target Idoc to be:
    EDI_DC40 record
    E1EDKxx records and for (E1EDK14/ORGID = G2O)
    E1EDPxx records  (1st Original E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2)
    E1EDPxx records  (1st corresponding correction E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2O)
    E1EDPxx records  (2nd Original E1EDP01 segment)
    E1EDSxx records
    E1EDKxx records for (E1EDK14/ORGID = G2)
    E1EDPxx records  (2nd Corresponding correction E1EDP01segment)
    E1EDSxx records
    so correction segments follows original segments.
    All the E1EDSxx records are identical. remaining all the other segments are Idential except the above changes.
    correlate original and correction E1EDP01 segments is through POSEX of Original = HIPOS of Correction..
    bold segments represents Original records
    Italic segments represents correction records
    How to achieve the above scenario. I am finding issue in generating and correlating the E1EDP01 segments using <key> element. and changing the vales in E1EDK14
    Also does XSLT supports Dynamic Configuration for File Name ?
    Regards
    Edited by: Varun Reddy on Jul 7, 2011 12:44 PM

    Also does XSLT supports Dynamic Configuration for File Name ?=   Yes.
    refer - http://help.sap.com/saphelp_nwpi71/helpdata/en/43/03fe1bdc7821ade10000000a1553f6/content.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/55/7ef3003fc411d6b1f700508b5d5211/content.htm

  • Issue with XSLT Mapping

    Hi Team,
    I have one requirements which I am explaining below:
    Source structure should be:
    <?xml version="1.0" encoding="UTF-8"?>
    <ns0:MT_Student xmlns:ns0="urn:bp:xi:hr:edm:test:100">
       <Data>
          <FName>
          <LName>     
          <Marks>                            Here Data fiels is 0......Unbounded.
                    <Maths>
                    <Science>        
    </ns0:MT_Student>
    and Target structure must be like below:
    <MT_Student_Result>
    <Data>
          <Name>                         Here data field is 0......Unbounded.
          <Marks>
                   <Total_Marks>
    In the target structure Filed "Name" is obtained by concating "FName" and "LName" in the source structure
    and the field "Total_Marks" is the sum of field "Maths" and "Science" in the source structure.
    I have used XSLT mapping to obtain this.I have got the value of the "Name" field in the Target structure as required but I am not getting the value of the field "Total_Marks" in the target structure as required.Every time I am putting any value the result is comming as "NaN" as a value of the field "Total_Marks".Can you explain what is the issue?I am providing the code that I have done
    <?xml version="1.0" encoding="UTF-8"?>
    <xsl:transform version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:sap="http://www.sap.com/sapxsl" xmlns:fo="urn:bp:xi:hr:edm:test:100" xmlns:ns0="urn:bp:xi:hr:edm:test:100">
    <xsl:template match="/">
    <MT_Student_Result>
    <xsl:for-each select="ns0:MT_Student/Data">
    <xsl:variable name="name" select="FName"/>
    <xsl:variable name="surname" select="LName"/>
    <Data>
    <Name>
    <xsl:value-of select="concat($name,'',$surname)"/>
    </Name>
    <Marks>
    <Total_Marks>
    <xsl:variable name="maths" select="ns0:MT_Student/Data/Marks/Maths"/>
    <xsl:variable name="science" select="ns0:MT_Student/Data/Marks/Science"/>
    <xsl:value-of select="($maths+$science)" />
    </Total_Marks>
    </Marks>
    </Data>
    </xsl:for-each>
    </MT_Student_Result>
    </xsl:template>
    </xsl:transform>
    Edited by: ATANU1 on Mar 17, 2011 1:40 PM

    Hei,
    you have to add the namespace prefix to each element of the path (and of course: check out if the hierarchy is matching)
    ns0:MT_Student/ns0:Data/ns0:Marks/ns0:Science
    Regards,
    Udo

  • JAVA/ XSLT Mapping to Create a SOAP Envelope

    Hello,
    I have a File to SOAP scenario and it requires the SOAP message with a custom SOAP envelope. I have searched SDN and could only find that SOAP envelope can be created using a JAVA or XSLT mapping. However, I could not find any blog/ article which will help me understand, with an example, how this is actually coded (creating of a custom SOAP envelope).
    Can anyone please point me to a valid blog/ article/ wiki which describes the procedure?
    Thanks,
    Pankaj.
    P.S. Please no spamming of post with links on SOAP Envelope; I have already searched on SDN

    Hello,
    Here is a wiki using PI 7.1
    https://wiki.sdn.sap.com/wiki/display/XI/SampleJAVAMappingcodeusingPI7.1+API
    If you want to create a SOAP Envelope, comment out the codes
      private static final DynamicConfigurationKey KEY_FILENAME =
             DynamicConfigurationKey.create("http://sap.com/xi/XI/System/File","FileName");
    String inParam = arg0.getInputParameters().getString("PARAM_IN1");
         getTrace().addInfo("Input Parameter: " +inParam);
         int offset = inData.indexOf(inParam);
         //7. Reader Message ID from Message Header
         InputHeader messageHeader = arg0.getInputHeader();
         String messageId = messageHeader.getMessageId();
         //8. A DynamicConfiguration is a map containing adapter specific message attributes.
         // It associates DynamicConfigurationKeys with string values. The DynamicConfiguration object is obtained using
         // method getDynamicConfiguration()of class com.sap.aii.mapping.api.TransformationInput;
         DynamicConfiguration conf = arg0.getDynamicConfiguration();
         conf.put(KEY_FILENAME, "This Test file is set by JAVA Mapping");
         String outData = "";if(offset > 0){
         int offset1 = inData.indexOf(">", offset);
         String StartString =inData.substring(0,offset1);
         String DocumentNameSpace = " xmlns=\"urn:iso:std:iso:20022:tech:xsd:pain.002.001.02\"";
         String RemainingString = inData.substring(offset1);
    lastly, instead of using
    outData = StartString + DocumentNameSpace + RemainingString;
    replace it with something like this
    String outData = "";
    outData = "<soap:Envelope xmlns:soap=\"http://www.w3.org/2003/05/soap-envelope\" xmlns:tem=\"http://yournamespace/\"><soap:Header/><soap:Body>"+inData.substring(inData.indexOf("?>")+2)+"</soap:Body></soap:Envelope>";
    Hope this helps,
    Mark

Maybe you are looking for

  • Camera Raw

    Dear Sirs, My camera raw from the Adobe Bridge CS6 does not work. What should I do ?

  • Inability of the staff to deal with the problem in the phone

    I bought the experia z1 in February 2014 . The phone was supposed to be waterproof.  I used it while standing on a rock againt which waves striked and their were splashes of water. I was cautious that the guard of the charging port was closed.  After

  • 64-bit libC.so.5 in Solaris 9

    Any alternative for the 64-bit libC.so.5 in Solaris 9? I could not find in in the directory /usr/lib/sparcv9. Or any patch or new packages should I install? Thanks, Qinghuai

  • Error message in LSMW step 7

    Hi Folks, I'm creating a LSMW for Document Info. Record and in step 7 Specify Files a error message appears 'Logical path has not been specified'. In the forum the solution provided didn't help me; the solution provided was to assign a Logical path L

  • Fill matrix with query

    Hi, I have a query that I want to display in a matrix. The query is based on the tables: OINV, INV1, OITM, OCRD. I would like to know what is the best way to bind this query to a matrix? Should I create a recordset with the query and iterate it and f