Java Holder vs document-style, or why use Holders

I recently started using document-style web-services. I found out that in this way we can only have one part(“parameter”) for an input / output message that can contain all the data.
But now I read about Holders, which, according to this link, is used to return several parameters. Now I am wondering why should I use Holders if I can use a document type response that can contain everything?
The additional information I found here left me uncertain.

+4
source share
1 answer

I recently started using document style web services. I learned that in this way we can only have one part ("parameter") for an input / output message that can contain all the data.

You must distinguish between document/literal bare (or unwrapped)and document/literal wrapped. Although your statement is true for the latter, it is not true for the primer. In relation to the IBM manual for specific types of encodings, you will see that document/literal bareseveral elements may indicate part:

<types>
    <schema>
        <element name="xElement" type="xsd:int"/>
        <element name="yElement" type="xsd:float"/>
    </schema>
</types>

<message name="myMethodRequest">
    <part name="x" element="xElement"/>
    <part name="y" element="yElement"/>
</message>
<message name="empty"/>

<portType name="PT">
    <operation name="myMethod">
        <input message="myMethodRequest"/>
        <output message="empty"/>
    </operation>
</portType>

which leads to a SOAP message:

<soap:envelope>
    <soap:body>
        <xElement>5</xElement>
        <yElement>5.0</yElement>
    </soap:body>
</soap:envelope>

, - , WS-I. document/literal wrapped ( ), bare.

, document/literal wrapped WSDL:

/ , wrapped-document/literal. WSDL. JSR 224 (JAX-WS: Java API - XML). ()


@Edit: - , Handler s:

WSDL IN, OUT INOUT. , , , , .

Java , , , Handler "" WSDL OUT INOUT.

, ,

+3

All Articles