当前位置:首页 » 多媒体相关

调用“SOAP扩展”出错


扩展类:  
  public   class   soaploggerattribute:soapextensionattribute  
  public   class   soaplogger:soapextension  
   
  webmethod:  
  [webmethod,soaplogger]  
  public   author   getauthorinfo()  
   
   
  直接使用web服务测试页,调用一切正常;  
  在aspx调用:  
  private   void   button1_click(object   sender,   system.eventargs   e)  
  {  
  myauthor=mysample.getauthorinfo();  
  }  
   
  出错:  
  客户端发现响应内容类型为“”,但应该是“text/xml”。    
  说明:   执行当前   web   请求期间,出现未处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。    
  异常详细信息:   system.invalidoperationexception:   客户端发现响应内容类型为“”,但应该是“text/xml”。    
   
   
  请问各位我应如何设置?

推荐阅读

  • 利用Delphi开发网络数据库应用 [详细内容]
  • 发改委史炜主任:胡鞍钢3G报告缺少技术判断 [详细内容]
  • 发改委考察报告:印度身上中国软件能学什么 [详细内容]
  • Delphi”程序级触发器”功能的实现 [详细内容]
  • 小S的一个BUG及防尘问题 [详细内容]
  • 观点:手机牌照的弃与留 可否不要太极端? [详细内容]
  • Delphi三十六之硬件篇 [详细内容]
  • 网友回答:
    网友:saucer

    the   error   doesnt   mean   anything,   since   you   said   it   was   ok   to   access   the   web   service   through   the   browser  
       
      what   if   you   remove   the   soapextension,   does   it   still   work?

    网友:qqchen79

    most   likely,   its   your   soapextension   code   that   corrupted   the   outgoing   soap   message.   (soapextension   is   skipped   when   you   are   using   web   test   page,   which   uses   http   get).  
     

    .

    讨论区

    Login