首页
学习
活动
专区
圈层
工具
发布
    • 综合排序
    • 最热优先
    • 最新优先
    时间不限
  • 来自专栏跟着阿笨一起玩NET

    如何创建一个RESTful WCF Service

    (Default ResponseFormat is WebMessageFormat.Json) // To create an operation that returns XML, id={id}", ResponseFormat = WebMessageFormat.Xml)] public void DeleteEmployee(string id) id={id}", ResponseFormat = WebMessageFormat.Xml)] public Employee GetEmployee(string id) (Default ResponseFormat is WebMessageFormat.Json) // To create an operation that returns XML, id={id}", ResponseFormat = WebMessageFormat.Json)] public void DeleteEmployee(string id)

    91010发布于 2018-09-19
  • Langchain4j-04

    在Langchain4j中有三种方法可以实现这一点(从可靠到不可靠):JSON SchemaPrompting + JSON Mode PromptingJSON Schema低级API下使用方式:ResponseFormat responseFormat = ResponseFormat.builder() .type(JSON) .jsonSchema(JsonSchema.builder( his personal goals and interests. """);ChatRequest chatRequest = ChatRequest.builder() .responseFormat (responseFormat) .messages(userMessage) .build();ChatModel chatModel = OpenAiChatModel.builder

    19110编辑于 2025-10-16
  • 来自专栏菩提树下的杨过

    当wcf遇到JSON ?

    summary> /// 测试 /// /// <returns></returns> [OperationContract] [WebInvoke(Method = "GET", ResponseFormat summary> /// 测试 /// /// <returns></returns> [OperationContract] [WebInvoke(Method = "GET", ResponseFormat summary> /// 测试 /// /// <returns></returns> [OperationContract] [WebInvoke(Method = "GET", ResponseFormat

    1K50发布于 2018-01-23
  • 来自专栏hbbliyong

    Extjs4处理后台json数据中日期和时间的方法

    当ASP.NET后台使用JavaScriptSerializer这个组件将对象序列化为json,或者使用ScriptMethod特性的json      [ScriptMethod(ResponseFormat = ResponseFormat.Json), WebMethod(EnableSession = true)] public List<EUser> Users()//参数测试用

    1.6K70发布于 2018-03-06
  • 来自专栏蘑菇先生的技术笔记

    Fd.Service 轻量级WebApi框架

    public static int GetPointsByID(int id) { return 10; } [FdMethod(ResponseFormat = ResponseFormat.Json)] public static List<Student> GetStudentList() { return

    90340发布于 2018-05-21
  • 来自专栏菩提树下的杨过

    jQuery调用RESTful WCF示例(GET方法/POST方法)

    OperationContract] [WebInvoke(Method = "POST", UriTemplate = "PostRestfulTest/{person}/{welcome}", ResponseFormat OperationContract] [WebInvoke(Method = "GET", UriTemplate = "GETRestfulTest/{person}/{welcome}", ResponseFormat OperationContract] [WebInvoke(Method = "*", UriTemplate = "RestfulTest/{person}/{welcome}", ResponseFormat param> /// <returns></returns> [OperationContract] [WebInvoke(Method = "POST", ResponseFormat param> /// <returns></returns> [OperationContract] [WebInvoke(Method = "GET", ResponseFormat

    2.3K80发布于 2018-01-23
  • 来自专栏全栈程序员必看

    让ASMX支持Json格式的返回数据「建议收藏」

    WebServiceHello : System.Web.Services.WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public string[] UserDetails() { return new

    1.7K20编辑于 2022-09-01
  • 来自专栏码匠的流水账

    聊聊langchain4j的AiServices

    tokenStream, returnType); } } ResponseFormat responseFormat = null; if (supportsJsonSchema && jsonSchema.isPresent()) { responseFormat = ResponseFormat.builder() .type(JSON) .toolSpecifications(toolExecutionContext.toolSpecifications()) .responseFormat (responseFormat) .build(); ChatRequest chatRequest

    34100编辑于 2025-03-11
  • 来自专栏liulun

    javascript post数据到WCF反馈json或者XML

    Namespace = "")]     public interface IJsonXmlService     {         [OperationContract]         [WebInvoke(ResponseFormat int id, string mytitle, string mycontent);         [OperationContract(Action="*")]         [WebInvoke(ResponseFormat

    90430编辑于 2022-05-09
  • 来自专栏菩提树下的杨过

    ExtJs学习笔记(20)-利用ExtJs的Ajax与服务端WCF交互

    AspNetCompatibilityRequirementsMode.Allowed)] public class MyService { [OperationContract] [WebInvoke(ResponseFormat param> /// <returns></returns> [OperationContract] [WebInvoke(Method = "*", ResponseFormat param> /// <returns></returns> [OperationContract] [WebInvoke(Method = "*", ResponseFormat SaveMyData2用来保存ExtJs提交过来的数据,区别是SaveMyData用于Get方法,SaveMyData2用于Post方法 需要说明的是[WebInvoke(Method = "*", ResponseFormat

    1.3K70发布于 2018-01-24
  • 来自专栏技术小讲堂

    ASP.NET AJAX(4)__客户端访问WebService服务器端释放WebService方法客户端访问WebService客户端访问PageMethod错误处理复杂数据类型使用基础客户端代理的

    = ResponseFormat.Xml)] public XmlNode GetXmlDocument() { XmlDocument doc = new XmlDocument = ResponseFormat.Xml)] public XmlNode GetXmlElement() { XmlDocument doc = new XmlDocument = ResponseFormat.Xml)] public Employee GetEmployee() { return new Employee("bai", "yulong ","developer"); } [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Xml)] public = ResponseFormat.Xml, XmlSerializeString = true)] public string GetSerializedString() {

    5.5K70发布于 2018-03-07
  • 来自专栏菩提树下的杨过

    用JS + WCF打造轻量级WebPart

       </endpointBehaviors>   </behaviors> (2)新建几个方法: Code //取得页面布局数据 [OperationContract] [WebInvoke(ResponseFormat WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain"; return ms; } //保存布局 [OperationContract] [WebInvoke(ResponseFormat } return _Result; } //取得新闻 [OperationContract] [WebInvoke(ResponseFormat WebOperationContext.Current.OutgoingResponse.ContentType = "text/plain"; return ms; } //取得图片地址 [OperationContract] [WebInvoke(ResponseFormat

    1K100发布于 2018-01-22
  • 来自专栏码匠的流水账

    聊聊langchain4j的AiServices

    tokenStream, returnType); } } ResponseFormat responseFormat = null; if (supportsJsonSchema && jsonSchema.isPresent()) { responseFormat = ResponseFormat.builder() .type(JSON) .toolSpecifications(toolExecutionContext.toolSpecifications()) .responseFormat (responseFormat) .build(); ChatRequest chatRequest

    1K10编辑于 2025-03-11
  • 来自专栏大内老A

    [WCF REST] Web消息主体风格(Message Body Style)

    WebInvoke(UriTemplate = "/", Method = "POST", 6: RequestFormat = WebMessageFormat.Xml, 7: ResponseFormat WebInvoke(UriTemplate = "/", Method = "POST", 6: RequestFormat = WebMessageFormat.Xml, 7: ResponseFormat WebInvoke(UriTemplate = "/", Method = "POST", 6: RequestFormat = WebMessageFormat.Json, 7: ResponseFormat WebInvoke(UriTemplate = "/", Method = "POST", 6: RequestFormat = WebMessageFormat.Json, 7: ResponseFormat

    1.1K100发布于 2018-02-07
  • 来自专栏平凡少年

    WCFRESTFul服务搭建及实现增删改查

    { [OperationContract] [WebInvoke(UriTemplate = "get/{value}", Method = "GET", ResponseFormat string value); [OperationContract] [WebInvoke(UriTemplate = "add", Method = "POST", ResponseFormat ; [OperationContract] [WebInvoke(UriTemplate = "GetList/{value}", Method = "GET", ResponseFormat

    91330发布于 2019-04-11
  • 来自专栏liulun

    jquery调WCF

    WCFservice     {         [OperationContract]         [WebInvoke(RequestFormat = WebMessageFormat.Json, ResponseFormat aspNetCompatibilityEnabled="true" />配合使用 OperationContract属性把方法公开在WCF服务中 RequestFormat = WebMessageFormat.Json, ResponseFormat

    55330编辑于 2022-05-09
  • 来自专栏hbbliyong

    asp.net :使用jquery 的ajax +WebService+json 实现无刷新去后台值

    对象</param> /// <returns>Json字符串</returns>    //然后在webservice中需要返回json数据的方法加上如下属性  [ScriptMethod(ResponseFormat =ResponseFormat.Json)] public static string ToJson(DataTable Adt) { StringBuilder jsonString

    4.6K60发布于 2018-03-05
  • 来自专栏葡萄城控件技术团队

    程序员Web面试之JSON

    如下所示: WCF服务:如果你想你的WCF服务应该发送JSON消息,而不是SOAP,可以设置“ResponseFormat”作为你的操作协定“WebMessageFormat.Json”。 OperationContract] [WebInvoke(Method="GET", UriTemplate="/GetData", RequestFormat=WebMessageFormat.Json, ResponseFormat

    2.7K100发布于 2018-01-10
  • 来自专栏全栈程序员必看

    Jquery Ajax 跨域调用asmx类型 WebService范例

    class WebService1 : System.Web.Services.WebService { [WebMethod] [ScriptMethod(ResponseFormat = ResponseFormat.Json)] public int Sum(int a,int b) { Thread.Sleep(3000)

    2.3K40编辑于 2022-09-06
  • 来自专栏木宛城主

    SharePoint 2013创建WCF REST Service

    [ServiceContract] public interface IService1 { [OperationContract] [WebGet(ResponseFormat

    1.5K50发布于 2018-01-11
领券