Write a client which send and recieve objects.

Hi,
I'm creating webservices that send objects but i don't manage to create a client (java) as somebody who will just see the WSDL.
The specific method of the webservice I want to call from a client is that:public Person sendObject(Person pers) throws RemoteException{
          pers.setName("+"+pers.getName());
          return pers;
     }Here is the exemple of my generated WSDL.<?xml version="1.0" encoding="UTF-8"?>
<definitions name='myWebService' targetNamespace='http://com.emailvision/ws/ccmd/docstyle'
xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:ns1='http://com.emailvision/ws/ccmd/docstyle/types'
xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/'
xmlns:tns='http://com.emailvision/ws/ccmd/docstyle'
xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
<types>
  <schema targetNamespace='http://com.emailvision/ws/ccmd/docstyle/types'
xmlns='http://www.w3.org/2001/XMLSchema' xmlns:soap11-enc='http://schemas.xmlsoap.org/soap/encoding/'
xmlns:tns='http://com.emailvision/ws/ccmd/docstyle/types' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
   <complexType name='sendObject'>
    <sequence>
     <element name='Person_1' nillable='true' type='tns:Person'/>
    </sequence>
   </complexType>
   <complexType name='sendObjectResponse'>
    <sequence>
     <element name='result' nillable='true' type='tns:Person'/>
    </sequence>
   </complexType>
   <complexType name='Person'>
    <sequence>
     <element name='name' nillable='true' type='string'/>
    </sequence>
   </complexType>
   <element name='sendObject' type='tns:sendObject'/>
   <element name='sendObjectResponse' type='tns:sendObjectResponse'/>
  </schema>
</types>
<message name='myWebService_sendObject'>
  <part element='ns1:sendObject' name='parameters'/>
</message>
<message name='myWebService_sendObjectResponse'>
  <part element='ns1:sendObjectResponse' name='result'/>
</message>
<portType name='myWebService'>
  <operation name='sendObject'>
   <input message='tns:myWebService_sendObject'/>
   <output message='tns:myWebService_sendObjectResponse'/>
  </operation>
</portType>
<binding name='myWebServiceBinding' type='tns:myWebService'>
  <soap:binding style='document' transport='http://schemas.xmlsoap.org/soap/http'/>
  <operation name='sendObject'>
   <soap:operation soapAction=''/>
   <input>
    <soap:body use='literal'/>
   </input>
   <output>
    <soap:body use='literal'/>
   </output>
  </operation>
</binding>
<service name='myWebService'>
  <port binding='tns:myWebServiceBinding' name='myWebServicePort'>
   <soap:address location='REPLACE_WITH_ACTUAL_URL'/>
  </port>
</service>
</definitions>If you can give me a client source code i'll be very happy.
Thanks !
Yann.

read JAX-WS documentation for client creation. it is rather simple

