How to add SOAP header parameters to WSDL in sequence without using a complexType definition?

时间:2015-08-07 02:14:29

标签: web-services soap wsdl sequence

Is it possible to specify SOAP header parameters in the WSDL to be in sequence without using a complexType type definition? Basically, I'm after the following as a request message and I'm trying to specify in the WSDL that two tags, HeaderParam1 and HeaderParam2, should be present in the header in sequence.

<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
    <SOAP-ENV:Header xmlns:m="http://test.com">
        <m:HeaderParam1>ABC</m:HeaderParam1>
        <m:HeaderParam2>DEF</m:HeaderParam2>
    </SOAP-ENV:Header>
    <SOAP-ENV:Body>
        <m:search_Input xmlns:m="http://test.com/CustomUI">
            <m:DetailParam1>String</m:DetailParam1>
            <m:DetailParam2>String</m:DetailParam2>
        </m:search_Input>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

I can't figure out how to make that specification in the WSDL that those two header parameters should be in sequence without defining them as part of a complexType definition under the SOAP header eg.

<SOAP-ENV:Header xmlns:m="http://test.com">
    <m:SubHeader>
        <m:HeaderParam1>ABC</m:HeaderParam1>
        <m:HeaderParam2>DEF</m:HeaderParam2>
    </m:SubHeader>
</SOAP-ENV:Header>

0 个答案:

没有答案