每当我在WebSphere中(使用管理员控制台)部署我的Web服务(作为.WAR)时,它似乎修改其WSDL以将其分离为WSDL和一个XSD(基本上除去内联的WSDL类型)。它还将其重命名为GetGedDoc.wsdl(原始名称为GetGedDocumentService.wsdl)。WebSphere在部署Web服务时修改我的WSDL(JAX-WS)
我没有任何具体的问题,但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>
http://stackoverflow.com/questions/238643/where-does-websphere-get-the-wsdl-from?rq=1 – Karthik