Hello *,
we've got a problem with flex builder 3 (Version: 3.0.194161)
and a generated webservice.
Our wsdl file is generated by openedge (progress).
This is a sample of it where i think the problem come from:
[code]
<element name="dsOrder">
<complexType>
<sequence>
<element maxOccurs="unbounded" minOccurs="0" name="ttOrder">
<complexType>
<sequence>
<element name="Ordernum" nillable="true" type="xsd:int"/>
<element name="CustNum" nillable="true" type="xsd:int"/>
<element name="OrderDate" nillable="true" type="xsd:date"/>
<element name="ShipDate" nillable="true" type="xsd:date"/>
<element name="PromiseDate" nillable="true" type="xsd:date"/>
<element name="Carrier" nillable="true" type="xsd:string"/>
<element name="Instructions" nillable="true" type="xsd:string"/>
<element name="PO" nillable="true" type="xsd:string"/>
<element name="Terms" nillable="true" type="xsd:string"/>
<element name="SalesRep" nillable="true" type="xsd:string"/>
<element name="BillToID" nillable="true" type="xsd:int"/>
<element name="ShipToID" nillable="true" type="xsd:int"/>
<element name="OrderStatus" nillable="true" type="xsd:string"/>
<element name="WarehouseNum" nillable="true" type="xsd:int"/>
<element name="Creditcard" nillable="true" type="xsd:string"/>
<element name="OrderTotal" nillable="true" type="xsd:decimal"/>
<element name="CustName" nillable="true" type="xsd:string"/>
<element name="RepName" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element maxOccurs="unbounded" minOccurs="0" name="ttOline"
prodata:beforeTable="BIttOline">
<complexType>
<sequence>
<element name="Ordernum" nillable="true" type="xsd:int"/>
<element name="Linenum" nillable="true" type="xsd:int"/>
<element name="Itemnum" nillable="true" type="xsd:int"/>
<element name="Price" nillable="true" type="xsd:decimal"/>
<element name="Qty" nillable="true" type="xsd:int"/>
<element name="Discount" nillable="true" type="xsd:int"/>
<element name="ExtendedPrice" nillable="true" type="xsd:decimal"/>
<element name="OrderLineStatus" nillable="true" type="xsd:string"/>
</sequence>
</complexType>
</element>
<element maxOccurs="unbounded" minOccurs="0" name="ttItem">
<complexType>
<sequence>
<element name="Itemnum" nillable="true" type="xsd:int"/>
<element name="ItemName" nillable="true" type="xsd:string"/>
<element name="Price" nillable="true" type="xsd:decimal"/>
<element name="Onhand" nillable="true" type="xsd:int"/>
<element name="Allocated" nillable="true" type="xsd:int"/>
<element name="ReOrder" nillable="true" type="xsd:int"/>
<element name="OnOrder" nillable="true" type="xsd:int"/>
<element name="CatPage" nillable="true" type="xsd:int"/>
<element name="CatDescription" nillable="true" type="xsd:string"/>
<element name="Category1" nillable="true" type="xsd:string"/>
<element name="Category2" nillable="true" type="xsd:string"/>
<element name="Special" nillable="true" type="xsd:string"/>
<element name="Weight" nillable="true" type="xsd:decimal"/>
<element name="Minqty" nillable="true" type="xsd:int"/>
</sequence>
</complexType>
</element>
</sequence>
</complexType>
<unique name="OrderNum" prodata:primaryIndex="true">
<selector xpath=".//S2:ttOrder"/>
<field xpath="S2:Ordernum"/>
</unique>
<unique name="orderline" prodata:primaryIndex="true">
<selector xpath=".//S2:ttOline"/>
<field xpath="S2:Ordernum"/>
<field xpath="S2:Linenum"/>
</unique>
<unique name="ItemNum" prodata:primaryIndex="true">
<selector xpath=".//S2:ttItem"/>
<field xpath="S2:Itemnum"/>
</unique>
<keyref name="OrderLine" refer="S2:OrderNum">
<selector xpath=".//S2:ttOline"/>
<field xpath="S2:Ordernum"/>
</keyref>
<annotation>
<appinfo>
<prodata:relation name="LineItem" prodata:child="ttItem"
prodata:parent="ttOline" prodata:relationFields="Itemnum,Itemnum"/>
</appinfo>
</annotation>
</element>
[/code]
And this is the schema generated by flex when we import the wsdl :
[code]
<xsd:element name="dsOrder" type="S2:dsOrder_type0">
<xsd:annotation>
<xsd:appinfo>
<prodata:relation name="LineItem"
prodata:child="ttItem" prodata:parent="ttOline"
prodata:relationFields="Itemnum,Itemnum"/>
</xsd:appinfo>
</xsd:annotation>
<xsd:keyref name="OrderLine" refer="S2:OrderNum">
<xsd:selector xpath=".//S2:ttOline"/>
<xsd:field xpath="S2:Ordernum"/>
</xsd:keyref>
<xsd:unique name="OrderNum">
<xsd:selector xpath=".//S2:ttOrder"/>
<xsd:field xpath="S2:Ordernum"/>
</xsd:unique>
<xsd:unique name="orderline">
<xsd:selector xpath=".//S2:ttOline"/>
<xsd:field xpath="S2:Ordernum"/>
<xsd:field xpath="S2:Linenum"/>
</xsd:unique>
<xsd:unique name="ItemNum">
<xsd:selector xpath=".//S2:ttItem"/>
<xsd:field xpath="S2:Itemnum"/>
</xsd:unique>
</xsd:element>
[/code]
That result on this error when we call the webservice in flex :
[error]
TypeError: Cannot unmarshall type
'http://www.w3.org/2001/XMLSchema::DsOrder_type0' from XML.
at
mx.rpc.xml::SchemaMarshaller/unmarshall()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SchemaMarshaller.as:135]
at
mx.rpc.xml::SchemaManager/unmarshall()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\SchemaManager.as:441]
at
mx.rpc.xml::XMLDecoder/marshallBuiltInType()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\XMLDecoder.as:1724]
at
mx.rpc.xml::XMLDecoder/decodeType()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\XMLDecoder.as:1649]
at
mx.rpc.soap::SOAPDecoder/decodeType()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:772]
at
mx.rpc.xml::XMLDecoder/decode()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\xml\XMLDecoder.as:162]
at
mx.rpc.soap::SOAPDecoder/mx.rpc.soap:SOAPDecoder::decodeBody()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:452]
at
mx.rpc.soap::SOAPDecoder/mx.rpc.soap:SOAPDecoder::decodeEnvelope()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:304]
at
mx.rpc.soap::SOAPDecoder/decodeResponse()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\soap\SOAPDecoder.as:236]
at
generated.webservices::BaseAppTestDSService/generated.webservices:BaseAppTestDSService::processResult()[C:\Users\fabrik\Documents\Flex
Builder 3\testDS\src\generated\webservices\BaseAppTestDSService.as:192]
at
mx.rpc::AsyncResponder/result()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncResponder.as:84]
at
mx.rpc::AsyncRequest/acknowledge()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\rpc\AsyncRequest.as:74]
at
DirectHTTPChannel.as$138::DirectHTTPMessageResponder/completeHandler()[E:\dev\3.0.x\frameworks\projects\rpc\src\mx\messaging\channels\DirectHTTPChannel.as:381]
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
[/error]
So i watch in the DsOrder_type0.as
[code]
public function DsOrder_type0() {}
[ArrayElementType("TtOrder_type0")]
public var
ttOrder:Array;[ArrayElementType("TtOline_type0")]
public var
ttOline:Array;[ArrayElementType("TtItem_type0")]
public var ttItem:Array;
}
}
[/code]
I try to modify the type of the public var to Arraycollection, then
xmllist, and finally object without any change in the result.
I read different topics near to our problem, but i didn't find the
solution.
It seems that's a bug, but i read that oracle SOA isn't valid, perhaps
the open edge SOA have the same problem ?
Is it the type of data that not corresponds to the received data ?
Any idea? help 'll be welcome :D
Thanks for reading