文件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>
<?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>
解决方案 »
- Cannot forward after response has been committed
- struts中调用接口时候的Cannot make a static reference to the non-static method问题
- java设计模式的核心是什么,跪求高手赐一句精辟的总结。
- 导航关闭和打开
- 使用Struts的Token机制,控制form重复提交
- 在jboss和tomcat上分别运行相同jxl代码,jboss上花5秒,tomcat则才1秒?望指导
- 请教javamail高手,复合邮件读取问题!!!!!!!1急
- 问一段我从没有见过的代码??
- JBOSS启动出现了如文所示的异常,请高手指点迷津!!!
- 求一个用j2ee标准架构编写的代码,分不够可以再加分!
- 数据库编码问题
- 關于DWR同步設置的怪異問題
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>
it mentioned
"model error: type "{http://mypackage/type} ValidateuserResponse" not found."是我环境出问题了 还是文件写错了需要设置什么吗?我用的是jdeveloer
targetNamespace="http://mypackage/type" should be targetNamespace="http://mypackage/type/"
targetNamespace="http://mypackage/type"
改成
targetNamespace="http://mypackage/type/"
就可以