关于wsad自动生成的xsd文件中的string[]问题

foxsnow 2004-04-14 03:09:37
hi, I'm trying to create a web service in WSAD 5.0.

It doesn't matter if my array is simple type or complex (i.e. String[]), and it does matter if it's a parameter or a result from the method, I get an error in my wsdl.

WSAD generates an xsd file:

<?xml version="1.0" encoding="UTF-8"?>
<schema attributeFormDefault="qualified"
elementFormDefault="unqualified" targetNamespace="http://myFoo/"
xmlns="http://www.w3.org/2001/XMLSchema"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd1="http://myFoo/">
<import namespace="http://schemas.xmlsoap.org/wsdl/" schemaLocation="http://schemas.xmlsoap.org/wsdl/"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOfString">
<complexContent>
<restriction base="soapenc:Array">
<sequence/>
<attribute ref="soapenc:arrayType" wsdl:arrayType="string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>

for this file i get three errors:

1. src-import.0: Failed to read imported schema document 'http://schemas.xmlsoap.org/wsdl/'. Foo.xsd FooWeb/Web Content/wsdl/myFoo line 7

2. src-import.0: Failed to read imported schema document 'http://schemas.xmlsoap.org/soap/encoding/'. Foo.xsd FooWeb/Web Content/wsdl/myFoo line 8

3. src-resolve: Cannot resolve the name 'soapenc:Array' to a(n) type definition component. Foo.xsd FooWeb/Web Content/wsdl/myFoo line 11


it seems to me that for some odd reason WSAD doesn't recognize the schams (warnings 1+2) and there for has an erro (3).

Does any body know how to fix the problem?

我在网上发现有人和我遇到了一样的问题,我想他描述的很好,就贴在这了,有人能
帮忙解决吗?谢谢大家。
网上也有人说自己写的xsd也碰到了相同的问题,但是将该定义直接放入WSDL文档的
<types></types>元素中不会出错,可是wsad中总是出错,说<types></types>下没有
找到<schema></schema>的说明。

我的描述是这样的
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://interfacelib.archive.taiji.com.wsdl/IforPlan/"
xmlns:tns="http://interfacelib.archive.taiji.com.wsdl/IforPlan/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:soap-enc="http://schemas.xmlsoap.org/soap/encoding/">
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"
schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
<complexType name="ArrayOfstring">
<complexContent>
<restriction base="soap-enc:Array">
<attribute ref="soap-enc:arrayType" wsdl:arrayType="string[]"/>
</restriction>
</complexContent>
</complexType>
</schema>
</types>
...全文
69 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
panpan221 2004-04-16
  • 打赏
  • 举报
回复
新手来学习,友情UP

67,513

社区成员

发帖
与我相关
我的任务
社区描述
J2EE只是Java企业应用。我们需要一个跨J2SE/WEB/EJB的微容器,保护我们的业务核心组件(中间件),以延续它的生命力,而不是依赖J2SE/J2EE版本。
社区管理员
  • Java EE
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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