Soap/wsdl Problem

Radeon

Mitglied
Hallo,
ich hab ein Problem das mir nicht lösbar erscheint da ich nach etlichen Stunden immer noch keine Lösung dafür gefunden habe. Das Problem ist folgenden des:

Ich habe folgende Funktionen
Code:
[System.Web.Services.Protocols.SoapRpcMethodAttribute("_getEntities", RequestNamespace="Connect.url", ResponseNamespace="Connect.url")]
[return: System.Xml.Serialization.SoapElementAttribute("return")]
public Entity[] getEntities(string defuser, string defpass) 
{
	object[] results = this.Invoke("getEntities", new object[] {defuser, defpass});
	return ((Entity[])(results[0]));
}
        
public System.IAsyncResult BegingetEntities(string defuser, string defpass, System.AsyncCallback callback, object asyncState) 
{
	return this.BeginInvoke("getEntities", new object[] {defuser,defpass}, callback, asyncState);
}
        
public Entity[] EndgetEntities(System.IAsyncResult asyncResult) 
{
	object[] results = this.EndInvoke(asyncResult);
	return ((Entity[])(results[0]));
}

und den Typ "Entity"
Code:
[System.Xml.Serialization.SoapTypeAttribute "Entity", "http://localhost/folders/kd813540866/demowebservice")]
public class Entity 
{
        public string caption;
        public int write;
        public int read;
        public int @base;
        public string entity;
}

Das Problem ist nun das die URL die in [System.Xml.Serialization.SoapTypeAttribute("Entity", "http://localhost/folders/kd813540866/demowebservice")] vorkommt Dynamisch sein soll, in meinem Fall will ich die aus einer Listbox auslesen und dort einsetzen und genau ist das Problem. Wenn ich nämlich folgendes mache [System.Xml.Serialization.SoapTypeAttribute "Entity", URL)] (wobei URL die string Variable mit der url ist) bekomme ich den Fehler:

soap.cs(138): Ein Attributeargument muss ein constant-, typeof- oder Arrayerstellungsausdruck sein.

Jetzt ist die Frage wie ich das machen kann? Der Typ const kann nicht in Frage kommen da die URL aus einer Listbox ausgelesen wird. Mit typeof hatte ich bisher auch keinen Erfolg und von einem "Arrayerstellungsausdruck" hab ich noch nie etwas gehört oder gelesen.
Ich hoffe ihr könnt mir helfen das ist nämlich ziemlich wichtig weil mir mein Chef sonnst die Hölle heiß macht :(

Gruße
Radeon
 

Neue Beiträge

Zurück