Web Service method string parameter uncertainty

Jan 26 2005 6:41 PM
Hi, I am quite new to web services and C#. I have a very simple Java web service that was implemented and generated by myself using Sun Studio and deployed onto Sun App Server. The purpose of this web serviced is to test returning an array of strings and passing a string parameter. I have tested it from XMLSpy and it runs fine. XMLSpy generates this request: " String " I want to call my web service form a Winform button. I have set-up a web reference to the web service and have coded simply like this: CDSvc.CDWS ws = new CDSvc.CDWS(); string[] sCDList = ws.getCDs( "C"); label1.Text = sCDList[0]; ... but that did not work as I got the error message - "Argument '1': cannot convert from 'string' to 'CeeDeez.CDSvc.getCDs'" - so had to code like this: CDSvc.CDWS ws = new CDSvc.CDWS(); string[] sCDList = ws.getCDs( new CeeDeez.CDSvc.getCDs()); label1.Text = sCDList[0]; I dont understand why I had to do pass this as the parameter "new CeeDeez.CDSvc.getCDs());". Why is it expecting this type and not string? Is the WSDL I generate from Java Web Service the problem ... yet when I run it from XML Spy and consume it from a JSP page, in both cases passing a string it is ok. My WSDL is: I am sure this is something simple - so appreciate any help!! Thank-you Mark