webservice 图片传输 服务端

 

服务端接收string类型 生成xml文件

 

服务端读取生成的xml里面图片信息 生成图片

 

 

housePic是根据某个ID查出的那条图片信息

 删除图片

 

 

 

 

 

 

  • 1
    点赞
  • 3
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
好的,我可以为您提供关于 C# WebService 服务端的相关信息。C# WebService 服务端是一种基于 SOAP 协议的 Web 服务,它可以通过 HTTP 或 HTTPS 协议进行通信,实现跨平台的数据传输。下面是一个简单的 C# WebService 服务端的实现示例: 1. 创建一个 C# 类,并在类上添加 [WebService] 和 [WebServiceBinding] 属性,示例代码如下: ``` using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.Services; using System.Web.Services.Protocols; [WebService(Namespace = "http://tempuri.org/")] [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)] public class MyWebService : System.Web.Services.WebService { // web service methods here } ``` 2. 在类中添加一个或多个 Web 方法,并使用 [WebMethod] 属性标识它们。示例代码如下: ``` [WebMethod] public string HelloWorld(string name) { return "Hello, " + name + "!"; } ``` 3. 在 Web 服务描述语言 (WSDL) 文件中定义 Web 服务的接口和方法。可以使用 Visual Studio 自带的 WSDL 生成工具或手动创建。示例代码如下: ``` <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://tempuri.org/" targetNamespace="http://tempuri.org/"> <wsdl:message name="HelloWorldSoapIn"> <wsdl:part name="name" type="xsd:string"/> </wsdl:message> <wsdl:message name="HelloWorldSoapOut"> <wsdl:part name="return" type="xsd:string"/> </wsdl:message> <wsdl:portType name="MyWebServiceSoap"> <wsdl:operation name="HelloWorld"> <wsdl:input message="tns:HelloWorldSoapIn"/> <wsdl:output message="tns:HelloWorldSoapOut"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="MyWebServiceSoap" type="tns:MyWebServiceSoap"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="HelloWorld"> <soap:operation soapAction="http://tempuri.org/HelloWorld"/> <wsdl:input> <soap:body use="literal"/> </wsdl:input> <wsdl:output> <soap:body use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="MyWebService"> <wsdl:port name="MyWebServiceSoap" binding="tns:MyWebServiceSoap"> <soap:address location="http://localhost/MyWebService.asmx"/> </wsdl:port> </wsdl:service> </wsdl:definitions> ``` 4. 将该类部署到 IIS 或自承载的 ASP.NET 运行时中。在浏览器中访问 Web 服务的 URL(如 http://localhost/MyWebService.asmx),即可看到 Web 服务的描述信息和测试界面。 希望这些信息能够对您有所帮助。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值