Bonjour à tous,
J'ai implémenté un web service tout simple en C# (une méthode HelloWorld est censée retourner une chaine de caractères). Je n'ai pas eu de problème dans le déploiement.
Mais j'ai un problème au moment de l'appel de ce web service à partir d'une application window également développée en C#.
Voici l'exception générée :
Voici le code appelant le web service :Une exception non gérée du type 'System.Web.Services.Protocols.SoapException' s'est produite dans system.web.services.dll
Informations supplémentaires : Le serveur n'a pas pu traiter la demande. --> Le fichier ou l'assembly nommé nbfe08us.dll ou l'une de ses dépendances, est introuvable.
Voici sur quel parti du code le débogueur s'arrête :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34 using System; using System.Drawing; using System.Collections; using System.ComponentModel; using System.Windows.Forms; using System.Data; namespace TestAppliWin { public class Form1 : System.Windows.Forms.Form { private System.Windows.Forms.Button button1; private System.Windows.Forms.TextBox textBox1; private System.ComponentModel.Container components = null; public Form1() { InitializeComponent(); } [STAThread] static void Main() { Application.Run(new Form1()); } private void button1_Click(object sender, System.EventArgs e) { hello1.Service1 s=new hello1.Service1(); textBox1.Text=s.HelloWorld(); } } }
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("http://tempuri.org/HelloWorld", RequestNamespace="http://tempuri.org/", ResponseNamespace="http://tempuri.org/", Use=System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle=System.Web.Services.Protocols.SoapParameterStyle.Wrapped)]
public string HelloWorld() {
object[] results = this.Invoke("HelloWorld", new object[0]);
return ((string)(results[0]));
}
Quel est le problème????
Merci d'avance.[/quote]
Partager