200分吸引火力 关于web service生成wsdl 本帖最后由 xxo1986cxm 于 2012-11-09 13:59:12 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 又事C#和java对接!不管他们,直接返回json给他们自己解析好了。不要管他们怎么说。传输jsom或者xml是绝对规范的。 以前一个项目也是这样的,不过我是直接根据对方提供的wsdl用wsdl.exe工具生成的服务端代码,对方用java可以正常调用。。汗颜。。没太深入,里面的原理还搞不太懂。看对楼主有帮助不。//------------------------------------------------------------------------------// <auto-generated>// 此代码由工具生成。// 运行时版本:4.0.30319.269//// 对此文件的更改可能会导致不正确的行为,并且如果// 重新生成代码,这些更改将会丢失。// </auto-generated>//------------------------------------------------------------------------------using System;using System.ComponentModel;using System.Diagnostics;using System.Web.Services;using System.Web.Services.Protocols;using System.Xml.Serialization;// // 此源代码由 wsdl 自动生成, Version=4.0.30319.1。// /// <res/>[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")][System.Web.Services.WebServiceBindingAttribute(Name = "xxxxxx", Namespace = "http://soap.xxx.xxx.xxx.com")]public interface xxxxx{ /// <res/> [System.Web.Services.WebMethodAttribute()] [System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace = "http://soap.xxx.xxx.xxx.com", ResponseNamespace = "http://soap.bossagent.vac.unicom.com")] [return: System.Xml.Serialization.SoapElementAttribute("xxxx")] OrderRelationUpdateNotifyResponse orderRelationUpdateNotify(OrderRelationUpdateNotifyRequest orderRelationUpdateNotifyRequest);}/// <res/>[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")][System.SerializableAttribute()][System.Diagnostics.DebuggerStepThroughAttribute()][System.ComponentModel.DesignerCategoryAttribute("code")][System.Xml.Serialization.SoapTypeAttribute(Namespace = "http://req.sync.soap.xxx.xxx.xxx.com")]public partial class xxxxxxxx{ private string recordSequenceIdField; private ArrayOf_tns2_SubInfo subNotifyField; /// <res/> [System.Xml.Serialization.SoapElementAttribute(IsNullable = true)] public string recordSequenceId { get { return this.recordSequenceIdField; } set { this.recordSequenceIdField = value; } }} 俺们也是通过wsdl /si 搞的,不知道为啥不行 有两个问题:1、里面有BPEL的东西,具体的我也不懂2、生成的wsdl 差异很大(比如attributeFormDefault="unqualified"这个.net的wsdl就没有,但是这个是必须 的),造成调用问题,因为实现这个web service的有好多,所以必须严格按照他的来up 要是用wcf 开发的就简单了:http://social.msdn.microsoft.com/Forums/pl/wcf/thread/2c1e41c6-4a0c-4aea-839c-fc0be6c83d00或者实现:IWsdlExportExtension 好需要问吗,既然都有了wsdl,那就严格按这个来吧,有不一样的地方,说明你没有做到位,没什么好说的,继续研究改进吧。 wsdl本身就是标准,是不是返回了不能序列化的类型 web service 不能实现吗?一定要wcf? 求一正则表达式 关于一个XMLSerializer的问题(100分) 怎么修改文件权限 用vsts仿真自定义流媒体协议是否可行? 知道怎么制作翻译软件吗?只需要完成输入的中文,输出英文就行了 问个SQL小语法问题,超简单,在线给 能否提供一个net2005的下载地址 谢谢了 把DataGridView中数据导出到文本文档 请问如何给控件添加额外的事件(tabcontrol) 在线讨论,property 与 attribute 概念及区别,大家踊跃。 一个简单的fileupload和checkbox问题,谢谢 根据MAC地址和已生成的KEY(字符串),能知道如何加密的吗
// <auto-generated>
// 此代码由工具生成。
// 运行时版本:4.0.30319.269
//
// 对此文件的更改可能会导致不正确的行为,并且如果
// 重新生成代码,这些更改将会丢失。
// </auto-generated>
//------------------------------------------------------------------------------using System;
using System.ComponentModel;
using System.Diagnostics;
using System.Web.Services;
using System.Web.Services.Protocols;
using System.Xml.Serialization;//
// 此源代码由 wsdl 自动生成, Version=4.0.30319.1。
//
/// <res/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.Web.Services.WebServiceBindingAttribute(Name = "xxxxxx", Namespace = "http://soap.xxx.xxx.xxx.com")]
public interface xxxxx
{ /// <res/>
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapRpcMethodAttribute("", RequestNamespace = "http://soap.xxx.xxx.xxx.com", ResponseNamespace = "http://soap.bossagent.vac.unicom.com")]
[return: System.Xml.Serialization.SoapElementAttribute("xxxx")]
OrderRelationUpdateNotifyResponse orderRelationUpdateNotify(OrderRelationUpdateNotifyRequest orderRelationUpdateNotifyRequest);
}/// <res/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "4.0.30319.1")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace = "http://req.sync.soap.xxx.xxx.xxx.com")]
public partial class xxxxxxxx
{ private string recordSequenceIdField; private ArrayOf_tns2_SubInfo subNotifyField; /// <res/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable = true)]
public string recordSequenceId
{
get
{
return this.recordSequenceIdField;
}
set
{
this.recordSequenceIdField = value;
}
}
}
俺们也是通过wsdl /si 搞的,不知道为啥不行
有两个问题:
1、里面有BPEL的东西,具体的我也不懂
2、生成的wsdl 差异很大(比如attributeFormDefault="unqualified"这个.net的wsdl就没有,但是这个是必须 的),造成调用问题,因为实现这个web service的有好多,所以必须严格按照他的来
up
web service 不能实现吗?一定要wcf?