Home > Net >  Consult a WCF returns the format problem
Consult a WCF returns the format problem

Time:05-26

The return format is
 & lt; S: Envelope XMLNS: s="http://schemas.xmlsoap.org/soap/envelope/" & gt; 

True
OK





Is the target to get the target value of
 & lt; S: Envelope XMLNS: s="http://schemas.xmlsoap.org/soap/envelope/" & gt; 

True
OK





This prefix how to set up, please?

Main point is how to add the ornament in front of the first?

Under the current code: use
 namespace WcfServiceLibrary 
{

Public delegate string DisplayContent (string content);
//note: the use of "refactoring" menu "renamed" command, can change the code and the name of the class in the configuration file at the same time "Service1,"

[ServiceBehavior (InstanceContextMode=InstanceContextMode. Single Namespace="http://localhost/BOI/")]
[XmlSerializerFormat]
Public class WServiceInstance: IService_Contract
{
Public DisplayContent AddContent;

Public BoiResult Invoke (string form, string token, string funcName, string parameters)
{
Var jsonres=AddContent (form + ";" + token + ";" + funcName + ";" + the parameters);
Var data=https://bbs.csdn.net/topics/new BoiResult ();
Data. InvokeResult=true;
Data. The result=jsonres;
return data;
}
}

[DataContract (Namespace=""))
[XmlSerializerFormat]
Public class BoiResult
{
[DataMember]
Public bool InvokeResult;

[DataMember]
Public string result;
}
}


 namespace WcfServiceLibrary 
{
//note: the use of "refactoring" menu "renamed" command, can change the code and configuration files at the same time the interface name "IService_Contract,"
[ServiceContract (Namespace="http://localhost/BOI/")]
[XmlSerializerFormat]
Public interface IService_Contract
{
[OperationContract (Action="" Name=" Invoke ")]
BoiResult Invoke (string form, string token, string funcName, string parameters).
}
}

  • Related