【发布时间】:2016-08-24 15:03:21
【问题描述】:
每当我在 WebSphere(使用管理员控制台)中部署我的 Web 服务(作为 .WAR)时,它似乎都会修改其 WSDL 以将其分离为 WSDL 和 XSD(基本上删除了 WSDL 类型的内联)。它还将其重命名为 GetGedDoc.wsdl(原名为 GetGedDocumentService.wsdl)。
我对此没有任何真正的问题,但 XSD 重命名了所有参数 arg0、arg1 等...并使它们全部可选。
如何防止这种非常烦人的行为?
我真的不知道您可以使用什么代码来诊断问题,但无论如何这是我的 WSDL。
<?xml version="1.0" encoding="UTF-8"?><!-- Generated by JAX-WS RI (http://jax-ws.java.net).
RI's version is JAX-WS RI 2.2.10 svn-revision#IBM 2.2.10-12/21/2015 12:33:25
PM(foreman)-. -->
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" name="GetGedDocumentService"
targetNamespace="http://cm.web.dsidiff.fr/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:tns="http://cm.web.dsidiff.fr/" xmlns:wsam="http://www.w3.org/2007/05/addressing/metadata"
xmlns:wsp="http://www.w3.org/ns/ws-policy" xmlns:wsp1_2="http://schemas.xmlsoap.org/ws/2004/09/policy"
xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<types>
<xsd:schema targetNamespace="http://cm.web.dsidiff.fr/">
<xsd:element name="parameters" type="tns:getDocument"/>
<xsd:complexType name="getDocument">
<xsd:sequence>
<xsd:element minOccurs="1" name="pid" type="xsd:string" />
<xsd:element minOccurs="1" name="login" type="xsd:string" />
<xsd:element minOccurs="1" name="pwd" type="xsd:string" />
<xsd:element minOccurs="1" name="numClient" type="xsd:string" />
<xsd:element minOccurs="0" name="numCompte" type="xsd:string" />
<xsd:element minOccurs="0" name="itemType" type="xsd:string" />
<xsd:element minOccurs="0" name="typeDoc" type="xsd:string" />
</xsd:sequence>
</xsd:complexType>
<xsd:element name="result" type="xsd:string" />
</xsd:schema>
</types>
<message name="getDocument">
<part element="tns:parameters" name="parameters" />
</message>
<message name="getDocumentResponse">
<part element="tns:result" name="result" />
</message>
<portType name="GetGedDocService">
<operation name="getDocument">
<input message="tns:getDocument"/>
<output message="tns:getDocumentResponse" />
</operation>
</portType>
<binding name="GetGedDocSOAP" type="tns:GetGedDocService">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
<operation name="getDocument">
<soap:operation soapAction="http://localhost:9080/DSI_CMDK_WS/getDocument" />
<input>
<soap:body use="literal" />
</input>
<output>
<soap:body use="literal" />
</output>
</operation>
</binding>
<service name="GetGedDocService">
<port binding="tns:GetGedDocSOAP" name="GetGedDocSOAP">
<soap:address location="http://localhost:9080" />
</port>
</service>
</definitions>
【问题讨论】:
标签: java web-services wsdl websphere jax-ws