Testing with complex types

Topics: Service Factory Modeling Edition Forum
Jan 10, 2008 at 11:51 AM
Hi,

I just discovered WSSF and tried to use it for developing an existing web service application.

Our existing web service application has a lot of web methods that accept primitive parameters, like a card id string. This is very useful to test because I can open the web service test form in a browser and enter input parameters and then submit the request.

Now I modeled the same web service with WSSF, created a asmx application and I noted that all operations take a Message as input and output resulting in complex types.

For example, the GetCardId operation takes a GetCardIdRequest message, containing a cardId string (primitive message part).

Now when viewing the service in a browser, I can only see the available web methods but I cannot test them anymore because they all use complex types.
The web service documentation page displays the following message : "The test form is only available for methods with primitive types as parameters".

As I am new to web service development, I have some questions:
- using primitive types is not recommended anymore?
- how are you testing web methods? with a dedicated testing client application?
- is there a tool that can generate automatically a form allowing to enter the complex types fields and test?

Thank you for sharing your experience
Developer
Jan 10, 2008 at 5:32 PM
The message strategy used by the factrory is the recommended guidance. As you pointed out, you may create a simple client that passes the message with all the properties inside or you may even create a unit test that do this. That may be the appropiate way to test this scenario.