Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


How to send a SOAP Request

How to send a SOAP Request

How to send a SOAP Request

How do i send a Soap request like the below in Java.
Links to SOAP for newbies will be much appreciated as well.

POST /Quotation HTTP/1.0
Host: www.xyz.org
Content-Type: text/xml; charset=utf-8
Content-Length: nnn

<?xml version="1.0"?>
  <SOAP-ENV:Body xmlns:m="http://www.xyz.org/quotations">

RE: How to send a SOAP Request

Thanks TonHu, but say i already have a wsdl file with the schema, to create the xml file, do i still need that.

RE: How to send a SOAP Request

Hi TonHu,Thansk for your help,  which file am i suppose to download. do i have to install the whole Axis server or there are jar file, i just have to import and then use.

RE: How to send a SOAP Request

Hi Thanks DianCecht,
Do i need to install Apache first or i just have to import the jar files. i was wondering where the URL for sending will come from. i have seen the following example:

RE: How to send a SOAP Request

That link is to build a service, not to invoke a service. Take a look at this


RE: How to send a SOAP Request

Cfx is as good, or possibly better than Axis2.

Just don't try to mock up your own xml to send to 'the other side', that's just a waste of time to say the least, en very error-prone as well.

RE: How to send a SOAP Request

Thank guys for your help, im getting this error message when i try to read from wsdl file:
Exception in thread "main" javax.xml.ws.WebServiceException: {http://server.hw.demo/}HelloWorld is not a valid service. Valid services are: {http://apache.org/hello_world_soap_http}SOAPService

My implimentation is like this:
 private static final QName SERVICE_NAME
     //   = new QName("http://server.hw.demo/", "HelloWorld");
     = new QName("http://apache.org/hello_world_soap_http", "S0APService");
    private static final QName PORT_NAME
     = new QName("http://apache.org/hello_world_soap_http", "HelloWorldPort");

RE: How to send a SOAP Request

i have fixed the above problem, but am now getting Undefined Port Type: http://mesh/}HelloWorld.
Do i have to create a port somewhere outside the code.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close