Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / Flash / Data Integration / April 2005



Tip: Looking for answers? Try searching our database.

Associative Arrays from SOAP?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
suaveant - 25 Apr 2005 22:28 GMT
Using Flash MX 2004 Pro. I am setting up a web service to pass data to Flash
from Perl. I am trying to figure out how (if it is possible) to define the WSDL
type definition to make Flash understand these.

Can anyone help me with this?
Anton_FA2 - 27 Apr 2005 05:21 GMT
Hi,

sorry, dont have an anwser - but I'm in a similiar situation, so I'm hoping
someone can anwser this for me too.

I have a Java webservice which has this .wsdl which needs a Map/Struct object
returned to the webService (an associative array?)

Can someone tell me if this is possible?
Thanks

<wsdl:definitions targetNamespace="urn:mpappliance">
-
    <wsdl:types>
-
    <schema targetNamespace="http://xml.apache.org/xml-soap">
<import namespace="http://lang.java"/>
<import namespace="http://soap.apache.org"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
    <complexType name="mapItem">
-
    <sequence>
<element name="key" nillable="true" type="xsd:anyType"/>
<element name="value" nillable="true" type="xsd:anyType"/>
</sequence>
</complexType>
-
    <complexType name="Map">
-
    <sequence>
<element name="item" minOccurs="0" maxOccurs="unbounded"
type="apachesoap:mapItem"/>
</sequence>
</complexType>
</schema>
-
    <schema targetNamespace="http://soap.apache.org">
<import namespace="http://xml.apache.org/xml-soap"/>
<import namespace="http://lang.java"/>
<import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
-
    <complexType name="SOAPException">
-
    <sequence>
<element name="faultCode" nillable="true" type="soapenc:string"/>
<element name="message" nillable="true" type="soapenc:string"/>
<element name="rootException" nillable="true" type="xsd:anyType"/>
<element name="targetException" nillable="true" type="tns3:Throwable"/>
</sequence>
</complexType>
</schema>
</wsdl:types>
-
    <wsdl:message name="getPriceRequest">
<wsdl:part name="params" type="apachesoap:Map"/>
</wsdl:message>
-
    <wsdl:message name="SOAPException">
<wsdl:part name="fault" type="tns2:SOAPException"/>
</wsdl:message>
-
    <wsdl:message name="getPriceResponse">
<wsdl:part name="getPriceReturn" type="apachesoap:Map"/>
</wsdl:message>
-
    <wsdl:portType name="MyPriceSOAP">
-
    <wsdl:operation name="getPrice" parameterOrder="params">
<wsdl:input name="getPriceRequest" message="impl:getPriceRequest"/>
<wsdl:output name="getPriceResponse" message="impl:getPriceResponse"/>
<wsdl:fault name="SOAPException" message="impl:SOAPException"/>
</wsdl:operation>
</wsdl:portType>
-
    <wsdl:binding name="rpcrouterSoapBinding" type="impl:MyPriceSOAP">
<wsdlsoap:binding style="rpc"
transport="http://schemas.xmlsoap.org/soap/http"/>
-
    <wsdl:operation name="getPrice">
<wsdlsoap:operation soapAction=""/>
-
    <wsdl:input name="getPriceRequest">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mpappliance"/>
</wsdl:input>
-
    <wsdl:output name="getPriceResponse">
<wsdlsoap:body use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mpappliance"/>
</wsdl:output>
-
    <wsdl:fault name="SOAPException">
<wsdlsoap:fault name="SOAPException" use="encoded"
encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
namespace="urn:mpappliance"/>
</wsdl:fault>
</wsdl:operation>
</wsdl:binding>
-
    <wsdl:service name="MyPriceSOAPService">
-
    <wsdl:port name="rpcrouter" binding="impl:rpcrouterSoapBinding">
<wsdlsoap:address location="http://server:8080/mpappliance-v2/rpcrouter"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
suaveant - 27 Apr 2005 18:29 GMT
I actually figured this out, but now I am having trouble figuring out how to
send an array of hashes...

here is the type that turned my perl hashes into flash associative arrays...

<xsd:complexType name="testHash">
    <xsd:all>
        <xsd:element maxOccurs="1" minOccurs="1" name="foo" type="xsd:string"/>
        <xsd:element maxOccurs="1" minOccurs="1" name="bar" type="xsd:string"/>
    </xsd:all>
</xsd:complexType>

unfortunately, this means that each key must be specified in the wsdl, but
that is workable for me.
for instance this gives an associative array with keys 'foo' and 'bar'.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.