Creating ASMX implementation technolgy project

Topics: General Discussion Forum, Service Factory Modeling Edition Forum
Jul 10, 2008 at 8:03 AM
Hi,

I have recently started using Web Service Factory Framework. I want to know how to build a web service, using ASMX implementation technology. If anyone could provide me with a good article with complete procedure and sample code. i have gone throught the hands-on-lab exercises but they are for wcf implementation technology. I want to make ASMX implementation technology web service. Any help would be greatly appreciated.\

Regards,
Faisal Shahzad
Developer
Jul 10, 2008 at 9:20 PM

 
Just to provide you a broader view, let me explain instead what actually happens when you change the Implementation Technology on a given model. The idea behind these models is to be as uncoupled as possible from the technology that will be used to implement a service. This means that most of the elements and settings created will be valid either for a WCF or an ASMX service, which is  a pretty cool thing! But what is actually going on when you change this value? Well, basically you may find a few differences in the following areas:

 

·         IMPLEMENTATION PROJECT: You will need to create an implementation project that is compatible with the chosen technology. This project has the same purpose than the WCF one, to serve as a repository for the code generated from the models. To create it,  you should follow the same steps you followed on the HOL (Hands On Lab) and simply choose ASMX Implementation Project instead.

 

·         SPECIFIC SETTINGS: Each model was built with a set of configurable values that are applicable to both technologies and specific ones are loaded using what we call extenders. Hence, if you switch from WCF to ASMX, you will notice that some element settings are not there anymore and some new ones show up. In the case of ASMX, there aren’t many additional settings to consider in each of the models:

 

o   DATA CONTRACT:

§  DataContracts will have an additional bool property called Order Parts, which determines whether message data members should be ordered or not. In case you set it to True, you will have to set the a unique Order value for each of its DataMembers.

§  DataContractCollections do not support Dictionary<string, type> collections.

 

o   SERVICE CONTRACT: Of course, DataContract Serializer won’t be a valid option for ASMX, you should use XmlSerializer instead.

o   HOST: Eventhough endpoints are one of a WCF main concepts, they are still applicable to ASMX. So basically you should proceed exactly the same as you did with the WCF one.

 

Other than these specific items, you should find no challenge in creating a ASMX service using WSSF. So don’t hesitate in going for it, you even have a whole Validation system behind that won’t let you  make conceptual mistakes.

 

Thanks