1. You need fds.swc from LCDS 2.5. I'll send you details offlist (it's due out publically very very soon). Actually, are you using the flex webtier compiler on tomcat to also compile or are you using flex builder? If you're using the webtier compiler you could just get the new flex.war from LCDS 2.5 as it has been updated with hotfix 2 too. 2. I'll help you offlist with this as I'll need some more details from you.
________________________________ From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On Behalf Of lfw_mara Sent: Thursday, May 31, 2007 4:07 PM To: flexcoders@yahoogroups.com Subject: [flexcoders] Re: Web Service Problems Peter Thanks for your help! :) 1) I updated flex builder 2.0.1 to hotfix 2. Since I am running my flex app using tomcat I decided to update WEB-INF/flex dir with relevant files I found in updated Flex SDK 2. After this I can't even compile my app I get an error. Not sure if i am doing this right? Error is the following / Channel definition, mx.messaging.channels.RTMPChannel, can not be found. 2) If I don't update my tomcat WEB-INF/flex. I removed format="xml" from my request so it doesn't binding issues. and I carefully looked at my WSDL, so my parameters have the same name as the part(WSDL is inluded above just in case). My send() function returns me null object, so when I debug I cannot see the SOAP body, cuz message=null. So eventually I get an error from fault-faultString = Required parameter 'orderId' not found in input arguments. My WSDl <wsdl:definitions targetNamespace="http://www.ofbiz.org/service/ <http://www.ofbiz.org/service/> "> <wsdl:message name="getOrderInformationResponse"> <wsdl:part name="orderInformation" type="xsd:string"/> </wsdl:message> <wsdl:message name="getOrderInformationRequest"> <wsdl:part name="orderId" type="xsd:string"/> </wsdl:message> <wsdl:portType name="getOrderInformationPortType"> <wsdl:operation name="getOrderInformation"> <wsdl:input message="tns:getOrderInformationRequest"/> <wsdl:output message="tns:getOrderInformationResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="getOrderInformationSoapBinding" type="tns:getOrderInformationPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http <http://schemas.xmlsoap.org/soap/http> "/> <wsdl:operation name="getOrderInformation"> <soap:operation soapAction=""/> <wsdl:input> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> " namespace="http://www.ofbiz.org/service/ <http://www.ofbiz.org/service/> " use="literal"/> </wsdl:input> <wsdl:output> <soap:body encodingStyle="http://schemas.xmlsoap.org/soap/encoding/ <http://schemas.xmlsoap.org/soap/encoding/> " namespace="http://www.ofbiz.org/service/ <http://www.ofbiz.org/service/> " use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="getOrderInformation"> <wsdl:port binding="tns:getOrderInformationSoapBinding" name="getOrderInformationPort"> <soap:address location="http://localhost:8080/webtools/control/SOAPService <http://localhost:8080/webtools/control/SOAPService> "/> </wsdl:port> </wsdl:service> </wsdl:definitions> Thanks, Regards Marina --- In flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> , "Peter Farland" <[EMAIL PROTECTED]> wrote: > > Hmm, I've noticed that format="xml" does not support data binding. I'm > not sure if that is a bug or just a limitation of mxmlc, but without > format="xml" you just have normal MXML processing rules and those tags > get converted into plain old ActionScript Objects with child elements > becoming properties/values. > > First up, you should move to Flex 2.0.1 Hotfix 2. > Second, if you want to use data binding I suggest not using format="xml" > and let the WebService operation encode the SOAP request for you. > Third, I would become very familiar with the WSDL operation message > definition and look very closely at the parts that are defined for the > message. The child elements should be named what the part name attribute > specifies as this syntax ends up being passed to a SOAPEncoder as an > Object so it thinks you're using named parameters and thus will look for > parts by name. Don't worry, if the part declares an element, it will use > the element when encoding that particular part. If the part declares a > type, then it will use the part name. > > > > ________________________________ > > From: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> [mailto:flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> ] On > Behalf Of lfw_mara > Sent: Wednesday, May 30, 2007 6:10 PM > To: flexcoders@yahoogroups.com <mailto:flexcoders%40yahoogroups.com> > Subject: [flexcoders] Web Service Problems > > > > Hello! > > I am trying to call web service created in OFBiz framework(it uses > axis java web services). > I am having two problems > > 1) Here is my flex client code > <mx:WebService id="ws" > wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma <http://localhost:8080/webtools/control/SOAPService/getOrderInforma> > tion?wsdl > <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? > > wsdl> " > showBusyCursor="true" > > <mx:operation name="getOrderInformation" > result="controller.resultHandlerGetOrderInformation(event)"> > <mx:request format="xml"> > <getOrderInformation> > <orderId>{myDataGrid.selectedItem}</orderId> > </getOrderInformation> > </mx:request> > </mx:operation> > </mx:WebService> > > And then I do > Application.application.ws.getOrderInformation.send(); > In soap message body my argument orderId equals to null. But if > I pass hard coded string instead of {myDataGrid.selectedItem}. It > works perfectly fine > > 2) I tried to pass arguments thru Action Script code and I did the > following > <mx:WebService id="ws" > wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma <http://localhost:8080/webtools/control/SOAPService/getOrderInforma> > tion?wsdl > <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? > > wsdl> " > showBusyCursor="true" /> > > And in Action Script > var selectedOrderId:string = > Application.application.myDataGrid.selectedItem.value; > Application.application.ws.getOrderInformation(selectedOrderId); > > I also tried > <mx:WebService id="ws" > wsdl="http://localhost:8080/webtools/control/SOAPService/getOrderInforma <http://localhost:8080/webtools/control/SOAPService/getOrderInforma> > tion?wsdl > <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? <http://localhost:8080/webtools/control/SOAPService/getOrderInformation? > > wsdl> " > showBusyCursor="true" > <mx:operation name="getOrderInformation" > result="controller.resultHandlerGetOrderInformation(event)"/> > </mx:WebService> > > And in Action Script > var selectedOrderId:string = > Application.application.myDataGrid.selectedItem.value; > > Application.application.ws.getOrderInformation.send(selectedOrderId); > > When I look in the soap message body it doesn't have the wrapper for > the name of the operation, it contains only argument with its value > and flex gives me an error > > [RPC Fault faultString="Error #1009: Cannot access a property or > method of a null object reference." faultCode="DecodingError" > faultDetail="null"] > at > mx.rpc.soap::Operation/http://www.adobe.com/2006/flex/mx/internal::proce <http://www.adobe.com/2006/flex/mx/internal::proce> > ssResult <http://www.adobe.com/2006/flex/mx/internal::processResult <http://www.adobe.com/2006/flex/mx/internal::processResult> > () > at > mx.rpc::AbstractInvoker/http://www.adobe.com/2006/flex/mx/internal::resu <http://www.adobe.com/2006/flex/mx/internal::resu> > ltHandler <http://www.adobe.com/2006/flex/mx/internal::resultHandler <http://www.adobe.com/2006/flex/mx/internal::resultHandler> > () > at mx.rpc::Responder/result() > at mx.rpc::AsyncRequest/acknowledge() > at ::DirectHTTPMessageResponder/completeHandler() > at > flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEven > tFunction() > at flash.events::EventDispatcher/dispatchEvent() > at flash.net::URLLoader/flash.net:URLLoader::onComplete() > > Please Help!! Can't seem to figure out what is going on. In adobe docs > it says that flex supports both type of mappings RPC and Document. > Also I can't figure out why variable for the argument is read as null? > If I could resolve the first problem it would resolve my issue. > > Thanks a lot for your time > Marina >