ResultFormat="object" in webservice. Flawed or is it me??

<mx:WebService id="getListTargs"
wsdl="myurl/dropper.cfc?wsdl" useProxy="false">
<mx:operation result="testRet();" name="dropRanges"
fault="Alert.show(event.fault.message)" resultFormat="object"/>
</mx:WebService>
When I get the XML back from that webservice it comes back as
a string and not an object. Is something wierd with resultFormat or
do I have to do some kind of conversion to get it into an
object????

The code below is working to populate a class with the values
returned from a web service, ofcourse you have to create the class
and create the callback function but I believe you have to create
the class even with the full blown FDS Java implementation so it's
a trivial task.
This code is all AS, as I personally dont like using the
tags.
These are two load functions in a custom ArrayCollection, so
ignore the this. calls as they are just calling super class
functions.
public function LoadAllModules():void
var ws:WebServices = WebServices.Instance;
var op:AbstractOperation =
ws.Service.getOperation("GetAllModules");
op.addEventListener("fault", ws.Fault_Callback);
op.addEventListener("result", this.LoadAllModules_Callback);
op.send();
private function
LoadAllModules_Callback(result:ResultEvent):void
this.disableAutoUpdate();
for (var s:String in result.result)
var m:MyClass = new MyClass();
m.ModuleID = result.result[s].ModuleID;
m.Name = result.result[s].Name;
m.BaseName = result.result[s].BaseName;
m.AssemblyName = result.result[s].AssemblyName;
m.AssemblyNamespace = result.result[s].AssemblyNamespace;
m.Active = result.result[s].Active;
m.RemoteFiles = result.result[s].RemoteFiles;
this.Add(m);
this.itemUpdated(m);
this.enableAutoUpdate();
}

