You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by To...@nokia.com on 2003/01/08 17:07:11 UTC

soap:header ignored when using MIME binding

Hi,

The Axis 1.1 seems to ignore soap:header declarations when using MIME binding.
Instead it sends all message parts in SOAP body. Here is the wsdl binding section:

    <wsdl:binding name="StoreServiceSOAPBinding" type="tns:StoreService">
        <soap:binding style="rpc"
                      transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="store">
            <wsdl:input>
                <mime:multipartRelated>
                    <mime:part>
                        <soap:body parts="fileName" use="encoded"
                            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                        <soap:header message="tns:FileToStore" part="context" use="encoded"
                            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                    </mime:part>
                    <mime:part>
                        <mime:content part="fileContent" type="application/octetstream"/>
                    </mime:part>
                </mime:multipartRelated>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="encoded"
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

The context part should have been send as SOAP header, but it was not
(the whole message was in SOAP body).
When I dropped "mime" declarations:

    <wsdl:binding name="StoreServiceSOAPBinding" type="tns:StoreService">
        <soap:binding style="rpc"
                      transport="http://schemas.xmlsoap.org/soap/http"/>
        <wsdl:operation name="store">
            <wsdl:input>
                        <soap:body parts="fileName fileContent" use="encoded"
                            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
                        <soap:header message="tns:FileToStore" part="context" use="encoded"
                            encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="encoded"
                    encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>

then everything worked fine. 

Am I doing something wrong, or it is Axis bug?

Regards,
Tomasz

Re: soap:header ignored when using MIME binding

Posted by Davanum Srinivas <di...@yahoo.com>.
Tomasz,

Can you please log a bug in bugzilla (http://nagoya.apache.org/bugzilla) with a stripped down
sample/testcase that can be used to recreate the problem?

Thanks,
dims

--- Tomasz.Bak@nokia.com wrote:
> Hi,
> 
> The Axis 1.1 seems to ignore soap:header declarations when using MIME binding.
> Instead it sends all message parts in SOAP body. Here is the wsdl binding section:
> 
>     <wsdl:binding name="StoreServiceSOAPBinding" type="tns:StoreService">
>         <soap:binding style="rpc"
>                       transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="store">
>             <wsdl:input>
>                 <mime:multipartRelated>
>                     <mime:part>
>                         <soap:body parts="fileName" use="encoded"
>                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>                         <soap:header message="tns:FileToStore" part="context" use="encoded"
>                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>                     </mime:part>
>                     <mime:part>
>                         <mime:content part="fileContent" type="application/octetstream"/>
>                     </mime:part>
>                 </mime:multipartRelated>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="encoded"
>                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
> 
> The context part should have been send as SOAP header, but it was not
> (the whole message was in SOAP body).
> When I dropped "mime" declarations:
> 
>     <wsdl:binding name="StoreServiceSOAPBinding" type="tns:StoreService">
>         <soap:binding style="rpc"
>                       transport="http://schemas.xmlsoap.org/soap/http"/>
>         <wsdl:operation name="store">
>             <wsdl:input>
>                         <soap:body parts="fileName fileContent" use="encoded"
>                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>                         <soap:header message="tns:FileToStore" part="context" use="encoded"
>                             encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>             </wsdl:input>
>             <wsdl:output>
>                 <soap:body use="encoded"
>                     encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>             </wsdl:output>
>         </wsdl:operation>
>     </wsdl:binding>
> 
> then everything worked fine. 
> 
> Am I doing something wrong, or it is Axis bug?
> 
> Regards,
> Tomasz


=====
Davanum Srinivas - http://xml.apache.org/~dims/

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com