免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4516 | 回复: 1
打印 上一主题 下一主题

AXIS2 开发 WSDL2JAVA 错误 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2008-02-13 12:33 |只看该作者 |倒序浏览
我这儿有这样一个 WSDL 文件: OAPush.wsdl
  1. <wsdl:definitions targetNamespace="http://192.168.10.194/oapush/services/OAPush"
  2.         xmlns:apachesoap="http://xml.apache.org/xml-soap"
  3.         xmlns:impl="http://192.168.10.194/oapush/services/OAPush"
  4.         xmlns:intf="http://192.168.10.194/oapush/services/OAPush"
  5.         xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
  6.         xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  7.         <!--WSDL created by Apache Axis version: 1.2.1
  8.                 Built on Jun 14, 2005 (09:15:57 EDT)-->
  9.         <wsdl:message name="push_OA_DataResponse">
  10.                 <wsdl:part name="push_OA_DataReturn" type="soapenc:string" />
  11.         </wsdl:message>
  12.         <wsdl:message name="push_OA_DataRequest">
  13.                 <wsdl:part name="sXmlContent" type="soapenc:string" />
  14.                 <wsdl:part name="sDocID" type="soapenc:string" />
  15.                 <wsdl:part name="sUserID" type="soapenc:string" />
  16.                 <wsdl:part name="sFrom" type="soapenc:string" />
  17.         </wsdl:message>
  18.         <wsdl:portType name="IOAPush">
  19.                 <wsdl:operation name="push_OA_Data" parameterOrder="sXmlContent sDocID sUserID sFrom">
  20.                         <wsdl:input message="impl:push_OA_DataRequest" name="push_OA_DataRequest" />
  21.                         <wsdl:output message="impl:push_OA_DataResponse" name="push_OA_DataResponse" />
  22.                 </wsdl:operation>
  23.         </wsdl:portType>
  24.         <wsdl:binding name="OAPushSoapBinding" type="impl:IOAPush">
  25.                 <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http" />
  26.                 <wsdl:operation name="push_OA_Data">
  27.                         <wsdlsoap:operation soapAction="" />
  28.                         <wsdl:input name="push_OA_DataRequest">
  29.                                 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  30.                                         namespace="http://oa..leadtone.com" use="literal" />
  31.                         </wsdl:input>
  32.                         <wsdl:output name="push_OA_DataResponse">
  33.                                 <wsdlsoap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
  34.                                         namespace="http://192.168.10.194/oapush/services/OAPush" use="literal" />
  35.                         </wsdl:output>
  36.                 </wsdl:operation>
  37.         </wsdl:binding>
  38.         <wsdl:service name="IOAPushService">
  39.                 <wsdl:port binding="impl:OAPushSoapBinding" name="OAPush">
  40.                         <wsdlsoap:address location="http://192.168.10.194/oapush/services/OAPush" />
  41.                 </wsdl:port>
  42.         </wsdl:service>
  43. </wsdl:definitions>
复制代码
wsdl2java 运行结果:
  1. C:\lyc>wsdl2java -uri OAPush.wsdl -p lyc -d adb -s -ss -sd -ssi -o build/service
  2. Using AXIS2_HOME:   D:\JavaSoft\AXIS2\axis2-1.3
  3. Using JAVA_HOME:    C:\Program Files\Java\jdk1.6.0_03
  4. Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: java.lang.RuntimeException: java.lang.
  5. reflect.InvocationTargetException
  6.         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:265)
  7.         at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35)
  8.         at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24)
  9. Caused by: java.lang.RuntimeException: java.lang.reflect.InvocationTargetException
  10.         at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:53)
  11.         at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.generate(CodeGenerationEngine.java:218)
  12.         ... 2 more
  13. Caused by: java.lang.reflect.InvocationTargetException
  14.         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
  15.         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
  16.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
  17.         at java.lang.reflect.Method.invoke(Method.java:597)
  18.         at org.apache.axis2.wsdl.codegen.extension.SimpleDBExtension.engage(SimpleDBExtension.java:50)
  19.         ... 3 more
  20. Caused by: org.apache.axis2.schema.SchemaCompilationException: {[url]http://schemas.xmlsoap.org/soap/encoding/[/url]}string is not
  21. supported.
  22.         at org.apache.axis2.schema.SchemaCompiler.findClassName(SchemaCompiler.java:819)
  23.         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:699)
  24.         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:478)
  25.         at org.apache.axis2.schema.SchemaCompiler.process(SchemaCompiler.java:1899)
  26.         at org.apache.axis2.schema.SchemaCompiler.processParticle(SchemaCompiler.java:1788)
  27.         at org.apache.axis2.schema.SchemaCompiler.processComplexType(SchemaCompiler.java:977)
  28.         at org.apache.axis2.schema.SchemaCompiler.processAnonymousComplexSchemaType(SchemaCompiler.java:886)
  29.         at org.apache.axis2.schema.SchemaCompiler.processSchema(SchemaCompiler.java:867)
  30.         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:518)
  31.         at org.apache.axis2.schema.SchemaCompiler.processElement(SchemaCompiler.java:489)
  32.         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:302)
  33.         at org.apache.axis2.schema.SchemaCompiler.compile(SchemaCompiler.java:212)
  34.         at org.apache.axis2.schema.ExtensionUtility.invoke(ExtensionUtility.java:80)
  35.         ... 8 more
复制代码

[ 本帖最后由 chouy 于 2008-2-13 13:38 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2008-02-13 15:57 |只看该作者
很明显是 xsd:string 而不是 soapenc:string 。

楼主这个wsdl是java2wsdl自动生成的?还是生成以后自己改的啊?

btw:
一看到OAPUSH我就想到了楼主的公司,一想到楼主的公司心里就来气。

[ 本帖最后由 fl3w 于 2008-2-13 16:10 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP