首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > .NET > C# >

c#怎么根据这个要球写这个webservice呢

2012-10-17 
c#如何根据这个要球写这个webservice呢?这个接口要球用WEBservice方法,根据下面的WSDL这个方法要怎么入手

c#如何根据这个要球写这个webservice呢?
这个接口要球用WEBservice方法,根据下面的WSDL这个方法要怎么入手写呢,哪个高手给整个DEMO啊?也没有个方法啥的,怎么光有参数啊
该接口采用Web Service方式。
4.1.5 接口内容
4.1.5.1 订购关系通知SP请求(OrderRelationUpdateNotifyReq)
参数名类型大小描述
RecordSequenceIDstring18流水号, 
UserIdTypeinteger4用户ID类型
1: MSISDN
2: PsedoCode
UserIdstring36用户手机号码或伪码
UserIdType填1 为手机号码
UserIdType填2 为伪码
ServiceTypeString2业务类型,见附录
SpIdstring21SP标识
ProductIdstring21产品标识(此为SP在PRM侧申请的SP_Productid)
UpdateTypeinteger4更新操作的类型包括:
1:订购
2:退定
3:点播
4:定购关系变更(一般是修改有效期)(保留,暂不用)
5:改号
UpdateTimestring14更新时间
UpdateDescstring100更新操作的详细描述
联通在信、彩信等定购、点播接入号,和CheckPrice请求中AccessNo字段一致;
对crm侧订购、退订由vac根据产品填写;对其他业务填空
LinkIDstring20事务关联ID,用于点播业务的临时定购关系关联,由平台产生。格式如下:
MMDDHHMMSS+10位随机序列号;
为空表示无效。
用户点播时使用。
Contentstring140内容,当UpdateType=5时,本字段填原用户手机号码或伪码,具体填写方式由UserIdType字段决定
EffectiveDatestring14订购关系生效时间, 格式:yyyyMMddhhmmss
ExpireDatestring14订购关系失效时间, 格式:yyyyMMddhhmmss
Time_Stampstring10时间戳由VAC生成,格式是: MMDDHHMMSS,月日时分秒。
EncodeStrstring32采用32位的MD5加密串,以便SP鉴权定购关系来源的合法性, MD5 加密算法如下:
EncodeStr=UserId+共享密钥+ ProductId+ Time_Stamp
共享密钥由SP分配,时间戳由VAC设备生成,格式是:MMDDHHMMSS,月日时分秒。共享密钥的定义见BSS与VAC接口规范SP属性接口OrderKey
如果SP的OrderKey为空,VAC不加密

注:UpdateType=5时,表示用户改号后的订购关系迁移操作,sp将Content字段表示的用户的所有订购关系、绑定的附属信息均迁移到UserId字段用户。此时按照sp或业务信息中SPOrderUrl字段通知SP。
4.1.5.2 订购关系通知SP响应(OrderRelationUpdateNotifyRsp)
参数名类型字节大小描述
RecordSequenceIDstring18流水号,与OrderRelationUpdateNotifyReq的流水号相同
ResultCode integer4结果识别码
0: 成功
1. 失败
当vac通知sp订购关系,但SP发现已经存在该订购关系时,SP返回VAC成功