Similar Messages

  • SingleTon object of WebServices (Please be specific as required and not be generic)

     // Singleton Object of viewservice
    private ViewService WorkListView = null;
    ViewServiceObjectCreation viewstrWorkListView =  ViewServiceObjectCreation.GetObject();
    // Object Creation
    public  class ViewServiceObjectCreation
            private static ViewServiceObjectCreation singleTonObject=null;
            private static readonly object lockingObject = new object();
            private ViewServiceObjectCreation()
            public static ViewServiceObjectCreation GetObject()
                if(singleTonObject == null)
                     lock (lockingObject)
                          if(singleTonObject == null)
                               singleTonObject = new ViewServiceObjectCreation();
                return singleTonObject;
    But this is not creating singleton object of webservice. How to create singleton object of webservice.
    Vivek

    Read my post again: Please describe your concrete problem which made you think you need a singelton.
    A singelton only works per domain. Thus it will not help in your sketched scenario. Cause it cannot prevent an user or administrator for starting another domain (a.k.a. process).
    In this case you should consider using a mutex, which is aquired when the web service is started and released when stopped.
    While singeltons are a cool pattern per se, they are one of those evil ones. They are often not a correct solution and much worse, the kill testability cause the represent a global state.

  • How can i return an object isn't java object from webservice????

    Hi !
    I have a problem in my Project. When i call method return a java object from webservice , it 's too easy. But when i create my own object (ex:ClientRequest.class) , it doesn't work exactly T_T . When i return that object (on client, doesn't have ClientRequest.class) , i cann't access its static variables.
    How can i do it ??
    Please help me !
    Thanks a lot !!!!!
    class ClientRequest {
    public static int i;
    public static String s;
    public ClientRequest() {
    }

    You can use REFCURSOR type for this. In java SQL TYPES this is available too. In your PLSQL use REFCURSOR for that array and then take the same from java code. Look in the servelet programming book for this SQLTYPE and see PLSQL for handling refcursors. We have done this way and it works.

  • SAP objects into Webservices

    Hello Experts,
    Can anybody guide me to explain how to convert the SAP objects into webservices.
    For example, convert Leads in SAP to be exposed as webservices.
    Thanks,
    Vijay

    Hello,
    Quick answer  to find the standard services without J2EE Engine or XI there is a BSP application that can be used to list the Web Services.
    http://<host_name>:<port_number>/sap/bc/bsp/sap/WebServiceBrowser/search.html?sap-client=<relevant_client>
    See this link: [Generating WSDL in SAP WebAS|http://help.sap.com/saphelp_webas620/helpdata/en/94/f8c8c8e68811d6b2dc00508b5d5211/content.htm]
    Detailed answer
    Classical way of creating Web services in ABAP stack is easy. If you are familiar with SAP RFC (Remore Function Calls), every RFC enabled Function Module can be "published" as a web service. The trick is the SOAP (runtime) service available since WAS 6.20. See the [Basic Concepts of SAP SOAP runtime|http://help.sap.com/saphelp_webas620/helpdata/en/94/f8c8a2e68811d6b2dc00508b5d5211/content.htm] here.
    So, literally you don't have to anything to "generate" web services for "standard objects" - if BAPIs and RFC enabled FMs are those standard objects you are looking for.
    To enable the use of Web Services in external tools, a description of the interface must exist in the Web Service Description Language WSDL. - This is common knowledge right?
    In the SAP Web AS, you can generate these descriptions using the Web Service Browser, which is a BSP application.
    You can access the Web Service Browser using the URL:
            http://<host_name>:<port_number>/sap/bc/bsp/sap/WebServiceBrowser/search.html?sap-client=<relevant_client>
    Trick to find the <host_name>, <port_number> and <relevant_client>:
    You can determine values of host_name and port_number in transaction SMICM (choose GoTo -> Services or Shift - F1.
    Hope this is very useful.
    Easwar Ram
    http://www.parxlns.com

  • Reference HttpServlet object from webservice method ...

    How to reference HttpServlet object from webservice method to access HTTP header?
    Thanks
    Marcel

    You are correct.
    I know that SOAP messages can be send not only via HTTP protocol.
    Our solution is restricted to use only HTTP protocol for communication between client and server by customer, because there is implemented transparent proxy for users authorization and strong security of communication via HTTP protocol. Authorization server transparently modify HTTP request header with user identity (DN from user certificate - with this PKI solution it is not possible to use standard SSL because certificate is proprietary enhanced and cannot be accessed in standard way). That is why I need access HTTP request header.
    Why I want to use webservices? I thing that webservice is flexible and perspective technology for integration and asynchronous communication between web clients and application (it is really more effective add new info in web page asynchronously from webservice than reload whole page).
    Thanks
    Marcel

  • "Join" Objects through Webservices

    I'm trying to find a fast way to join objects through webservices.
    What do I need?
    -An extract of the recipients from a campaign joined with contacts
    What do I have?
    -I have an extract of the recipients of the campaign...
    What's left?
    -No I have the ID's of the contacts and I could get the information of the contacts 1 by 1. This means if I have 100 recipients, that I have 101 webservice calls.
    My question?
    Is there a way to get all the contacts with 1 webservice call, containg the needed info from recipients?

    Probably not, Campign - Contact is Many-to-Many relationship. You can query contacts where 'SourceCampaignName' field equals some camagin, but it not the same that you want.

  • Object to Object in WebService Integration Tier

    Hello,
    I'm working in a Financial application.
    We use WebService as main datastore.
    So, i designed a facade for WebService integration into the Application.
    With a SOAP engine (Axis, Xfire) a have generated Class representing the message info and request/respond for the webservice.
    In the Application, i designed a Business Model and the WebService Model is different.
    My needs :
    What is the best way to map WebService Object to the Application Business Model in a flexible and configurable way ?
    I though about a "Service" to provide such a Mapping.
    But, i want the ervice to be flexible a modifiable (not mapping hard coded)
    This is probably not 100% OO Pattern question but ...

    If the WebService is a datastore, then the Data Access Object design pattern could be applied to facilitate behavior between the WebService object and the application's Business Tier.

  • RWD error during Configuration of RWD Server: Object Required webservice.js

    We are in the process of Configuring the Server - after installing the Autonomy IDOL/DISH and the RWD Server. We get to the point of entering Company Name - and Product Key, as soon as we click on SAVE we get the error message
    Object Required                          Line 43 - Character 13
    webservice,js
    ==========
    Need help Thank you!
    Guillermo Gomez

    Since we are using 64 bit application the ASP.Net file needs to be forced to use 32 bit because RWD sometimes does not recognize the file during the installation process.
    1. Ensure the uPerform Website points to use port 80 and the Collaboration Server to use port 8080. This can be verified or change by executing the AuthenticationWizard.exe file located in: <InstallPath>\Collaboration\WWW\uPerformWS\ms
    -Click on Start u2013 verify or change the information as needed and ensure the Server DNS Hostname does not have 8080 at the end.
    2. Set the permissions to full rights for all users for the file RWD.uPerform.ServerConfiguration.DLL u2013 located in: <InstallPath>\Collaboration\WWW\uPerformWS\
    3. Delete the VCBS folders in
    <InstallPath>\Collaboration\webapps\
    Re-Start IIS
    Once is back up:
    -     Make sure Web Service Extensions is using ASP.NET v2.05727 (32-bit). Remove or prohibit any other ASP.NET.
    -     Make sure Jakarta Connector is set to allowed if not create a new connector to point to file <InstallPath>\Collaboration\JKConnect\bin\isapi_redirect-1.2.14.dll
    -     Make sure WebDAV is set to allowed
    Inside the websites (iis) right click on uPerform Collaboration and click on properties. Display the tab ISAPI Filters and make sure Jakarta is there and in black font. Any other color (RED) indicates is not connected and you need to delete it from the web services extensions and then add it back in this section u2026 same file location.
    Re-Start IIS
    Once is back up:
    Re-register ASP.NET by executing this file from the command line:
    C:\windows\microsoft.net\framework\aspnet_regiis.exe u2013iru
    Once this is doneu2026 then do:
    C:\windows\microsoft.net\framework\aspnet_regiis.exe u2013ir
    Re-Start IIS
    Ensure the website is back up u2026 and continue with the configuration of the RWD uPerform Server.

  • Oracle ADF Mobile getting array of objects from webservice

    hi,
    i am trying to fetch a certain number of records using a webservice call and then storing in the SQLLite DB in the mobile.
    i understand i can create a data control using the webservice > then?
    my webservice returns an array of objects.
    how can i do that?
    regards,
    ad

    It's fairly easy.
    What I have done is created a WebService Controller (plain java class) which calls the methods (from the WS) programmaticly.
    Example :
    public class WSController {
        private final String WSDataControllerName = "ThisIsTheNameOfMyWebserviceDataControl";
        private List pnames ,ptypes ,params;
        public WSController() {
            super();
        public List getAllActioncodesFromWS()
           //start - WS empty params
            pnames = new ArrayList();
            params = new ArrayList();
            ptypes = new ArrayList();
            pnames.add("findCriteria");
            params.add(null);
            ptypes.add(Object.class);
            pnames.add("findControl");
            params.add(null);
            ptypes.add(Object.class);
            //end - WS empty params
            List actionCodes = new ArrayList();
            try
                GenericType result = (GenericType)AdfmfJavaUtilities.invokeDataControlMethod(WSDataControllerName, null, "findActioncodesView1",pnames, params, ptypes);
                if(result!=null)
                    for (int i = 0; i < result.getAttributeCount(); i++)
                        GenericType row = (GenericType)result.getAttribute(i);
                        Actioncode wd = (Actioncode)GenericTypeBeanSerializationHelper.fromGenericType(Actioncode.class, row);
                        actionCodes.add(wd);
            catch (AdfInvocationException e)
                e.getMessage();
            catch (Exception e)
                e.getMessage();
         return actionCodes;
        }I also defined a Pojo named Actioncode :
    Note that the attribute names are completly the same as the VO from the web service.
    public class Actioncode {
        String Actioncode,Descript1;
        public Actioncode() {
            super();
        public Actioncode(String Actioncode, String Descript1) {
            super();
            this.Actioncode = Actioncode;
            this.Descript1 = Descript1;
        public void setActioncode(String Actioncode) {
            this.Actioncode = Actioncode;
        public String getActioncode() {
            return Actioncode;
        public void setDescript1(String Descript1) {
            this.Descript1 = Descript1;
        public String getDescript1() {
            return Descript1;
    }Since the WS method returns a GenericType, you can 'convert' that object to an POJO.
    Read more about it here :
    http://adf4beginners.blogspot.be/2013/01/adf-mobile-how-to-iterate-over-all-rows.html
    I know the blog post is about iterating over rows in an iterator, but it's just to illustrate how you can work with the GenericType

  • Non-Serializable objects in webservice

    Hi everyone,
    I'm writing a webservice that connects and performs update on a third-party
    data repository (document management system) through the vendor provided
    framework.
    Some of the objects used in the framework are not serialized, and WebLogic
    Workshop 7.0 won't compile my services because they contain non-serializable
    objects. Those objects are not used as messages or method parameters, rather
    are the member variables of the services.
    My question is how would I go about using non-serialized objects in a
    webservice class with WebLogic Workshop 7.0? I've seen some Apache AXIS
    webservice examples that does the similar thing, but some of the services
    works with non-serializable objects. Do I need to create an EJBcontrol that
    masks non-serializable objects to be used with the webservice?
    Any input is greatly appreciated. I'm still new at webservice programming.
    Thank you,
    Makoto

    Hi everyone,
    I'm writing a webservice that connects and performs update on a third-party
    data repository (document management system) through the vendor provided
    framework.
    Some of the objects used in the framework are not serialized, and WebLogic
    Workshop 7.0 won't compile my services because they contain non-serializable
    objects. Those objects are not used as messages or method parameters, rather
    are the member variables of the services.
    My question is how would I go about using non-serialized objects in a
    webservice class with WebLogic Workshop 7.0? I've seen some Apache AXIS
    webservice examples that does the similar thing, but some of the services
    works with non-serializable objects. Do I need to create an EJBcontrol that
    masks non-serializable objects to be used with the webservice?
    Any input is greatly appreciated. I'm still new at webservice programming.
    Thank you,
    Makoto

  • Binding ActionScript object to webservice

    Hi,
    Can someone please provide me with simple example as to how
    to bind an ActionScript object to the webservice.
    The Scenario is I have an actionscript class. I have the
    webservice in the mail mxml. I want to create an object of the
    class and want to bind that object to the webservice rather than
    binding each of the property.
    Thanks in advance.

    Do not bind directly to a webService result. Use a result
    handler, and assign the result to a bindable variable. Bind to
    that.
    To intercept binding events in AS code, use a ChangeWatcher.
    Tracy

  • Object in WebService (anyType)

    import javax.ejb.Stateless;
    import javax.jws.WebMethod;
    import javax.jws.WebParam;
    import javax.jws.WebResult;
    import javax.jws.WebService;
    import javax.jws.soap.SOAPBinding;
    @WebService(name = "EJB3Bean", targetNamespace = "http://ejb3webservice.bstd.com", serviceName = "EJB3BeanService")
    @SOAPBinding(style = SOAPBinding.Style.RPC)
    @Stateless
    public class EJB3Bean {
         * @param obj
         * @return
         @WebMethod
         public Book getBook(Book book) {
              book.setName("New Name!");
              return book;
         @WebMethod
         @WebResult(name = "object")
         public Object getObject(@WebParam(name = "obj")
         Object obj) {
              Book book = (Book) obj;
              book.setName("New Name!");
              return book;
    It generated the WSDL contain below:
    - <message name="EJB3Bean_getObject">
    <part name="obj" type="tns:Object" />
    </message>
    - <message name="EJB3Bean_getObject">
         <part name="obj" type="tns:anyType" />
    </message>
    Message was edited by:
    leemingjun

    If the WebService is a datastore, then the Data Access Object design pattern could be applied to facilitate behavior between the WebService object and the application's Business Tier.

  • How get java Object from webservice

    Hai
    i gave ArrayList<bean> , i can't get this ArrayList<bean> from webservice. How can i get ? via for each or iterator or any ?????
    Note: i iterated  but only one element was come from bean property  using next() of iterator .
    I need all property. any one please help.
    thanks
    Mr...Javan

    Try to return an Array instead of an ArrayList?
    Have a look at http://forums.sun.com/thread.jspa?forumID=331&threadID=5289022.

  • Transferring objects over webservices

    Hi all
    I am using netbeans 5.5 with J2EE 5 and the sun application server 9. I am able to transfer information in the form of lists or stings etc using jax-ws. the problem is that I don't know how to transfer objects can someone please point me in the right direction as I am getting lost.
    thanks in advance
    Brian
    Message was edited by:
    Brian.R.Johnson

    It should just work. Define you SEI with the Object classes you wish to work and everything should just work.

  • WebService response object in XML - parsing attributes

    Hi- new to Flex and I'm trying to parse out the attributes of the response object. I can get the entire object and see that its working, but I cant get just a single attribute. It pulls weather info for world cities. For example, I just want the location name and temperature.
    Any advice on this? Thanks!
    <?xml version="1.0"?>
    <!-- fds\rpc\RPCResultFaultMXML.mxml -->
    <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
                    xmlns:s="library://ns.adobe.com/flex/spark">
        <mx:Script>
            <![CDATA[
                import mx.rpc.soap.SOAPFault;        
                import mx.rpc.events.ResultEvent;
                import mx.rpc.events.FaultEvent;
                import mx.controls.Alert;
                import mx.utils.ObjectUtil;
                public function showErrorDialog(event:FaultEvent):void {
                    // Handle operation fault.
                    Alert.show(event.fault.faultString, "Error");
                public function defaultFault(event:FaultEvent):void {
                    // Handle service fault.
                    if (event.fault is SOAPFault) {
                        var fault:SOAPFault=event.fault as SOAPFault;
                        var faultElement:XML=fault.element;
                        // You could use E4X to traverse the raw fault element returned in the SOAP envelope.
                    Alert.show(event.fault.faultString, "Error");              
                public function log(event:ResultEvent):void {
                    // Handle result.
                    trace(event.result);
                    //trace(ObjectUtil.toString(event.result));
                    //var len:int;
                    //len = event.result.length;
                    //trace(len);
                    //trace(event.result);
                    //trace(event.result.GetWeatherResponse.Location);
                    //var myXML:XML = new XML(event.result);
                    //trace(myXML.attribute("Location"));
            ]]>
        </mx:Script>
        <mx:WebService id="WeatherService" wsdl="http://www.webservicex.com/globalweather.asmx?wsdl"
                       fault="defaultFault(event)">
            <mx:operation name="GetWeather"
                          fault="showErrorDialog(event)"
                          result="log(event)"
                          resultFormat="xml">
                <mx:request>
                    <CityName>{myCity.text}</CityName>
                    <CountryName>{myCountry.text}</CountryName>
                </mx:request>
            </mx:operation>
        </mx:WebService>
        <mx:TextInput id="myCity" text="Madrid"/>
        <mx:TextInput id="myCountry" text="Spain"/>
        <!-- Call the web service operation with a Button click. -->
        <mx:Button width="60" label="Get Weather"
                  click="WeatherService.GetWeather.send();"/>
        <!-- Display the Weather -->
        <mx:Label text="Weather:"/>
        <mx:TextArea text="{WeatherService.GetWeather.lastResult}" height="200"/>
    </mx:Application>

    The WSDL says GetWeatherResponse is a string, and it appears to be a string of XML, so set <mx:operation resultFormat="object"> as this will unwrap the SOAP response value and leave a string typed value intact. You can then create a new ActionScript 3.0 E4X-based XML instance from the unwrapped string:
        var myXML:XML = new XML(event.result.toString());
    You can then travese the XML document using E4X syntax, a simple example is included below:
        trace(myXML..Location);
        trace(myXML..Temperature);

Maybe you are looking for