locked
What to do? RRS feed

  • Question

  • I have to do some initial work on web services. The task is not yet clear but can you help in understanding following para?

    "We have an API based on a web service that several client applications use to communicate with core processing. If I send you the WSDL and supporting XSDs, you need to build the web service, binding, etc. in a .NET environment. The current implementation uses Tomcat and AXIS2, JAXB, etc. We need a .NET implementation for this."

    I have got xsd and wsdl files.

    Thanks.

    Wednesday, January 6, 2010 12:11 PM

Answers

  • Hi Atul,

    "Do I need to write a web service by asking class objects as an input parameters?
    If I do that, I think I need to do serialization and send it."

    Yes - web services take serializable objects as parameters.  The framework takes care of serialization on your behalf - you don't have to do any explicit serialization. 

    If you have the choice - you should use Windows Communication Foundation (WCF) for implementing your services.  It is the go forward technology for writing and consuming services in .Net.  Here are some links for getting started. http://msdn.microsoft.com/en-us/netframework/first-steps-with-wcf.aspx, http://msdn.microsoft.com/en-us/netframework/aa663324.aspx,  http://msdn.microsoft.com/en-us/library/ms734712.aspx,

    Specifically in your case - you can use the svcutil.exe tool to generate the interface you need to implement for your service. (svcutil generates client code - but you can grab the interface from the genned code).

    If you choose asmx - you can use the wsdl.exe tool with the /serviceInterface option to generate the base implementation of your web service.

    HTH,
    Ed

    Wednesday, January 6, 2010 4:17 PM
    Moderator

All replies

  • Hi Atul,

    You need to analyse the WSDL & XSD files, note down the web methods & parameters(with their data types) passed to those web methods.

    After that create one web service(ASP.NET or WCF) in .NET framework & write the web methods found in WSDL.


    Regards, Ulhas
    Wednesday, January 6, 2010 12:43 PM
  • I analyzed wsdl and xsds and it is very complex. Also I used XSD.Exe tool to generate class files but it is too complex to start with. Do you have any simple example I should look before working on this?

    Also on using xsd.exe tool, it generated one class file having lots of classes in it.

    So some questions are:

    Do I need to write a web service by asking class objects as an input parameters?
    If I do that, I think I need to do serialization and send it.

    Or I need to use xml strings as an input and output parameters, is this suggested way?

    Thanks.
    Wednesday, January 6, 2010 12:53 PM
  • Hi,

    I have two web services webcast on my blog, you're more than welcome to view them.

    Videos [http://devisfun.wordpress.com/videos/]

    Hope it helps. Any further help, just ask.

    Regards.
    -

    Esteban Murchio.

    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Blog
    Wednesday, January 6, 2010 1:35 PM
  • Hi Atul,

    "Do I need to write a web service by asking class objects as an input parameters?
    If I do that, I think I need to do serialization and send it."

    Yes - web services take serializable objects as parameters.  The framework takes care of serialization on your behalf - you don't have to do any explicit serialization. 

    If you have the choice - you should use Windows Communication Foundation (WCF) for implementing your services.  It is the go forward technology for writing and consuming services in .Net.  Here are some links for getting started. http://msdn.microsoft.com/en-us/netframework/first-steps-with-wcf.aspx, http://msdn.microsoft.com/en-us/netframework/aa663324.aspx,  http://msdn.microsoft.com/en-us/library/ms734712.aspx,

    Specifically in your case - you can use the svcutil.exe tool to generate the interface you need to implement for your service. (svcutil generates client code - but you can grab the interface from the genned code).

    If you choose asmx - you can use the wsdl.exe tool with the /serviceInterface option to generate the base implementation of your web service.

    HTH,
    Ed

    Wednesday, January 6, 2010 4:17 PM
    Moderator