Click here to Skip to main content
15,898,222 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

when i run my webservice this error has occured.

Error:

The test form is only available for methods with primitive types as parameters.

Code:

C#
public FactureTopNet CreationFacture(ref FactureTopNet fact)
       {

           System.Data.OleDb.OleDbConnection conn = new     System.Data.OleDb.OleDbConnection();
           conn.ConnectionString = @"Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=False;User ID=topnet;Initial Catalog=TopnetBase;Data Source=SWEET-4B6F892B4\SQLEXPRESS";
           conn.Open();
           FactureTopNet facture = new FactureTopNet();
           int r;
           string req = "INSERT INTO facture (NUM_FACTURE, NUM_JUR_FACT, SOCIETE, TYPE, LOGIN_CREATION, DATE_CREATION,LOGIN_MODIFICATION,DATE_MODIFICATION,MNT_FACT, REMISE, NET_PAYE, REST_PAYE, OBSERV, ID_CLIENT, REMARQUE, MONTANTTEXT, TIMBRE, AVOIR,NUM_LISTE,ID_REV,NUM_PF,NUM_PP, REFERENCE, CLE, ID_COM,MONTANT_COM, DATE_COM, RED_COM, INTER_GROUPE)VALUES('" + fact.NUM_FACTURE + "','" + fact.NUM_JUR_FACT + "','" + fact.SOCIETE + "','" + fact.TYPE + "','" + fact.LOGIN_CREATION + "','" + fact.DATE_CREATION + "','" + fact.LOGIN_MODIFICATION + "','" + fact.DATE_MODIFICATION + "','" + fact.MNT_FACT + "','" + fact.REMISE + "','" + fact.NET_PAYE + "','" + fact.REST_PAYE + "','" + fact.OBSERV + "','" + fact.ID_CLIENT + "','" + fact.REMARQUE + "','" +fact.MONTANTTEXT + "','" + fact.TIMBRE + "','" + fact.AVOIR + "','" + fact.NUM_LISTE + "','" + fact.ID_REV + "','" + fact.NUM_PF + "','" + fact.NUM_PP + "','" + fact.REFERENCE + "','" +fact.CLE + "','" + fact.ID_COM + "','" + fact.MONTANT_COM + "','" + fact.DATE_COM + "','" + fact.RED_COM + "','" + fact.INTER_GROUPE + "')";
           System.Data.OleDb.OleDbCommand command = new System.Data.OleDb.OleDbCommand(req, conn);
           r = command.ExecuteNonQuery();
           facture.NUM_FACTURE = fact.NUM_FACTURE;
           facture.NUM_JUR_FACT = fact.NUM_JUR_FACT;
           facture.SOCIETE = fact.SOCIETE;
           facture.TYPE = fact.TYPE;
           facture.LOGIN_CREATION = fact.LOGIN_CREATION;
           facture.DATE_CREATION = fact.DATE_CREATION;
           facture.LOGIN_MODIFICATION = fact.LOGIN_MODIFICATION;
           facture.DATE_MODIFICATION = fact.DATE_MODIFICATION;
           facture.MNT_FACT = fact.MNT_FACT;
           facture.REMISE = fact.REMISE;
           facture.NET_PAYE = fact.NET_PAYE;
           facture.REST_PAYE = fact.REST_PAYE;
           facture.OBSERV = fact.OBSERV;
           facture.ID_CLIENT = fact.ID_CLIENT;
           facture.REMARQUE = fact.REMARQUE;
           facture.MONTANTTEXT = fact.MONTANTTEXT;
           facture.TIMBRE = fact.TIMBRE;
           facture.AVOIR = fact.AVOIR;
           facture.NUM_LISTE = fact.NUM_LISTE;
           facture.ID_REV = fact.ID_CLIENT;
           facture.NUM_PF = fact.NUM_PF;
           facture.NUM_PP = fact.NUM_PP;
           facture.REFERENCE = fact.REFERENCE;
           facture.CLE = fact.CLE;
           facture.ID_COM = fact.ID_COM;
           facture.MONTANT_COM = fact.MONTANT_COM;
           facture.DATE_COM = fact.DATE_COM;
           facture.RED_COM = fact.RED_COM;
           facture.INTER_GROUPE = fact.INTER_GROUPE;
           return (facture);

       }



if any one have an idea , please help me :( :(
Posted
Updated 8-Jun-10 14:42pm
v2

1 solution

You are testing web service which takes complex data types as input. You can only test services which use primitive datatypes (string, int etc) for input. To test your service you need to Add WebRefrence of your service in your project and test the service from code. You can't test it from the default services GUI as you can't enter Array or Datatable in textbox.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900