关于 web.services 问题 wsdl,请高手解答,高分,解决再送

aiaaaa 2009-06-12 08:54:34


http://www.itpub.net/thread-1035178-1-6.html
按照这个网站提供的资料信息

通过 wsdl 生成的 cs:


/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("wsdl", "2.0.50727.42")]
[System.Web.Services.WebServiceBindingAttribute(Name = "IsmpSpEngineSoapBinding",

Namespace = "http://sp.ismp.chinatelecom.com")]
public interface IIsmpSpEngineSoapBinding
{

/// <remarks/>
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use =

System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle =

System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute

("orderRelationUpdateNotifyReturn", Namespace = "http://sp.ismp.chinatelecom.com")]
Response orderRelationUpdateNotify

([System.Xml.Serialization.XmlElementAttribute(Namespace =

"http://sp.ismp.chinatelecom.com")] OrderRelationUpdateNotifyReq

orderRelationUpdateNotifyReq);

/// <remarks/>
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use =

System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle =

System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute

("serviceConsumeNotifyReturn", Namespace = "http://sp.ismp.chinatelecom.com")]
Response serviceConsumeNotify([System.Xml.Serialization.XmlElementAttribute

(Namespace = "http://sp.ismp.chinatelecom.com")] ServiceConsumeNotifyReq

serviceConsumeNotifyReqPara);

/// <remarks/>
[System.Web.Services.WebMethodAttribute()]
[System.Web.Services.Protocols.SoapDocumentMethodAttribute("", Use =

System.Web.Services.Description.SoapBindingUse.Literal, ParameterStyle =

System.Web.Services.Protocols.SoapParameterStyle.Bare)]
[return: System.Xml.Serialization.XmlElementAttribute

("notifyManagementInfoReturn", Namespace = "http://sp.ismp.chinatelecom.com")]
NotifyManagementInfoRsp notifyManagementInfo

([System.Xml.Serialization.XmlElementAttribute(Namespace =

"http://sp.ismp.chinatelecom.com")] NotifyManagementInfoReq notifyManagementInfoReq);
}


写的方法:



/// <summary>
/// NotifyManagementInfoService 的摘要说明
/// </summary>
[WebService(Namespace = "http://tempuri.org/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class NotifyManagementInfoService : InterFaceIIsmpSp.IIsmpSpEngineSoapBinding
{

public NotifyManagementInfoService()
{

//如果使用设计的组件,请取消注释以下行
//InitializeComponent();
}



[WebMethod]
public InterFaceIIsmpSp.NotifyManagementInfoRsp notifyManagementInfo

(InterFaceIIsmpSp.NotifyManagementInfoReq notifyManagementInfoReq)
{
InterFaceIIsmpSp.NotifyManagementInfoRsp notifyManagementInfoRsp = new

InterFaceIIsmpSp.NotifyManagementInfoRsp();
notifyManagementInfoRsp.resultCode = 0;
notifyManagementInfoRsp.streamingNo = notifyManagementInfoReq.streamingNo;

return notifyManagementInfoRsp;
}


[WebMethod]
public InterFaceIIsmpSp.Response serviceConsumeNotify

(InterFaceIIsmpSp.ServiceConsumeNotifyReq serviceConsumeNotifyReqPara)
{
InterFaceIIsmpSp.Response serviceConsumeNotifyRsp = new

InterFaceIIsmpSp.Response();
serviceConsumeNotifyRsp.resultCode = 0;
serviceConsumeNotifyRsp.streamingNo = serviceConsumeNotifyReqPara.streamingNo;

return serviceConsumeNotifyRsp;
}


[WebMethod]
public InterFaceIIsmpSp.Response orderRelationUpdateNotify

(InterFaceIIsmpSp.OrderRelationUpdateNotifyReq orderRelationUpdateNotify)
{
InterFaceIIsmpSp.Response orderRelationUpdateNotifyRsp = new

InterFaceIIsmpSp.Response();
orderRelationUpdateNotifyRsp.resultCode = 0;
orderRelationUpdateNotifyRsp.streamingNo =

orderRelationUpdateNotify.streamingNo;

return orderRelationUpdateNotifyRsp;
}

}


调用出错

“/WebSite”应用程序中的服务器错误。
--------------------------------------------------------------------------------

System.Web.Services.Protocols.SoapException: 方法 serviceConsumeNotify 和

notifyManagementInfo 使用相同的 SOAPAction“”。当 XML Web services 的 RoutingStyle 为

SoapAction 时,SOAPAction 值在 XML Web services 的所有方法中必须是唯一的。可以通过

SoapDocumentMethod 或 SoapRpcMethod 属性的 Action 参数更改 SOAPAction,也可以指定 XML

Web services 上 RequestElement 的 RoutingStyle。


请高手解答....急等...
...全文
248 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
slimboy123 2009-07-20
  • 打赏
  • 举报
回复
soapAction问题

解决办法:
第一种:
在类前面加上
[System.Web.Services.Protocols.SoapDocumentService(RoutingStyle = SoapServiceRoutingStyle.RequestElement)]

第二种:用不同的soapAction值
yzf86211861 2009-06-14
  • 打赏
  • 举报
回复
SoapAction 问题
老郭20130824 2009-06-13
  • 打赏
  • 举报
回复
SoapAction问题,检查:
1、是否有相同的函数名,同时写了[WebMethod]
2、返回的对象类,有没有写[WebService...]

感觉第一个可能性比较大。
wuyq11 2009-06-12
  • 打赏
  • 举报
回复
服务器无法处理请求 ,SoapAction 问题
参考
aiaaaa 2009-06-12
  • 打赏
  • 举报
回复
俺 的结帖率 还是可以的 请放心。。。

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