• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

Web Services Contract First

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    Web Services Contract First

    Dont suppose anyone has a copy of WSCF version 5.0 of this tool? They managed to break the generation of Collections in version 5.1 it seems...

    Or, should anyone know of any other tools that generate Collection based proxies for Web Services (in VB.Net rather than C# for this contract), please let me know....
    Vieze Oude Man

    #2
    Not sure what you mean Mr Mc Guid.

    I always create the web service contract first using XML Spy to create the schemas and the WSDL by hand and then use wsdl.exe to generate the proxies.

    Perhaps I am missing something????

    Comment


      #3
      Firstly, its VB.Net and .Net 1.1....

      We dont have control over the WSDL, as its generated in conjunction with a few dozen outside agencies... the actual spec hasnt been signed off but we are writing a system to communicate according to that 'contract' anyway!!!

      With this in mind Ive written a wrapper for a Web Service proxy that uses reflection to examine the properties of a given Web Method, and set the values from a Hashtable either stored in session (from a wizard type interface with up to 30 pages of data) or passed as a Hashtable directly from a standard ASPX page, using a 'stateKey' attributes for the Web Controls, and a base page that handles persitence of values from any Web Control and a placeholder to dynamically instantiate Custom Controls acording to an XML file that dictates the process.

      Basically I know we would be caught out in terms of timescales if we had to keep reworking calls to the various Web Services, and it is not a performance critical application - it just needs to be reliable and maintainable if the specs change.

      The array based proxies generated by the VS.Net 'Add Web Reference' are unwieldy - much easier to use Collections and cast them as CollectionBase to allow generic processing (GetEnumerator and loop through the Types they contain, and then Get or Set properties using reflection).

      WSCF is an easy way to convert a WSDL description to a Collection based proxy....
      Last edited by mcquiggd; 17 January 2006, 22:04.
      Vieze Oude Man

      Comment


        #4
        You lost me a bit.

        Have you used this MS tool:

        http://apps.gotdotnet.com/xmltools/xsdobjgen/

        Just like xsd.exe but generates better code.

        HTH.

        PS VB.NET is gay

        Comment


          #5
          Well, its local government... what do you expect... Im a C# MCSD but it was 50 minutes into the 1 hour interview that they told me it was VB.Net... was pretty easy to get back into.

          Re: XSDObjectGen - Yep, Im looking at that... not bad, and seems to support .Net 2... all suggestions welcome
          Vieze Oude Man

          Comment


            #6
            Originally posted by mcquiggd
            With this in mind Ive written a wrapper for a Web Service proxy that uses reflection to examine the properties of a given Web Method, and set the values from a Hashtable either stored in session (from a wizard type interface with up to 30 pages of data) or passed as a Hashtable directly from a standard ASPX page, using a 'stateKey' attributes for the Web Controls, and a base page that handles persitence of values from any Web Control and a placeholder to dynamically instantiate Custom Controls acording to an XML file that dictates the process...WSCF is an easy way to convert a WSDL description to a Collection based proxy....
            Sounds terribly complicated to me.

            Perhaps something more generic would be easier? Have to say never been keen on web-services/WDSL to proxy class/code generators. Always prefered generic webservices/webservice-clients which deal with all and sundry and use the XML or schema to decide what to do with it.

            "The array based proxies generated by the VS.Net 'Add Web Reference' are unwieldy"

            Using 'Add Web Reference' is like a box, sometimes it's difficult to step out of...

            "The code generated is an enhanced .NET object library that greatly simplifies working with XSD data structures and XML."

            Hmm, sometimes that's one of its biggest limitations.
            Last edited by Joe Black; 17 January 2006, 23:38.

            Comment


              #7
              Actually Mr Black, Ive pretty much done as you suggest.....

              A new interface is agreed, we get the WSDL, we import it into our project, I right click and effictively say ' create me a Collection based proxy '... takes seconds...

              The same code I wrote a month ago will handle the population of parameters no matter what is recreated in the proxy - its up to the UI developers to just assign a ' stateKey="propertyName" ' attribute to any control in the aspx page they want mapped to a property of the Web Method call... and thats pretty much it.

              Basically Im working with people who arent familiar with .Net, so I abstracted as much as possible - an API for calling the Web Services through a single call, two base classes that handle authorisation, errors, logging, and a 'Wizard' framework that involves just creating a User Control.
              Vieze Oude Man

              Comment


                #8
                I get a lift home to Edinburgh from the senior permie database chappie who is leading the non-dotnet side of the project - they may be upgrading the way they work with Web Services, which would mean a reworking of our side... i have already mentioned the increased capabilities of .Net 2.....
                Vieze Oude Man

                Comment


                  #9
                  "The code generated is an enhanced .NET object library that greatly simplifies working with XSD data structures and XML."

                  interesting - in what way? not that i'm a fan of either web services or reflection but happy to be educated.

                  what does .not2 bring to webservices beyond wse3?

                  Comment


                    #10
                    Well, I hope you've considered security...



                    ...yeah - I put in a firewall
                    Older and ...well, just older!!

                    Comment

                    Working...
                    X