locked
XSD to WSDL Conversion RRS feed

  • Question

  • User-885475315 posted

    Dear All - I need to convert XSD to WSDL, is there any utility available ? Further and what is the best way to consume XSD type web services in WCF 2015. 

    I am in a situation our two clients have web services and one in SOAP (WSDL) and other in XSD, we need to prepare a web service that will act as a bridge between our desktop application and customer service. In our webservice we need to consume both web services WSDL and XSD, would you please what is the best way to do it please.

    Br.TAM

    Thursday, April 20, 2017 5:35 AM

All replies

  • User475983607 posted

    tanvir.mughal

    Dear All - I need to convert XSD to WSDL, is there any utility available ?

    That's not possible.  An XSD defines a schema.  A WSDL describes a web service.  You might find an XSD used as a data contract defined by the client proxy that consumed a WSDL though.

    tanvir.mughal

    Further and what is the best way to consume XSD type web services in WCF 2015. 

    WCF uses a data contract to define the interface used between end points.  You probably should take some time to learn WCF so you know what you're dealing with before going down this path.

    https://msdn.microsoft.com/en-us/library/ee354180.aspx

    tanvir.mughal

    I am in a situation our two clients have web services and one in SOAP (WSDL) and other in XSD, we need to prepare a web service that will act as a bridge between our desktop application and customer service. In our webservice we need to consume both web services WSDL and XSD, would you please what is the best way to do it please.

    This is a difficult question to answer as your question has  little to do with services.  You're asking how abstract two services that use different interfaces in hopes to simplify the client code or business logic.  One service being SOAP and the other service is probably REST or a simple XML service.  There is probably no need to build a 3rd service to do this if the client app can currently talk to both services.  Look into design patters.  Maybe a facade pattern to wrap the service calls directly in the client code.  Or a service locator pattern, Or maybe a bit of both with a little DI. 

    If you really want to build another service to do this you will be faced with the same problem only the problem has moved to the services.  In this case you'll naturally end up with a facade pattern.  Keep in mind, no matter what direction you go there is no getting around handling the two different service interfaces.

    Thursday, April 20, 2017 3:56 PM
  • User-885475315 posted

    Hi - Thank you for your swift and helpful response, Would you please confirm, is it possible to generate proxy classes from XSD files as our client provide XSD's their XML files but we need to write a client app in WCF 2015 to consume these XSD's. Please assist on this too. Thanks in advance. 

    Sunday, April 23, 2017 6:54 AM
  • User475983607 posted
    The .net framework comes with the xsd.exe utility that can create a class from and XML XSD file.

    https://msdn.microsoft.com/en-us/library/x6c1kb0s(v=vs.110).aspx

    https://en.m.wikipedia.org/wiki/XML_Schema_(W3C)
    Sunday, April 23, 2017 1:19 PM