Java WSDL内容,绑定:显示输入类型";字面上的;而不是complextype的名称
我将Web服务部署到tomcat。在wsdl文件中,绑定部分如下所示:Java WSDL内容,绑定:显示输入类型";字面上的;而不是complextype的名称,java,web-services,soap,wsdl,complextype,Java,Web Services,Soap,Wsdl,Complextype,我将Web服务部署到tomcat。在wsdl文件中,绑定部分如下所示: <binding name="mywsPortBinding" type="tns:mywsInterface"> <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/> <operation name="update"> <soap:operati
<binding name="mywsPortBinding" type="tns:mywsInterface">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
<operation name="update">
<soap:operation soapAction=""/>
<input> <soap:body use="literal"/> </input>
<output> <soap:body use="literal"/> </output>
</operation>
</binding>
我的问题:为什么输入和输出类型显示为“文字”?
作为响应,此Web服务根据指定的xsd发回某些xml复杂类型的数据。为什么不在wsdl中显示copmlex类型名称?在绑定中,“literal”仅定义使用的编码样式,复杂类型名称显示在“wsdl:message”定义中,该定义在“wsdl:portType”中的“wsdl:operation”中使用
你应该有这样的东西。
`
`
您可以在绑定中找到更多详细信息和示例,“literal”仅在使用的编码样式中定义,复杂类型名称显示在“wsdl:message”定义中,该定义在“wsdl:portType”中的“wsdl:operation”中使用
你应该有这样的东西。
`
`
你可以找到更多的细节和例子
在“literal”的情况下,抽象类型定义本身成为具体定义(它们是“literal”定义)。在本例中,您可以简单地检查XML模式类型定义以确定具体的消息格式。例如,文档/文字绑定的操作在网络上看起来如下所示:
3.14159265358979
3.14159265358979
注意,SOAP主体只包含一个Add的实例
模式中定义的元素这就是document/literal的本质
吸引人
参考:
在“literal”的情况下,抽象类型定义本身成为具体定义(它们是“literal”定义)。在本例中,您可以简单地检查XML模式类型定义以确定具体的消息格式。例如,文档/文字绑定的操作在网络上看起来如下所示:
3.14159265358979
3.14159265358979
注意,SOAP主体只包含一个Add的实例
模式中定义的元素这就是document/literal的本质
吸引人
参考:
<xs:element name="update" type="tns:update"/>
<xs:complexType name="update">
<xs:sequence>
<xs:element name="arg0" type="xs:string"/>
<xs:element name="arg1" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<xs:element name="updateResponse" type="tns:updateResponse"/>
<xs:complexType name="updateResponse">
<xs:sequence>
<xs:element name="arg0" type="xs:string"/>
</xs:sequence>
</xs:complexType>
<wsdl:message name="update">
<wsdl:part element="tns:update" name="parameters"/>
</wsdl:message>
<wsdl:message name="updateResponse">
<wsdl:part element="tns:updateResponse" name="parameters"/>
</wsdl:message>
<wsdl:portType name="mywsInterface">
<wsdl:operation name="update">
<wsdl:input message="tns:update" name="update"/>
<wsdl:output message="tns:updateResponse" name="updateResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="mywsPortBinding" type="tns:mywsInterface">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="update">
<soap:operation soapAction="" style="document"/>
<wsdl:input name="update">
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output name="updateResponse">
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
>
<SOAP-ENV:Body>
<m:Add xmlns:m="http://example.org/math/types/">
<x>3.14159265358979</x>
<y>3.14159265358979</y>
</m:Add>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>