XML code
<?xml version="1.0" encoding="UTF-8" ?> - <wsdl:definitions xmlns:tns3="http://rsp.sync.soap.bossagent.vac.unicom.com" xmlns:impl="http://soap.bossagent.vac.unicom.com" xmlns:intf="http://soap.bossagent.vac.unicom.com" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns2="http://req.sync.soap.bossagent.vac.unicom.com" xmlns:tns4="http://type.sync.soap.bossagent.vac.unicom.com" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://soap.bossagent.vac.unicom.com">- <wsdl:types>- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://req.sync.soap.bossagent.vac.unicom.com">  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> - <complexType name="ArrayOf_tns2_SubInfo">- <sequence>  <element maxOccurs="unbounded" minOccurs="1" name="item" type="tns2:SubInfo" />   </sequence>  </complexType>- <complexType name="OrderRelationUpdateNotifyRequest">- <sequence>  <element name="recordSequenceId" nillable="true" type="soapenc:string" />   <element name="subNotify" type="tns2:ArrayOf_tns2_SubInfo" />   </sequence>  </complexType>- <complexType name="SubInfo">- <sequence>  <element name="userIdType" nillable="true" type="soapenc:int" />   <element name="userId" nillable="true" type="soapenc:string" />   <element name="serviceType" nillable="true" type="soapenc:string" />   <element name="spId" nillable="true" type="soapenc:string" />   <element name="sp_productId" nillable="true" type="soapenc:string" />   <element name="updateType" nillable="true" type="soapenc:int" />   <element name="updateTime" nillable="true" type="soapenc:string" />   <element name="updateDesc" nillable="true" type="soapenc:string" />   <element name="linkId" nillable="true" type="soapenc:string" />   <element name="content" nillable="true" type="soapenc:string" />   <element name="effectiveDate" nillable="true" type="soapenc:string" />   <element name="expireDate" nillable="true" type="soapenc:string" />   <element name="time_stamp" nillable="true" type="soapenc:string" />   <element name="encodeStr" nillable="true" type="soapenc:string" />   <element name="accessNo" nillable="true" type="soapenc:string" />   </sequence>  </complexType>  </schema>- <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://rsp.sync.soap.bossagent.vac.unicom.com">  <import namespace="http://schemas.xmlsoap.org/soap/encoding/" /> - <complexType name="OrderRelationUpdateNotifyResponse">- <sequence>  <element name="recordSequenceId" nillable="true" type="soapenc:string" />   <element name="resultCode" type="xsd:int" />   </sequence>  </complexType>  </schema>  </wsdl:types>- <wsdl:message name="orderRelationUpdateNotifyRequest">  <wsdl:part name="orderRelationUpdateNotifyRequest" type="tns2:OrderRelationUpdateNotifyRequest" />   </wsdl:message>- <wsdl:message name="orderRelationUpdateNotifyResponse">  <wsdl:part name="orderRelationUpdateNotifyReturn" type="tns3:OrderRelationUpdateNotifyResponse" />   </wsdl:message>- <wsdl:portType name="SyncNotifySPService">- <wsdl:operation name="orderRelationUpdateNotify" parameterOrder="orderRelationUpdateNotifyRequest">  <wsdl:input name="orderRelationUpdateNotifyRequest" message="impl:orderRelationUpdateNotifyRequest" />   <wsdl:output name="orderRelationUpdateNotifyResponse" message="impl:orderRelationUpdateNotifyResponse" />   </wsdl:operation>  </wsdl:portType>- <wsdl:binding name="SyncNotifySPSoapBinding" type="impl:SyncNotifySPService">  <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" /> - <wsdl:operation name="orderRelationUpdateNotify">  <wsdlsoap:operation /> - <wsdl:input>  <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soap.bossagent.vac.unicom.com" />   </wsdl:input>- <wsdl:output>  <wsdlsoap:body use="encoded" encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" namespace="http://soap.bossagent.vac.unicom.com" />   </wsdl:output>  </wsdl:operation>  </wsdl:binding>- <wsdl:service name="SyncNotifySPServiceService">- <wsdl:port name="SyncNotifySP" binding="impl:SyncNotifySPSoapBinding">  <wsdlsoap:address location="http://localhost/services/VacSync" />   </wsdl:port>  </wsdl:service>  </wsdl:definitions> 




他这个要球返回这2个属性RecordSequenceID和ResultCode应以什么方式返回呢?

[解决办法]
返回一个xml的格式,里面带有这两个节点就可以了
[解决办法]
现在写webservice WDSL不是自动生成的嘛?

热点排行