SOAPFault From A WebService
i am using a webservis for my appliction and i wont to get same of the informstion from the webservismy cade look like that loginWebService = new WebService("http://198.168.0.15/rnet/Services/ThrowTest.asmx?WSDL");callback = loginWebService.myThrow() callback.onFault = function(fault){ trace("fault.faultstring " +fault.faultstring) trace("fault.faultcode "+fault.faultcode) trace("fault.detail "+fault.detail) trace("fault.faultactor "+fault.faultactor)}and my output win look like that Error opening URL "http://192.168.0.15/rnet/Services/ThrowTest.asmx"fault.faultstring Unable to connect to endpoint: http://192.168.0.15/rnet/Services/ThrowTest.asmxfault.faultcode Server.Connectionfault.detail undefinedfault.faultactor undefinedand when i snif the port and take a look of the XML that i get from the webservises it is look like that Server: Microsoft-IIS/5.1Date: Tue, 19 Oct 2004 07:00:56 GMTX-Powered-By: ASP.NETHTTP/1.1 500 Internal Server Error.Server: Microsoft-IIS/5.1Date: Tue, 19 Oct 2004 07:00:56 GMTX-Powered-By: ASP.NETX-AspNet-Version: 1.1.4322Cache-Control: privateContent-Type: text/xml; charset=utf-8Content-Length: 613<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="http://www.w3.org/2001/XMLSchema"> <soap:Body> <soap:Fault> <faultcode>soap:Client</faultcode> <faultstring>Fault occurred</faultstring> <faultactor>http://192.168.0.15/rnet/Services/ThrowTest.asmx</faultactor> <detail> <SessionExpired d5p1:reason="timeout" xmlns:d5p1="http://fitracks.net/" xmlns="http://fitracks.net/" /> </detail> </soap:Fault> </soap:Body></soap:Envelope> who can i get the that that there is in that XML?i founded this post about it http://www.intangibleinc.com/movable...es/000007.htmldase there is some thining to do about it and not in the changing the header
KirupaForum > Flash > Flash 8 (and earlier) > Flash MX 2004
Posted on: 10-19-2004, 10:36 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SOAPFault From A WebService
i am using a webservis for my appliction and i wont to get same of the informstion from the webservis
my cade look like that
loginWebService = new WebService("http://198.168.0.15/rnet/Services/ThrowTest.asmx?WSDL");
callback = loginWebService.myThrow()
callback.onFault = function(fault){
trace("fault.faultstring " +fault.faultstring)
trace("fault.faultcode "+fault.faultcode)
trace("fault.detail "+fault.detail)
trace("fault.faultactor "+fault.faultactor)
}
and my output win look like that
Error opening URL "http://192.168.0.15/rnet/Services/ThrowTest.asmx"
fault.faultstring Unable to connect to endpoint: http://192.168.0.15/rnet/Services/ThrowTest.asmx
fault.faultcode Server.Connection
fault.detail undefined
fault.faultactor undefined
and when i snif the port and take a look of the XML that i get from the webservises it is look like that
Server: Microsoft-IIS/5.1
Date: Tue, 19 Oct 2004 07:00:56 GMT
X-Powered-By: ASP.NET
HTTP/1.1 500 Internal Server Error.
Server: Microsoft-IIS/5.1
Date: Tue, 19 Oct 2004 07:00:56 GMT
X-Powered-By: ASP.NET
X-AspNet-Version: 1.1.4322
Cache-Control: private
Content-Type: text/xml; charset=utf-8
Content-Length: 613
<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlnssi="http://www.w3.org/2001/XMLSchema-instance" xmlnssd="http://www.w3.org/2001/XMLSchema">
<soap:Body>
<soap:Fault>
<faultcode>soap:Client</faultcode>
<faultstring>Fault occurred</faultstring>
<faultactor>http://192.168.0.15/rnet/Services/ThrowTest.asmx</faultactor>
<detail>
<SessionExpired d5p1:reason="timeout" xmlns:d5p1="http://fitracks.net/" xmlns="http://fitracks.net/" />
</detail>
</soap:Fault>
</soap:Body>
</soap:Envelope>
who can i get the that that there is in that XML?
i founded this post about it
http://www.intangibleinc.com/movable...es/000007.html
dase there is some thining to do about it and not in the changing the header
SOAPFault Object Handling
Hi there, i've written a web service using PHP/NuSOAP library I want to be queried by Flash clients too.
According to this tech note http://www.adobe.com/go/3c6784bc, i've patched send_response function in nusoap.php to send back always an HTTP 200 OK header in case of the user agent is Flash.
Done this, i can access correctly all methods and get data but I've a last trouble.
When the service sends back a SOAP-ENV:Fault message telling something was wrong, in the Flash client the callback onFault(faultOb) function on PendingCall object is indeed invoked, but as faultOb object i get a:
faultOb.faultcode = "VersionMismatch"
faultOb.faultstring = "Request implements version: http://schemas.xmlsoap.org/soap/envelope/ Response implements version "
and not the one my webservice has produced.
I've tested the service with a PHP/NuSOAP client and seems to be ok..
so if anybody has any ideas to resolve this error-handling trouble I'll be happy..
Here I post the service response used for testing:
Code:
<?xml version="1.0" encoding="utf-8"?>
<SOAP-ENV:Envelope SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
<SOAP-ENV:Body>
<SOAP-ENV:Fault>
<faultcode xsi:type="xsd:string">Client</faultcode><faultactor xsi:type="xsd:string"></faultactor>
<faultstring xsi:type="xsd:string">Invalid username and/or password for this service.</faultstring>
<detail xsi:type="xsd:string"></detail>
</SOAP-ENV:Fault>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
Greetings and good coding..
WebService Vs. Client Proxy And WebService Faults
Hi!
We've made a website in flash which fetches content from an ASP.NET 2.0 WebService on another server. The WSDL is on the same server as the flash.
When clients use the web site from behind a proxy, the service call fails. We've tried configuring one of our clients' proxy to ignore calls to the IPs of the servers, but there's no luck.
When trying to find out what's wrong, Flash' webservice component reports "Unable to connect to endpoint" no matter what the exception is on the server side. (Yes, it does find a service and get a result, but it's a fault message, not a connection exception)
Is there any way to find the correct exception, or configure the webservice component for use behind a proxy?
(The flash is using ActiveScript 2.0 for compatibility reasons)
Lars-Erik
Webservice
import mx.services.*;
paswd_mc.onRelease = checkmail;
function checkmail(){
if (_root.login.usr_txt.text == ""){
_root.login.usr_txt.text = "enter E-mail!!!";
}else{
var checkEmailService = new mx.services.WebService("http://www.webservicex.net/ValidateEmail.asmx?WSDL");
checkEmailResultOb = checkEmailService.IsValidEMail(_root.login.usr_txt .text);
checkEmailService.onLoad = trace("loading");
checkEmailResultOb.onResult = function(result) {
trace("the email is " + result);
}
checkEmailResultOb.onFault = function(fault){
trace('error');
}
MailVars = new LoadVars();
MailVars.mailAdr = _root.login.usr_txt.text;
MailVars.sendAndLoad("scripts/check.asp", MailVars, "POST");
}
}
He's constantly saying:
Scene=Scene 1, Layer=actions, Frame=1: Line 1: ';' expected
import mx.services.*;
And I don't see where he needs the ;
XML To ASP.NET Webservice
I am looking for something that will help me through the whole process... I am looking to transfer a flash created xml file to an ASP.NET webservice however my google search has been fruitless. If anyone has some hints on this subject I would be most grateful for the help... thanks!
Help With Webservice...
ok....i am building a roulette game.i am trying to receive and use in the fla some values passed by the webservice.
The problem is that i cannot use data outside the functions,as the pending call response is sent via parameter to the function attached.PLEASE HELP,i am losing my mind over here.
here is the code.
import mx.services.WebService;
import mx.services.PendingCall;
var sAdr:String="http://numberware.com/number.asmx?WSDL";
var wsNumar:WebService=new WebService(sAdr);
var pcCdate:PendingCall=wsNumar.Now();
var pcCastig:PendingCall=wsNumar.Random();
var pcUrmatoar:PendingCall=wsNumar.Interval();
pcCdate.onResult = function(nRate):Void{
n=nRate;//<---n is what i'm trying to use in the rest of my file
};
pcCastig.onResult = function(nr):Void{
trace(nr);//<---nr is what i'm trying to use in the rest of my file
};
pcUrmatoar.onResult = function(date):Void{
trace(date);//<---date is what i'm trying to use in the rest of my file
};
Webservice Url
how can we dynamically load webservice url from actionscript to the mxml file
Webservice In AS 3.0
Hi
Is there any Webserviceclass in AS3.0, How can I use the XMLclass instead?
// Olof
WebService Bug
I am trying to execute the following code:
var wsdlURI = "
WebService
hi There, I've a doubt about a job done, but now it's need to be modified, thing is the flash file feeds the info from a public and free WebService, in this case I'm using drop down components so people can choose between us dollar or euro, then compare this option to mexican peso and then, place the conversion in some text field, now my client needs this automatic, this means, user do not have to click nothing, just a text with this info:
US Dollar: 10.278 / Euro: 12.987
is this possible?, my actionscript is this:
// Inicio cambios de estilos de DropDowns componentes
cmbMoneda1.setStyle("selectionColor", 0xFFFFFF);
cmbMoneda1.setStyle("rollOverColor", 0xA0ADC0);
cmbMoneda1.setStyle("backgroundColor", 0xFFFFFF);
cmbMoneda2.setStyle("selectionColor", 0xFFFFFF);
cmbMoneda2.setStyle("rollOverColor", 0xA0ADC0);
cmbMoneda2.setStyle("backgroundColor", 0xFFFFFF);
// Fin cambios de estilos de DropDowns componentes
//************************************************** ***********
// Inicio Funcion Cambio de Divisas
//Creamos un objeto nuevo del tipo objeto
var on_Release = new Object();
//Declaramos la función que se va a realizar cuando se haga clic
on_Release.click = function(evt) {
//Limpiamos la caja de texto
txtCambio.text = "";
//Lanza la función del webservice
_root.wsConversor.trigger();
};
//Asignamos el Listener al componente botón
botCambio.addEventListener("click", on_Release);
// Fin Funcion Cambio de Divisas
You can check the .FLA file on
www.videoestudio.net/divisas/divisas.fla
or
check the .SWF file on:
www.videoestudio.net/divisas/divisas.swf
hope somebody here can help me on this, thanks a lot!!!
Arturo
Webservice Help
I am trying to pass an object to a web service call in flash. I need the output of the webservice call to have multiple questions with the same xml tag name.
//setup webservice
var webService:WebService;
webService= new WebService(ws);
webService.getCall.concurrency(SOAPCall.MULTIPLE_C ONCURRENCY);
webService.getCall.doLazyDecoding(true);
//create object to pass to the service
var SurveyRequest:Object = new Object;
SurveyRequest.surveyName = "my survey";
SurveyRequest.question = getAnswer();
//pass object into webservice
var IDResult:Object = new Object();
IDResult = webService.getRequest(SurveyRequest);
//handle webservice result
IDResult.onResult = function(result)
{
}
//function to return an object containing the question data
public function getAnswer():Object
{
var Q0:Object = new Object;
var A0:Object = new Object;
A0.answer = "my answer";
Q0.answer = A0;
Q0.qTitle = "my question";
return Q0;
}
When the webService.getRequest(SurveyRequest); is called, it creates an xml structure similar to...
<SurveyRequest>
<surveyName>my survey</surveyName>
<question><qTitle>my question</qTitle><answer>my answer</answer></question>
</SurveyRequest>
What I need is to have multiple questions added to the survey, but they must have the same tag name.
It should look something like
<SurveyRequest>
<surveyName>my survey</surveyName>
<question><qTitle>my question</qTitle><answer>my answer</answer></question>
<question><qTitle>my question2</qTitle><answer>my answer2</answer></question>
<question><qTitle>my question3</qTitle><answer>my answer3</answer></question>
</SurveyRequest>
Thank you for your help .
Webservice
Hello
I'm a complete newbie to flash and actionscript. Have been asked to update flash clip a developer wrote who has now left the componay.
I have been banging my head against a Actionscript wall alll week,
I need to connect a flash clip from our South African server, via a webservice, to our german server.
I somehow managed to connect within the flash development environment, a couple of time, now it's broken again. On the live sites I just cannot get it to connect.. all kinds of errors, like "Error loading WSDL", "Wrong WSDL Format" or it connects and just sits there. Executes the webservice method call, but no result, no error.. nadda. Tried crossdomain.xml on our german server, tried local proxy.php route... NOTHING
The webservice is on http://intranet.tray-international.c...nchservice.php. One of the methods I need to use is GetBranchDetailsXML(str_xml_request), with str_xml_request = "<request><branch>104</branch></request>";
If there is anyone out there capable of making a simple connection to this service, and get back the XML returned, pls let me know how you did this. I've run out of google search terms
.Net Webservice
I looked through these forums, and haven't found an answer yet. In Flash MX 2004, I have read that you can't return a dataset from a .Net webservice and have flash be able to process it. But instead you should return an array.
Is this still true for Flash 8?
Thanks!
Webservice Connector?
i'm using the webservice connector and I can't get the params to pass correctly?
if a checkbox is selected i want it to use that as the param for the web service.
if another is checked i want it to use that as it's param. I can't even assign a param to get it to work, why not?
getCityNames.params = [akron];
getCityNames.params = (akron);
getCityNames.params = ("akron");
none work???
NFL Webservice Or XML Connection
Hi,
I want to build an application to display NFL results and i was wondering if anybody knows about a webservice connection or xml file, which is continously updated and can be downloaded, similar to weather service.
WebService & Base64Binary ? How To?
I´m consuming a webService using the WebServiceConnector. The service gives me a name, and a photo of someone. The problem is that the name comes as a String but the photo is not an URL, it´s a base64Binary. How can i view this image with Flash?
Should i link the foto (base64Binary) result to which object? I have tries the Loader component, a empty MovieClip and nothing...
If i link that result to a textField it will show a huge code!!!I guess that´s the binary of the file....
Any help please?
AS 2.0 Problem With Webservice
Hello everyone,
I'm having a problem with consuming a webservice in Actionscript 2.0. I've determined that I can hit it with Flex 3, and ActionScript 3, but not 2.0. Are there any Guru's that can tell what I'm doing wrong in AS 2.0?
Thanks in advance!!
Here's the code that I'm using for AS 3.
import flash.events.Event;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.xml.*;
import flash.events.IOErrorEvent;
var loader:URLLoader;
function KickPaulInTheButt()
{
Security.loadPolicyFile("xmlsocket://www.gastineautechnical.com");
var request:URLRequest = new URLRequest("http://www.gastineautechnical.com/WebServices3.asmx/Login?username=dave&password=test");
loader = new URLLoader();
try
{
loader.load(request);
}
catch (error:SecurityError)
{
trace("A SecurityError has occurred.");
}
loader.addEventListener(IOErrorEvent.IO_ERROR, errorHandler);
loader.addEventListener(Event.COMPLETE, loaderCompleteHandler);
}
function errorHandler(e:IOErrorEvent):void
{
trace("DAM! an Error!");
}
function loaderCompleteHandler(event:Event):void
{
trace("It came back");
trace(event.target.data);
}
KickPaulInTheButt();
/*
import mx.services.*;
trace("running AS");
// Creates a Log object which records all events when calling a web service.
wsServiceLog = new Log(Log.VERBOSE);
wsServiceLog.onLog = function(txt) {
trace(txt);
}
trace("Pre login WS call");
var returnedValue:Object;
var wsURL:String = "http://www.gastineautechnical.com/WebServices3.asmx?WSDL";
var ws:WebService = new WebService(wsURL,wsServiceLog);
trace("loaded the webservice");
var re:PendingCall = ws.Login("dave","test");
trace("Pending call");
ws.onLoad = trace("ws.onLoad");
re.onResult = function(result):Void
{
trace("in result");
returnedValue = result;
trace("Returned: "+ returnedValue);
};
re.onFault = function(fault)
{
trace("in fault");
returnedValue = fault.faultCode+","+fault.faultstring;
trace(returnedValue);
};
trace("END");
*/
The 2.0 code that I can't get to work is:
//import the Classes needed for the application import mx.remoting.*; import mx.rpc.*; import mx.services.*; import mx.data.*;
var myService:WebService = new WebService("http://www.gastineautechnical.com/WebServices3.asmx?WSDL
", new Log());
var serviceCall:PendingCall=myService.Login("username" ,"pass");
serviceCall.onResult=function(result:Object){
trace(result);
}
stop();
Webservice Problem
Hello, i have created flash movie thats connect to webservice. when i am testing to flash application using ctrl+enter. The flash movie is working properly and its loading the data from webservice.. but when i published it and try it in the web it gave me pop-window that is saying:
"Adobe Flash Player Security.
Adobe Flash player has stopped a potentially unsafe operation."
What does that mean. What if i load the html in localhost will it solve the issue?
Thanks.
[F8] Webservice Security
Im have application that connect to webservice when i test it locally all are working fine. Im having connection to the webservice and all data are loaded. But when i published it, the viewed it in HTML. I'm having pop-window that says
"Adobe flash Player Security"
Adobe has stopped a potentially unsafe operation
The following local application on your computer or network"
d:documentflash.swf
How can i prevent this from happening and make my flash.swf establish communication to the webservice without appearing this pop-up window.
WebService /Component Help
I have a component that calls a webservice with two methods, retreives some values and animates a dial....
My problem at the moment is that after it has retreived the values, and animated the component, it still sits there saying 'Transfering from 127.0.0.1...' <-- host of where the webservice is at the moment.
It seems to crash the web browser as it tries over and over to get the values.
What is the correct way to use the webs service?
Here is the first call function:
var wsService:WebService = new WebService("http://127.0.0.1/WS/Service1.asmx?WSDL");
wsService.onLoad = trace("Loading Database Data...");
var wsGetAllVals:PendingCall = wsService.GetSensorValueAll(sensorID);
var wsObject:PendingCall = wsService.GetSensorValue(sensorID);
trace(sensorID)
var me = this; // in openService()
wsGetAllVals.onResult = function (result)
{
me.sensorMax = "400";
trace("All Values received");
trace("-----------------");
var splitArr:Array = result.split(";");
me.sensorMax = me.lblMax = splitArr[6].substring(9,15);
me.sensorMin = me.lblMin = splitArr[5].substring(9,15);
me.lblUnit = splitArr[3].substring(6,40);
trace(splitArr);
trace("-----------------");
_root.sensorMax = me.sensorMax;
_root.sensorMin = me.sensorMin;
}
Thanks heaps!
WebServiceConnector --> WebService Help
Hi,
I realized too late in this project (like I need it now ) that I need error handling which the WebServiceConnector does not seem to offer me such as .onFail.
Is there a way I can do error checking the the WebServiceConnector class?
If not..
I have my own classes which I would like to convert to the WebService class if possible although it seems I may not be able to simply extend the WebService class with the component in my library.
Please can you offer some assistance how I would convert the following example class.
ActionScript Code:
import DataTransferLayer.*;
import BusinessLayer.*;
import DataAccessLayer.BaseDatabase;
class DataAccessLayer.EventDetailDataAccess extends mx.data.components.WebServiceConnector implements DataAccessLayer.IEventDetailDataAccess
{
private static var EVENT_LISTENER_RESULT:String = "result";
private static var GET_EVENTS:String = "getEvents";
private var caller:Object;
private var _eventSetup:EventSetup;
private var baseDatabase:BaseDatabase;
var detail:Array;
var eventDetailResults:Object;
function EventDetailDataAccess(setCaller:Object)
{
//Constructor code
baseDatabase = new BaseDatabase();
caller = setCaller;
}
private function GetEventDetailFromWebService():Void
{
this.addEventListener(EVENT_LISTENER_RESULT, EventDetails);
this.WSDLURL = _eventSetup.GetEventDetailWebServiceURL();
this.suppressInvalidCalls = true;
this.trigger();
}
private function EventDetails(evt:Object)
{
eventDetailResults = evt.target.results;
var eventDetail:EventDetailData = new EventDetailData();
for (var resultCount = 0; resultCount<eventDetailResults.length; resultCount++)
{
//TODO: temp if until web service accepts params
if(baseDatabase.Trim(this.params[0]) == baseDatabase.Trim(this.eventDetailResults[resultCount].code))
{
eventDetail.Id = this.eventDetailResults[resultCount].id;
eventDetail.StartDate = this.eventDetailResults[resultCount].startDate;
eventDetail.EndDate = this.eventDetailResults[resultCount].endDate;
eventDetail.Location = this.eventDetailResults[resultCount].location;
eventDetail.Code = this.eventDetailResults[resultCount].code;
eventDetail.Title = this.eventDetailResults[resultCount].title;
eventDetail.TypeCode = this.eventDetailResults[resultCount].typeCode;
}
}
caller.LoadFromResults(eventDetail);
}
function GetEventDetail(eventSetup:EventSetup):Void
{
_eventSetup = eventSetup;
this.operation = GET_EVENTS;
this.params = [""];
GetEventDetailFromWebService();
}
}
Get Data From WebService To XML
Hi
Im having some issues on how to translate a returned Object from the WebService and i would like to know if someone can help me?
The WebService is something like this:
Code:
<WebService(Namespace:="Gallery Slides")> _
Public Class GetPhotos
Inherits System.Web.Services.WebService
<WebMethod()> _
Public Function GetSlides() As DataSet
Dim DataConn As New Data.SqlClient.SqlConnection(ConfigurationManager.ConnectionStrings("MyConnectionString").ConnectionString)
Dim MyAdapter As New Data.SqlClient.SqlDataAdapter("SELECT TOP 10 ImageId, Thumbnail, ToolTip FROM ConcertImages WHERE Active = 1 ORDER BY NEWID()", DataConn)
Dim MyDataSet As System.Data.DataSet = New Data.DataSet
DataConn.Open()
MyAdapter.Fill(MyDataSet)
DataConn.Close()
Return MyDataSet
End Function
End Class
Then the ActionScript:
Code:
import mx.services.*;
MonWebService = new WebService("http://www.somesite.net/GetPhotos.asmx?wsdl", new Log());
serviceCall = MonWebService.GetSlides();
serviceCall.onResult = function(result) {
trace(result);
};
This returns an object:
3/30 4:12:3 [INFO] : Queing call GetSlides
3/30 4:12:4 [INFO] : Made SOAPCall for operation GetSlides
3/30 4:12:4 [INFO] : Invoking previously queued call GetSlides
3/30 4:12:4 [INFO] SOAP: Asynchronously invoking SOAPCall: GetSlides
[object Object]
If i use this ActionScript: (result.diffgram - is the difference)
Code:
import mx.services.*;
MonWebService = new WebService("http://www.somesite.net/GetPhotos.asmx?wsdl", new Log());
serviceCall = MonWebService.GetSlides();
serviceCall.onResult = function(result) {
trace(result.diffgram);
};
I get:
3/30 4:14:13 [INFO] : Queing call GetSlides
3/30 4:14:13 [INFO] : Made SOAPCall for operation GetSlides
3/30 4:14:13 [INFO] : Invoking previously queued call GetSlides
3/30 4:14:14 [INFO] SOAP: Asynchronously invoking SOAPCall: GetSlides
<diffgr:diffgram xmlns:msdata="urn:schemas-microsoft-com:xml-msdata" xmlns:diffgr="urn:schemas-microsoft-com:xml-diffgram-v1"><NewDataSet xmlns=""><Table diffgr:id="Table1" msdata:rowOrder="0"><ImageId>17</ImageId><Thumbnail>images/concerts/tn_827591.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table2" msdata:rowOrder="1"><ImageId>13</ImageId><Thumbnail>images/concerts/tn_140494.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table3" msdata:rowOrder="2"><ImageId>2</ImageId><Thumbnail>images/concerts/tn_466260.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table4" msdata:rowOrder="3"><ImageId>30</ImageId><Thumbnail>images/concerts/tn_312246.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table5" msdata:rowOrder="4"><ImageId>37</ImageId><Thumbnail>images/concerts/tn_718532.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table6" msdata:rowOrder="5"><ImageId>5</ImageId><Thumbnail>images/concerts/tn_664167.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table7" msdata:rowOrder="6"><ImageId>3</ImageId><Thumbnail>images/concerts/tn_391945.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table8" msdata:rowOrder="7"><ImageId>9</ImageId><Thumbnail>images/concerts/tn_380003.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table9" msdata:rowOrder="8"><ImageId>32</ImageId><Thumbnail>images/concerts/tn_294888.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table><Table diffgr:id="Table10" msdata:rowOrder="9"><ImageId>4</ImageId><Thumbnail>images/concerts/tn_969281.jpg</Thumbnail><ToolTip>Last Concert</ToolTip></Table></NewDataSet></diffgr:diffgram>
The point is how can i get this results into XML?
Thanks in Advance
Cheers
Problem With Webservice
I don't know how to parse a webservice.
Hope someone can help. I call a method named GetAll() and it returns an object [n]. Inside that object [n], there is differents variable but I can't reach them. How can I reach PostingDate, Title, Category and the others ?
Thanks
Code:
import mx.services.*;
var myWS = new WebService("http://ws.cisa.ca/WehireWS/JobsWs.asmx?WSDL", new Log());
myWS.onLoad = function(pWSDL:String) {
var test = this.GetAll();
test.onResult = manageResult;
test.onFault = manageFault;
};
myWS.onFault = function() {
trace("error");
};
manageResult = function (wsResult) {
trace("retour : "+wsResult);
};
manageFault = function () {
trace("error");
};
SOAP And WebService
I'm trying to send SOAP requests with WebService.
WebService.loadWSDL seems to load the configuration stuff. I know I can use getOperation, then Send to send things, but the callbacks from the AsyncToken never seem to get called.
Am I doing things right? I don't want to do this with the UI XML; I want to do it in ActionScript.
I'm not sure Send is what I really want to do, and I'm not sure what the parameters are for a remote call.
Say I have
Code:
<SomeOperation xmlns="http://foo.com/file">
<Parameter1>foo</Parameter1>
<Parameter2>bar</Parameter2>
</SomeOperation >
the xmlns and SomeOperation part should have been parsed with loadWSDL (I think). I'm not sure how to send the parameters. I tried making XML objects with Parameter1 as the root, but I didn't get a response.
Pointers, examples, and anything else would be appreciated.
Thank you!
WebService, XML, DateTime
When I send an argument off to WebService, I can't get the time right. The xsd file says Time is an XML DateTime. Whatever I do, I keep getting this on the other end:
Code:
<tns:Time>
<tns:Time xsi:nil="true"/>
</tns:Time>
I've tried passing XML("<Time>2007-10-09T07:15:42.18Z</Time>"), the same with XML Document, and actual XML (since that's legal actionscript). No matter what I do, I get the above nested XML.
I had a similar problem with XML strings when I used a string argument or an XMLDocument.
Code:
<tns:Foo>text</tns:Foo>
That's what the other entries look like (and what they're supposed to look like). They are XML Strings, not XML DateTimes.
WebService For Flash CS3
Annoyed that Flex has a WebService class, but Flash CS3 does not? You might want to check out this project:
gofr: AS3 Web Service
http://labs.alducente.com/?page_id=13
Blog post:
http://alducente.wordpress.com/2007/...s3-release-10/
Getting At XML Returned By WebService
Hello everyone,
I hope this is the correct group to post this question, etc. etc.
I am four days new to Flex development using FlexBuilder 3.
I have written a very simple .NET web service that returns the following XMLDocument when invoked:
Code:
<?xml version="1.0" encoding="utf-8" ?>
<fabrics>
<fabric>
<color>Yellow</color>
<price>3</price>
</fabric>
</fabrics>
I have the following WebService result handler in my application:
Code:
public function handleXML(event:ResultEvent):void
{
var fabricList:XML = XML(event.result);
fabricProvider = new XMLListCollection(fabricList.fabric)
fabricInfoList.dataProvider = fabricProvider;
}
Which fails to populate the datagrid (fabricInfoList) correctly, because event.result contains the SOAP XML wrapper (<GetFabricsResponse ... etc.) with the XML fragment I actually want buried in the <GetFabricsResult> element of the SOAP response.
I have spent the entire day trying to find examples of how to pull out the actual response value of the event.result object, but I have not found anything. The result handler works just fine when I hardcode the values like so:
Code:
public function handleXML(event:ResultEvent):void
{
var fabricList:XML =
<fabrics>
<fabric>
<color>Yellow</color>
<price>3</price>
</fabric>
<fabrics>
fabricProvider = new XMLListCollection(fabricList.fabric)
fabricInfoList.dataProvider = fabricProvider;
}
So I feel very confident that it is simply a matter of getting past the SOAP wrapper and pulling out the actual value. Can anyone reveal the mystery for me?
Thanks in advance,
Jason
WebService And Crossdomain.xml... Again
Well, I know that there are some threads concerning this topic already.
But from my point of view, it should work fine:
I call the webservice http://www.webservicex.net/stockquote.asmx?WSDL .
I works fine when I test the app on my local machine.
But when I upload the flash app and test on my server, it doesn't work - "Security error accessing url".
Well, of course the webservices server needs a crossdomain.xml... and it has one in its root directory. See yourself:
http://www.webservicex.net/crossdomain.xml
But I get this error.
Loading the policy file before with Security.loadPolicyFile("http://www.webservicex.net/crossdomain.xml") doesn't help.
Any ideas?
Polling A WebService
Hello
I'm new at Actionscript and Flash and I'm trying to hit a webservice every X seconds to get data back and refresh the Flash. I've got the data stuff down and it's displaying, but I need it to hit the webservice and refresh itself automatically.
import mx.services.*;
var service = new WebService("http://localhost/foo.asmx?wsdl");
result = service.GetIt();
service.onLoad = trace("loading");
result.onResult = function(result)
{
trace("Market: " + result[0].ID);
trace("MarketID: " + result[0].Desc);
Item1Value = result[0].Desc;
}
Timer And WebService AS3
Hi all i got a problem and is that whenever i got a timer on , and its set to infinite loop e.g new timer (1000 , 0 ) ; and after that i will have to insert new rows into database ... However i found out a problem is that will timer sometimes prevent data from successfully inserting the data into a new row of the databasE ? thats because sometimes the data will get inserted into database and sometimes it wont ...
is it because i execute the command juz when the timer time is up ?
i nid some help please ... thanks
Weborb & Webservice
Hi all , i am tryin to use weborb for my chinese checker board game development. Previously , im usin well-considered webservice class for connecting of user to passing of game moves ... However , well-considered only support client pull technology from the webserver which MUST be initiated by the client . i put timer on the client side but however i want it to have a real time basis in the sense that i want client make a move and SERVER PUSH to all other client using weborb
/*import be.wellconsidered.services.WebService;
import be.wellconsidered.services.Operation;
import be.wellconsidered.services.events.OperationEvent;
var ws = new WebService("http://MCCCU-PC999/ChineseCheckerWebsite/WebService.asmx?WSDL");
var opCreateRoom : Operation = new Operation(ws);
opCreateRoom.addEventListener(OperationEvent.COMPL ETE, onResult);
opCreateRoom.setRoomInfo(Room_Name, Room_Password,room_players,room_detect); (AS3)
Like here is how i use the well considered class to connect to the webserver and create the room ..
The question is how can i create equivalent code of the above using weborb AS3
any help will be appreciated ...
AS3, Xml And Webservice Problem
Heya, i'm having some troubles with this project i'm working on where i need to access an access-database from flash. I've written a webservice which works fine and managed to access the resulting xml-file in flash, but i can't seem to sort out the specific data i want from it.
ActionScript Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
var xml:XML;
function onLoaded(e:Event):void
{
xml = new XML(e.target.data);
trace(xml);
}
loader.load(new URLRequest("http://localhost:1492/Lab3/Lab3Service.asmx/getAllData"));
This results in the following "output" in flash:
Code:
<ArrayOfUsrData xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://tempuri.org/">
<usrData>
<posX>100</posX>
<posY>200</posY>
<name>gubb</name>
<email>a@b.c</email>
</usrData>
<usrData>
<posX>200</posX>
<posY>100</posY>
<name>test</name>
<email>asd</email>
</usrData>
</ArrayOfUsrData>
Now, i'v found in noumerous forums and books that the way to trace a specific post in an xml-file is to use dots. I've tried using trace(xml.usrData) and trace(xml.ArrayOfUsrData) but these return nothing.
My best guess of how to lets say access the posX-value of the upper usrData would be trace(xml.usrData.posX.text()[0]);
(The "text()" method is supposed to return the value without its wrapping tags.)
Anyone who has an idea of what i'm doing wrong?
Webservice Connection
Hi,
I've made a couple of flash movies that uses webserviceconnector to retrieve some data using Actionscript 2.0 .
It all work fine from the development environment (Flash CS3) but not after publish. The data does not show up. I've tried the following:
- "executed" the html file by doubleclick
- executed the SWF file
- put the html and SWF on my localhost and accessed it through the browser.
It has to be a simple answer and I guess it has something to do with new security features but I can not find the answer.
Any answer is highly appreciated, thanks.
WebService Refresh
Hi,
My flash is consuming a webservice as follows:
var wsConn:WebServiceConnector = new WebServiceConnector();
wsConn.addEventListener("result", getGroups);
wsConn.WSDLURL = "
Webservice Connector
I'm trying to use a webservice connector component. I have specified the url as localhost/server.php?wsdl. This is returning valid wsdl (i've checked) and flash is accepting it without complaining. However, when I check my schema tab in the component inspector rather than having the operations specified it has 'params : Object' and 'results : Object'. It doesn't have the operation name defined in wsdl. Is this normal? How do I call my operation from flash?
In the flash example it comes up with 'product : string' below the 'params : Object'. My wsdl defines one operation with an input of two integers. Surely these should come up in the schema tab.
What am I doing wrong?
Pb Webservice Flash8
Hello everyone!
first pls excuse my english...
I'm trying to get data from a webservice placed on an other server, parse the data and display it in a datagrid.
I'm using the WebServiceConnector component.
I placed a crossdomain.xml on the remote server, allowing my domain
(<allow-access-from domain="*.mydomain.corp" secure="false" />)
Everything works fine within Flash. (Ctrl+Enter)
Data is recovered, parsed and diplayed propoerly.
But when i try somewhere else, it doesn't work at all.
(local swf, local html, nor in http on mydomain)
I placed dynamic txt fields to trace the status of the webserviceconnector, throught a listener on "status" event.
I have of course an other listener for "result" event, which launches parsing and display.
Within Flash, i see the "status" changing from
"StatusChange" {callsInProgress:1}
to
"StatusChange" {callsInProgress:0}
and then, the "result" event is triggered.
But when trying online, the "status" stays on
"StatusChange" {callsInProgress:1}
and the "result" event is never triggered.
Looking on the httpheaders of the page, i can see the webservice is called with success (Method:GET Result:200, Type text.xml;charset=utf-8).
I though it was a security issue, so in my html, i set
<param name="allowScriptAccess" value="always" />
And in my flash, i put:
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
And still, i can't access the data...
Any idea ?
Thanks thanks thanks
Pb Webservice Flash8
Hello everyone!
first pls excuse my english...
I'm trying to get data from a webservice placed on an other server, parse the data and display it in a datagrid.
I'm using the WebServiceConnector component.
I placed a crossdomain.xml on the remote server, allowing my domain
(<allow-access-from domain="*.mydomain.corp" secure="false" />)
Everything works fine within Flash. (Ctrl+Enter)
Data is recovered, parsed and diplayed propoerly.
But when i try somewhere else, it doesn't work at all.
(local swf, local html, nor in http on mydomain)
I placed dynamic txt fields to trace the status of the webserviceconnector, throught a listener on "status" event.
I have of course an other listener for "result" event, which launches parsing and display.
Within Flash, i see the "status" changing from
"StatusChange" {callsInProgress:1}
to
"StatusChange" {callsInProgress:0}
and then, the "result" event is triggered.
But when trying online, the "status" stays on
"StatusChange" {callsInProgress:1}
and the "result" event is never triggered.
Looking on the httpheaders of the page, i can see the webservice is called with success (Method:GET Result:200, Type text.xml;charset=utf-8).
I though it was a security issue, so in my html, i set
<param name="allowScriptAccess" value="always" />
And in my flash, i put:
System.security.allowDomain("*");
System.security.allowInsecureDomain("*");
And still, i can't access the data...
Any idea ?
Thanks thanks thanks
WebService Class
Hello, everybody!
I would say that working with arrays returned from the web service (written on C# if it matters) is the most peculiar things in the FMS. For starting FMS documentation states: "Note: The WebService class is not able to retrieve complex data or an array returned by a web service.". But it IS able to work with arrays return by the web service. The result has length property, you can select any array element by index. What is that documentation note for? Is it deprecated and authors forgot to remove it from the docs?
The second strange thing with arrays is the following. If I try to work with array returned from the web server in the most natural way, for example:
service.onResult = function(result)
{
for (var i = 0; i < result.length; i++)
{
// do something
}
}
the application often is unloaded WITHOUT any additional information besides "Unloaded application instance xxx". And application event onAppStop is never called in such cases.
I found workaround, and it works. The workaround is the following:
service.onResult = function(result)
{
for (var k = 0; k < result.length; k++)
{
result[k] = result.sCall.decodeResultNode(
result.xmlNodes[k],result.arrayType);
// do something
}
}
And it is documented nowhere!
Now I have bumped into next problem -- the web service returns an array with many elements (~650). The FMS application again just unloaded with the last words "unloaded application instance" even if service onResult handler doesn't contain any code at all!
I am using FMS 3. Does anybody know how to work with arrays returned from web service correctly and have explanations for all bizarre thing I've just described?
Edited: 06/02/2008 at 12:20:14 PM by gribunin
Webservice Problem
Hello!
I am using web service located on the same server as fms. All worked fine on my windows machine. Now the server is running on linux machine and i get this error.
faultcode Client.Disconnected
faultstring Could not load WSDL
detail Unable to load WSDL, if currently online, please verify the URI and/or format of the WSDL
Can this have something to do with user rights? I have read logs but there is nothing there. Firewall should be ok too. I tried with wget and it worked out. I have no idea why I get this error, it seems that I can't make any requests (also tried http://localhost/mywsdl.wsdl)
Thanks for any help.
WebService With Remoting And AS3
Hi at all,
last day i have ask the solution in order to work with Webservice with AS3;
I have try to use Remoting before download and install many 3th party
webservice class (like wellconsiderer.com component), but without
success: i can't call ASMX file with remoting.
<CODE>
import flash.net.NetConnection;
import flash.net.Responder;
var myResult:Function = function(o:Object)
{
trace("result="+o);
}
var myStatus:Function = function (o:Object)
{
trace("status="+o.code+"__"+o.description);
}
var myResponder:Responder = new Responder(myResult,myStatus);
NetConnection.defaultObjectEncoding = ObjectEncoding.AMF0;
var a:NetConnection = new NetConnection();
a.objectEncoding = ObjectEncoding.AMF0;
a.connect("
Webservice , URL & URL Variable
hi all ,
i got a problem with my project and its regarding connectinng to a webservice page for methods interacting with my SQL server database and URL variable. (Front end is chinese checker Game )
Is there any related problems with sending URL variable to another swf files and declaring a webservice address as i use the URL variable in the methods of the webservices.
i found out that i cannot connect to the webservice page sometimes ( random occurance) with the page being directed by new urlrequest with the url variable attached.
However if it has successfully connected , there is no subsequent problems anymore .
Can someone enlighten mi ?
Webservice Delay
Hello all,
Is there any event which tells you that webservice call is in progress..
i want to show the processing animation in the time gap bwteen a call to webservice and the result from the webservice.
Regards
PS
Can We Communicate To Webservice
Hi all,
I just want to know is, Can we communicate to web service while the SWF is playing online? If so pls tell me how we can connect. Is there any restrictions stopping the SWF to communicate?
Thanks in advance
Can We Communicate To Webservice
Hi all,
I just want to know is, Can we communicate to web service while the SWF is playing online? If so pls tell me how we can connect. Is there any restrictions stopping the SWF to communicate?
Thanks in advance
Can We Communicate To Webservice
Hi all,
I just want to know is, Can we communicate to web service while the SWF is playing online? If so pls tell me how we can connect. Is there any restrictions stopping the SWF to communicate?
Thanks in advance
Two Combobox With Webservice - Help
Hi,
I would like to create a flash-application that works like this example:
Combobox1 provide some country names
Combobox2 provide some city names
The data should be provided with webservices (like .asmx).
I want them to work together and when i choose country in Combobox1 all cities related to that country will be shown on the second Combobox2.
I've searched alot for an answer but couldn't find any for AS2 and please now i need your support. Any help with this would be very kind. Maybe someone has an source-example with something like this or close to this.
How do I make this??
If possible an example of the webservices would be cool too but not necessary.
Thank you alot
Webservice Question
Hi all,
I found this nice article about webservices (
http://blog.kirupa.com/?p=37 ) and i was wondering if there is a way to return the result from the onResult statement to the webservicecall function.
example:
----------- original sample code -------------------------
import mx.services.WebService;
import mx.services.PendingCall;
function WebServiceCall(input:Number) {
var returnedValue:String;
var wsURL:String = "http://www.kirupafx.com/WebService/TopMovies.asmx?WSDL";
var ws: WebService = new WebService(wsURL);
var re: PendingCall = ws.GetMovieAtNumber(input);
re.onResult = function(result):Void {
returnedValue = result;
trace("Movie Returned: "+returnedValue);
};
re.onFault = function(fault) {
returnedValue = fault.faultCode+","+fault.faultstring;
trace(returnedValue);
};
}
// 5 corresponds to "Schindler's List"
WebServiceCall(5);
------- what I' trying to do --------------------------
import mx.services.WebService;
import mx.services.PendingCall;
function WebServiceCall(input:Number):String {
var returnedValue:String;
var wsURL:String = "http://www.kirupafx.com/WebService/TopMovies.asmx?WSDL";
var ws:WebService = new WebService(wsURL);
var re: PendingCall = ws.GetMovieAtNumber(input);
re.onResult = function(result):Void {
returnedValue = result;
trace("Movie Returned: "+returnedValue);
};
re.onFault = function(fault) {
returnedValue = fault.faultCode+","+fault.faultstring;
trace(returnedValue);
};
return returnedValue // this return undefined
}
// 5 corresponds to "Schindler's List"
var temp:String = WebServiceCall(5);
trace(temp)
thanks in advance for any help with this
Webservice Problem
I have a weird problem with my webservice. When i call TrackService.asmx?wsdl with a relative path, i get an 'unabled to load' error. If i call the same service with it's full url http//testpage.com/TrackService.asmx?wsdl everything's ok...
Anyone encountered the same problem?
Problems With Form And My WebService
I have a free host called HpG and I´m trying to create a form mail using FlashMX and the Post CGI that is available on this host.
The problem is that the only way to make this form works is using HTML cause the host need a variable in "Content-type: text/html". I have modified a FLA file but it is not working. How can I make some kind of modification on my FLA that he can generate this "Content-type: text/html" and sendo to the CGI and works?
The examples are in:
http://www.marcelloprata.hpg.com.br/...o/formmail.htm
Thanks
|