• 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!

Writing a program to consume a webservice, in Java, using Visual Studio

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

    Writing a program to consume a webservice, in Java, using Visual Studio

    We've a couple of numpty Microsoft consultants, who have to write a program to consume a webservice. I've given them two WSDL files - one Portside, one with the Bindings. They're ignoring these files, insisting instead that they need a URL to get the WS information.

    In Visual Studio, how can you set up a webservice consumer proxy, using WSDL files, rather than a URL.

    ( sorry if the terminology is a bit off, I've written the webservice, on SAP, but I don't know Microsoft stuff - when others have wanted to consume the webservice, they've been fine with the WSDL files).
    Down with racism. Long live miscegenation!

    #2
    Its simple but they really should Google before talking crap.

    In solution explorer of VS2008 and VS2010 right click on References and select Add Service Reference.

    The project needs to be using the .net 3.0 framework or above but where did you grab those numpties from.

    For earlier versions you simply cross compiled the java code in J# (that worked wonders on JDE implementations).
    merely at clientco for the entertainment

    Comment


      #3
      Originally posted by eek View Post
      Its simple but they really should Google before talking crap.

      In solution explorer of VS2008 and VS2010 right click on References and select Add Service Reference.

      The project needs to be using the .net 3.0 framework or above but where did you grab those numpties from.

      For earlier versions you simply cross compiled the java code in J# (that worked wonders on JDE implementations).
      So the Add Service Reference will allow you to specify a flat file?

      The numpties are fully qualified Microsoft consultants, and are Microsoft employees.
      Down with racism. Long live miscegenation!

      Comment


        #4
        Originally posted by NotAllThere View Post
        So the Add Service Reference will allow you to specify a flat file?

        The numpties are fully qualified Microsoft consultants, and are Microsoft employees.
        Yes the information placed in the address text box doesn't have to be a website url, a local file path is perfectly acceptable.

        Of course this means

        1) they can't test as they develop which I guess is what they really want to do.
        2) they need to edit the proxy file prior to doing any testing but if they are fully qualified they should know how to do that.
        merely at clientco for the entertainment

        Comment


          #5
          Originally posted by eek View Post
          Its simple but they really should Google before talking crap.

          In solution explorer of VS2008 and VS2010 right click on References and select Add Service Reference.
          If he's written it in SAP shouldn't it be 'Add Web Reference'? Just tried and and it accepts a local c:\xxx.wsdl URL happily.
          Last edited by Durbs; 17 December 2010, 10:33.

          Comment


            #6
            Originally posted by Durbs View Post
            If he's written it in SAP shouldn't it be 'Add Web Reference'? Just tried and and it accepts a local c:\xxx.wsdl URL happily.
            .net v2 add web references is really for .net based web (.asmx) web services. It may work but you usually discover gotcha's and strange errors down the line due to implicit conversions that .net insists you really want to do.

            .net v3 add service reference is generic and doesn't make the assumptions the web references code does (avoiding the strange random errors you otherwise see).
            merely at clientco for the entertainment

            Comment


              #7
              Generating a WCF Client from Service Metadata

              Comment


                #8
                Originally posted by eek View Post
                .net v2 add web references is really for .net based web (.asmx) web services.
                ?? No it isn't, its for consuming any WS-I compliant service. Nothing to do with .NET or asmx.

                Comment


                  #9
                  I think I've just entered the geek zone...

                  Anyway, I've passed the important information on, so thanks all. "Yes a file works fine, stop being so stupid".

                  Thanks all.
                  Down with racism. Long live miscegenation!

                  Comment


                    #10
                    Originally posted by Durbs View Post
                    ?? No it isn't, its for consuming any WS-I compliant service. Nothing to do with .NET or asmx.
                    upto the point when it does something stupid and throws a wobbly. I wasted days three years ago getting a WS-I service (written in php) to work correctly via the web reference link.

                    Using the Add service reference it worked first time.

                    You view may vary but I wouldn't use a web reference if the other link is available.
                    merely at clientco for the entertainment

                    Comment

                    Working...
                    X