webMethods

webMethods

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

WSDL with Sequence of any 

Thu December 22, 2022 02:51 AM

WSDL with Sequence of any
This tutorial is on how to work with wsdl providers/consumers with i/o defined as sequence of any.
Use Cases:
WSDL with sequence of any can be implemented when multiple services can share a common endpoint (i.e.)common endpoint but i/o of the service can be changed dynamically.
This approach has the below advantages
• The number of operations in wsdl is reduced.
• The number of endpoints and its configuration is reduced.
• Easy to maintain.
Schema Definitions:
In WSDL:

image

In webMethods schema file:
The schema created from the wsdl generates a document of mixed complex type with sequence of any

image

Working with Consumer WSDL with i/o defined as sequence of any.

  • Import the wsdl into designer by following the below steps:
  • Right click on the folder->Select Web Service Descriptor
    image

Select Consumer and import the wsdl as per below steps:

image

image

Connector definition in Consumer Descriptor:

When this type of element is converted into an IS document type ,IS creates a document structure with 'allow unspecified files" flag set to true. And inside that document structure it puts a string element with name *body

Request Definition for Connector:
The request to this service should be passed as IDATA and map the IDATA document to the document structure above *body.
In this example, map to requestDoc and since the requestDoc is set to allow unspecified fields and it will be a valid request.

Working with Provider WSDL with i/o defined as sequence of any.
Import the wsdl into designer by following the below steps:

  • Right click on the folder->Select Web Service Descriptor
  • Select Provider and import the wsdl as per below steps:

image

Provider service structure :

• This service can receive input in any document structure at run time.
• You can create logic based on the document received.

SOAP UI Samples


Attachments
Samples.zip (46.2 KB)


#Integration-Server-and-ESB
#webMethods

Statistics
0 Favorited
0 Views
0 Files
0 Shares
0 Downloads