Results 1 to 18 of 18
Thread: Sending XML
- 03-01-2011, 04:28 PM #1
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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
- 03-02-2011, 02:30 AM #2
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Did you search the web. Simple search listed very good articles related with what you want.
- 03-02-2011, 10:03 AM #3
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
I did sarch the web but found nothing! Please rpovide a link if you found lots of things.
- 03-02-2011, 10:06 AM #4
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Your basic requirement is to send and XML stream through a web service, right?
- 03-02-2011, 10:09 AM #5
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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?
- 03-02-2011, 10:16 AM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Following articles not explains what you want exactly. But it's possible to done what you want using as a guideline.
Another servlet to Send XML : Send File*«*Servlets*«*Java
Send XML : Send File*«*Servlets*«*Java
- 03-02-2011, 10:46 AM #7
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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!
- 03-02-2011, 11:00 AM #8
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Ok, do you have a web service with you to accept web requests?
- 03-02-2011, 11:07 AM #9
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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.
- 03-02-2011, 11:19 AM #10
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Then what's the matter that you couldn't sent a request stream to the server? Because of XML?
- 03-02-2011, 11:22 AM #11
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
Because I do noy know the ins and outs of calling a web service using Java!
- 03-02-2011, 11:24 AM #12
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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
- 03-02-2011, 11:25 AM #13
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Are you generate your XML stream with a Java client, basically a Java application?
- 03-02-2011, 11:38 AM #14
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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.
- 03-02-2011, 11:50 AM #15
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
You don't know the meaning on namespace ? :o
- 03-02-2011, 11:55 AM #16
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
Is is the same as in the XML request?
There are two in there!
- 03-02-2011, 12:00 PM #17
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
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.
- 03-02-2011, 01:00 PM #18
Member
- Join Date
- Aug 2009
- Posts
- 26
- Rep Power
- 0
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
-
Sending fax
By mantas.brasiunas in forum New To JavaReplies: 8Last Post: 07-04-2012, 04:43 AM -
Struts2 Sending URL
By sandeep.ctg in forum Web FrameworksReplies: 0Last Post: 04-13-2010, 06:59 AM -
sending SMS between PC and mobile
By Halayas in forum Sun Java Wireless ToolkitReplies: 6Last Post: 03-18-2010, 11:45 AM -
Sending emails using jms
By rrkumar in forum Advanced JavaReplies: 0Last Post: 10-15-2008, 03:14 PM -
Sending a Mail
By haiforhussain in forum Advanced JavaReplies: 7Last Post: 07-30-2008, 12:28 AM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks