Incoming XML validation in UDF

Hello Expert,
I am trying to do a simple XML structure validation in my User Defined Library. All I need to check is if the XML structure is valid if it is not then I have to throw a custom error message in my logs. I know that PI within itself does the validation but I am not sure how to catch that exception and write in the my choice of Location and/or Category.
Thanks for your help.
Thanks,
Mayur

Hi Patel,
You need to write some big code to validate XML,in UDF u can genarates logs my urself,we can rise exceptions.
But if you want genarate own logs and place it in to other place(FTP not in XI) I think its not possible.
one of my requirement i tried to genarate logs for catching all message mapping exceptions in to one text file place it in to Clinet Ftp server,but i am unable to do that one.i tried different ways.
Better approach is Java Mapping.
Regards,
Raj

Similar Messages

  • Incoming XML validation for SOAP adapter request

    Hi,
    Does anyone know of a method to validate incoming XML request against the relevant XSD definition and return a SOAP fault message to the calling application ?
    I guess this would involve BPM unless there is some sort of module that can be used.
    Please advise.
    Kind regards
    Colin.

    Hi Michal,
    Would you suggest a simple BPM or an adapter module ?
    I would hope a simple BPM would be the way it could be done.
    Cheers
    Colin.

  • Does income xml request get validated against wsdl?

    Hi, there:
    I'm using document/literal web service. My question is: Does income xml request get validated automatically against wsdl complex type xml schema? If not is there any configuration way we can set to validate income xml request automatically?
    I searched posts in this forum, it seems the same question was asked long long time ago already, but no answer. So, I want to check that question again.
    I simply tested my web service by using soapUI, it seems no xml validation implemented on any request at all.
    Highly appreciated if any help or comment, thanks a lot in advance.
    David

    Thank you very much jwenting for the reply. We are using jbossWs.
    Yes, I definately agree that it's very cool that wsdl is generated on the fly, and all xml message is parsed to java bean automatically by jaxb. However, my 2 cents is:
    1. How can I generate other xml schema restrictions in wsdl on the fly except "enum" (ex. pattern, minInclusive, maxInclusive etc.)? Currently, it seems only @XmlEnum can generate "enum" restriction in wsdl automatically, no other restrictions could be generated automatically in wsdl.
    2. Even if I have those restrictions defined manually in wsdl, as it doesn't implement validation on income xml request, and I should do the validation inside my webservice logic, which means that even if I have those xml schema restrictions defined in wsdl, they are useless.
    That's the reason I want to check if anyway the validation can be implemented automatically on income xml request.
    Again, highly appreciated any further helps or comments. Thanks a lot in advance.
    David

  • XML validation in sender file adapter

    Hi
    I am using FCC on the sender file adapter ....i need to make sure that one of the fields should always be integer else the sender adapter should give error
    Can i use xml validation with FCC on the sender file adapter?

    Hi Hema,
    As per understanding you need to check one or few fields value is integer or not.
    You can achieve in 2 ways :
    Case1:Using inbuilt xml validation options.
    For 7.11 and below
    1)In ESR/Message type/Export the xsd to local machine.
    2)Insert the xsd file in the below loc
    /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/
    <guid>/<namespace1>/<service_interface_name>/<namespace2>
    <sid>: System ID of the server instance.
    <guid>: The GUID of the SWCV.
    <namespace1> : The namespace within which the service interface is defined.
    <service_interface_name> : The name of the service interface.
    <namespace2>
    : The namespace of the Message Type used by the service interface. In many
    instances, namespace1 and namespace2 are the same.
    Italic path folders need to create by you.
    For 7.3 and above
    Michal's PI tips: XML validation - changes in 7.3
    Case 2 :Handling using simple UDF.
    Input-->UDF-->Output
    try {
       Integer.parseInt(input);
       return input ;
    catch(NumberFormatException e) {   
    throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
    Regards
    Venkat

  • Handling empty values during xml validation

    Hello experts,
    I have a file to file scenario in PI 7.1.  I am using xml validation to validate the incoming source file. There are various types of fields in the incoming file including int, decimal and string. They can have a certain enumeration of values but can also have a blank value.
    For example field 'Num' of type int can have values 1,2,3 or a blank value.
    But I am not able to define a blank value for the field in the enumeration during definition. Therefore a blank value in the input file fails during the validation stage.
    Is there any workaround for this?
    Thanks!
    RR

    This is a basic problem. When you define a field as integer you cannot declare blank space which represents String type.
    So for your case make the value 'zero' instead of blank, if you want do declare the field as integer and as below...
    <xs:element name="Num">
      <xs:simpleType>
        <xs:restriction base="xs:integer">
          <xs:pattern value="[0-3]"/>
        </xs:restriction>
      </xs:simpleType>
    </xs:element>
    Also refer this page for further reference.
    http://www.w3schools.com/schema/schema_facets.asp

  • XML validation in WS adapter

    Hi experts,
    I get the following error message in SXMB_MONI while processing a message through a WS sender adapter:
    <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
    <!-- Error Message -->
    <n0:Fault xmlns:n0="http://schemas.xmlsoap.org/soap/envelope/">
         <faultcode>n0:Server</faultcode>
         <faultstring xml:lang="en">SRT: Failure in SOAP processing occurred</faultstring>
         <detail>
              <ns:SystemFault xmlns:ns="http://www.sap.com/webas/710/soap/runtime/abap/fault/system/">
                   <Host>Integration Server Entry</Host>
                   <Component>COREMSG</Component>
                   <ChainedException>
                        <Exception_Name>CX_XMS_XI_SYS_ERR</Exception_Name>
                        <Exception_Text>System error</Exception_Text>
                   </ChainedException>
                   <ChainedException>
                        <Exception_Name>CX_XMS_SYSERR_VALIDATION</Exception_Name>
                        <Exception_Text>System error occurred during XML validation</Exception_Text>
                   </ChainedException>
              </ns:SystemFault>
         </detail>
    </n0:Fault>
    This is strange, because I didn't configure any XML validation. I didn't configure that explicitly.
    However, I noticed that the step "XML Validation Inbound Channel Request ( CENTRAL )" is executed every time I send messages to PI. Normally this is successful, so the message flow is not interrupted. But even in the successful case the xml header is always cut off (so the line "<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>" in the beginning). I checked other messages with different adapters, and this step is never executed.
    I would like to know whether this step can be switched off somewhere or whether it is performed by default. Does anybody know more about this topic?
    Best regards,
    Jörg

    Hi Hema,
    As per understanding you need to check one or few fields value is integer or not.
    You can achieve in 2 ways :
    Case1:Using inbuilt xml validation options.
    For 7.11 and below
    1)In ESR/Message type/Export the xsd to local machine.
    2)Insert the xsd file in the below loc
    /usr/sap/<sid>/DVEBMGS00/j2ee/cluster/server0/validation/schema/
    <guid>/<namespace1>/<service_interface_name>/<namespace2>
    <sid>: System ID of the server instance.
    <guid>: The GUID of the SWCV.
    <namespace1> : The namespace within which the service interface is defined.
    <service_interface_name> : The name of the service interface.
    <namespace2>
    : The namespace of the Message Type used by the service interface. In many
    instances, namespace1 and namespace2 are the same.
    Italic path folders need to create by you.
    For 7.3 and above
    Michal's PI tips: XML validation - changes in 7.3
    Case 2 :Handling using simple UDF.
    Input-->UDF-->Output
    try {
       Integer.parseInt(input);
       return input ;
    catch(NumberFormatException e) {   
    throw new StreamTransformationException( "Input field value for xyz field "+input+"is not in integer format.Plz correct it"); 
    Regards
    Venkat

  • Receiver determination based on the filename of the incoming xml file

    hi folks,
    is it possible to base the receiver determination from the filename (pattern) of the incoming xml file?
    suppose, if the filename is partner1.xml, then the receiver determination has a condition of partner1.  in this case, the message is received by partner1.
    any advise please?
    thanks!
    -lex

    Hi Lex,
    You can use Enhanced Receiver Determination for this. Do your normal mapping from source to target. And another mapping for the receiver determination. In that mapping you can use the UDF for Dynamic Configuration and set the filename as the receiver service name.
    Use the following blog for Enhanced Receiver Determination:
    /people/venkataramanan.parameswaran/blog/2006/03/17/illustration-of-enhanced-receiver-determination--sp16
    This blog explains the usage of Dynamic Configuration:
    /people/michal.krawczyk2/blog/2005/11/10/xi-the-same-filename-from-a-sender-to-a-receiver-file-adapter--sp14
    Regards,
    Sanjeev.

  • Sort incoming XML message

    Hi
    Is there a standard way in PI to sort the incoming XML message within the message mapping before doing the mapping itself?
    The scenario would be an incoming Flat file with header and item data records, and we will be mapping it in PI to create IDOC messages based on the same Header segment. So for the same Header Data I would like to create a single IDOC. But the incoming file would be unsorted, so I would need to sort it first based on the header segment some way.
    Ideally, we would like to do all of the mapping in the graphical mapping tool and not use a UDF.
    Thanks
    Edited by: MxG on Nov 20, 2008 5:04 PM

    I already tried Sort, but it doesnt work the way I want.
    Say I have inbound XML as
    <hdr1>
    <hdr2>
    <itm1>
    <itm2>
    <itm3>
    it needs to be mapped to an IDOC as
    <hdrsegment>
    <itmsegment>
    I mapped XML header data to IDOC after sorting, and that works fine. The issue comes on assigning the inbound XML Item data to IDOC Item segment. It is creating the correct Number of segments, but when assiging the fields to IDOC fields, it is using unsorted data ie the data as received, not the sorted one which I did for IDOC Node, and for Header fields.
    What I really want is to sort the data once, and then use that in the mapping.

  • Not able to run validation using validation.xml & validator-rules.xml

    Hello Friends,
    I am not able to run validation using validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    </form-beans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    </global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    </action>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}" resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    </form>
    </formset>
    </form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    } else {
    results = service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come from a real data
    source such as a database. */
    private static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees.getName().toUpperCase().indexOf(name.toUpperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.

    Hello Friends,
    I am not able to run validation using
    validation.xml & validator-rules.xml.
    Entire code in running prefectly but no error
    messages are prompted.
    Following is my code:
    File Name : struts-config.xml
    <struts-config>
    <!-- Form Beans Configuration -->
    <form-beans>
    <form-bean name="searchForm"
    type="com.solversa.SearchForm"/>
    ans>
    <!-- Global Forwards Configuration -->
    <global-forwards>
    <forward name="search" path="/search.jsp"/>
    global-forwards>
    <!-- Action Mappings Configuration -->
    <action-mappings>
    <action path="/search"
    type="com.solversa.SearchAction"
    name="searchForm"
    scope="request"
    validate="true"
    input="/search.jsp">
    tion>
    </action-mappings>
    <!-- Message Resources Configuration -->
    <message-resources
    parameter="ApplicationResources"/>
    <!-- Validator Configuration -->
    <plug-in
    className="org.apache.struts.validator.ValidatorPlugI
    ">
    <set-property property="pathnames"
    value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    >
    </struts-config>
    <br> File Name : <b> validation.xml </b>
    <form-validation>
    <formset>
    <form name="searchForm">
    <field property="name" depends="minlength">
    <arg key="label.search.name" position = "0"/>
    <arg1 name="minlength" key="${var:minlength}"
    resource="false"/>
    <var>
    <var-name>minlength</var-name>
    <var-value>5</var-value>
    </var>
    </field>
    <field property="ssNum" depends="mask">
    <arg0 key="label.search.ssNum"/>
    <var>
    <var-name>mask</var-name>
    <var-value>^\d{3}-\d{2}-\d{4}$</var-value>
    </var>
    </field>
    /form>
    </formset>
    form-validation>
    <br> File Name : <b> SearchForm.java </b>
    package com.jamesholmes.minihr;
    import java.util.List;
    import org.apache.struts.validator.ValidatorForm;
    public class SearchForm extends ValidatorForm
    private String name = null;
    private String ssNum = null;
    private List results = null;
    public void setName(String name) {
    this.name = name;
    public String getName() {
    return name;
    public void setSsNum(String ssNum) {
    this.ssNum = ssNum;
    public String getSsNum() {
    return ssNum;
    public void setResults(List results) {
    this.results = results;
    public List getResults() {
    return results;
    <br> File Name : <b> SearchAction.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    public final class SearchAction extends Action
    public ActionForward execute(ActionMapping
    mapping,
    ActionForm form,
    HttpServletRequest request,
    HttpServletResponse response)
    throws Exception
    EmployeeSearchService service = new
    EmployeeSearchService();
    ArrayList results;
    SearchForm searchForm = (SearchForm) form;
    // Perform employee search based on what criteria
    was entered.
    String name = searchForm.getName();
    if (name != null && name.trim().length() > 0) {
    results = service.searchByName(name);
    else {
    results =
    service.searchBySsNum(searchForm.getSsNum().trim());
    // Place search results in SearchForm for access
    by JSP.
    searchForm.setResults(results);
    // Forward control to this Action's input page.
    return mapping.getInputForward();
    <br> File Name : <b> EmployeeSearchService.java </b>
    package com.jamesholmes.minihr;
    import java.util.ArrayList;
    public class EmployeeSearchService
    /* Hard-coded sample data. Normally this would come
    from a real data
    source such as a database. */
    ivate static Employee[] employees =
    new Employee("Bob Davidson", "123-45-6789"),
    new Employee("Mary Williams", "987-65-4321"),
    new Employee("Jim Smith", "111-11-1111"),
    new Employee("Beverly Harris", "222-22-2222"),
    new Employee("Thomas Frank", "333-33-3333"),
    new Employee("Jim Davidson", "444-44-4444")
    // Search for employees by name.
    public ArrayList searchByName(String name) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if
    (employees.getName().toUpperCase().indexOf(name.toU
    pperCase()) != -1) {
    resultList.add(employees[i]);
    return resultList;
    // Search for employee by social security number.
    public ArrayList searchBySsNum(String ssNum) {
    ArrayList resultList = new ArrayList();
    for (int i = 0; i < employees.length; i++) {
    if (employees[i].getSsNum().equals(ssNum)) {
    resultList.add(employees[i]);
    return resultList;
    <br> File Name : <b> Employee.java </b>
    package com.solversa;
    public class Employee
         private String name;
         private String ssNum;
         public Employee(String name, String ssNum) {
         this.name = name;
         this.ssNum = ssNum;
         public void setName(String name) {
         this.name = name;
         public String getName() {
         return name;
         public void setSsNum(String ssNum) {
         this.ssNum = ssNum;
         public String getSsNum() {
         return ssNum;
    Pls help me out.
    Not able to prompt errors.
    Hi,
    Your error message are not displaying because u does not made Message-Resoucrce property file (Resource Bundle) when you make it .
    give it entry in
    struts-config.xml
    <message-resources parameter="ApplicationResources" />
    and
    define key and corresponding error message to key in this ApplicationResources i.e
    #Error Resources
    label.search.ssNum=Plz Enter correct ssNum

  • How to binding incoming xml node list to the tree control as dataProvider

    Recently, I faced into one issue: I want to binding incoming xml node (it's not avaliable at start) list to the tree control as a dataProvider.
    Since the incoming xml node list is not avaliable at beginning but I needs to bind it to the tree, so I create one virtual one in the xml, and prepare to remove it before the tree is shown. (ready for the actual node adding). But It did not work.
    Please see the presudo-code here:
    1.  Model layer(CsModel.as)
    public class CsModel
            [Bindable]
            public var treeXML:XML=<nodes><car label="virtualOne" id="1">
                                   </car></nodes>;
            (Here, I want to build binding relationship on the <car/> node,
             one 'virtual/stub' node is set here with lable="virtualOne".
             But this node will be deleted after IdTree
             control is created completely.)      
            [Bindable]
            public var treeData:XMLList =new XMLListCollection(treeXML.car);
    2. view layer(treePage.mxml)
            private var _model:CsModel = new CsModel();
            private function addNode():void
                    var newNode:XML=<car/>;
                    newNode.@label="newOne";
                    newNode.@id=1;
                    _model.treeXML.appendChild(newNode);
                             private function cleanData():void
                                     delete _model.treeXML.car;
            <mx:VBox height="100%" width="100%">
            <mx:Button label="AddNode" click="addNode()" />
            <mx:Tree id="IdTree"  labelField="@label"
              creationComplete="cleanData()"
              dataProvider="{_model}"/>
        </mx:VBox>
    3. Top view layer (App.Mxml)
    <mx:application>
        <treePage />
    </mx:application>
    For method: cleanData(),It's expected that when the treePage is shown, we first delete the virutalOne to provide one 'clear' tree since we don't want show virtualOne to the user. The virutalOne node just for building the relationship between treeData and treeXML at beginning. But the side effect of this method, I found, is that the relationship between treeXML and treeData was cut off. And this leads to that when I added new node (by click the 'addNode' button) to the xmlXML, the xmlData was not affected at all !
    So Is there any other way to solve this issue or bind the incoming xml node list to the xmlListCollection which will be used as Tree control's dataProvider ?

    If u want to display the name : value then u can do like this
    <xsl:eval>this.selectSingleNode("name").nodeName</xsl:eval> : <xsl:value-of select="name" />

  • XML validation error while parsing MXI Manifest

    Hi,
    I have created an hybrid extension for Photoshop. I want to upload my extension on Adobe Exchange. during the upload process I get an error,
    "XML validation error while parsing MXI Manifest: Declarations can only occur in the doctype declaration. Line: 19 Position: 791 Last 80 unconsumed characters".
    The error description specifies that description in MXI file is not valid. Below are the contents of my MXI file.
    <macromedia-extension
               name="yyy"
               id="com.yyy"
               version="1.0.0"
               type="object"
               requires-restart="true">
              <author name="abcd" />
              <products>
              <product familyname="Photoshop" maxversion="" primary="true" version="12.0"/>  
              </products>
    <description>
              <![CDATA[
    <p><font size="14" color="black"><b>abcd</b> qwertyuioipafgjhkjljljklkjl
    <br><br>
    Open Extension via: Photoshop top menu > Window > Extensions > abcd.
    <br><br>
    Online support at: <a href="http://www.abcd.com/help.php">http://www.abcd.com/help.php</a></font></p>
    <br>]]>
    </description>
    <ui-access>
              </ui-access>
    <license-agreement>
    </license-agreement>
    <files>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.html" products="" source="zxp-support/Description/abcd.html"/>
                <file destination="$ExtensionSpecificEMStore/com.abcd/html/abcd.png" products="" source="zxp-support/Description/abcd.png"/>
                <file destination="" file-type="CSXS" products="" source="abcd.zxp"/> 
                <file destination="$automate" file-type="plugin" platform="mac" products="Photoshop" source="mac/abcd.plugin"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop32" source="win32/abcd.8li"/>
                <file destination="$automate" file-type="plugin" platform="win" products="Photoshop64" source="win64/abcd.8li"/>
    </files>
    </macromedia-extension>
    Can anyone please point out why am I getting the error?
    Thanks

    Hi CarlSun,
    Thanks for the reply. I have made the changes suggested by you.
    I have few queries:
    1.  Can we use attribute "source" in the description tag?
         I have created a local html page and specified it in source attribute. but the Extension Manager CS6 did not render the local html page and displayed      the following:
         No description avaliable. Click the following link for more details.
         "http://www.abcd.html". Is it possible to display a local html page in Extension Manager CS6?
    2. Can I display an image (png) in CDATA under description tag? If yes, then can you please guide me how can I do so?
    3. As suggested in tech notes MXI file must include UTF-8 encoding as header (<?xml version="1.0" encoding="UTF-8"?>). The MXI I am using does      not have this header. Do I need to include the header?
    Thanks

  • XML Validation in PI 7.1 - Restart and skip validation possible, but how?

    Hello all,
    I read about schema validation in PI 7.1 and did a few tests on my own, but could not restart and skip validation for invalid payloaded messages. The documents say it is possible.
    Anyone know how? Thanks.
    BTW, I really think putting the schemas in server file system will cause a lot of authorization trouble in enterprises. No one gives access to the server filesystem and I don't think they will also like to open the required subdirectories for share. Asking the basis team to create the folder structures and maintaining schemas would be another pain. Don't you also think that SAP could find a better approach, like automatically uploading the schemas to the filesystem, or validating them from repository directly if possible?
    Kind regards,
    Gökhan

    Hi Gökhan,
    I am facing the same issue.
    I set up outbound xml validation in receiver agreement and tested it with valid and invalid messages.
    The validation works fine.
    But in case of validation error I tried to restart with skipping the validation. But this wasn't possible.
    I am always facing the same valdiation error.
    I already tried all different tools I know (sxi_monitor, message monitoring in rwb and in nwa)
    I am working on PI 7.11 SP6
    Did you find a solution for skipping the validation for a single message out of the monitoring?
    I know that there is the possibility of deactivate the validation in receiver agreement but thid doesn't meet the requirement of skip the validation only for a single message.
    Maybe anyone else faced and solved this issue already.
    Thanks in advance
    Jochen

  • XML Validation - How to raise an alert

    Hi PI Experts,
    I enabled XML validation at "Validtion by Adapetr Engine". Its working fine. But how to integrate XML validation error with Alert Monitoring. Please advise.
    Here below the error from Audit log:
    2010-03-18 18:33:13     Information     The application tries to send an XI message asynchronously using connection File_http://sap.com/xi/XI/System.
    2010-03-18 18:33:13     Information     Backward validation is enabled
    2010-03-18 18:33:13     Error     Unable to validate the message with message ID b01d356e-1801-4b93-29fb-9ed84b25c6a3
    2010-03-18 18:33:13     Error     Returning to application. Exception: com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    2010-03-18 18:33:13     Error     MP: exception caught with cause com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    2010-03-18 18:33:13     Error     File processing failed with com.sap.engine.interfaces.messaging.api.exception.MessageFormatException: cvc-enumeration-valid: Value '11' is not facet-valid with respect to enumeration '[1, 2, 3, 4, 5, 6, 7]'. It must be a value from the enumeration. at line 15, column 34
    Thanks...
    Ravi Kanakam

    Hi Ravi,
    Are you getting other adapter engine alerts? Or only you are not getting xml validation ones? Also take a look at this:
    /people/michal.krawczyk2/blog/2005/09/09/xi-alerts--troubleshooting-guide
    Regards,
    ---Satish

  • XML Validation: ignore non-XML-Header in XML-file(payload): any solutions?

    Dear Experts,
    after I finally managed to configure the XML Validation, we're facing the next problem:
    The payload of the XML files looks like that:
    Abcdef#ABCDEF
    AbcDef#123
    <?xml version="1.0" encoding="UTF-8"?><Document xmlns.....
    as you can see, there's a header which is necessary. The XML Validation works fine if the header is removed manually for testing. If the header is not removed, the validation is not possible ("Content is not allowed in prolog.")
    Is it possible to realise the validation WITH that header? Can I tell SAP PI to ignore the header? Or make any changes to the XSD file?
    Thanks alot!

    Hi Armin,
    Armin Kern wrote:
    > After leaving SAP PI, those 2 lines have to be in that exact place (before the XML part) for further processing. Just deleting it wouldn't be enought. Does the complex design you mentioned complay with this requirement?
    You can put it into the message instead of deleting. And rebuild the "header" in the second step. So you can fullfill the requirement. As mentioned before: The design is complex, this will lead later on to problems. Any change will be difficult, as another developer had to read a long documentation.
    An alternative would be to do all with one interface mapping (without validation):
    1. ABAP / Java mapping deleting the "header" (put it to memory)
    2. Messges Mapping 1:1 each field (will fail in case of wrong format and act as validator)
    3. ABAP / Java mapping restoring the header
    4. Alert will be raised in case of an error (to get the result of the validation)
    Armin Kern wrote:
    > I also thought about splitting the message, deleting those 2 rows in one of the messages, sending this one message to PI again, validate it and if it is correct, send the second message (without mapping) to the final destination. No idea if that is possible at all..
    As well possible. You would need a virtual receiver for the first message, which is sending back a response. For example a servlett, a proxy or a RFC module. In that design you put some logic to the sender, what is actually not bad. But if you do so, why you dont validate there as well (for example with Java)? It would make your design much easier..
    Regards,
    Udo

  • XML Validation

    Since there is no XML validation currently in the Flex/Flash framework, I've decided to start a class that parses a string in an effort to validate the markup, returning whether the XML is valid. I have a need for it in my non-server based application, and have read in numerous places where there is desire for it as well. I have built the class far enough to get the ball rollin', but figure it should be :
    A) available to the community
    B) able to be improved upon by the community
    If you improve upon the code, please post your work here so everyone can benefit.
    Here is the source code :
    XML Validator : v0.2 - last edit by Justin Myers | J2 CREATIVE MEDIA DESIGN
    NOTES:
    Parser is a bit weak and needs work.
    Still need to :
    - Make sure tags are ended properly
    - Make sure there is space between tag name and attribute
    Parser currently handles :
    - Making sure there is no space between tags (with exception to white space)
    - Making sure that attributes open and close properly
    - Making sure there is proper space after an attribute or that it is immediately followed with the tag closing
    package community.classes.parsers
           public class XMLValidator
                  public function XMLValidator()
                  public static function validate(str:String , ignoreWhiteSpace:Boolean = true):Boolean
                          // validation defaults to true (innocent til proven guilty)
                          var valid:Boolean = true;
                          // minimum char length to be valid XML
                          if (str.length < 4)
                                 valid = false;
                          var withinTag:Boolean;
                          var withinAttribute:Boolean;
                          var tags:Array = [];
                          var tag:String;
                          for (var i:uint = 0 ; i < str.length ; i++)
                                 var char:String = str.charAt(i);
                                 // if we are closing a tag
                                 if (char == ">")
                                        // invalid if we never opened a tag, or if we never closed the last attribute
                                        if (!withinTag || withinAttribute)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = false;
                                               tags.push(tag);
                                 // invalid if last character is not a closing tag
                                 else if (i == str.length - 1)
                                        valid = false;
                                        break;
                                        // if we are entering a tag
                                 else if (char == "<")
                                        // invalid if we haven't closed the last tag
                                        if (withinTag)
                                               valid = false;
                                               break;
                                        else
                                               withinTag = true;
                                               tag = "";
                                        // all other characters
                                 else
                                        if ((char != " " || char != "\n") || ((char == " " || char == "\n") && !ignoreWhiteSpace) )
                                               // invalid if there are any characters between tags
                                               if (!withinTag)
                                                      valid = false;
                                                      break;
                                               else
                                                      if (char == "\"")
                                                              // entering attribute
                                                              if (!withinAttribute)
                                                                     // invalid if = does not preclude ", or there is space before =
                                                                     if (str.charAt(i-1) != "=" || str.charAt(i-2) == " ")
                                                                            valid = false;
                                                                            break;
                                                                     else
                                                                            withinAttribute = true;
                                                                     // exiting attribute
                                                      

    961190 wrote:
    so whats the best way to store Rules?
    How to get the data validated with those rules given the source data is in a xml file
    The "integrity rules"?
    Since they have to be ececutable code I'd suggest Java classes...
    How to get the data validated with those rules given the source data is in a xml file
    as @hsc71 wrote, that each XML element select the rules this particular element should pass and run each rule with the current element as parameter.
    This meight be easiser in the Rules have a common interface like
    interface Rule{
      public boolean isPassedBy(XmlElement theCurrentElement, XmlElement theRootElement);
    You could use the ServiceRegistry class from the JVM to fetch the known rules, so that you can add new ones with minimum effort.
    bye
    TPD

Maybe you are looking for

  • Playlist syncing problems

              I'm using a new to me Gen4 iPod Touch, and am used to the classic and original nano. When I sync my music , audiobook, and podcast playlists, the files sync just fine, and the playlist names do, but for my podcast playlists, they are either

  • How to Split Single Outbound Idoc into Multiples

    Hi guys Hope you all are doing good. Can you please let me know , How to Split Single Outbound IDOC into multiples. I am looking for some sought of configuration in IDOC/from SHIPMENT Configuration level.  Because this needs to be implemented for Shi

  • Change Time Constraint for Personal Data InfoType

    Hi, How to change the Time Constraint for Personal Data InfoType. I tried to do it in Customisation Procedure --> Infotypes, but the option to change Time Constraint is disabled for Infotype 0002. Thanks

  • How do I pin the DW properties panel to the bottom of the editor?

    I use the Accordion widget quite a lot, and to edit it I use the Properties panel. Until recently, it had been pinned to the bottom of the DW editor. However the techs at Adobe, in their infinite wisdom, decided to change it into a free floating pane

  • Middleware setting for sales order documents replication crm to ECC

    Hi, Please help me on the following query: what kind of middleware settings should done to get transaction documents(sales order(TA) and contracts) tranferred from SAP CRM to SAP ECC. Please provide tcode and navigate for settings. Thansk and Regards