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.

Similar Messages

  • How to convert an array collection instance to a complex object for interaction with webservice

    Hi there,
    I have a stubborn problem that I am trying to work out the best way to solve the problem.  I am interacting with a WebService via HTTPService calling a method called find(String name) and this returns me a List of ComplexObjects that contain general string and int params and also lists of other Complex Objects.  Now using the code:
    ArrayCollection newOriginalResultsArray = new ArrayCollection(event.result as Array)
    flex converts my complex objects results to an arraycollection so that I can use it in datagrids etc.  Now up until this part is all good.  My problem is when getting a single instance from the results list, updating it by moving data around in a new datagrid for example - I want to interact with the webservice again to do an create/update.  This is where I am having problems - because these webservice methods require the complex object as a parameter - I am struggling to understand how I can convert the array collection instance back to my complex object without iterating over it and casting it back (maybe this is the only way - but I am hoping not).
    I am hoping that there is a simple solution that I am missing and that there is some smart cookie out there that could provide me with an answer - or at least somewhere to start looking. I guess if I have no other alternative - maybe I need to get the people who built the service to change it to accept an array - and let them do the conversion.
    Any help would be greatly appreciated.
    Bert

    Hi Bert,
    According to my knowledge you can use describeType(Object) method which will return an XML... That XML will contain Properties and values just iterate through the XML and create a new Object..   Probably u can use this method...
    public function getObject(reqObj:Object,obj:Object,instanceName:String,name:String=null,index:int=-1):Obj ect
                if(!reqObj)
                    reqObj = new Object();
                var classInfo:XML = describeType(obj);
                var className:String = instanceName;
                if(name!=null)
                    className=name+"."+className;
                if(index!=-1)
                    className=className+"["+index+"]";
                for each (var v:XML in classInfo..accessor)
                    var attributeName:String=v.@name;
                    var value:* = obj[attributeName]
                    var type:String = v.@type;
                    if(!value)
                        reqObj[className+"."+attributeName] = value; 
                    else if(type == "mx.collections::ArrayCollection")
                        for(var i:int=0;i<value.length;i++)
                            var temp:Object=value.getItemAt(i);
                            getReqObject(reqObj,temp,attributeName,className,i);
                    else if(type == "String" || type == "Number" || type == "int" || type == "Boolean")
                        reqObj[ className+"."+attributeName] = value; 
                    else if (type == "Object")
                        for (var p:String in value)
                            reqObj[ className+"."+attributeName+"."+p] = value[p];
                    else
                        getReqObject(reqObj,value,attributeName,className);
                return reqObj;
    Thanks,
    Pradeep

  • Which Objects should I target for integrating Eloqua REST API 2.0?

    Which Objects should I target for integration? and What are the possible use cases for the additional objects other than core objects?

    I am still trying to find a good REST API 2,0 document like the Bulk 2.0 document.  Book List: Oracle Marketing Cloud
    I did find this but is also not in depth:
    REST API - Documentation for Core Objects

  • Need example on passing an XML object to a JWS webservice

    Hello,
    Does anyone have an example on how to pass an xml object to a JWS webservice?
    I have created a webservice and passed parameters as such:
    https://myserver.test.com:7777/lookups/lookups_db/AmsDBClient.jws/getStaffInformation?userName=kkwiatek
    But there has got to be a way to pass an xml object, right? How?
    Thanks,
    Keith

    As an example of a JWS that expects and XML Object, try a method like the following:
    public XmlObject simpleXmlObject(noNamespace.PurchaseOrderDocument poDoc){
    return XmlObject.Factory.parse("<newXml>"+poDoc.xmlText()+"</newXml>");
    where noNamespace.PurchaseOrderDocument comes from compiling the po.xsd that is available in the W3C XML Schema spec.
    From your URL it appears you are trying to use a REST style web service. Is this correct?
    You will NOT be able to invoke this method via a get query like you mention below. For you to invoke this method you should use SOAP over HTTP.
    Are you still having problems with this?

  • Can Designer generate ADF Entity Objects, View Objects and Apps Module ?

    Hi all,
    On what way can Designer integrate with JDeveloper (+ ADF) ?
    Can Designer generate ADF Entity Objects, View Objects and Apps Module ?
    Thank you for your help,
    xtanto

    Designer itself has no direct integration with JDeveloper. However, there are three options. First of all, you can get a JDeveloper extension (download this separately) that lets you create a Connection to a Designer repository. From that Connection you can find modules that you defined in Designer and generate Entity and View objects for the tables and columns that you used in those modules, and an Application Module. It does not create JSPs or other user interface objects.
    Another option is to buy JHeadstart from Oracle. This contains a set of code generators and ADF extensions that include an ability to get information from a Designer repository. JHeadstart works fine for non-Designer users too, but was built by the same people who wrote Designer Headstart - they know the repository API intimately.
    The third option is to download Oracle Designer Extension Builder (ODEB) which was just recently made available. This is a product of a collaboration between Designer users from the Oracle Development Tools Users Group (ODTUG) and Oracle to extend the capabilities of Designer with user written tools and utilities. You could use ODEB to write your own generators for ADF Business Components. Or you could wait and see if someone else in the user community does this. I hope that you or whoever does such a generator will be willing to share it with us all.

  • Reg: bussiness object,condition object& customising object

    Hi,
    Can anybody help me out to know what is mean by Business Object,Condition Object & Customising object
    Thanks & regards
    Dibya

    A business object represents an actual object in the real business world. It describes an integral business context. This encapsulation leads to simplification, because the inner structuring of a business object remains hidden in additional nested objects. Business APIs as methods of business objects enable external systems to access R/3 System functions, via the Internet.
    Condition Object: You assign preconditions and selection conditions to the characteristic or characteristic value to which the condition applies.
    Customizing Object: A customizing object is an SAP component, to which a customizing object with the same contents in another component is assigned. The contents of the customizing objects have to be synchronized in different systems in a system landscape.

  • How to Capture the Objects in Object Library in Openscript tool?

    Hi All,
    I am new to OATS and i was trying to explore the Object Library in Opencript tool.
    Can anyone please advise me how to capture the Oracle forms Object in Object Library or Object Repository using OpenScript Tool?
    It would be grateful,If you can provide me the step to follow for the above.
    Thanks
    Ajith

    Hi Ajith,
    Create one Object Library. In OpenScript click File -> New -> Select Object Library under Script Assets.
    Then mention name of your library and save it.
    Add this library to script assets of your script. Select Script -> Script Properties... -> Script Assets -> Object Library -> Add(button) -> select your Object Library.
    Then save  your script and start recording. After recording you can see xpath of all objects you interacted with during your script recording.
    If you want to apply this to your script, select Script -> Apply Object Library.. -> then select your Object Library. If you want to revert it, then select Script --> Revert All Navigation To Recorded
    Hope this will help you...
    Regards,
    Deepu M

  • Error in MIGO :Number range object for object J_1IINTNUM, year 2010, excise

    Dear Experts,
                              While  posting  MIGO, System throws below error : 
    Mainintain number range object for object J_1IINTNUM, year 2010, excise
    Maiintain number range object for object J_1IRG23A1, year 2010, excise
    Maintain number range object for object J_1IRG23A2, year 2010, excise
    Actually we are posting the MIGO for the  fiscal year 2009, still i am getting error  why ?
    regards
    rajakarthik.

    check the posting date what u r puting , it should be on or  before 31/03/2010
    i think this is only the issue dont looks like any other issue
    or do one thing just o\go in SNRO and for J_1IINTNUM object put 9999 year and the number range
    and try to post your transaction in 2009
    hope this helps
    Edited by: Umakant Bhangale on Apr 1, 2010 10:22 AM

  • Sort table of objects by object attribute

    Hi all,
    I would like to write method for sorting table of objects. Sorting will be according selected attribute of object.
    My problem is that when I have dynamic data, I'm not able to access attributes of object. Here is example in code. Problematic lines are commented.
    If you have any idea how to solve it, I will be very happy.
    CLASS lcl_reflection DEFINITION CREATE PUBLIC.
      PUBLIC SECTION.
        CLASS-METHODS: sort_object_table_by_field IMPORTING field_name   TYPE char72
                                                            direction    TYPE c DEFAULT 'A'
                                                  CHANGING  object_table TYPE table.
    ENDCLASS.                    "lcl_reflection DEFINITION
    CLASS lcl_reflection IMPLEMENTATION.
      METHOD sort_object_table_by_field.
        DATA: obj_type_desc   TYPE REF TO cl_abap_refdescr,
              cls_type_desc   TYPE REF TO cl_abap_classdescr,
              tab_type_desc   TYPE REF TO cl_abap_tabledescr,
              elm_type_desc   TYPE REF TO cl_abap_elemdescr,
              struc_type_desc TYPE REF TO cl_abap_structdescr,
              line            TYPE REF TO data,
              tab             TYPE REF TO data,
              object          TYPE REF TO data,
              lt_component TYPE cl_abap_structdescr=>component_table,
              ls_component LIKE LINE OF lt_component.
        FIELD-SYMBOLS: <object> TYPE any,
                       <tab>    TYPE table,
                       <line>   TYPE any,
                       <value>  TYPE any.
        READ TABLE object_table INDEX 1 ASSIGNING <object>.
        cls_type_desc ?= cl_abap_classdescr=>describe_by_object_ref( <object> ).
        elm_type_desc ?= cls_type_desc->get_attribute_type( field_name ).
        obj_type_desc ?= cl_abap_refdescr=>create( cls_type_desc ).
        UNASSIGN <object>.
        ls_component-name = 'key'.
        ls_component-type = elm_type_desc.
        APPEND ls_component TO lt_component.
        ls_component-name = 'object'.
        ls_component-type ?= obj_type_desc.
        APPEND ls_component TO lt_component.
        struc_type_desc ?= cl_abap_structdescr=>create( lt_component ).
        tab_type_desc ?= cl_abap_tabledescr=>create( p_line_type  = struc_type_desc
                                                     p_table_kind = cl_abap_tabledescr=>tablekind_std
                                                     p_unique     = abap_false ).
        REFRESH lt_component.
        CLEAR ls_component.
        CREATE DATA line TYPE HANDLE struc_type_desc.
        CREATE DATA tab TYPE HANDLE tab_type_desc.
        CREATE DATA object TYPE HANDLE obj_type_desc.
        ASSIGN tab->* TO <tab>.
        ASSIGN line->* TO <line>.
        ASSIGN object->* TO <object>.
        LOOP AT object_table REFERENCE INTO object.
          APPEND INITIAL LINE TO <tab> REFERENCE INTO line.
          ASSIGN object->* TO <value>.
          ASSIGN line->* TO <line>.
    *      <line>-key = <value>->(field_name).
    *      <line>-object = object.
        ENDLOOP.
    *    SORT <tab> BY key.
    *    LOOP AT <tab> REFERENCE INTO line.
    *      APPEND INITIAL LINE TO object_table REFERENCE INTO object.
    *      object = line-object.
    *    ENDLOOP.
      ENDMETHOD.                    "sort_object_table_by_field
    ENDCLASS.                    "lcl_reflection IMPLEMENTATION

    Ok guys, it's solved. It was little bit more complicated then I expected. Thanks for you help.
    METHOD sort_object_table_by_field.
        TYPES: t_object TYPE REF TO object.
        DATA: obj_type_desc   TYPE REF TO cl_abap_refdescr,
              cls_type_desc   TYPE REF TO cl_abap_classdescr,
              tab_type_desc   TYPE REF TO cl_abap_tabledescr,
              elm_type_desc   TYPE REF TO cl_abap_elemdescr,
              struc_type_desc TYPE REF TO cl_abap_structdescr,
              r_line          TYPE REF TO data,
              r_tab           TYPE REF TO data,
              r_object        TYPE REF TO data,
              r_obj           TYPE REF TO data,
              lt_component TYPE cl_abap_structdescr=>component_table,
              ls_component LIKE LINE OF lt_component.
        FIELD-SYMBOLS: <object>    TYPE any,
                       <obj>       TYPE REF TO object,
                       <tab>       TYPE table,
                       <line>      TYPE any,
                       <key>       TYPE any,
                       <fs_key>    TYPE any,
                       <fs_object> TYPE any.
        READ TABLE object_table INDEX 1 ASSIGNING <object>.
        cls_type_desc ?= cl_abap_classdescr=>describe_by_object_ref( <object> ).
        elm_type_desc ?= cls_type_desc->get_attribute_type( field_name ).
        obj_type_desc ?= cl_abap_refdescr=>create( cls_type_desc ).
        UNASSIGN <object>.
        ls_component-name = 'key'.
        ls_component-type = elm_type_desc.
        APPEND ls_component TO lt_component.
        ls_component-name = 'object'.
        ls_component-type ?= obj_type_desc.
        APPEND ls_component TO lt_component.
        struc_type_desc ?= cl_abap_structdescr=>create( lt_component ).
        tab_type_desc ?= cl_abap_tabledescr=>create( p_line_type  = struc_type_desc
                                                     p_table_kind = cl_abap_tabledescr=>tablekind_std
                                                     p_unique     = abap_false ).
        REFRESH lt_component.
        CLEAR ls_component.
        CREATE DATA r_line TYPE HANDLE struc_type_desc.
        CREATE DATA r_tab TYPE HANDLE tab_type_desc.
        CREATE DATA r_object TYPE HANDLE obj_type_desc.
        CREATE DATA r_obj TYPE REF TO object.
        ASSIGN r_tab->* TO <tab>.
        LOOP AT object_table REFERENCE INTO r_object.
          APPEND INITIAL LINE TO <tab> REFERENCE INTO r_line.
          ASSIGN r_object->* TO <object>.
          ASSIGN r_obj->* TO <obj>.
          MOVE <object> TO <obj>.
          ASSIGN <obj>->(field_name) TO <key>.
          ASSIGN r_line->* TO <line>.
          ASSIGN COMPONENT 'KEY' OF STRUCTURE <line> TO <fs_key>.
          ASSIGN COMPONENT 'OBJECT' OF STRUCTURE <line> TO <fs_object>.
          <fs_object> = <object>.
          <fs_key> = <key>.
        ENDLOOP.
        DATA: sort_field TYPE fieldname.
        sort_field = 'KEY'.
        SORT <tab> BY (sort_field).
        REFRESH object_table.
        LOOP AT <tab> REFERENCE INTO r_line.
          APPEND INITIAL LINE TO object_table REFERENCE INTO r_object.
          ASSIGN r_line->* TO <line>.
          ASSIGN r_object->* TO <object>.
          ASSIGN COMPONENT 'OBJECT' OF STRUCTURE <line> TO <fs_object>.
          <object> = <fs_object>.
        ENDLOOP.
      ENDMETHOD.

  • Keep getting this prompt when I close a tab: ASSERT: Giving up waiting for the tab closing animation to finish (bug 608589) Stack Trace: 0:([object XULElement],[object XULElement],0) How do I get rid of it?

    ASSERT: Giving up waiting for the tab closing animation to finish (bug 608589)
    Stack Trace:
    0:([object XULElement],[object XULElement],0)
    Happening since I went to the 4.0b9 beta. Thanks for any help in getting rid of it.

    They're still working on fixing that Bug - https://bugzilla.mozilla.org/show_bug.cgi?id=608589 - a fix for another Bug - https://bugzilla.mozilla.org/show_bug.cgi?id=613888 - landed earlier this week which might have fixed it. Unless you are willing to install a nightly Trunk which has the latest fixes, you'll have to wait for 4.0b10 for the fix.

  • [AGENT] socket error: [object XrayWrapper [object Event]]; readyState=3. Perhaps Helper is not running on ws://127.0.0.1:14821/2 or is shutting down? console.error: onepassword:

    hi
    in terminal, i am seeing this message.
    [AGENT] socket error: [object XrayWrapper [object Event]]; readyState=3. Perhaps Helper is not running on ws://127.0.0.1:14821/2 or is shutting down?
    is something missing that should be running
    i dont understand this message
    thankyou

    solved. was a firefox addon called 1password
    solved by deleting the desktop version of hte app and reinstalling
    1password support was useless. didnt even know a piece of their own software.  suggested it was a ffox profile issue. red herring.

  • Differences between object and object references

    What's the differences between object and object references? To me, it seems the same, but I am sure there are differences.
    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an object reference of class Student?
    Please clarify. thanks!!

    Student s = new Student("Joe",20);
    s is an object of class Student. Can we say s is an
    object reference of class Student?The thing you created via "new Student()" is an object. The variable you declared via "Student s" contains a reference to that object. People say all kinds of things but I find it clearer to differentiate between variables and the objects they refer to.

  • How to typecast Object Class object dynamically

    Hai every one
    i have a object of any particular class , but i don't know the variables in that class object. But i have string variable contains value of variables in that class object.
    So i use following method for get value of variables in that class object.
    class ObjectCLass
         Sub s=new Sub();
         public static void main(String[] args)
              ObjectCLass a=new ObjectCLass();
              try
                   System.out.println(*a.getClass().getDeclaredField("s").get(a)*);
              catch(Exception e)
                   System.out.println("Exception");
    class Sub
         int i=5;
         public void print()
              System.out.println("Hello World!");
    }Here the bolder line give Object class object. By using this Object class object i need access the variable i and method print(). So i need to cast Object class object into sub class
    so how can i typecast it
    i try with following methods , but i cant succeed
    1.(  *(a.getClass().getDeclaredField("s").get(a).getClass)*   a.getClass().getDeclaredField("s").get(a)   ).print() ;
    2.(  (Class.forName(�Sub�) ) a.getClass().getDeclaredField("s").get(a) ).print();Please any one one help me how to typecast it dynamically
    By
    Thiagu

    If you know you're going to invoke the "print" method on an object, then you also need to know the type of the class, or interface, which has that method.
    It seems what you are looking for is a tutorial on interfaces.
    http://java.sun.com/docs/books/tutorial/java/IandI/index.html
    In a nutshell, you can set up an interface which defines a "print" method, and create class(es) which implement that interface. Then as long as you have an object which implements that interface, but do not know the exact type of that object, you can simply cast it to the interface type and invoke the method.

  • Can anyone clarify me about the api Object[] toArray(Object[])

    There are two apis in Collections framework to convert the Collection elements into an array
    1. Object[] toArray()
    2. Object[] toArray(Object[])
    Can some one explain me what does the second api - Object[] toArray(Object[]) does ?

    Just read the javadoc API of the Collection interface: toArray() just returns an Object[]. But if you need for example a String[] as result use
    String[] sa = o.toArray(new String[0]);

  • How to recompile object (by object id)

    Hi All,
    I have Oracle 11.1.0.7 on Enterprise Linux 5.2 64-bit. During the import (inserting many rows) the ORA-600 [17059] [0x1C7912FF8] [0x1C79129C0] [0x1CF9B9760] have appeared. I found on metalink document corresponding to this error- 138554.1. The suggestion is to recompile “dependent object” that are listed by given sql.
    How can I recompile object having object id?
    Please help.
    Groxy

    First you have to find object name using following query than you can recompile:
    SQL> select owner, object_name, object_id, status, object_type
      2  from dba_objects
      3  where object_id = 71176
      4  /
    OWNER                          OBJECT_NAME                OBJECT_ID STATUS  OBJECT_TYPE
    A                              MY_FUNC                            71176 VALID   FUNCTION
    Then you can recompile based on object type:
    SQL> alter function a.my_func compile
      2  /
    Function altered.With kind regards
    Krystian Zieja

