Hi,
I've been facing the same issue mentioned and am a newbie. Was the issue
resolved - if so could you please post what helped.
DM
tddclare wrote:
Hi,
I haven't worked with webservices much, but am needing to test out a
service that was produced by a software package my company is
evaluating. I'm building the flex front end to show the results.
When I run what I have, I get errors when the application launches:
===
TypeError: Error #1034: Type Coercion failed: cannot convert to
flash.xml.XMLNode.
at mx.rpc.xml::SchemaContext/::httpResultHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::dispatchRpcEvent()
at
mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resultHandler()
at mx.rpc::Responder/result()
at mx.rpc::AsyncRequest/acknowledge()
at ::DirectHTTPMessageResponder/completeHandler()
at
flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::URLLoader/flash.net:URLLoader::onComplete()
===
My application is relatively simple:
===
?xml version=1.0 encoding=utf-8?
mx:Application xmlns:mx=http://www.adobe.com/2006/mxml;
layout=absolute
mx:Script
![CDATA[
import mx.rpc.events.FaultEvent;
import mx.rpc.events.ResultEvent;
public function handleResult(e:ResultEvent):void {
trace( Result: + e.result );
}
public function handleFault(e:FaultEvent):void {
trace( Error: + e.fault.faultString );
}
]]
/mx:Script
mx:WebService id=mmWebService
wsdl=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/MetaMatrixDataServices.wsdl;
result=handleResult(event)
fault=handleFault(event)
/mx:WebService
mx:Button id=getDataButton
click=mmWebService.getVmdbHrrsJoin(63458); /
/mx:Application
===
and I suspect I'm not doing something right with setting up the
webservice, as the error occurs after the app starts, before I push
the button.
Here's the WSDL of the web service (I suspect my answer is here, but
again, I'm dumb):
===
definitions name=MetaMatrixDataServices
targetNamespace=http://com.metamatrix/NasaVDBjoin;
#8722;
types
#8722;
xsd:schema targetNamespace=http://com.metamatrix/NasaVDBjoin;
xsd:import
namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Input;
schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Input.xsd/
xsd:import
namespace=http://www.metamatrix.com/VmdbHrrsIntegration_Output;
schemaLocation=http://quest3:8000/NasaVDBjoin/servlet/ArtifactDocumentService/NasaDemo/DataIntegrationPOC/HrrsVmdbIntegration/VmdbHrrsIntegration_Output.xsd/
/xsd:schema
/types
#8722;
message
name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg
#8722;
documentation
Input message for operation
VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin.
/documentation
part
name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg
element=schema1:VmdbHrrsJoin_Input/
/message
#8722;
message
name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg
#8722;
documentation
Output message for operation
VmdbHrrsIntegration_VmdbHrrsJoin/getVmdbHrrsJoin.
/documentation
part
name=VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg
element=schema2:VmdbHrrsJoin_Output/
/message
#8722;
portType name=VmdbHrrsIntegration_VmdbHrrsJoin
#8722;
operation name=getVmdbHrrsJoin
input
message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_InputMsg/
output
message=tns:VmdbHrrsIntegration_VmdbHrrsJoin_getVmdbHrrsJoin_VmdbHrrsJoin_OutputMsg/
/operation
/portType
#8722;
binding name=VmdbHrrsIntegration_VmdbHrrsJoin
type=tns:VmdbHrrsIntegration_VmdbHrrsJoin
soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http/
#8722;
operation name=getVmdbHrrsJoin
soap:operation style=document
soapAction=VmdbHrrsIntegration_WS.VmdbHrrsIntegration_VmdbHrrsJoin.getVmdbHrrsJoin/
#8722;
input
soap:body use=literal/
/input
#8722;
output
soap:body use=literal/
/output
/operation
/binding
#8722;
service