wsimport忘记了一个代理类

时间:2011-09-04 12:07:10

标签: java web-services proxy-classes wsimport

我使用 wsimport 从WSDL文件生成代理类。 A类生成,但B类对应于其构造函数的A参数 - 不是。 可能是什么原因? THX。

这是WSDL:

<?xml version='1.0' encoding='UTF-8'?><!-- Published by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is JAX-WS RI 2.1.4-b01-. --><definitions xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://project-project.org/ref" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://schemas.xmlsoap.org/wsdl/" targetNamespace="http://project-project.org/ref" name="MyName">
<types>
<xsd:schema>
<xsd:import namespace="http://purl.org/dc/terms/" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=1" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/ref/tools" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=2" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/ref/datatypes" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=3" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/ref/ProjectService" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=4" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/ref/MyName" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=5" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/ref" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=6" />
</xsd:schema>
<xsd:schema>
<xsd:import namespace="http://project-project.org/objects" schemaLocation="http://X.X.X.X:8080/myName/MyName?xsd=7" />
</xsd:schema>
</types>
<message name="MyName">
<part name="parameters" element="tns:MyName" />
</message>
<message name="MyNameResponse">
<part name="parameters" element="tns:MyNameResponse" />
</message>
<message name="ProjectServicePull">
<part name="parameters" element="tns:ProjectServicePull" />
</message>
<message name="ProjectServicePullResponse">
<part name="parameters" element="tns:ProjectServicePullResponse" />
</message>
<portType name="MyName">
<operation name="MyName">
<input message="tns:MyName" />
<output message="tns:MyNameResponse" />
</operation>
<operation name="ProjectServicePull">
<input message="tns:ProjectServicePull" />
<output message="tns:ProjectServicePullResponse" />
</operation>
</portType>
<binding name="MyNamePortBinding" type="tns:MyName">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document" />
<operation name="MyName">
<soap:operation soapAction="http://project-project.org/ref/MyName" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
<operation name="ProjectServicePull">
<soap:operation soapAction="http://project-project.org/ref/ProjectService/Pull" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="MyName">
<port name="MyNamePort" binding="tns:MyNamePortBinding">
<soap:address location="http://X.X.X.X:8080/myName/MyName" />
</port>
</service>

1 个答案:

答案 0 :(得分:1)

可能是您的模式对于B类不完整,因此jaxb无法成功创建该类。如果我理解正确的话,你是说由于缺少类,生成的类将在生成后不会编译? wsimport会吐出任何警告吗?