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.

Similar Messages

  • Transferring object graph over RMI

    Hi all,
    I'm designing a client-server thingy, and am intending it to communicate over RMI. I'm currently designing a filter mechanism to let the client see a certain subset of the state (essentially an object graph), manipulate this, and transfer updates of it back to the server, which then are propagated to the other clients and so on.
    Any tips and tricks to take into account when transfering interconnected objects over RMI? (They don't need remove references, apart from the state transfer process, all local references are sufficient.) Also, I'd like to not transfer the entire "graph", only updates to it as they happen.
    I have a couple of ideas, I'd just like to hear your input before I dwelve more into the mechanics of them..
    Thanks!
    /C

    Go for it.
    Just think clearly about where the objects exist, and what get's transferred:
    o What objects are on the clients?.
    o What is a shared remote object?
    o What objects get passed from client to server? What objects are returned to clients?

  • My computer broke and i lost all files including ITunes. what happens to all the stuff purchased already. will this appear in itues when i download it agian? how can i save the music on my ipod and transfere it over to the new itunes?

    my computer broke and i lost all files including ITunes. what happens to all the stuff purchased already. will this appear in itues when i download it agian? how can i save the music on my ipod and transfere it over to the new itunes?

    Unfortunely, all movies and songs purchased in iTunes will be lost...you'll have to purchase them again! Any applications you've purchased, you can download again for free.
    Music Rescue is a program you can use to transfer any and all data (music, movies, pictures..) from your iPod to your computer, and iTunes.
    http://www.kennettnet.co.uk/products/musicrescue/

  • Problem in passing/returning objects over dynamic web service call

    Hi Friends,
    I am beginner in java web service.
    Here is the problem I am facing when I pass/return user defined objects to remote web service method using dynamic we service call.
    The client can call the remote web service method in 2 ways.
    1. By generating client stubs using WSDL file
    - In this case, I am able to pass/return the user defined objects to remote method without any issue only when the server side web services are deployed in any server(jboss)
    - But in java 1.6 & above, the web services can be deployed without server using endpoint. In this case, I am not able to pass/return objects over web service calls.
    2. Without generating client stubs (dynamic web service call)
    - This will establish a connection at run time using the given WSDL file (I have attached the document). I have to form an XML(This will contain API name, arguments) string as input at run time
    - In this case, it allows only string as argument while passing & returning.
    Please let me know if you can help me on this.
    Regards,
    pani

    I'm not sure about your question, but this might help:
    [http://forum.java.sun.com/thread.jspa?threadID=5251188|http://forum.java.sun.com/thread.jspa?threadID=5251188]
    You might also want to read on JAXB.

  • 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 do I write objects over a SocketChannel?

    Using the regular Socket class we can pass objects over sockets like this.
    Socket s = new Socket("127.0.0.1", 80);
    ObjectOutputStream out = new ObjectOutputStream(s.getOutputStream());
    out.writeObject(new Object());
    Now, I've looked through the documentation on the new Channel classes and have only seen ways to pass bytes over the channel, not an entire object. Is there an easy way to pass an entire object over a channel? Am I just missing an appropriate wrapper that adds this functionality?
    Thanks,
    Dave

    This code will help you converting an Object to a byte[]:
    //Object to send MUST implement Serializable
    SerializedObject anObject = new SerializedObject();
    //byte[] needed to send
    byte[] aByteArray = null;
    //the conversion
    java.io.ByteArrayOutputStream aByteArrayOutputStream = new java.io.ByteArrayOutputStream();
    java.io.ObjectOutputStream aObjectOutputStream = new java.io.ObjectOutputStream(aByteArrayOutputStream);
    aObjectOutputStream.writeObject(anObject);
    aObjectOutputStream.close();
    aByteArray = aByteArrayOutputStream.toByteArray();
    //When you receive the Object you should reverse the conversion
    //byte[] reveived from InputStream
    byte[] aReceivedByteArray;
    //Expected Object
    SerializedObject theExpectedObject = null;
    //the conversion
    java.io.ByteArrayInputStream aByteArrayInputStream = new java.io.ByteArrayInputStream(aReceivedByteArray);
    java.io.ObjectInputStream aObjectInputStream = new java.io.ObjectInputStream(aByteArrayInputStream);
    theExpectedObject = aObjectInputStream.readObject();
    That's one way to do it.
    You should watch out with Serializable object when sending it to another OS or JRE-version.

  • Recently bought new macbook pro , transferred data over and thought microsoft office would work on new laptop. Icons are there , although don't have my key codes!! should i just buy new software package ?

    recently bought new macbook pro , transferred data over and thought microsoft office would work on new laptop. Icons are there , although requires key codes and I don't have my key codes anymore as dog chewed the packaging!! should i just buy new software package ?  I am told that this is a microsoft issue not a mac issue !! But all my other data on the old macbook pro transferred over even the icons for office for mac on the bottom app bar. only now I can't open any of my word or excel files without key code! I thought that there may have been something that could be done before having to bite the bullet and fork out for new software package.??

    If this is Office for Mac 2011 then it will work on your new computer. Reinstall it. If you don't have the key code call Microsoft's activation line to get a new key code. Explain that you lost the original key code and want to install Office on your new computer.

  • Business Objects over Enterprise portals

    Hi all,
    Anyone done projects with Business Objects on SAP BW ???
    Pls. let me know on related links.
    what are the pros and cons of using Business Objects over using Enterprise Portals.
    Points will be given for useful answers...
    Thanks,

    Hi Vaishali,
    Please check this link, it may useful to u
    http://help.sap.com/saphelp_nw04/helpdata/en/fc/f2ef41a0b99d39e10000000a155106/content.htm
    Thanks, KR

  • 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.

  • What is the use Business objects over WAD.

    Hi Folks,
    what is the use Business objects over WAD.
    How sap bw is going to use Business Objects.
    Thanks,
    Cheta.

    hi,
    A business object is a master record within the Measurement System, and is defined as part of the measurement class within Customizing.
    Examples of business objects are wells, well completions, and measurement points.
    Once the measurement object is maintained, it is saved with the business object so that when viewed, the measurement object is part of the business object.
    regards,
    Siddharth.

  • URGENT : Pass non-serializable objects over sockets

    I am working with a non-serializable class.I can't change it to serializable(since it's an API class).I can't create a subclass either as I need to pass the same exact Object .I have tried wrapping it in a serializable class (as transient )but then the particular object that I need is not serialized.Is there a way to pass non-serializable objects over sockets?.Some other way of doing this?. Should i use RMI or Externalize?. Any help would be appreciated.

    {snip}
    Like this:
    public class SerializableLibraryClass extends
    LibraryClass implements Serializable {
    }Then you've got a class that is exactly the same as
    LibraryClass, but is now serializable.Not quite. The base class still isn't Serializable. Take, for example, the following code:
    public class A
        public int a1;
    public class B extends A implements Serializable
        public int b1;
    B beforeSend = new B();
    beforeSend.a1 = 1;
    beforeSend.b1 = 2;
    objectOutputStream.writeObject(b);
    B afterSend = (B)(objectInputStream.readObject());Both beforeSend and afterSend have fields a1 and b1. For beforeSend, a1 = 1 and b1 = 2. For afterSend, b1 = 2 but a1 = 0. The superclass wasn't Serializable; therefore, its members weren't Serialized and, when the object was created on the other side of the stream, a1 was left at its initial value.
    In short, you can't just Serialize the subclass. That Serialization won't apply to its superclasses.

  • Entity Object over XML file

    USing Jdeveloper 11.1.1.0.2+ADF
    Have anybody implemented an entity object over a XML file, i want to store some informations into a XML before connect to a database (the connection information) and be able to modify the data (create rows) using AF forms and tables.
    Edited by: Fernando Ferpa Hackbart on Jun 18, 2009 5:39 PM

    you have to write your own save/load functions, since you have to build your personnel xml document and then serilaize it
    you can use nu.xom at this url
    http://www.cafeconleche.org/XOM/apidocs/nu/xom/package-summary.html
    to parse your document

  • Pass non-serializable objects over sockets

    I am working with a non-serializable class.I can't change it to serializable(since it's an API class).I can't create a subclass either as I need to pass the same exact Object .I have tried wrapping it in a serializable class (as transient )but then the particular object that I need is not serialized.Is there a way to pass non-serializable objects over sockets?.Some other way of doing this?.

    Have you considered leaving it in situ and using RMI to manipulate it remotely ?
    To be a little pedantic, if you need the "same exact object" then there's no technique that will work for you, since you can only copy an object between JVMs, not move it.
    D.

  • 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();
    }

  • 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

Maybe you are looking for

  • Since the 5.1.1 update my iPhone no longer connects to 3g

    it just shows the little circle no matter what i do i tried hard reset reset network settings toggle airplane mode

  • Lumira Server Installation on HANA Options

    Dear All, I have asked this Question to SAP Lumira support team , i am awaiting for their response. Lumira experts please help me with the query in case if you an answer We have ECC 6.0 running on HANA DB and now migrating BW database also to HANA DB

  • DFS Replication doesn't work. Windows server 2012. Failed to communicate with partner. Error 5012.

    Hi! I really confused with this error. I created replication group within two servers - AD domain controller and File server. I just want to migrate some files from AD domain controller to FS. But synchronization doesn't work. I get the error - DFS R

  • Reference type clarification

    I was studying the training CD from Sun Java and at one point it says that a variable of type of a certain object keeps the value of the allocated memory for the object rather than the object itself. So far so good So if the we have the following: My

  • Inventory Management - Best Processes Documentation

    Dear All, We have recently implemented SAP in our organization. And we have mapped as such our process in sap. Now we want to know either the our processes regarding Inventory Management are best or not. So I want to get the complete documentation of