How to get inputs of calling service


I need to create a document that stores the inputs passed to a service at runtime. And by that I mean the inputs (those declared in the input/output) not the whole pipeline.

I thoght of creating a java service to do so (getInputsAsDocument()). The API specifies a few methods that should be usefull, noticeably the InvokeState.getInputs() method. The problem is that when I call the java service, the current InvokeState gets updated, and a call to getInputs() will give me the inputs of the getInputsAsDocument() service.

So my question is: is there any way to gain access to the InvokeState variable that describes the state of the calling method instead of the current state?

Many thx.

I just thought of another way arround this problem: if I can get the list of declared inputs for a service given its name, I can look for their values in the pipeline. However, I can’t seem to find such functionallity in the API.

Any help will be greatly appreciated.


Can you provide more information about what you are trying to do? I’m guessing that you are working on a utility of some sort. It would be helpful to know more.


Yeah, sure.

I’m trying to build a platform to facilitate Unit Testing within the Developer environment, so that we can bring the extreme programming philosofy to it.

The idea is to provide utility methods that make it easy to write unit tests for a given package, and then a jsp application that executes them all and displays the results.

One of the flow services I implemented receives a method name, its inputs and the tests to execute (basically assert conditions) and it’s called testService().

Another service I am trying to implement is an utility to gather the inputs and method name of a service at runtime (createTestSet()). It would allow for a strategy somewhat like the get/restore pipeline debugging tactique: the createTestSet() is added at the beggining of the service that needs testing, and at runtime it’ll capture the inputs so that they can be reused for testing.

The main advantage is that after the inputs are caught, you can delete the createTestSet() reference from the service. Thereafter, there is no mixing of “actual” code and testing code, which is done elsewhere through the use of the testService() function. Another advantage is that the output is automatically tested with the rules given, so there’s no need for a manual inspection of the result tab.

So, as you can see, there are a lot of fuctions that use reflexion: they need to determine at runtime the variables they’ll be dealing with, services they’ll be calling, etc. Needless to say that there are a lot of java services, but I try to keep this to a minimum.

In any case, besides the input variables problem, I’m currently stuck at two other issues:

.output variables: it’s the exact symmetrical of the input variables, I need this to implement a cleaner pipeline management (how can you drop variables that aren’t in the output if you don’t know what’s the output like?:wink: )

.listing services: how can I get a list of services from a package? This would be needed for the second part of the project, the jsp application.

Any help will be welcome.

This post might give you some ideas. Also, you should check out CustomWare’s WMUnit unit testing utility for webMethods IS.


I had already bumped into CustomWare’s utility. I’ll be looking into it asap (got some pretty nasty bureaucracy for running demos :mad: ).

Meanwhile, I’ll look into the info on the thread you pointed me to. Thx a lot. I’ll report back if I have any news.