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

posting complex object by web service call

Level 1
Level 1
I have following issues with calling web service with complex
object :

Issue 1: Complex object is getting posted as null

I used class WebService provided by flex and proxy-config.xml
configuration file provided by blazeds to bypass security error
which is reaching webservice on web-qa posting Payment object as
null to server webservice method insertPayment( Payment pay).

Forum says it is bug in flex 3 and needs hotfix for flex 3
which is available for licensed copy of flex builder.

I have made web service request as follows:


Service Declaration:

private var advicews:WebService;


Code inside init() called on creationComplete:

advicews = new WebService();

advicews.destination = "ws-advices";

advicews.port = "AWebServiceSOAP11port_http1";

advicews.service = "AWebService";

advicews.endpointURI = "

advicews.useProxy = true;


advicews.addEventListener(FaultEvent.FAULT, handleFault2 );

advicews.addEventListener(ResultEvent.RESULT, handleWSResult

handleFault2 definition:

public function handleFault2( fault:FaultEvent ):void

{ "fault message: " + fault.fault.message );


handleWSResult definition:

public function handleWSResult( event:ResultEvent ):void

{ "got result " + event.result.toString() );



web service call on submit:

postAdvice( advicews );


postAdvice method definition:

private function postAdvice( service:AbstractService ):void


var pay : Payment = new Payment();

var uid : UserId_type3 = new UserId_type3();

uid.userId_type2 = "t1.t1";

pay.userId = uid;




proxy-config.xml entry for specifying the destination:

<destination id="ws-advices">





<adapter ref="soap-proxy"/>


Issue 2: Security exception for cross domain web service

To resolve the null object posting issue mentioned above I
used the stubs generated with flex builder 3 and commented out
lines of wrapper = true and qname as mentioned in the flex forum in
the BaseAWebService proxy class generated by flex builder 3 as we

But getting the security exception which is not resolved even
after placing crossdomain.xml policy file in ROOT.war in web
service server.

If anybody knows the solutions kindly let me know.


0 Replies