Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOAP returned from the java web service

Level 1
Level 1

I am using a simple java web service to return the object
containing a string and an integer using e4x format. The result I
get in the result event is

"<ns:return type="read.Profile" xmlns:ax21="
http://read/xsd" xmlns:ns="
http://read" xmlns:soapenv=""/>".

What i am unable to understand is where is the object that
the service would have returned???

Another question is can we return arraylist from the
webservice?? If i try to add the objects into the array list and
pass it into the flex application, i get an " HTTP request error".
Please advise.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application xmlns:mx=""

<mx:WebService id = "ReadData" wsdl="{'
fault="" showBusyCursor="true"

<mx:operation name ="returnData" resultFormat="e4x"
result= "showItemResult(event)">

<mx:request xmlns="">








import mx.collections.ArrayCollection;


import mx.controls.Alert;


private var resultdata:ArrayCollection;

private namespace read = "

use namespace read;

public function sendRequest():void {



private function showItemResult(res:ResultEvent):void {

var _xml:XML;

_xml = XML(res.result);




<mx:Button x="273" y="64" label="getIT" click=

<mx:Label x="190" y="81" id="myLabel"/>



Java web service


package read;

import java.util.ArrayList;

import java.util.Set;

import java.util.Vector;

import java.util.HashMap;

class Profile {

String name;

int age;

void setvalues(String name, int age) { = name;

this.age = age;



public class ReadQuickbase {

public Profile returnData() {

Profile p = new Profile();

try {

p.setvalues("abc", 10);


catch (Exception e){



return p;


0 Replies