Similar Messages

  • Cannot send and read objects through sockets

    I have these 4 classes to send objects through sockets. Message and Respond classes are just for
    trials. I use their objects to send &#305;ver the network. I do not get any compile time error or runtime error but
    the code just does not send the objects. I used object input and output streams to send and read objects
    in server (SOTServer) and in the client (SOTC) classes. When I execevute the server and client I can see
    that the clients can connect to the server but they cannot send any objects allthough I wrote them inside the main method of client class. This code stops in the run() method but I could not find out why it
    does do that. Run the program by creating 4 four classes.
    Message.java
    Respond.java
    SOTC.java
    SOTServer.java
    Then execute server and then one or more clients to see what is going on.
    Any ideas will be appreciated
    thanks.
    ASAP pls
    //***********************************Message class**********************
    import java.io.Serializable;
    public class Message implements Serializable
    private String chat;
    private int client;
    public Message(String s,int c)
    client=c;
    chat=s;
    public Message()
    client=0;
    chat="aaaaa";
    public int getClient()
    return client;
    public String getChat()
    return chat;
    //*******************************respond class*****************************
    import java.io.Serializable;
    public class Respond implements Serializable
    private int toClient;
    private String s;
    public Respond()
    public Respond(String s)
    this.s=s;
    public int gettoClient()
    return toClient;
    public String getMessage()
    return s;
    //***********************************SOTServer*********************
    import java.io.*;
    import java.net.*;
    import java.util.Vector;
    //private class
    class ClientWorker extends Thread
    private Socket client;
    private ObjectInputStream objectinputstream;
    private ObjectOutputStream objectoutputstream;
    private SOTServer server;
    ClientWorker(Socket socket, SOTServer ser)
    client = socket;
    server = ser;
    System.out.println ("new client connected");
    try
    objectinputstream=new ObjectInputStream(client.getInputStream());
    objectoutputstream=new ObjectOutputStream(client.getOutputStream());
    catch(Exception e){}
    public void sendToClient(Respond s)
    try
    objectoutputstream.writeObject(s);
    objectoutputstream.flush();
    catch(IOException e)
    e.printStackTrace();
    public void run()
    do
    Message fromClient;
    try
    fromClient =(Message) objectinputstream.readObject();
    System.out.println (fromClient.getChat());
    Respond r=new Respond();
    server.sendMessageToAllClients(r);
    System.out.println ("send all completed");
    catch(ClassNotFoundException e){e.printStackTrace();}
    catch(IOException ioexception1)
    ioexception1.printStackTrace();
    break;
    Respond k=new Respond();
    sendToClient(k);
    }while(true);
    public class SOTServer
    ServerSocket server;
    Vector clients;
    public static void main(String args[]) throws IOException
    SOTServer sotserver = new SOTServer();
    sotserver.listenSocket();
    SOTServer()
    clients = new Vector();
    System.out.println ("Server created");
    public void sendMessageToAllClients(Respond str)
    System.out.println ("sendToallclient");
    ClientWorker client;
    for (int i = 0; i < clients.size(); i++)
    client = (ClientWorker) (clients.elementAt(i));
    client.sendToClient(str);
    public void listenSocket()
    try
    System.out.println ("listening socket");
    server = new ServerSocket(4444, 6);
    catch(IOException ioexception)
    ioexception.printStackTrace();
    do
    try
    ClientWorker clientworker=new ClientWorker(server.accept(), this);
    clients.add(clientworker);
    clientworker.start();
    catch(IOException ioexception1)
    ioexception1.printStackTrace();
    while(true);
    protected void finalize()
    try
    server.close();
    catch(IOException ioexception)
    ioexception.printStackTrace();
    //*************************SOTC***(client class)*********************
    import java.io.*;
    import java.net.Socket;
    import java.net.UnknownHostException;
    class SOTC implements Runnable
    private Socket socket;
    private ObjectOutputStream output;
    private ObjectInputStream input;
    public void start()
    try
    socket= new Socket("127.0.0.1",4444);
    input= new ObjectInputStream(socket.getInputStream());
    output= new ObjectOutputStream(socket.getOutputStream());
    catch(IOException e){e.printStackTrace();}
    Thread outputThread= new Thread(this);
    outputThread.start();
    public void run()
    try
    do
    Message m=new Message("sadfsa",0);
    output.writeObject(m);
    Respond fromServer=null;
    fromServer=(Respond)input.readObject();
    }while(true);
    catch(NullPointerException e){run();}
    catch(Exception e){e.printStackTrace();}
    public SOTC()
    start();
    public void sendMessage(Message re)
    try
    Message k=new Message("sdasd",0);
    output.writeObject(k);
    output.flush();
    catch(Exception ioexception)
    ioexception.printStackTrace();
    System.exit(-1);
    public static void main(String args[])
    SOTC sotclient = new SOTC();
    try
    System.out.println("client obje sonrasi main");
    Message re=new Message("client &#305;m ben mesaj bu da iste",0);
    sotclient.sendMessage(re);
    System.out.println ("client gonderdi mesaji");
    catch(Exception e) {e.printStackTrace();}

    ObjectStreams send a few bytes at construct time. The OutputStream writes a header and the InputStram reads them. The InputStream constrcutor will not return until oit reads that header. Your code is probably hanging in the InputStream constrcutor. (try and verify that by getting a thread dump)
    If that is your problem, tolution is easy, construct the OutputStreams first.

  • Since updating to iOS 6 I no longer can hear the send and recieve text sounds when texting

    Updated to IOS 6 yesterday and now I am having trouble hearing the text "swoosh" or whatever it is called while in a converstation the sound you hear when you send one or recieve one. Also when my phone is switched to vibrate mode when I receive a text message all my phone does is light up and it dosn't not vibrate which stinks cuz if it is my pocket I don't know if I'm getting a text message. I went into the message settings to try and set a vibrate tone for when recieveing a text and It won't even vibrate when I click on an option or click to create my own vibration pattern. My phone still however vibrates when I recieve an email or when someone calls me ect.... just not on texts and no sound when in a text conversation as in sent and recieved sounds. My sister, and both my parents updated to IOS 6 yesterday and they are having not probems of any sort? Anyone else have this problem and know of a solution? Ive already tried resetting my phone thinking maybe it was a glitch but still have the same problems.

    I figured out my problem...... I have custom text tones set up for certain ppl and had the default text tone set to "none" well with the iOS6 update it made it so if your default text tone is set on "none" then you won't hear what I call the send and recieve text sounds when in a converstation... if you change the default text tone to any text tone other than "none" you will get your send and recieve sounds back.... kinda annoying if you don't won't random texts from ppl waking you up... so I made a custon text tone that is called silence with just recording a few seconds of dead noise then edited it and turned all the sound levels down to 0 and set that as my default text tone.... now I have the send and recieve text sounds in a conversation and everything is fine! Sorry Nehucskter the first time I had this problem thats the first thing I did was reboot my phone.... first thing you do for everything lol....

  • Sender and reciever tabs of a Business systems

    Hi,
    I use XI 3.0 TCC version.
    My doubt is reated Integration Directory.
    When i assign Business system XXXXXX.
    The sender and reciever tabs of the business systems are populated with some standard and user defined
    Name Namespace and Software component versions.
    and i want to know y does this happen.
    Thanks
    Pradeep

    Hi Pradeep,
      i have understood what is ur doubt.
    Suppose u want to create a Business system of type WebAS ABAP.
    When u create a BS it will ask for a Technical system and client associated with it.After filling this u can see the installed product and all the Software component associated with it.u can see this due to dependency.
    Thats why ..when u import the BS in ID .. u can see the SWCVs and the namespaces.
    Sometimes the BS is used as a sender and sometimes rcvr.
    Regards
    Biplab

  • Outbound IDOC - Sender and reciever

    Hello SDNites,
    I have created a report pgm which is equipped to send an outbound IDOC i.e used FM 'MASTER_IDOC_DISTRIBUTE'. Can someone please tell me how do I decide my sender and reciever when populating the control record in this FM.
    I know sender will be my system and reciver will be third party system but can you please tell me what values need to be opulated there or

    Thanks for the information,
    Can you please give the info in following form,
    1. Partner profile configuration with the values in your system.
    2. Code snippet where control records are poulated for Outbound IDOC with the values you specified in step 1.
    This will help me in understanding the same.
    Regards,
    Abhi

  • SAP TDMS add on setup on central/control , sender and reciever systems

    I found that SAP TDMS is shipped in the following add-ons:
    DMIS: Contains general functions, for example for the process monitor and for the technical data transfer
    DMIS_CNT: Contains TDMS-specific functions and some of the process types
    DMIS_EXT: For various additional process types (reduction scenarios) for SAP TDMS; currently, it contains only the process   type for business process library
    DMIS_BSC: For the process types to be used with SAP BI or CRM systems
    DMIS_HR: For the process types to be used in the context of SAP Human Capital Management (HCM)
    I have read TDMS master guide under section 3.4.1 Setting up the TDMS Server. There is a reference to SAP Note 970531 which is for DIMS setup and there is also reference to SAP note 970532 which is for DMIS_CNT setup.
    I would like to know if DMIS_EXT,DMIS_BSC and DMIS_HR need to be setup on TDMS central/control server , sender and reciever or only need to be setup on central/control server for respective scenario realization.
    Best Regards
    Mohammed Ashraf

    All the add-on components need to be installed in all the system (sender, receiver, central, control) in the landscape.

  • I am new to the ethernet communicat​ion using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.

    i am new to the ethernet communication using labview. I do not have any hardware. I have two laptop i need to send and recieve the data via these 2 laptop using labview. Kindly help me on this.
    Solved!
    Go to Solution.

    Hi thanks for the help.
    Actually i am trying to send 10 sine signals from server pc to client pc. So i will bundle 10 signals in server pc and send it and in client pc i am unbundling it and need to save in TDMS format.
    Till unbundling i was able to do. TDMS format it is saving only last value. I need to save all the values. Kindly help me on same. I am attaching both the VI.
    Attachments:
    Client.vi ‏62 KB
    Server.vi ‏252 KB

  • I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating poin

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...I am a newbie to labview but have delt with plc's for the last 10 years. I would like to send and recieve certain integer, floating point, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right dir
    ection...

    t, or binary files through the plc or micrologix communication port. This would allow me to build a front panel and change certain states of bits or retrieve data from certain files to display on the front panel. Please steer me in the right direction...Another option is to talk to the PLC using Modbus. Several versions of Modbus drivers are available online--or I could send you the ones I use.
    The big thing to look at is exactly what you want to do in the end. If you are going to be able to use all the features of the DSC, by all means go for it. It will save you a lot of time.
    If however, all you want is a remote front panel for the PLC, the DSC might be overkill. Only you can say.
    Look at your entire application and where you can see your work going in the reasonable future.
    Mike...
    Certified Professional Instructor
    Certified LabVIEW Architect
    LabVIEW Champion
    "... after all, He's not a tame lion..."
    Be thinking ahead and mark your dance card for NI Week 2015 now: TS 6139 - Object Oriented First Steps

  • I have my Dad's apple ID etc, but he has an iphone and i have an Ipod Touch then on IMessage i can read all the messages he recieves and sends and he can read all the messages i send and recieve how do i stop this?

    Hi
    I have my Dad's apple ID etc, but he has an iphone and i have an Ipod Touch then on IMessage i can read all the messages he recieves and sends and he can read all the messages i send and recieve how do i stop this? But i still want to send messages to him.
    Thank You

    . You do not need a seperate Apple ID. One one device you just need to go to Settings>Messages and add another/different Messaging email address and delete the common Apple ID address. Also see:
    MacMost Now 653: Setting Up Multiple iOS Devices For Messages and FaceTime

  • My imessages are gone. i cant activate them now. When i go into send and recieve its only my e-mail address thats ticked and not my phone number ticked also. When i sign in with my apple ID it is ticked there. can anyone help me please.

    my imessages are gone. i cant activate them now. When i go into send and recieve its only my e-mail address thats ticked and not my phone number ticked also. When i sign in with my apple ID it is ticked there. can anyone help me please.

    Hi,
    Go to the iPhone
    GO to Settings > Messages
    Is the iPhone Number ticked to be enabled (It will be greyed out and not editable but should be On)
    If it is Off (Unticked remove the Apple ID)
    Place the iPhone in Airplane mode for a few minutes.
    Go back to Settings Messages and make sure the Message app Is Enabled overall.
    Check the iPhone Number is verifying.
    When Completed test by sending an iMessage to your Apple ID (Mac)
    If that works add back the Apple ID to the iPhone's Settings.
    Restart the Mac App and Accept the op ups that appear as to what the iPhone is using.
    9:52 pm      Friday; April 4, 2014
    ​  iMac 2.5Ghz i5 2011 (Mavericks 10.9)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad

  • Airplay disconnecting when sending and recieving a message

    I use Airplay on my iPhone to stream music from the music app to my Apple TV. When sending and recieving a message over Skype or Facebook, my phone disconnects from Airplay, pausing the music.
    Is this a common issue, and are there any known fixes, or do i just have to wait for Apple to fix this in a future update?

    That is silly - Facebook message notifications are tiny.  You can't provide some vague hand waving dismissal of the problem and blame network throughput.
    I have the same issue - it's obviously a bug with iOS or Facebook.  Airplay shouldn't disconnect every time a new message arrives.  If I don't have Facebook open the same messages still arrive in the background and airplay works fine.
    The issue is specific to a foreground app receiving notifications and then Airplay craps out.
    Come on Apple, fix this!

  • File and photo and video sending and recieving

    I have been able to send and recieve videos photos and files till today. i have the latest skype version. The only thing i did different today was when asked if i wanted to accept the file i said yes and ticked the box for "do not ask again'' ..can i reverse that? and will it solve my problem?..thank you 

    What version of Windows are you on (XP, Vista, Windows 7, Windows 8 )? Is it 32-bit or 64-bit?
    http://support.microsoft.com/kb/827218
    What is the version of Internet Explorer installed on your computer?
    In Internet Explorer go to Help -> About Internet Explorer.
    P.S. Please, don’t say that you are not using Internet Explorer. This is irrelevant. Skype depends on Internet Explorer.

  • My NEW ipod touch stopped sending and recieving messages!

    My NEW ipod touch stopped sending and recieving messages even though I am connected to the internet and all other internet apps are working just fine.  I am just replying to messages sent to me.  Any suggestions as to the solution?

    This one
    http://www.apple.com/support/itunes/

  • Sending and recieving photos

    Does anyone know how I get the capability to send and recieve photos using the IPhone, I have the 8GB and it is far from full?

    That would not work if I'm sending and receiving from a person without e-mail capability on their phone. I used to be able to take a picture with my phone and send it a friends cell phone, is that not an option?

  • Send and recieving emails

    Are there some VI's that give the posibility to send and reciev emails?

    The internet toolkit has vi's that allow you to send email pragmatically. It does not include vi's to receive emails. I did, however, find some utilities on NI's site that allows you to receive mail in the POP protocol. Both work well.

Maybe you are looking for