on 07-09-2009 3:46 PM
Hi folks,
I'm just trying to call a MII transaction that delivers a XML document in Flex via Actionscript. But how has the call to look like? It requires 3 input parameters (LoginName, LoginPassword and InputParams). But the called transaction has no input parameters and I don't find a way to set the parameters. Does anybody know that?
I already tried to embed it in the mxml-file, I tried to import the ws but nothing works. My calling statement looks like this:
griddata.xacute("Username","Password","");
But I always get the error message in the just-in-time-debugger "Id 1067: Implizite Umwandlung eines Werts des Typs String in einen nicht verwandten Typ generated.webservices:InputParams. .." - "implicit compilation of a value of the type string into a non-related type...."
Thanks,
Anika
In general, do not use web services to call MII transactions. It works much easier/better to use "RESTful" style services by invoking the "Runner" servlet. You can parse the resulting XML quite easily in Flex and databind it to almost any type of UI component.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rick,
thanks for your reply.
If I use the HTTPService, how has the url for the MII-transaction to look like? I have one input parameter (Vorgabe) and an XML output parameter. How do I call the transaction the right way? I tried it like this:
<mx:HTTPService useProxy="false" id="callTransaction" method="POST" showBusyCursor="true" url="http://server/XMII/Runner?Transaction=AD_Sandbox/FLEXtest/create" result="callTransactionResult(event)" fault="callTransactionFault(event)" >
<mx:request xmlns="">
<Vorgabe>Test</Vorgabe>
<XacuteLoginName>Username</XacuteLoginName>
<XacuteLoginPassword>Password</XacuteLoginPassword>
</mx:request>
</mx:HTTPService>
But that delivers only "[object Object]" when I try to put it into a textbox for checking the result.
According to the webservice issue:
I tried the webservice call from another client via VPN and I always got the same error like via the client in our network here: "SOAP Response cannot be decoded. Raw response: " - but, if I logged in to MII seperately and started a session by doing this, it worked and I got the right response. But if I logged off again, the error reoccured. Is it possible, that the webservice call did not create a correct MII session? I tried it this way:
<mx:WebService id="MyWebServiceCall" wsdl="http://server/XMII/WSDLGen/AD_Sandbox/FLEXtest/create" useProxy="false">
<mx:operation name="Xacute" resultFormat="xml" result="getXacute_result(event);" fault="getXacute_fault(event);">
<mx:request>
<parameters>
<XacuteRequest>
<LoginName>Username</LoginName>
<LoginPassword>Password</LoginPassword>
<InputParams>
<Vorgabe>test</Vorgabe>
</InputParams>
</XacuteRequest>
</parameters>
</mx:request>
</mx:operation>
</mx:WebService>
Hi Rick,
although I'm able to fetch my data now (with Flex 3), I just want to ask you if you know, why the webservice call did not work? As I already explained, it worked from outside when a MII session was open and did not work when the session was closed. And it did not work from the inside of our network. But I asked someone else this question before and he executed my example on his system (with Flex 2.0.1) and it worked fine. So is it possible, that the Webservice call could'nt establish a working MII connection so that the error occured? Although it might work now with HTTPService calls, I would like to have it running also with webservice because it is an offered functionality and in some case we might to have to do it with webservice. So do you have any idea what the problem might be? Would be great.
Thanks
Anika
Edited by: Anika Delzeit on Jul 14, 2009 11:07 AM
Met the same problem, but resolved. Following is the solution.
param = new Dictionary();
var LoginName:String = 'LoginName';
var LoginPassword:String = 'LoginPassword';
param[LoginName] = 'username';
param[LoginPassword] = 'password';
queryCurrentTag.loadWSDL("http://localhost/data/TrnCarData.WSDL");
queryCurrentTag.Xacute(param);
The WSDL should be copy to the folder which Flex can access, because the WSDL which generated by xMII also need user authentication.
User | Count |
---|---|
11 | |
6 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.