IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
  • 1.  Validating XSD Schema against an XML

    Posted Thu May 12, 2005 05:27 AM

    Hi,

    I am using Business Connector 4.6 and I don’t know why BC does not perform correct validation on my XML against an XSD schema I created. Attached please find a sample XSD that I created. I created a Record in BC, which I named myPO, based on the XSD and BC also automatically creates the schema named schema_myPO.

    Sample XSD file
    myPO.xsd (1.0 k)

    Then I created a flow with the following sequence of commands:

    1.) MAP

    • I created a record reference to myPO and set the following values to the fields: orderDate = ‘2005-05-06’, shipTo/country = ‘US’, shipTo/name = ‘Someone’, shipTo/street = ‘street’, shipTo/city = ‘city’, shipTo/state = ‘state’ and zip = ‘1234’, fields in billTo = same as shipTo except that zip is set to ‘hello’ and comment = ‘my comment’.

    2.) recordToDocument

    • I mapped myPO to boundNode, generateRequiredTags is set to true and this outputs an xmldata

    3.) stringToDocument

    • I mapped xmldata to the xmldata service in parameter and this outputs a node

    4.) validate

    • I mapped the node to the object service in parameter, set conformsTo = <interface>.<subinterface>:schema_myPO, ignoreContent = false and set failIfInvalid to true.

    When I run this service I am expecting an error to be raised by the validate service because billTo/zip is set to ‘hello’ when in the XSD it is defined as a decimal. However, it is not raising an error. Can somebody help me?

    Thanks in advance for your help.


    #Flow-and-Java-services
    #Integration-Server-and-ESB
    #webMethods


  • 2.  RE: Validating XSD Schema against an XML

    Posted Sat May 14, 2005 12:37 PM


  • 3.  RE: Validating XSD Schema against an XML

    Posted Thu September 26, 2013 01:02 PM

    Hi,

    I have the same problem because I want to validate xml to xsd, I created two docs types docXML and docXSD then I created a service which use the following services :

    pub.file:getFile
    pub.xml:xmlStringToXMLNode
    pub.xml:xmlNodeToDocument
    MAP

    ??? pub.schema:validate ?? I want to use validate in order to return two values success and failed then I don’t know how do to develop the validation process? Could help me?

    Thanks!!!


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB


  • 4.  RE: Validating XSD Schema against an XML

    Posted Thu September 26, 2013 01:30 PM

    Yes if you use schema:validate service it does validate any incoming XML node against the DTD or XML Schema and returns the validation errors based on the inputs you pass it in the validate service.

    Did you test any of the above like?

    Also please review the built in services guide for the public services and it covers some basic explanation of how the service works.

    HTH,
    RMG


    #Integration-Server-and-ESB
    #webMethods
    #Flow-and-Java-services