Visual Studio, wsdl, xsd

Generate sample request/response message from WSDL

For those of you well versed in the ways of wsdl, you might be able to do this by hand. But if you want a little help you can generate sample xml from the wsdl/xsd you get from a service’s metadata. Using Add Service Reference in Visual Studio creates this metadata for you. When you add your service reference, if you expand the files that you got you will see a couple of schemas.


image


Now if you have a xsd in BizTalk Generating an instance of a schema is a very basic functionality for all developers. I’m not sure how it is for the pure .NET developers though, but there are ways (of which this is one) that does not include BizTalk tools that allows you to generate xml for pieces of a schema.


In your service reference locate the schema you want (hint: in the above image that would be item.xsd) and open it with the XML Editor (you could just as well open any other schema, it need not come from a service reference in a project). Then go for View – XML Schema Explorer.


Right clicking on the node you want (your response) you can then choose to Generate Sample XML.


image


Now I make no claim as to having used this extensively – I’m a BizTalk developer, and as such I’ve got other tools at hand. I’m sure it’s got it’s flaws, but hey – you can always do it by hand if you aren’t happy with the help you get.

1 thought on “Generate sample request/response message from WSDL”

Leave a Reply to http:// Cancel reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s