Maybe you are looking for

  • RFC_ERROR while calling RFC FM from XI

    Hi Guys,               I am getting following error in the XI Monitor <rfc:ZFIBAPI_ACC_DOCUMENT_POST.Exception xmlns:rfc="urn:sap-com:document:sap:rfc:functions"><Name>RFC_ERROR_SYSTEM_FAILURE</Name><Text>Type conflict when calling a function module.

  • Sort Index Size failed in file

    Hi Experts, Do you have any idea why we get this error in MDS log file? I am sure you must have come across it, what could be a fix for it? We have observed Log info "Sort Index Size failed in file" logged into MDS Log file while doing following: It

  • 3 Problems with the 40UL605U

    Problem number 1) The TV has the SAME exact problem as the Toshiba 40G300U with the Handshake with Netflix and the Xbox 360 with HDCP . Jim, I was reading your posts and was wondering if you could forward this one along to the tech guys as I called a

  • Enum - core java II example

    hi the following code is an example taken from 'core java II'-book. what i don't understand is where the enum constructor is called to set the abbreviation field anyone care to explain ? thanks import java.util.*; public class EnumTest {     public s

  • I can not reset my new email pasword on my phone.

    hello there!, my wireless provider AT&T told me to contact you directly about my issue with my phone. I got the torch 9800, and just recently I stoped geting my Emails over the phone. I changed my email pasword few days back on my desk top computer,