OK, I wonder if this is a serialization problem due to objects not converting to arrays correctly (since you have only a single element inside an array type).  What if you try this before sending?

 

Whatever.myOperation.request.param.bazRequests.myRequestType = mx.utils.ArrayUtil.toArray(Whatever.myOperation.request.param.bazRequests.myRequestType);

 

And then send the request.

 

An alternative would be to define the request object outside the WebService tag like so:

 

<mx:Object id=”myOpRequest”>

  <param>

     <mx:Object baz=”123”>

       <bazRequests>

          <mx:Object>

            <myRequestType>

               <mx:Array>

                   <mx:Object foo=”aaa” bar=”bbb” />

                </mx:Array>

            </myRequestType>

          </mx:Object>

       </bazRequests>

     </mx:Object>

  </param>

</mx:Object>

 

Then <mx:WebService …>

          <mx:operation name=”myOperation”>

              <mx:request>{myOpRequest}</mx:request>

          </>

         </>

 

I may not have the object syntax exactly right but hopefully you get the idea.

 

Matt

 


From: extensive_systems [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 17, 2005 5:03 PM
To: [EMAIL PROTECTED]
Subject: [flexcoders] Re: Flex Choking on Array WSDL syntax?

 


Well, my web service definition resembles this:

<mx:WebService
  id="whatever"
  serviceName="whatever2"
  protocol="https">
  <mx:operation name="myOperation">
    <mx:request>
      <param>
        <baz>123</baz>
        <bazRequests>
          <myRequestType>
            <foo>aaa</foo>
            <bar>bbb</bar>
          </myRequestType>
        </bazRequests>
        <username>GOP</username>
        <password>evil</password>
      </param>
    </mx:request>
  </mx:operation>
</mx:WebService>

The SOAP request resembles the following (the interesting points are
that 'undefined' has been put into the square brackets, and the 'foo'
and 'bar' elements (i.e., the content of 'my_RequestType') are not
there?)...

<?xml version="1.0" encoding="utf-8"?>
  <SOAP-ENV:Envelope
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/">
  <SOAP-ENV:Body xmlns:ns1="urn:my-identifier-here">
    <ns1:myOperation
SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">
      <param
        xsi:type="ns2:my-other-identifier-here"
        xmlns:ns2="http://my.xsd">
        <baz xsi:type="xsd:int">123</baz>
        <bazRequests
          soapenc:arrayType="ns2:my_RequestType[undefined]"
          xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/"
          xsi:type="soapenc:Array" />
        <userName xsi:type="xsd:string">GOP</userName>
        <password xsi:type="xsd:string">evil</password>
      </param>
    </ns1:myOperation>
  </SOAP-ENV:Body></SOAP-ENV:Envelope>


================================================
--- In [EMAIL PROTECTED], Matt Chotin <[EMAIL PROTECTED]> wrote:
> What does the SOAP request look like?  Nothing in what you've posted
jumps
> out at me.
>

>
> Matt
>

>
>   _____ 
>
> From: extensive_systems [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 17, 2005 1:31 PM
> To: [EMAIL PROTECTED]
> Subject: [flexcoders] Flex Choking on Array WSDL syntax?
>

>
>
> I'm calling a web service over HTTPS - see WSDL fragment below
> (snipped to relevant portion and edited to remove business info) - and
> the following fault is returned. Could this be a Flex bug?
>
> --------------------------------------------
> Fault returned:
>
> <SOAP-ENV:Fault>
>          <faultcode>SOAP-ENV:Client</faultcode>
>          <faultstring>Explicit array length is not a valid integer
> 'undefined'. [java.lang.IllegalArgumentException]</faultstring>
>          <faultactor>/vintel/vinDecode</faultactor>
>       </SOAP-ENV:Fault>
>
> --------------------------------------------
> WSDL fragment:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <definitions name="Foobar"
>         targetNamespace="http://some.where/Foobar.wsdl
> <http://some.where/Foobar.wsdl> "
>         xmlns="http://schemas.xmlsoap.org/wsdl/
> <http://schemas.xmlsoap.org/wsdl/> "
>         xmlns:xsd1="http://some.where/Foobar.xsd
> <http://some.where/Foobar.xsd> "
>         xmlns:tns="http://some.where/Foobar.wsdl
> <http://some.where/Foobar.wsdl> "
>         xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/
> <http://schemas.xmlsoap.org/wsdl/soap/> " >
>
>   <documentation>
>   WSDL for Service: Foobar, generated by Oracle WSDL toolkit (version:
> 1.1)
>   </documentation>
>
>   <types>
>     <schema
>             targetNamespace="http://some.where/Foobar.xsd
> <http://some.where/Foobar.xsd> "
>             xmlns:tns="http://some.where/Foobar.xsd
> <http://some.where/Foobar.xsd> "
>             xmlns="http://www.w3.org/2001/XMLSchema
> <http://www.w3.org/2001/XMLSchema> "
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema
> <http://www.w3.org/2001/XMLSchema> "
>             xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/
> <http://schemas.xmlsoap.org/soap/encoding/> "
>             xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/
> <http://schemas.xmlsoap.org/wsdl/> ">
>
>       <complexType name="my_Type">
>         <all>
>           <element name="baz" type="xsd:int"/>
>           <element name="bazRequests" type="tns:ArrayOfmy_RequestType"/>
>           <element name="bazResponses"
type="tns:ArrayOfmy_ResponseType"/>
>           <element name="username" type="xsd:string"/>
>           <element name="password" type="xsd:string"/>
>         </all>
>       </complexType>
>       <complexType name="my_RequestType">
>         <all>
>           <element name="foo" type="xsd:string"/>
>           <element name="bar" type="xsd:string"/>
>         </all>
>       </complexType>
>       <complexType name="ArrayOfmy_RequestType">
>         <complexContent>
>           <restriction base="soapenc:Array">
>             <attribute ref="soapenc:arrayType"
> wsdl:arrayType="tns:my_RequestType[]"/>
>           </restriction>
>         </complexContent>
>       </complexType>
>
>       ....... S N I P .........
>
> </definitions>
>
>
>
>
>
>
>
>
>
> Yahoo! Groups Sponsor
>
>
>
> ADVERTISEMENT

>
<http://us.ard.yahoo.com/SIG=1296anhob/M=298184.6191685.7192823.3001176/D=gr
>
oups/S=1705007207:HM/EXP=1111181454/A=2593423/R=0/SIG=11el9gslf/*http:/www.n
> etflix.com/Default?mqso=60190075> click here
>
>

>
<http://us.adserver.yahoo.com/l?M=298184.6191685.7192823.3001176/D=groups/S=
> :HM/A=2593423/rand=407525824>
>

>
>   _____ 
>
> Yahoo! Groups Links
>
> *      To visit your group on the web, go to:
> http://groups.yahoo.com/group/flexcoders/
> <http://groups.yahoo.com/group/flexcoders/>
>  
> *      To unsubscribe from this group, send an email to:
> [EMAIL PROTECTED]
> <mailto:[EMAIL PROTECTED]>
>  
> *      Your use of Yahoo! Groups is subject to the Yahoo!
> <http://docs.yahoo.com/info/terms/>  Terms of Service.






Yahoo! Groups Sponsor
ADVERTISEMENT
click here


Yahoo! Groups Links

Reply via email to