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.


#TechXchangePresenter
 View Only
  • 1.  Problem in creating document list out of xmlNodeToDocument

    Posted Mon March 07, 2005 11:05 AM

    Hello,
    I am converting xCBL Order data from xml string to xCBL Order document using xmlStringToXMLNode and then xmlNodeToDocument. To validate the generated document against WmxCBL3.5rder document(i.e. WmxCBL.com.commerceone.XCBL35.n1_0rder), the simple elements should be converted to documents and some complex element to document list. Hence I have set the list of such simple elements in “documents” input param of xmlNodeToDocument service, and complex elements in “arrays” input param of xmlNodeToDocument service. But I have certain complex type in Order document that I wish to convert to document list. e.g. “StructuredNote” element. When I do not receive any child element value for such complex element in input xml string, the xmlNodeToDocument service will generate this element just as string list and not as document list. As a result, my order doc fails validation against WmxCBL3.5 Order document type.

    Here is the part of xCBL 3.5 Order.xsd that refers to above mentioned comlpex element “StructuredNote” (I have removed starting tag of xsd so that it can be viewed properly in browser):

    xsd:element name=“ListOfStructuredNote” type=“ListOfStructuredNote”/
    xsd:complexType name=“StructuredNote”
    xsd:sequence
    xsd:element minOccurs=“0” name=“GeneralNote” type=“xsd:string”/
    xsd:element minOccurs=“0” name=“NoteID” type=“xsd:string”/
    xsd:element minOccurs=“0” ref=“Agency”/
    xsd:element minOccurs=“0” name=“NoteURL” type=“xsd:anyURI”/>
    xsd:element minOccurs=“0” name=“TextTypeCoded” type=“TextTypeCode”/>
    xsd:element minOccurs=“0” name=“TextTypeCodedOther” type=“xsd:string”/>
    /xsd:sequence>
    /xsd:complexType>

    Kindly suggest some way to convert this element (StructuredNote) into document list and not string list in the output of xmlNodeToDocument service.


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


  • 2.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Mon March 07, 2005 03:15 PM

    Ashu,

    If you set “StructuredNote” in the “arrays” also set makeArrays=true in the xmlNodeToDocument and specify the documentTypeName(XCBL Order doc fully qualified path)this should take care of the rest.

    HTH,
    RMG


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


  • 3.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Mon March 07, 2005 03:31 PM

    Thanks for response RMG.
    But if I give documentTypeName name for the service xmlNodeToDocument, makeArrays should be false and arrays should not be set. I tried that way but could not get such element as document list if its child element are not appearing.


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


  • 4.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Mon March 07, 2005 04:14 PM

    Ashu,

    yes you are right,still wondering what could be the problem.

    Normally if you set documentName it should take care of doclists in the output,for complex arrays,if u specify “arrays” elements it should work.

    Regards,


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


  • 5.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Tue May 10, 2005 02:29 PM

    Is it just me or is this a major defect in webMethods, that regularly bites us in the behind? Why can’t this very basic service actually work when passed the doc type name?


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


  • 6.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Mon October 20, 2008 12:31 PM

    Hi,

    Were you able to resolve this problem ??
    I am stuck in exact same issue and have not been able to figure out the solution.

    Please help

    Regards
    Namita


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


  • 7.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Wed October 22, 2008 08:15 AM

    PLease try following steps -

    nodeToDocument (use webMethods IS document name)
    documentToXMLString (use same webMetods IS document name)
    xmlStringToNode
    nodeToDocument (use webMethods IS document name)

    Output should have proper structure as per webMethods IS document.


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


  • 8.  RE: Problem in creating document list out of xmlNodeToDocument

    Posted Tue October 28, 2008 04:59 PM

    This was also an issue for us. If you have this package in your system: WmIPRoot, you can use this service: wm.ip.util:documentToRecord, two input parameters (they are invisible, you need to type in):
    makeArrays: set to “false”
    recordName: set to “WmxCBL…”
    This service works better in most cases than xmlNodeToDocument (it handle the list type of nodes properly).
    HTH,
    Tong


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