Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Mar 01, 2012 02:19 PM by desertfoxaz
Feb 29, 2012 08:33 PM|LINK
My company has been using ASMX web services for some time but is now moving toward WCF. I have created a new WCF service (my first) using basicHttpBinding and I can get it to work. The service exposes a type that I created (a custom class) who has simple
A (Java) client application needs to use this web service so they wanted to get the WSDL for it so they could generate their client class. After inspecting the WSDL, there is nothing in it specifying how the custom class is defined.
I created a separte project having an ASMX web service in it and created a copy of the custom class within it and create a method that returns that type, just like the WCF version did. When I compare the WSDLs for each service type, I notice that the WCF
service has an empty <wsdl:types> element while the ASMX one has information about my custom type. I did remember to add the DataContract and DataMember attributes to my custom type for the WCF service and in the ASMX service I added the Serializable attribute.
Strangely, if I create a console test app and connect to the WCF service, it knows the return type (my custom class) and I can get Intellsense to recognize all of it's properties. I do not have a reference to the assembly which contains the class in question.
This makes me think that there's something wrong with my configuration. Is there something I need to do in the WCF service project's web.config to get this to work? They want to do a demo soon and I need to get this working. Thanks
Mar 01, 2012 09:01 AM|LINK
Have u enabled in WCF config
Mar 01, 2012 02:19 PM|LINK
Yes it does. After further analysis I see that there are import statements that link to other files and if I look at those the information is there. That's why my code works.