![]() |
![]() |
||||||
|
|||||||
| Tags: |
![]() |
|
|||
|
I can't get a basic example of calling an automatically generated web service
proxy, with MXML, to work. I always get this compilation error: Could not resolve <srv:HelloWorld_request_var> to a component implementation. I have declared the namespace properly. Also, other components from the 'srv' namespace are compiled with no errors. What the heck is going on here? I have read the docs, the code and many examples online. I can't find any examples of anyone else having this specific problem. This is my last hope. Help me Obi-Wan? <?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" xmlns:srv="wtf.*" layout="absolute"> <srv:TestService id="myService"> <srv:HelloWorld_request_var> <srv:HelloWorld_request /> </srv:HelloWorld_request_var> </srv:TestService> </mx:Application> |
| Sponsored Links |
|
|||
|
I have found the problem.
The automatically generated web service proxy code does not have the 'HelloWorld_request_var' defined. However, request wrapper variables are defined for all the other operations that the service provides. (see attached code) Once I created a 'HelloWorld_request_var' manually, everything worked perfectly. It appears that there is a bug in the 'Import Web Service (WSDL)' functionality. Lucky me, I got to find it ![]() /** * Service.as * This file was auto-generated from WSDL by the Apache Axis2 generator modified by Adobe * Any change made to this file will be overwritten when the code is re-generated. */ package wtf{ import mx.rpc.AsyncToken; import flash.utils.ByteArray; import mx.rpc.soap.types.*; public interface ITestService { //Stub functions for the HelloWorld operation /** * Call the operation on the server passing in the arguments defined in the WSDL file * @return An AsyncToken */ function helloWorld():AsyncToken; /** * Method to call the operation on the server without passing the arguments inline. * You must however set the _request property for the operation before calling this method * Should use it in MXML context mostly * @return An AsyncToken */ function helloWorld_send():AsyncToken; /** * The helloWorld operation lastResult property */ function get helloWorld_lastResult():String; /** * @private */ function set helloWorld_lastResult(lastResult:String):void; /** * Add a listener for the helloWorld operation successful result event * @param The listener function */ function addhelloWorldEventListener(listener:Function):void ; //Stub functions for the Ping operation /** * Call the operation on the server passing in the arguments defined in the WSDL file * @param value * @return An AsyncToken */ function ping(value:String):AsyncToken; /** * Method to call the operation on the server without passing the arguments inline. * You must however set the _request property for the operation before calling this method * Should use it in MXML context mostly * @return An AsyncToken */ function ping_send():AsyncToken; /** * The ping operation lastResult property */ function get ping_lastResult():String; /** * @private */ function set ping_lastResult(lastResult:String):void; /** * Add a listener for the ping operation successful result event * @param The listener function */ function addpingEventListener(listener:Function):void; /** * The ping operation request wrapper */ function get ping_request_var():Ping_request; /** * @private */ function set ping_request_var(request:Ping_request):void; /** * Get access to the underlying web service that the stub uses to communicate with the server * @return The base service that the facade implements */ function getWebService():BaseTestService ; } } |
![]() |
| Thread Tools | |
| Display Modes | |
|
|
- Contact Us
-|-
Adobe Dreamweaver Forums -|-
Archive -|-
Top -|-Rules/Disclaimer-|-Help/Support-|-Advertise