Results 1 to 18 of 18

Thread: Sending XML

  1. #1
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default Sending XML

    Guys

    I am using soapUI to test a web service I have written snd it all works fine. Now I want to send the same request a large number of times to see how the web service copes.

    I decided to write a Java class to do that. How can I send the same XML as I have in soapUI using Java?

    Regards

    Patrick

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  3. #3
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    I did sarch the web but found nothing! Please rpovide a link if you found lots of things.

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  5. #5
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Yes, it is. I have the XML all build-up in soapUI and I want to send the same XML using Java. Can you help?

  6. #6
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  7. #7
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Thanks for the examples. They seem to wirte XML contents from a file to a servlet response. I already have the XML contnet is a String; how can I send this as is to a web service? Sorry if I wasn't clear enough at the start!

  8. #8
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  9. #9
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Yes. I have a web service running and I can invoke it using soapUI. It works as I am getting the expected response in soapUI.

  10. #10
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  11. #11
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Because I do noy know the ins and outs of calling a web service using Java!

  12. #12
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    So that's matter of you don't know how to call a web service in Java. Oh, I thought you stuck with how to send data through web calls.

    Invoking web services with Java clients

  13. #13
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  14. #14
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Thanks for taking the time to help me up this learning curve!
    I am looking at thast right now.
    I don't quite understand what the following are.

    namespace
    portNane
    operationName
    serviceName

    Please explain what those are.

  15. #15
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

  16. #16
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Is is the same as in the XML request?
    There are two in there!

  17. #17
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    19

    Default

    namespaces are conceptual space that group classes, variables, etc..

    Web service also could be a collection of classes and all, and web service can include namespaces accordingly.

  18. #18
    zzpprk is offline Member
    Join Date
    Aug 2009
    Posts
    26
    Rep Power
    0

    Default

    Do you mean the classes that are used to make-up the request and the response? I don't need to know anything about those classes as I will be sending raw XML.
    Am I getting confused?
    I certainly feel that way!

    I understand that portName is the full URL to the web service and operationName is the name of the method I am calling. What about serviceName?

Similar Threads

  1. Sending fax
    By mantas.brasiunas in forum New To Java
    Replies: 8
    Last Post: 07-04-2012, 04:43 AM
  2. Struts2 Sending URL
    By sandeep.ctg in forum Web Frameworks
    Replies: 0
    Last Post: 04-13-2010, 06:59 AM
  3. sending SMS between PC and mobile
    By Halayas in forum Sun Java Wireless Toolkit
    Replies: 6
    Last Post: 03-18-2010, 11:45 AM
  4. Sending emails using jms
    By rrkumar in forum Advanced Java
    Replies: 0
    Last Post: 10-15-2008, 03:14 PM
  5. Sending a Mail
    By haiforhussain in forum Advanced Java
    Replies: 7
    Last Post: 07-30-2008, 12:28 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •