Hello,

I found the Flex3 WebService does ignore the namespaces defined and used
by the xsi:type constructs when the SOAP message gets built.

Example:

     <mx:WebService
         id="contextRegistryService"
         showBusyCursor="true"
         wsdl="{_webServiceBaseUrl}runtime/ContextRegistryService?WSDL"
         useProxy="false" >
         <mx:operation name="register">
             <mx:request format="xml">
                 <ns1:register
                         xmlns:ns1="http://services.foo.bar.com/
<http://services.foo.bar.com/> "
                         xmlns:ns2="http://context.foo.bar.com/
<http://context.foo.bar.com/> "
                         xmlns:ns3="http://profiles.foo.bar.com/
<http://profiles.foo.bar.com/> ">
                  <context>
                     <ns2:Profiles
                        
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> "
                         xsi:type="ns3:ContentTransferProfile"
                         geolocation="{_geoLocation}"
                         transferMode="BASE64"/>
                     </context>
                 </ns1:register>
             </mx:request>
         </mx:operation>
     </mx:WebService>


The SOAP that gets generated is incorrect:

<SOAP-ENV:Envelope
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/
<http://schemas.xmlsoap.org/soap/envelope/> "
    xmlns:xs="http://www.w3.org/2001/XMLSchema
<http://www.w3.org/2001/XMLSchema> "
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance
<http://www.w3.org/2001/XMLSchema-instance> ">
    <SOAP-ENV:Body>
       <ns1:register xmlns:ns1="http://services.foo.bar.com
<http://services.foo.bar.com> ">
          <context>
             <ns2:Profiles
                geolocation="Toronto"
                xsi:type="ns3:ContentTransferProfile"
                transferMode="BASE64"
                xmlns:ns2="http://context.foo.bar.com/
<http://context.foo.bar.com/> " />
          </context>
       </ns1:register>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

The ns3 namespace is not there in the SOAP message, hence the Web
Service server rejects this request as being invalid (prefix ns3 is not
bound to a namespace).

Any ideas how to make this work?

Thanks, Robert

Reply via email to