Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to send a SOAP Request

Status
Not open for further replies.

kurie

Programmer
Jun 4, 2008
170
ZA
How do i send a Soap request like the below in Java.
Links to SOAP for newbies will be much appreciated as well.

Regards
POST /Quotation HTTP/1.0
Host: Content-Type: text/xml; charset=utf-8
Content-Length: nnn

<?xml version="1.0"?>
<SOAP-ENV:Envelope
xmlns:SOAP-ENV="SOAP-ENV:encodingStyle=" <SOAP-ENV:Body xmlns:m=" <m:GetQuotation>
<m:QuotationsName>MiscroSoft</m:QuotationsName>
</m:GetQuotation>
</SOAP-ENV:Body>
</SOAP-ENV:Envelope>
 
Thanks TonHu, but say i already have a wsdl file with the schema, to create the xml file, do i still need that.
 
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.
 
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.
 
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: { is not a valid service. Valid services are: {
My implimentation is like this:
private static final QName SERVICE_NAME
// = new QName(" "HelloWorld");
= new QName(" "S0APService");
private static final QName PORT_NAME
= new QName(" "HelloWorldPort");
 
i have fixed the above problem, but am now getting Undefined Port Type: Do i have to create a port somewhere outside the code.

Regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top