Method overloading

How do we accomplish method overloading in webMethods similar to java? How can we have two methods (flow services) in the same namespace with different number of input parameters?

In wM you can’t have two items with the same namespace.
You can play with these properties of the input parameters of your flow service to achieve what you want here.

“required”, “allow null” and “Allow unspecified fields”

I wonder why method overloading is not supported in webMethods. what would be the drawback of supporting it? Any idea?

I have also thought about using optional parameters. Buy my requirement is to slowly phase out certain flow services exposed as web services written using SOAP RPC protocol. We want to implement some of these existing services using SOAP MSG protocol (DOC/Literal) for performance reasons. At the same we want to have minimum impact on the clients which are already consuming the existing web services. So i want to duplicate the service and have a different input/output specification for the new flow service or operation.

In general what would be good migration strategy in this scenario? Any comments/ideas would be appreciated.

Thanks much,
Srinivas

Well, for one thing IS will receive soap-rpc and soap-message (doc/lit) messages on separate URL’s. Messages sent to your soap-rpc processor would continue to work as they do today.

If you created a custom soap processor, you could extract the body from the soap message and convert it to a document suitable for invoking your existing service. Since your existing services may not have document types for their input and output signature, you may not be able to generate a soap-message WSDL for them.

I suppose you could modify your existing services (the ones exposed as soap-rpc web service operations) to accept either the current parameters or a new document type containing those parameters. Doc/lit messages would populate the document type, while soap rpc messages would populate the existing parameters.

There are several variations on this theam including creating new wrapper services that accept the document type, extract its contents and invoke your existing services. Probably could do that in the custom soap processor as well.

Mark

Mark,

Thank you for taking the time to write your response. Those are good strategies. Also i was wondering why webMethods does not allow method overloading (Same service names but different number and type of parameters).

Thank you,
srinivas

I don’t think there is much of a need for method overloading in IS. It is only one approach for versioning services.

Mark