WSDL生成java文件有问题,请大家帮忙看看啊?

PoorAngel 2010-02-26 01:40:30
文件1:Request.xsd
<?xml version="1.0" encoding="windows-1252" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://mypackage/type" elementFormDefault="qualified"
xmlns:tns="http://mypackage/type/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/"
attributeFormDefault="unqualified">
<complexType name="ValidateUserRequest">
<sequence>
<element name="userName" type="String"/>
<element name="password" type="String"/>
</sequence>
</complexType>
</schema>

文件2 Response.xsd:
<?xml version="1.0" encoding="windows-1252" ?>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://mypackage/type" elementFormDefault="qualified"
xmlns:tns="http://mypackage/type/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
<complexType name="ValidateUserResponse">
<sequence>
<element name="Result" type="String" nillable="true"/>
</sequence>
</complexType>
</schema>
...全文
160 4 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
4 条回复
切换为时间正序
请发表友善的回复…
发表回复
liuxianglin 2010-02-26
  • 打赏
  • 举报
回复
Request.xsd、Response.xsd:
targetNamespace="http://mypackage/type"
改成
targetNamespace="http://mypackage/type/"
就可以
PoorAngel 2010-02-26
  • 打赏
  • 举报
回复
mistake1:
targetNamespace="http://mypackage/type" should be targetNamespace="http://mypackage/type/"
PoorAngel 2010-02-26
  • 打赏
  • 举报
回复
try to create a new java web service through WSDL using above wsdl file,
it mentioned
"model error: type "{http://mypackage/type} ValidateuserResponse" not found."

是我环境出问题了 还是文件写错了

需要设置什么吗?

我用的是jdeveloer
PoorAngel 2010-02-26
  • 打赏
  • 举报
回复
文件三validate.wsdl

<definitions name="ValidateWebService" targetNamespace="http://mypackage/"
xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://mypackage/"
xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:tns0="http://mypackage/type/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<types>
<schema xmlns="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://mypackage/type/"
elementFormDefault="qualified"
xmlns:tns="http://mypackage/type/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/">
<xsd:import namespace="http://mypackage/type/"
schemaLocation="Request.xsd"/>
<xsd:import namespace="http://mypackage/type/"
schemaLocation="Response.xsd"/>

</schema>
</types>
<message name="validateRequest">
<part name="req" type="tns0:ValidateUserRequest"/>
</message>
<message name="validateResponse">
<part name="res" type="tns0:ValidateUserResponse"/>
</message>
<portType name="ValidateWebService">
<operation name="validate">
<input message="tns:validateRequest"/>
<output message="tns:validateResponse"/>
</operation>
</portType>
<binding name="bindMePort" type="tns:ValidateWebService">
<soap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
<operation name="validate">
<soap:operation soapAction="http://mypackage//validate"/>
<input>
<soap:body use="literal" namespace="http://mypackage/" parts="req"/>
</input>
<output>
<soap:body use="literal" namespace="http://mypackage/" parts="res"/>
</output>
</operation>
</binding>
<service name="ValidateWebService">
<port name="AccessMe"
binding="tns:bindMePort">
<soap:address location="http://qkong-cn.cn.oracle.com:80/ValidateWebService/AccessMe"/>
</port>
</service>
</definitions>

67,549

社区成员

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

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