Sample input XML

Hi,
   Can somebody point me to some simple sample xml. I am trying out java Mapping.
Thankx,

<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_Send xmlns:ns0="urn:FileToFile">
   <No>123</No>
</ns0:MT_Send>
It could be any structure as per ur requirement
Regards,
Prateek

Similar Messages

  • Can biztalk accept input xml with extra tags in it? if yes, How?

    I have the following sample input xml:
    <Students Class='xyz'>
    <Student count='0'>
    <FName value='Alex'/>
    <LName value='James'>
    <Age value='22'>
    <DOB value='01/01/2001'>
    <ID value='123'>
    </Student>
    <Student count='1'>
    <FName value='Victor'/>
    <LName value='Brown'>
    <Age value='23'>
    <DOB value='02/12/2000'>
    <ID value='541'>
    </Student>
    </Students>
    And my input schema accepts the xml which is similar to the above xml except it does not have <Age> and <DOB> tags in it. which means that the <Age> and <DOB> tags are extra tags in my input xml which is not
    required by the input schema.
    Question: is it possible in biztalk to accept the above xml as it is (i.e. along with <Age> and <DOB> tags) to populate the schema which accepts all xml except <Age> and <DOB> tags?
    Can it just pick up the required tags and populate the input schema?
    Thanks
    manibest

    Automatic change in the published schema on the basis of a received messages is still science fiction :)
    There is still a way for you to handle these messages. If in the receive pipeline you do not enforce schema validation, in your orchestration you use bound receive ports [not direct ports] and receive the message as an XMLDocument, you should still be able
    to receive/process the document.
    The ability of an predefined Schema to accept additional data elements is called an OPEN CONTENT Model [refer
    http://msdn.microsoft.com/en-us/library/aa468557.aspx] and you can create a schema to support such things if that is how you expect messages. So in your schema you define elements of type
    "xsd:any" to accept content changes even with schema validation turned on.
    Regards.

  • Generating Input XML

    Hi,
    I have a schema and a xsl file.Is there any way to generate the input xml file using the same?
    find my sample xsl file below :
    <?xml version="1.0" encoding="iso-8859-1"?>
    <!-- � 2004-2005 Pantero Corporation. All rights reserved. -->
    <!-- Exporting Pantero maps to XSLT file:                  -->
    <!-- Source Type: com.cingular.ngLimitedXmlSchemaDataSource.Contact -->
    <!-- Target Type: com.cingular.cingularCommon.Contact -->
    <xsl:stylesheet version="1.1"
         xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
         <xsl:output method="xml" encoding="UTF-8"/>
         <xsl:template match="/Contact">
                   <xsl:element name="Contact" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                   <xsl:element name="BusinessPhone" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./businessPhone"/>
                   </xsl:element>
                   <xsl:element name="City" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./city"/>
                   </xsl:element>
                   <xsl:element name="ContactType" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./contactType"/>
                   </xsl:element>
                   <xsl:element name="EntityName" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./name"/>
                   </xsl:element>
                   <xsl:element name="StateAbbreviation" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./state"/>
                   </xsl:element>
              <xsl:comment> concatWithDelimiter(AddressLineOne, AddressLineTwo, ", ") TO StreetAddress1 </xsl:comment>
                   <xsl:element name="TollFreePhone" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./tollFreePhone"/>
                   </xsl:element>
                   <xsl:element name="Zip" namespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
                             <xsl:value-of select="./zip"/>
                   </xsl:element>
                   </xsl:element>
         </xsl:template>
    </xsl:stylesheet>here is the xsd :
    i am using CONTACT in this xsd....
    <?xml version="1.0" encoding="utf-8"?>
    <!--  CONFIDENTIAL LICENSED MATERIAL
          � 2004-2005 Pantero Corporation. All rights reserved.     -->
    <!-- Exporter Configuration Options:
         Include all the packages in the selected schema.
         Complex Types Only - false               
         Include Required Rules - true               
         Include Reverse Relationships - false     
         Export with Weak Typing - false-->
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:tns="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd"
    targetNamespace="http://www.CingularCommonXmlSchema.com/CingularCommonXmlSchema.xsd">
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Battery-->
       <xs:element name="Battery" type="tns:Battery"/>
       <xs:complexType name="Battery">
          <xs:sequence>
             <xs:element name="HoursAtFullCapacity" minOccurs="0" type="xs:int"/>
             <xs:element name="InstallationDate" minOccurs="0" type="xs:date"/>
             <xs:element name="Manufacturer" minOccurs="0" type="xs:string"/>
             <xs:element name="Model" minOccurs="0" type="xs:string"/>
             <xs:element name="NumberOfBatteries" minOccurs="0" type="xs:int"/>
             <xs:element name="NumberOfCells" minOccurs="0" type="xs:int"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Contact-->
       <xs:element name="Contact" type="tns:Contact"/>
       <xs:complexType name="Contact">
          <xs:sequence>
             <xs:element name="BusinessPhone" minOccurs="0" type="xs:string"/>
             <xs:element name="City" minOccurs="0" type="xs:string"/>
             <xs:element name="ContactType" minOccurs="0" type="xs:string"/>
             <xs:element name="EntityName" minOccurs="0" type="xs:string"/>
             <xs:element name="StateAbbreviation" minOccurs="0" type="xs:string"/>
             <xs:element name="StreetAddress1" minOccurs="0" type="xs:string"/>
             <xs:element name="TollFreePhone" minOccurs="0" type="xs:string"/>
             <xs:element name="Zip" minOccurs="0" type="xs:string"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Generator-->
       <xs:element name="Generator" type="tns:Generator"/>
       <xs:complexType name="Generator">
          <xs:sequence>
             <xs:element name="Manufacturer" minOccurs="0" type="xs:string"/>
             <xs:element name="Rating" minOccurs="0" type="xs:string"/>
             <xs:element name="Receptacle" minOccurs="0" type="xs:string"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.GetContactByKeyRequest-->
       <xs:element name="GetContactByKeyRequest" type="tns:GetContactByKeyRequest"/>
       <xs:complexType name="GetContactByKeyRequest">
          <xs:sequence>
             <xs:element name="contactId" minOccurs="0" type="xs:string"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.GetContactByKeyResponse-->
       <xs:element name="GetContactByKeyResponse" type="tns:GetContactByKeyResponse"/>
       <xs:complexType name="GetContactByKeyResponse">
          <xs:sequence>
             <xs:element name="Contact" type="tns:Contact" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Location-->
       <xs:element name="Location" type="tns:Location"/>
       <xs:complexType name="Location">
          <xs:sequence>
             <xs:element name="AlarmResponsibility" minOccurs="0" type="xs:string"/>
             <xs:element name="CellSiteId" minOccurs="0" type="xs:int"/>
             <xs:element name="City" minOccurs="0" type="xs:string"/>
             <xs:element name="CLLI" minOccurs="0" type="xs:string"/>
             <xs:element name="ConstructionDate" minOccurs="0" type="xs:date"/>
             <xs:element name="Country" minOccurs="0" type="xs:string"/>
             <xs:element name="County" minOccurs="0" type="xs:string"/>
             <xs:element name="CTSEntryId" minOccurs="0" type="xs:string"/>
             <xs:element name="CTSLocationId" minOccurs="0" type="xs:string"/>
             <xs:element name="Directions" minOccurs="0" type="xs:string"/>
             <xs:element name="FCCASRNumber" minOccurs="0" type="xs:string"/>
             <xs:element name="FinancialLocation" minOccurs="0" type="xs:string"/>
             <xs:element name="Floor" minOccurs="0" type="xs:string"/>
             <xs:element name="Height" minOccurs="0" type="xs:int"/>
             <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
             <xs:element name="IsCingularOwned" minOccurs="0" type="xs:int"/>
             <xs:element name="IsLighted" minOccurs="0" type="xs:int"/>
             <xs:element name="Latitude" minOccurs="0" type="xs:double"/>
             <xs:element name="LocationId" minOccurs="0" type="xs:int"/>
             <xs:element name="LocationType" minOccurs="0" type="xs:string"/>
             <xs:element name="Longitude" minOccurs="0" type="xs:double"/>
             <xs:element name="MeanHeightAboveSeaLevel" minOccurs="0" type="xs:int"/>
             <xs:element name="MorphologyType" minOccurs="0" type="xs:string"/>
             <xs:element name="PhoneNumber" minOccurs="0" type="xs:string"/>
             <xs:element name="Room" minOccurs="0" type="xs:string"/>
             <xs:element name="SiteAccessDescription" minOccurs="0" type="xs:string"/>
             <xs:element name="StateAbbreviation" minOccurs="0" type="xs:string"/>
             <xs:element name="StreetAddress1" minOccurs="0" type="xs:string"/>
             <xs:element name="StreetAddress2" minOccurs="0" type="xs:string"/>
             <xs:element name="SubleaseRights" minOccurs="0" type="xs:int"/>
             <xs:element name="UsId" minOccurs="0" type="xs:string"/>
             <xs:element name="XNGAltSiteId" minOccurs="0" type="xs:string"/>
             <xs:element name="Zip" minOccurs="0" type="xs:string"/>
             <xs:element name="ZipPLUS4" minOccurs="0" type="xs:string"/>
             <xs:element name="Contact" type="tns:Contact" minOccurs="0" maxOccurs="unbounded"/>
             <xs:element name="Market" type="tns:Market" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Market-->
       <xs:element name="Market" type="tns:Market"/>
       <xs:complexType name="Market">
          <xs:sequence>
             <xs:element name="Market" minOccurs="0" type="xs:string"/>
             <xs:element name="MarketCluster" minOccurs="0" type="xs:string"/>
             <xs:element name="Region" minOccurs="0" type="xs:string"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Project-->
       <xs:element name="Project" type="tns:Project"/>
       <xs:complexType name="Project">
          <xs:sequence>
             <xs:element name="M145ActualDate" minOccurs="0" type="xs:date"/>
             <xs:element name="M145ForecastDate" minOccurs="0" type="xs:date"/>
             <xs:element name="M150ActualDate" minOccurs="0" type="xs:date"/>
             <xs:element name="M150ForecastDate" minOccurs="0" type="xs:date"/>
             <xs:element name="M80ActualDate" minOccurs="0" type="xs:date"/>
             <xs:element name="M80ForecastDate" minOccurs="0" type="xs:date"/>
             <xs:element name="ProjectNumber" minOccurs="0" type="xs:string"/>
             <xs:element name="SearchringName" minOccurs="0" type="xs:string"/>
             <xs:element name="Location" type="tns:Location" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.RBS-->
       <xs:element name="RBS" type="tns:RBS"/>
       <xs:complexType name="RBS">
          <xs:sequence>
             <xs:element name="AffectedManagedObject" minOccurs="0" type="xs:string"/>
             <xs:element name="CTSSiteId" minOccurs="0" type="xs:string"/>
             <xs:element name="BaseStationType" minOccurs="0" type="xs:string"/>
             <xs:element name="BeastBSCName" minOccurs="0" type="xs:string"/>
             <xs:element name="BeastCellId" minOccurs="0" type="xs:string"/>
             <xs:element name="CellNetwork" minOccurs="0" type="xs:string"/>
             <xs:element name="CLLI3" minOccurs="0" type="xs:string"/>
             <xs:element name="CTSCellId" minOccurs="0" type="xs:string"/>
             <xs:element name="CTSSwitchName" minOccurs="0" type="xs:string"/>
             <xs:element name="DisasterRecoveryType" minOccurs="0" type="xs:string"/>
             <xs:element name="EquipmentType" minOccurs="0" type="xs:string"/>
             <xs:element name="Frequency" minOccurs="0" type="xs:string"/>
             <xs:element name="IntegrationActualCompletionDate" minOccurs="0" type="xs:date"/>
             <xs:element name="IntegrationDirectionType" minOccurs="0" type="xs:string"/>
             <xs:element name="IntegrationPlannedCompletionDate" minOccurs="0" type="xs:date"/>
             <xs:element name="IntegrationStartDate" minOccurs="0" type="xs:date"/>
             <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
             <xs:element name="Name" minOccurs="0" type="xs:string"/>
             <xs:element name="OffAirDate" minOccurs="0" type="xs:date"/>
             <xs:element name="OnAirPublicDate" minOccurs="0" type="xs:date"/>
             <xs:element name="OPSDistrict" minOccurs="0" type="xs:string"/>
             <xs:element name="OPSZone" minOccurs="0" type="xs:string"/>
             <xs:element name="PromisSiteId" minOccurs="0" type="xs:string"/>
             <xs:element name="RBSId" minOccurs="0" type="xs:int"/>
             <xs:element name="RFDistrict" minOccurs="0" type="xs:string"/>
             <xs:element name="SiteType" minOccurs="0" type="xs:string"/>
             <xs:element name="TechnologyDefinitionType" minOccurs="0" type="xs:string"/>
             <xs:element name="TechnologyType" minOccurs="0" type="xs:string"/>
             <xs:element name="TeleserviceType" minOccurs="0" type="xs:string"/>
             <xs:element name="UsId" minOccurs="0" type="xs:string"/>
             <xs:element name="Vendor" minOccurs="0" type="xs:string"/>
             <xs:element name="Location" type="tns:Location" minOccurs="0"/>
             <xs:element name="Market" type="tns:Market" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Sector-->
       <xs:element name="Sector" type="tns:Sector"/>
       <xs:complexType name="Sector">
          <xs:sequence>
             <xs:element name="AntennaAverageCellRadius" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaBeamWidth" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaBearing" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaEffectiveRadiatedPower" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaEffectiveRadiatedPowerUOM" minOccurs="0" type="xs:string"/>
             <xs:element name="AntennaForwardPower" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaRadiationCenter" minOccurs="0" type="xs:double"/>
             <xs:element name="AntennaTiltDegrees" minOccurs="0" type="xs:int"/>
             <xs:element name="AntennaTiltType" minOccurs="0" type="xs:string"/>
             <xs:element name="AntennaType" minOccurs="0" type="xs:string"/>
             <xs:element name="CellId" minOccurs="0" type="xs:string"/>
             <xs:element name="HardSector" minOccurs="0" type="xs:string"/>
             <xs:element name="IsActive" minOccurs="0" type="xs:int"/>
             <xs:element name="LocationAreaCode" minOccurs="0" type="xs:string"/>
             <xs:element name="OnAirDate" minOccurs="0" type="xs:date"/>
             <xs:element name="ParentId" minOccurs="0" type="xs:int"/>
             <xs:element name="ParentName" minOccurs="0" type="xs:string"/>
             <xs:element name="RBSId" minOccurs="0" type="xs:int"/>
             <xs:element name="RBSSId" minOccurs="0" type="xs:int"/>
             <xs:element name="SoftSector" minOccurs="0" type="xs:string"/>
             <xs:element name="UseId" minOccurs="0" type="xs:string"/>
             <xs:element name="Project" type="tns:Project" minOccurs="0"/>
             <xs:element name="RBS" type="tns:RBS" minOccurs="0"/>
          </xs:sequence>
       </xs:complexType>
    <!-- Type name: com.cingular.cingularCommonXmlSchema.Tank-->
       <xs:element name="Tank" type="tns:Tank"/>
       <xs:complexType name="Tank">
          <xs:sequence>
             <xs:element name="TotalStorageCapacity" minOccurs="0" type="xs:double"/>
          </xs:sequence>
       </xs:complexType>
    </xs:schema>Thanks
    Vivek

    Madhu,
    You may:
    1. Generate XML Document manually with DOM API
    2. Use some complex lib like implementation of <a href="http://java.sun.com/webservices/jaxb/">JAXB</a> with ad-hoc control over format.
    3. Use some simple library like <a href="http://xstream.codehaus.org/">XStream</a> with minimal format control.
    Valery Silaev
    EPAM Systems
    http://www.NetWeaverTeam.com

  • XSLT samples for XML- ABAP mapping

    Hi all,
    Does anyone have a XSLT samples for XML->ABAP mapping ?
    regards

    first create XSLT program by copy pasting the below given code and give the program name as "Y_TEST"
    <b>XSLT code</b>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
      <xsl:strip-space elements="*"/>
      <xsl:output indent="yes"/>
      <xsl:template match="NewDataSet">
        <asx:abap xmlns:asx="http://www.sap.com/abapxml" version="1.0">
          <asx:values>
            <OUTTAB>
              <xsl:for-each select="Table">
                <OUTTAB1>
                  <AIRPORTCODE>
                    <xsl:value-of select="AirportCode"/>
                  </AIRPORTCODE>
                  <CITYOFAIRPORTNAME>
                    <xsl:value-of select="CityOrAirportName"/>
                  </CITYOFAIRPORTNAME>
                  <COUNTRY>
                    <xsl:value-of select="Country"/>
                  </COUNTRY>
                  <COUNTRYABBRIVATION>
                    <xsl:value-of select="CountryAbbrviation"/>
                  </COUNTRYABBRIVATION>
                  <COUNTRYCODE>
                    <xsl:value-of select="CountryCode"/>
                  </COUNTRYCODE>
                  <GMTOFFSET>
                    <xsl:value-of select="GMTOffset"/>
                  </GMTOFFSET>
                  <RUNWAYLENGTHFEET>
                    <xsl:value-of select="RunwayLengthFeet"/>
                  </RUNWAYLENGTHFEET>
                  <RUNWAYELEVATIONFEET>
                    <xsl:value-of select="RunwayElevationFeet"/>
                  </RUNWAYELEVATIONFEET>
                  <LATITUDEDEGREE>
                    <xsl:value-of select="LatitudeDegree"/>
                  </LATITUDEDEGREE>
                  <LATITUDEMINUTE>
                    <xsl:value-of select="LatitudeMinute"/>
                  </LATITUDEMINUTE>
                  <LATITUDESECOND>
                    <xsl:value-of select="LatitudeSecond"/>
                  </LATITUDESECOND>
                  <LATITUDENPEERS>
                    <xsl:value-of select="LatitudeNpeerS"/>
                  </LATITUDENPEERS>
                  <LONGITUDEDEGREE>
                    <xsl:value-of select="LongitudeDegree"/>
                  </LONGITUDEDEGREE>
                  <LONGITUDEMINUTE>
                    <xsl:value-of select="LongitudeMinute"/>
                  </LONGITUDEMINUTE>
                  <LONGITUDESECONDS>
                    <xsl:value-of select="LongitudeSeconds"/>
                  </LONGITUDESECONDS>
                  <LONGITUDEEPERW>
                    <xsl:value-of select="LongitudeEperW"/>
                  </LONGITUDEEPERW>
                </OUTTAB1>
              </xsl:for-each>
            </OUTTAB>
          </asx:values>
        </asx:abap>
      </xsl:template>
    </xsl:stylesheet>
    <b>just create a type 1 program and paste the below given code.</b>
    report y_consume_webservice .
    data: wf_user type string .
    data: wf_password type string .
    types: begin of outtab1 ,
       airportcode(6)  ,
       cityofairportname(50),
       country(30)  ,
       countryabbrivation(10),
       countrycode(6)  ,
       gmtoffset(10)  ,
       runwaylengthfeet(15),
       runwayelevationfeet(15),
       latitudedegree(10)  ,
       latitudeminute(10)  ,
       latitudesecond(10)  ,
       latitudenpeers(10)  ,
       longitudedegree(10)  ,
       longitudeminute(10)  ,
       longitudeseconds(10)  ,
       longitudeeperw(10) ,
       end of outtab1 .
    data: outtab type  table of outtab1.
    data: wf_o like line of outtab .
    data: g_okcode like sy-ucomm .
    data: my_container   type ref to cl_gui_custom_container .
    data: g_dock type ref to cl_gui_docking_container .
    data: mygrid type ref to cl_gui_alv_grid .
    data: wf_field_cat type lvc_t_fcat .
    data: wf_field_cat_wa like line of wf_field_cat ,
          wf_is_layout type lvc_s_layo .
    data: wf_fld_cat type slis_t_fieldcat_alv .
    data: wf_fld_cat_wa like line of wf_fld_cat .
    data: wf_repid like sy-repid .
    data: int_tab_name type slis_tabname .
    data: xslt_err type ref to cx_xslt_exception .
    constants:
    * encoding for download of XML files
    encoding     type string value 'utf-8' .
    data: rlength type i,
          txlen type string  .
    data: http_client type ref to if_http_client .
    data: wf_string type string .
    data: wf_string1 type string .
    data: wf_proxy type string ,
          wf_port type string .
    selection-screen: begin of block a with frame .
    parameters: uri2(132) type c lower case .
    selection-screen skip 1.
    parameters: user(50) lower case,
                password(50) lower case ,
                p_proxy(100) lower case default 'proxy.xxx.com' ,
                p_port(4) default '80'.
    selection-screen: end of block a .
    at selection-screen output.
      loop at screen.
        if screen-name = 'PASSWORD'.
          screen-invisible = '1'.
          modify screen.
        endif.
      endloop.
    start-of-selection .
    clear wf_string .
    concatenate
    '<?xml version="1.0" encoding="utf-8"?>'
    '<soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">'
    '<soap:Body>'
    '<GetAirportInformationByCountry xmlns="http://www.webserviceX.NET">'
    '<country>' uri2 '</country>'
    '</GetAirportInformationByCountry>'
    '</soap:Body>'
    '</soap:Envelope>'
    into wf_string .
    clear :rlength , txlen .
    rlength = strlen( wf_string ) .
    move: rlength to txlen .
    clear: wf_proxy, wf_port .
    move: p_proxy to wf_proxy ,
          p_port to wf_port .
    call method cl_http_client=>create
      exporting
        host          = 'www.webservicex.net'
        service       = '80'
        scheme        = '1'
        proxy_host    =  wf_proxy
        proxy_service =  wf_port
      importing
        client        = http_client.
    http_client->propertytype_logon_popup = http_client->co_disabled.
    wf_user = user .
    wf_password = password .
    call method http_client->authenticate
      exporting
        proxy_authentication = 'X'
        username             = wf_user
        password             = wf_password.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_method'
        value = 'POST'.
    call method http_client->request->set_header_field
      exporting
        name  = '~server_protocol'
        value = 'HTTP/1.1'.
    call method http_client->request->set_header_field
      exporting
        name  = '~request_uri'
        value = '/airport.asmx'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Type'
        value = 'text/xml; charset=utf-8'.
    call method http_client->request->set_header_field
      exporting
        name  = 'Content-Length'
        value = txlen.
    call method http_client->request->set_header_field
      exporting
        name  = 'SOAPAction'
        value = 'http://www.webserviceX.NET/GetAirportInformationByCountry'.
    call method http_client->request->set_cdata
      exporting
        data   = wf_string
        offset = 0
        length = rlength.
    call method http_client->send
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2.
    call method http_client->receive
      exceptions
        http_communication_failure = 1
        http_invalid_state         = 2
        http_processing_failed     = 3.
    clear wf_string1 .
    wf_string1 = http_client->response->get_cdata( ).
    replace all occurrences of
        '<' in wf_string1 with '<' .
    replace all occurrences of
    '>' in wf_string1 with '>' .
    replace all occurrences of
    'xmlns=' in wf_string1 with 'xmlns:xsl=' .
    try .
        call transformation (`Y_TEST`)
                source xml wf_string1
                result     outtab = outtab.
      catch cx_xslt_exception into xslt_err.
        data: s type string.
        s = xslt_err->get_text( ).
        write: ': ', s.
        stop.
    endtry .
    break-point .
    Try this and give me your feedback.
    Regards
    Raja

  • How to transfer multi-input xml file to One xml file using BPM?

    Hi!
    Using BPM, We wana transfer multiful xml file to One xml at Remote FTP Server.
    I don't know how to design BPM.
    ============== samle1: input xml====================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Shipments SYSTEM "DTD/Shipment.dtd">
    <Shipments>
      <sendingPartnerID>XXX</sendingPartnerID>
      <receivingPartnerID>XXX_UPSTMS</receivingPartnerID>
      <receivingMessageType>TPSDLS</receivingMessageType>
      <Shipment ID="0081646547" Type="CREATE">
        <CustomerID>XXX</CustomerID>
      </Shipment>
    </Shipments>
    ============== samle2: output xml====================
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE Shipments SYSTEM "DTD/Shipment.dtd">
    <Shipments>
      <sendingPartnerID>XXX</sendingPartnerID>
      <receivingPartnerID>XXX_UPSTMS</receivingPartnerID>
      <receivingMessageType>TPSDLS</receivingMessageType>
      <Shipment ID="0081646547" Type="CREATE">
      </Shipment>
      <Shipment ID="0081886548" Type="CREATE">
      </Shipment>
      <Shipment ID="0081646999" Type="CREATE">
      </Shipment>
    </Shipments>
    Message was edited by: ChangSeop Song

    Hi,
    To convert multiple xml files into a single file, you will have to perform a N:1 mapping.
    The following tutorials are available on SAP to help you understand BPM and also to collect multiple XML messages so that they can be mapped into a single message. Check them out,
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/08/16163ff8519a06e10000000a114084/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    http://help.sap.com/saphelp_nw04/helpdata/en/14/80243b4a66ae0ce10000000a11402f/frameset.htm
    Regards,
    Bhavesh

  • Mapping complete input XML structure into one field on target

    Hi,
    I have a scenario where I need to map the complete input XML structure as it is, into one field on target side. so can we achieve this in Graphical Mapping? If yes, please share your valuable info.
    Regards,
    Shiva.

    Hello,
    this is the java map code.just compile it and made a .zip file import it and use it Interface Mapping.
    import com.sap.aii.mapping.api.StreamTransformation;
    import com.sap.aii.mapping.api.AbstractTrace;
    import com.sap.aii.mapping.api.StreamTransformationConstants;
    import java.util.Map;
    import java.io.*;
    public class PayloadToXMLField1 implements StreamTransformation {
        String strXML = new String();
       //Declare the XML tag for your XML message
       String StartXMLTag = "<DocumentBody>";
       String EndXMLTag = "</DocumentBody>";
       //String StartXMLTag1 = "<Code>";
       //String EndXMLTag1 = "</Code>";
        AbstractTrace trace;
        private Map param = null;
        public void setParameter(Map param) {
            this.param = param;
        public void execute(InputStream in, OutputStream out) {
            trace =
                (AbstractTrace) param.get(
                    StreamTransformationConstants.MAPPING_TRACE);
            trace.addInfo("Process Started");
            try {
                StringBuffer strbuffer = new StringBuffer();
                byte[] b = new byte[4096];
                for (int n;(n = in.read(b)) != -1;) {
                    strbuffer.append(new String(b, 0, n));
                strXML = strbuffer.toString();
            } catch (Exception e) {
                System.out.println("Exception Occurred");
            String outputPayload =
                StartXMLTag
             + "<![CDATA["
             + strXML
             + "]]>"
             + EndXMLTag;
            try {
                out.write(outputPayload.getBytes());
             trace.addInfo("Process Completed");;
            } catch (Exception e) {
                trace.addInfo("Process Terminated: Error in writing out payload");;

  • FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col

    I have an ODSI Physical Service that is based on a Java Function. The Java Function builds a SQL statement and uses JDBC to query for a ResultSet. One of the columns that is queried is a Clob. Sometimes, the data in this column causes an XMLBeans validation exception in ODSI: {err}XQ0027: Validation failed: error: decimal: Invalid decimal value: unexpected char '114'
    The issue is not consistently replicable with particular database record, the database records that present this issue at one point in time will be resolved after a restart of ODSI and replaced by another list of records that present the same error.
    As can be seen from the stack trace, it looks like the issue is happening after the database query has returned and while the process is assembling the SOAP response.
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:510)
    at weblogic.xml.babel.baseparser.EndElement.parse(EndElement.java:34)
    at weblogic.xml.babel.baseparser.BaseParser.parseElement(BaseParser.java:457)
    at weblogic.xml.babel.baseparser.BaseParser.parseSome(BaseParser.java:326)
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:195)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    at weblogic.xml.query.parsers.BufferedParser.fetchNext(BufferedParser.java:79)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.navigation.ChildPath.fetchNext(ChildPath.java:308)
    at weblogic.xml.query.iterators.GenericIterator.hasNext(GenericIterator.java:133)
    at weblogic.xml.query.schema.BestEffortValidatingIterator$OpenedIterator.hasNext(BestEffortValidatingIterator.java:224)
    at weblogic.xml.query.schema.ValidatingIterator.fetchNext(ValidatingIterator.java:82)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.schema.BestEffortValidatingIterator.fetchNext(BestEffortValidatingIterator.java:85)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.next(LegacyGenericIterator.java:109)
    at weblogic.xml.query.runtime.typing.SeqTypeMatching.fetchNext(SeqTypeMatching.java:137)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at com.bea.dsp.wrappers.jf.JavaFunctionIterator.fetchNext(JavaFunctionIterator.java:273)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.querycide.QueryAssassin.fetchNext(QueryAssassin.java:54)
    at weblogic.xml.query.iterators.GenericIterator.peekNext(GenericIterator.java:163)
    at weblogic.xml.query.runtime.qname.InsertNamespaces.fetchNext(InsertNamespaces.java:247)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.runtime.core.ExecutionWrapper.fetchNext(ExecutionWrapper.java:88)
    at weblogic.xml.query.iterators.GenericIterator.next(GenericIterator.java:104)
    at weblogic.xml.query.xdbc.iterators.ItemIterator.fetchNext(ItemIterator.java:86)
    at weblogic.xml.query.iterators.LegacyGenericIterator.hasNext(LegacyGenericIterator.java:130)
    at weblogic.xml.query.xdbc.util.Serializer.serializeItems(Serializer.java:251)
    at com.bea.ld.server.ResultPusher$DSP25CompatibilityPusher.next(ResultPusher.java:236)
    at com.bea.ld.server.ResultPusher.pushResults(ResultPusher.java:112)
    at com.bea.ld.server.XQueryInvocation.execute(XQueryInvocation.java:770)
    at com.bea.ld.EJBRequestHandler.invokeQueryInternal(EJBRequestHandler.java:624)
    at com.bea.ld.EJBRequestHandler.invokeOperationInternal(EJBRequestHandler.java:478)
    at com.bea.ld.EJBRequestHandler.invokeOperation(EJBRequestHandler.java:323)
    at com.bea.ld.ServerWrapperBean.invoke(ServerWrapperBean.java:153)
    at com.bea.ld.ServerWrapperBean.invokeOperation(ServerWrapperBean.java:80)
    at com.bea.ld.ServerWrapper_s9smk0_ELOImpl.invokeOperation(ServerWrapper_s9smk0_ELOImpl.java:63)
    at com.bea.dsp.ws.RoutingHandler$PriviledgedRunner.run(RoutingHandler.java:96)
    at com.bea.dsp.ws.RoutingHandler.handleResponse(RoutingHandler.java:217)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:287)
    at weblogic.wsee.handler.HandlerIterator.handleResponse(HandlerIterator.java:271)
    at weblogic.wsee.ws.dispatch.server.ServerDispatcher.dispatch(ServerDispatcher.java:176)
    at weblogic.wsee.ws.WsSkel.invoke(WsSkel.java:80)
    at weblogic.wsee.server.servlet.SoapProcessor.handlePost(SoapProcessor.java:66)
    at weblogic.wsee.server.servlet.SoapProcessor.process(SoapProcessor.java:44)
    at weblogic.wsee.server.servlet.BaseWSServlet$AuthorizedInvoke.run(BaseWSServlet.java:285)
    at weblogic.wsee.server.servlet.BaseWSServlet.service(BaseWSServlet.java:169)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:820)
    at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
    at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:292)
    at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:175)
    at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3498)
    at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
    at weblogic.security.service.SecurityManager.runAs(Unknown Source)
    at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2180)
    at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2086)
    at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1406)
    at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
    at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)
    <Apr 29, 2011 12:47:01 PM EDT> <Notice> <ODSI> <BEA-000000> <LabOrderDataServices> <Error occurred performing ODSI operation: {ld:LabOrder/logical/LabOrderReport}getLabOrderDetails:1
    weblogic.xml.query.exceptions.XQueryDynamicException: ld:LabOrder/logical/LabOrderReport.ds, line 34, column 6: {err}FODC0002 [{bea-err}FODC0002a]: Error parsing input XML: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:95)
    at weblogic.xml.query.iterators.AbstractIterator.reportUserError(AbstractIterator.java:147)
    at weblogic.xml.query.parsers.Parser.reportParseError(Parser.java:157)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:225)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:124)
    Truncated. see log file for complete stacktrace
    javax.xml.stream.XMLStreamException: Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.stax.XMLStreamReaderBase.advance(XMLStreamReaderBase.java:206)
    at weblogic.xml.stax.XMLStreamReaderBase.next(XMLStreamReaderBase.java:237)
    at weblogic.xml.stax.XMLEventReaderBase.parseSome(XMLEventReaderBase.java:189)
    at weblogic.xml.stax.XMLEventReaderBase.nextEvent(XMLEventReaderBase.java:122)
    at weblogic.xml.query.parsers.StAXEventAdaptor.queueNextTokens(StAXEventAdaptor.java:136)
    Truncated. see log file for complete stacktrace
    Error at line:2 col:481 Line:2 '=' expected, got char[99]
    at weblogic.xml.babel.scanner.ScannerState.expect(ScannerState.java:241)
    at weblogic.xml.babel.scanner.OpenTag.read(OpenTag.java:60)
    at weblogic.xml.babel.scanner.Scanner.startState(Scanner.java:251)
    at weblogic.xml.babel.scanner.Scanner.scan(Scanner.java:178)
    at weblogic.xml.babel.baseparser.BaseParser.accept(BaseParser.java:533)
    Truncated. see log file for complete stacktrace
    >
    Can somebody shed some light on this issue?
    Thanks
    Edited by: user738507 on May 6, 2011 7:21 AM

    Here is the java function:
         * Iterate through the search results and build out the XmlBean response
         * @param helper A helper class used to simplify common JDBC commands
         * @param doc The XmlBean document to populate
         * @param isCollectionsIncluded True if Collection info should be included in results, False otherwise
         * @param isFullDetailsIncluded True if Result data should be included in results, False otherwise
         * @throws Exception
         private static void addOrders(XmlBeansJDBCHelper helper, LabOrderReportDocument doc,
                   boolean isCollectionsIncluded, boolean isFullDetailsIncluded) throws Exception {
              int rows = 0;
              ResultSet rs = helper.getResultSet();
              LabOrders labOrders = doc.getLabOrderReport().addNewLabOrders();
              LabOrder record = null;
              HashMap<Long, Collection> parentCollectionMap = null;
              // initialize variable used to track when child elements of the XML should be created
              long previousRowOrderId = 0;
              long previousRowParentOrderCollectionId = 0;
              long previousRowOrderCollectionId = 0;
              long previousRowResultId = 0;
              boolean isRootCollectionNode = false;
              LabOrder.Collections lastParentOuterCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection.Collections lastParentInnerCollectionsAdded = null;
              com.idexx.services.lde.laborder.Collection lastCollectionAdded = null;
              Result lastResultAdded = null;
              // Loop through the results and build XmlBean nodes for each row
              // Since the SQL is joining Orders to Collections (one-to-many) to Results (one-to-many),
              // and returning a flat structure, there will be duplicate Order data on each row when
              // multiple collections exist on the Order, and duplicate Collection data when multiple
              // Results exist. We can use this fact to determine when to create a new Collection, or
              // Result node.
              while (helper.getResultSet().next())
                   rows++;
                   long currentRowParentOrderCollectionId = 0;
                   long currentRowOrderCollectionId = 0;
                   long currentRowResultId = 0;
                   long currentRowResultRemarkId = 0;
                   //int rowno = helper.getResultSet().getRow();
                   // Get the Order ID
                   logDebug("Getting the OrderId.....");
                   BigInteger dbOrderId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_ID);
                   logDebug("DONE getting the OrderId.");
                   long currentRowOrderId = dbOrderId.longValue();
                   // Determine the Order ID, Order Collection ID, and Result ID currently being processed.
                   // These will be used to determine whether to start a new LabOrder Bean, Collections Bean, or Results Bean
                   if (isCollectionsIncluded || isFullDetailsIncluded) {
                        // Get the ParentOrderCollectionID
                        logDebug("Getting the Parent Collection Order ID.....");
                        BigInteger dbParentOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.PARENT_ORDER_COLLECTION_ID);
                        if ( dbParentOrderCollectionId != null )
                             currentRowParentOrderCollectionId = dbParentOrderCollectionId.longValue();
                        else
                             currentRowParentOrderCollectionId = 0;
                        // Get the OrderCollectionID
                        logDebug("Getting the Order Collection ID.....");
                        BigInteger dbOrderCollectionId = JDBCHelper.getBigInteger(rs, DataConstants.ORDER_COLLECTION_ID);
                        if ( dbOrderCollectionId != null )
                             currentRowOrderCollectionId = dbOrderCollectionId.longValue();
                        else
                             currentRowOrderCollectionId = 0;
                        if ( isFullDetailsIncluded ) {
                             // Get the ResultID
                             logDebug("Getting the Result Id.....");
                             BigInteger dbResultId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_ID);
                             if ( dbResultId != null )
                                  currentRowResultId = dbResultId.longValue();
                             else
                                  currentRowResultId = 0;
                             // Get the ResultRemarkID
                             BigInteger dbResultRemarkId = JDBCHelper.getBigInteger(rs, DataConstants.RESULT_REMARK_ID);
                             if ( dbResultRemarkId != null )
                                  currentRowResultRemarkId = dbResultRemarkId.longValue();
                             else
                                  currentRowResultRemarkId = 0;
                   isRootCollectionNode = (currentRowParentOrderCollectionId == 0);
                   logDebug("currentRowOrderId: " + currentRowOrderId);
                   logDebug("previousRowOrderId: " + previousRowOrderId);
                   logDebug("currentRowResultId: " + currentRowResultId);
                   logDebug("previousRowResultId: " + previousRowResultId);
                   logDebug("currentRowResultRemarkId: " + currentRowResultRemarkId);
                   logDebug("previousRowResultRemarkId: N/A");
                   logDebug("currentRowParentOrderCollectionId: " + currentRowParentOrderCollectionId);
                   logDebug("previousRowParentOrderCollectionId: " + previousRowParentOrderCollectionId);
                   logDebug("currentRowOrderCollectionId: " + currentRowOrderCollectionId);
                   logDebug("previousRowOrderCollectionId: " + previousRowOrderCollectionId);
                   if ( currentRowOrderId != previousRowOrderId ) {
                        parentCollectionMap = new HashMap<Long, Collection>();
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        // This is a new Order, generate a new Lab Order bean
                        record = addOrder(labOrders, helper, dbOrderId, isFullDetailsIncluded);
                        logDebug("Order Added!");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             lastParentOuterCollectionsAdded = record.addNewCollections();
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, true);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                             if ( isRootCollectionNode ) {
                                  lastParentOuterCollectionsAdded = record.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                                  logDebug("parent collection added to map: " + currentRowOrderCollectionId);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  logDebug("Adding result....");
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  logDebug("Result Added!");
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                        logDebug("DONE getting first Collection and Result.");
                   else if ( currentRowParentOrderCollectionId != previousRowParentOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new, top level, Order Collection to be included
                        lastParentOuterCollectionsAdded = null;
                        lastParentInnerCollectionsAdded = null;
                        lastCollectionAdded = null;
                        lastResultAdded = null;
                        logDebug("Getting next Order Collection...");
                        // If there is Parent Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( !isRootCollectionNode ) {
                             lastCollectionAdded = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             logDebug("A Collection Added! Is it null? " + (lastCollectionAdded == null));
                        // If there is Collection data and it should be included, build a Collections element,
                        // and populate the first one
                        if ( currentRowOrderCollectionId > 0 ) {
                             if ( isRootCollectionNode ) {
                                  //LabOrder.Collections collections = record.addNewCollections();
                                  lastParentOuterCollectionsAdded = record.getCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                                  parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                             else {
                                  lastParentInnerCollectionsAdded = lastCollectionAdded.addNewCollections();
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                             logDebug("B Collection Added! Is it null? " + (lastCollectionAdded == null));
                             // If there is Result data and it should be included, build a Results element,
                             // and populate the first one
                             if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                                  lastResultAdded = addResult(record, helper, lastCollectionAdded);
                                  // If there is Result Remark data and it should be included, build a ResultRemarks element,
                                  // and populate the first one
                                  if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                       addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowOrderCollectionId != previousRowOrderCollectionId
                             && (isCollectionsIncluded || isFullDetailsIncluded) ) {
                        // This is a new Order Collection to be included inside of a parent collection
                        logDebug("Getting next CHILD Order Collection...");
                        logDebug("isRootCollectionNode: " + isRootCollectionNode);
                        logDebug("Order ID: " + helper.getBigInteger(DataConstants.ORDER_ID));
                        logDebug("Order Collection ID: " + helper.getBigInteger(DataConstants.ORDER_COLLECTION_ID));
                        logDebug("Collection ID: " + helper.getBigInteger(DataConstants.COLLECTION_ID));
                        if ( isRootCollectionNode ) {
                             lastCollectionAdded = addCollection(record, helper, lastParentOuterCollectionsAdded, false);
                             parentCollectionMap.put(new Long(currentRowOrderCollectionId), lastCollectionAdded);
                        else {
                             com.idexx.services.lde.laborder.Collection parentCollection = (com.idexx.services.lde.laborder.Collection)parentCollectionMap.get(new Long(currentRowParentOrderCollectionId));
                             if(parentCollection == null) {
                                  log(LOG_LEVEL.WARN, "Parent Collection with id: " + currentRowParentOrderCollectionId + " is null for collection id: " + currentRowOrderCollectionId + " but isRootCollectionNode is " + isRootCollectionNode);
                             } else {
                                  lastParentInnerCollectionsAdded = parentCollection.getCollections();
                                  logDebug("Is lastParentInnerCollectionsAdded null? " + (lastParentInnerCollectionsAdded == null));
                                  lastCollectionAdded = addCollection(record, helper, lastParentInnerCollectionsAdded, false);
                        // If there is Result data and it should be included, build a Results element,
                        // and populate the first one
                        if ( currentRowResultId > 0 && isFullDetailsIncluded ) {
                             lastResultAdded = addResult(record, helper, lastCollectionAdded);
                             // If there is Result Remark data and it should be included, build a ResultRemarks element,
                             // and populate the first one
                             if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                                  addResultRemark(record, helper, lastResultAdded);
                   else if ( currentRowResultId != previousRowResultId
                             && isFullDetailsIncluded ) {
                        // There is a new Result to be included
                        logDebug("Getting next Result...");
                        // This is a new result to be included
                        lastResultAdded = addResult(record, helper, lastCollectionAdded);
                        // If there is Result Remark data and it should be included, build a ResultRemarks element,
                        // and populate the first one
                        if ( currentRowResultRemarkId > 0 && isFullDetailsIncluded ) {
                             addResultRemark(record, helper, lastResultAdded);
                   else if ( isFullDetailsIncluded ) {
                        // There is a new Result Remark to include
                        logDebug("Getting next Result Remark...");
                        // This is a new result remark to be included
                        addResultRemark(record, helper, lastResultAdded);
                   logDebug("Done building response.");
                   previousRowResultId = currentRowResultId;
                   previousRowParentOrderCollectionId = currentRowParentOrderCollectionId;
                   previousRowOrderCollectionId = currentRowOrderCollectionId;
                   previousRowOrderId = currentRowOrderId;
              logDebug("Found " + rows + " rows of data.");
         }

  • Email input xml as body of mail

    Dear all
    I need to provide the input xml in the body of the mail. The body of the mail should be the input xml.
    I understand that in order to provide the content in the email body we need to use the XIMail30  package. However this is only for the text. But we need xml in the email body?
    Regards
    Monika

    hi,
    >>>But we need xml in the email body?
    what you can do is you can use escape chars
      "   & quot;
      <   & lt;
      >   & gt;
      &   & amp;
    which will allow you to send XML data as text and it will be visible as "XML" in the e-mail body right ?
    or you can use CDATA to wrap the XML too and send as text
    Regards,
    Michal Krawczyk

  • NewBie : How can I do to compile the samples of XML Parser ?

    How can I do to compile the samples of XML Parser ?
    I must create a Makefile file, and after ?
    Thanks

    It`s for the Parser C++.
    thanks

  • Input XML - DB - Output XML

    I have been able to get Liquid Data up and running.
    I have set my Output XSD as the target schema
    I have included my DB and mapped it to the Output XSD
    I am having problems getting the Input XML into my project. When I include in my XML source (input xsd) it does not show all the elements....
    My bigger question is, can I through Liquid Data, map an input XML file to a DB (run sql to match up XML element value and DB table values) and export the SQL recordset to my defind XML file?
    I started down this road based on a 'yes' answer from a
    peer.
    Spending a little more time than I had hoped on this one...
    I need to do this below..
    <Membership_ID>000001</Membership_ID> //Input XML
    ...db....
    Select * from Member_Table where XML.Membership_ID = Member_Table.Memb_ID
    ...db....
    Insert Into Pre-Defined XML.....
    <Memb_F_Name>Elvis</Memb_F_Name>
    <Memb_L_Name>Costello</Memb_L_Name>
    <Memb_City>Miami</Memb_City>
    <Memb_Age>50</Memb_Age>
    <Memb_ID>000001</Memb_ID> //Makes Hit On This
    Making progress but, any examples would be great...
    TIA
    Jay

    to use an xml file as a datasource, create an XML File Datasource in the LD Console (you need to specify a schema there). Go to the DataView Builder, reconnect to the server, it will show the XML File source with all the elements defined in the schema.
    To compare values with a db against values in a file, you need to defined an LD rdbms source for the db and an LD XML file source for the file.
    Then write your xquery - it will look something like...
    for $file_rec in document("MyFileSource")
    for $db_rec in document("MyDBSource")
    where $db_rec/Member_id eq $file_rec/Member_id
    return
    $db_rec

  • Input XML having multiple values in the same tag

    Hi,
    In my scenario, my input XML is in the following format...
    <Product>
    <Site_ID>A1, A2, A3</Site_ID>
    <SIte_Name>ABC, XYZ, PQR</Site_Name>
    </Product>
    A1 corresponds to ABC
    A2 corresponds to XYZ and so on...
    Is there some way to retrieve values from such a source file and then map it to the target
    i.e A1 ABC has to go as one record
    A2 XYZ has to go as a second record and so on..
    Thanks in advance,
    Regards,
    Karen

    using xslt you can retrive Site_ID values and Site_name and then you have to use your own abap logic to split the values.
    for example
    site_name = 'A1, A2, A3, A4' .
    then you can use split site_name at ',' into table <itab>

  • Input XML Format needs to be Translated Into CSV String Format

    Hi,
    I need to translate input xml format to CSV string format in BPEL.
    How to use xpath function to do this?
    Thanks

    1. In the partner link of the file adapter you can run the wizard and create a XSD according to your CSV format.
    (you just need to create an example of CSV)
    The wizard will create a XSD automatically.
    2. Assign an invoke activity to that partner link.
    3. Use transformation to pass data from your XML input into the invoke variable.
    Arik

  • Input xml  to where clause ..

    An input XML passed as a parameter to the oracle stored procedure . based on input xml the dynamic predicate( where ) clause need to be build . for example
    <map opt="and" >
    <map opt="and" >
    <condition opt="equal" >
         <key>job_id</key>
         <value>IT_PROG</value>
    </condition>
    <conditon opt="equal" >
              <key>salary</key>
              <value>9000</value>
    </conditon>
    </map>
    <map opt="or" >
    <condition opt="equal" >
              <key>manger_id</key>
              <value>100</value>
    </condition>
    <conditon opt="like" >
                   <key>lastname</key>
                   <value>m</value>
    </conditon>
    </map>
    </map>
    select * from employees where (job_id='IT_PROG' and salary='9000') or (manager_id = '100' or last_name like '%m%').
    please help with pl/sql part of this . i have written a pl/sql which can print the element tag , what changes should i make this code .
    The input xml will be dynamic based on the input xml the predicate should be prepared, i want to use oracle dom .
    declare
    vxml xmltype;
    l_xmldoc xmldom.DOMDocument;
    l_ndlist xmldom.DOMNodeList;
    l_node xmldom.DOMNode;
    l_element xmldom.DOMElement;
    len number;
    BEGIN
    vxml:= xmltype('<map opt="and" >
    <map opt="and" >
    <condition opt="equal" >
         <key>job_id</key>
         <value>IT_PROG</value>
    </condition>
    <conditon opt="equal" >
              <key>salary</key>
              <value>9000</value>
    </conditon>
    </map>
    <map opt="or" >
    <condition opt="equal" >
              <key>manger_id</key>
              <value>100</value>
    </condition>
    <conditon opt="like" >
                   <key>lastname</key>
                   <value>m</value>
    </conditon>
    </map>
    </map>
    l_xmldoc := xmldom.newDOMDocument(vxml);
    l_ndlist := xmldom.getElementsByTagName(l_xmldoc, '*');
    len := xmldom.getLength(l_ndlist);
    -- loop through elements
    for i in 1..len-1 loop
    l_node := xmldom.item(l_ndlist, i);
    dbms_output.put( xmldom.getNodeName(l_node));
    l_node := xmldom.getFirstChild(l_node);
    if xmldom.getNodeType(l_node) = xmldom.TEXT_NODE then
    dbms_output.put('='|| xmldom.getNodeValue(l_node) || ' ');
    end if;
    dbms_output.put(' ');
    end loop;
    dbms_output.put_line('');
    END;

    >
    our application has java front end , the users have option to select multiple filter values . the frond end developers will send an xml construct as the one i have showed . based on the input xml i have to apply those filters on a table . so i thought using xml dom and parse the xml and make a dynamic sql from that .
    >
    why java app needs to send XML? Let it create SQL and execute it.
    Of course you can do it in PL/SQL but it less convenient comparing to Java.
    If you can extract values from XML, then just create SQL for them, assign bind vars and execute it dynamically.
    Yes, you will have to implement lots of IF logic.
    Advise: Use bind variables as placeholders for values to avoid injection attacks. Do not concatenate values into your dynamic SQL.

  • Large input xml request to BPEL

    Does BPEL load the whole input request xml in memory?
    I have a input request having multiple IDs. The oracle business rule transforms 1 id at a time.
    BPEL calls the business rule in flowN for a size of 20. (processes 20 ids at a time)
    The input request size is huge more than 150K ids at a time. Does BPEL load the whole input xml in memory ( DOM tree)?
    what is a better way to do it

    Avoid calling the BPEL process with big payload.
    It loads everything into memory, you could use debatching technique in the file adapter to split the payload into more manageable sizes.
    Do stress testing to check whether its working fine under different loads.
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Batch input xml files to one flatfile output

    I have a receive location where I would need to wait for couple of minutes to get
    all the xml files needed to process. Every file in that receive location is of same format.
    I would need to produce one output flat file for all the input xml files received within couple of minutes.A mapping need
    to be applied on every file before it's converted to a flat file batch.
    I tried to batch the input xml files but I am unable to implement the mapping which has to be applied on every input xml
    file.
    How do I approach this?

    Thank you for your response.The transformed xml has got header, body and trailer so when I processed two files by using the map in the receive port. The batched output flat file is as below:
    HEADER 27052014                                   
    1      HSGbryan_oNSYS300270520141038                                     
    2      HSG3851911NSYS150220420141455                      22042014       
    3      HSG3851909NSYS150220420141449                      22042014       
    4      HSG3853034NSYS150220420141436                      22042014       
    TRAILER      4
    HEADER 27052014                                   
    1      HSGbryan_oNSYS150270520141045                                     
    TRAILER      1
    However, the required output is
    HEADER 27052014                                   
    1      HSGbryan_oNSYS300270520141038                                     
    2      HSG3851911NSYS150220420141455                      22042014       
    3      HSG3851909NSYS150220420141449                      22042014       
    4      HSG3853034NSYS150220420141436                      22042014        
    5      HSGbryan_oNSYS150270520141045                                     
    TRAILER      5
    Is there anything we can tweak in to have one header and trailer with the body having sequential row count for the entire flat file batched message?

Maybe you are looking for

  • DESCRIPTIONS ARE NOT SHOWED IN REPORT PAINTER

    Hi, I have a problem with the report painter, because i am run the report but i realize that  if the master data(Commitment item ) is not created for the next year  example 2008 and  I am running the report for the year 2007, when the report is gener

  • In FD32 why credit value is calculating at cash sale cycle

    Hello Every body In credit management, customer having credit limit and also having in ova8 it is static credit limit check in sales order level. My question while customer take cash sales in sales order level, he adopted payment terms as cash sales.

  • Trapping line no of a statement  in se38 abap editor

    Hello Everyone,                             I want to trap the line number of a perticular statement [ say wrire : 'arnab' ]  in SE38 Abap editor, so that I can go back[ GO TO as in C programming ] the same statement as and when needed.Pls providec m

  • I'm trying to download my pictures but keep getting Server Error in '/' Application?

    I'm trying to download my pictures from the modeling/acting website. It starts spinning to download my picture package but it keeps transferring me to this page saying: Server Error in '/' Application. Server Error in '/' Application. Could not find

  • AppleScript for install CS6?

    Photoshop CS6 downloaded, but I am having trouble opening it to install now. It is trying to open in AppleScript but then saying the file is unscriptable. Is there another application I can use or some way to get around this? I have tried every optio