10 Replies Latest reply on May 16, 2011 1:53 AM by Antonio123131

    Flex Builder 4.5: I can't consume .net webservice

    Antonio123131 Level 1

      Hi, i'm trying to connect to a .NET webservice using Data Service Wizard. I think i must select WDSL service. When i set my webservice URL:


      http://192.168.1.135/prueba/webservice1.asmx

       

      I get this error:

       

      There was an error during service introspection.
      WSDLException: faultCode=PARSER_ERROR: Problem parsing 'http://192.168.1.135/prueba/webservice1.asmx'.: org.xml.sax.SAXParseException: The element type "p" must be terminated by the matching end-tag "</p>".

       

      The webservice is very simple:

       

      namespace iNext
      {
          /// <summary>
          /// Descripción breve de WebService1
          /// </summary>
          [WebService(Namespace = "http://tempuri.org/")]
          [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
          [System.ComponentModel.ToolboxItem(false)]
          // Para permitir que se llame a este servicio Web desde un script, usando ASP.NET AJAX, quite la marca de comentario de la línea siguiente.
          [System.Web.Script.Services.ScriptService]
          public class WebService1 : System.Web.Services.WebService
          {

       

              [WebMethod]
              public String[] GetClientes(string prefixText, int count)
              {
                  CLIENTESTableAdapter t = new CLIENTESTableAdapter();
                  ClientesDS.CLIENTESDataTable cds = new ClientesDS.CLIENTESDataTable();
                  t.Filtra(cds, "%" + prefixText + "%");

       

                  List<string> responses = new List<string>();
                  foreach (DataRow dr in cds)
                  {
                      string make = (string)dr["NOMFISCAL"];
                      responses.Add(make);
                  }
                  return responses.ToArray();
              }
          }
      }

       

       

      Where is the error?

      Thanks