useOriginalwsdl = true在axis2中不起作用 [英] useOriginalwsdl=true is not working in axis2

查看:291
本文介绍了useOriginalwsdl = true在axis2中不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遵循合同优先的方法.因此,我首先编写了wsdl文件,然后生成了服务器端代码.但是,当我在浏览器中单击Web服务的URL时,我会看到自动生成的wsdl文件.不是我保存在META-INF文件夹中的那个.我还在我的services.xml文件中设置了useOriginalwsdl = true.当我尝试在浏览器中查看wsdl时,会触发错误 无法在说明部分中为此服务生成WSDL 1.1 ,并且 如果您希望Axis2自动生成WSDL 1.1,则请在 error 标签的 reason 部分的services.xml 中将useOriginalwsdl设置为false.

I have followed contract first approach. So I first wrote the wsdl file and then generated the server side code. But when I hit the url for my web service in the browser then I see the auto generated wsdl file; not the one I had kept inside META-INF folder. I have also set useOriginalwsdl=true in my services.xml file. When I try to view the wsdl in browser, it fires error Unable to generate WSDL 1.1 for this service in description section and If you wish Axis2 to automatically generate the WSDL 1.1, then please set useOriginalwsdl as false in your services.xml in the reason section of error tag.

请帮助我.

推荐答案

useOriginalwsdl = true将可以工作:

useOriginalwsdl=true will work if you have followed the following steps:

  1. 将自定义wsdl文件放入META-INF文件夹中.
  2. 自定义wsdl和services.xml中的服务名称都应该相同
  3. 将定制wsdl命名为service.wsdl或(您的ServiceName).wsdl.
  4. 在services.xml文件中设置useOriginalwsdl = true

注意:如果useOriginalwsdl = true,则Axis2引擎首先尝试使用任何名为service.wsdl的wsdl文件.如果未找到,则它将尝试查找命名的(您的服务名称).wsdl 如果未成功,则当您尝试访问Web服务时会显示错误.

Note: If useOriginalwsdl=true, Axis2 engine first tries to use any wsdl file named service.wsdl. If not found, then it tries to find named (your service name).wsdl If not succeeds, then it shows error when u try to access the web service.

这篇关于useOriginalwsdl = true在axis2中不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