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.



#Automation


#Applicationintegration
#webMethods
#Integration
 View Only
  • 1.  Best way to write ws output document type

    Posted 03/02/07 03:49 PM

    I’m writing a flow service that we will expose as a web service. I’ve written two document types, one for input and another for output, for example:

    input

    • param1

    output

    • value1
    • value2
    • value3

    so every output value are at top level of doc type.

    Since our main clients will be java apps, we’ve played a bit with Eclipse and generated a client to invoke that ws. Since output values are at top level, the client has a method where the first param is the input one, and all the other method params are output values; it’s really ugly! :slight_smile:

    So we do defined output doc type as:

    output

    • results
      • value1
      • value2
      • value3

    so results is a document with output values inside itself. This way, genrating a java client, it will create a method with one input paramenter and returns a bean with output parameters.

    So, I’d like to know, if defining an output document type, with only one top level variable (a documents), and inside it all output values is a suggest / best practice in developing flow services to be exposed as web services.

    Regards,
    Sandro


    #soa
    #webMethods
    #API-Management


  • 2.  RE: Best way to write ws output document type

    Posted 03/03/07 01:12 AM

    My approach is to use a single document type reference for the input and a single document type for the output. The source document types should be namespace-qualified by populating the XMLNamespace property.

    In attempting to follow the document / literal “wrapped” style, the input document name should be the same as the name of the operation (e.g. “CreateOrder”) and the output document type name should be the name of the operation plus the string “Response” (e.g. “CreateOrderResponse”).

    If you follow this approach, you be able to use the much-maligned WSDL generator wizard to generate a single-operation WSDL that should work with most, but not all, soap clients.

    HTH,

    Mark


    #API-Management
    #soa
    #webMethods