Hello All,
I have to make a web service client.I am doing this by appache-soap.
I have make One Proxy as follows.
inSide somemethod (this method i am calling in my client program)
{
org.apache.soap.messaging.Message _message = new org.apache.soap.messaging.Message();
//My Own Body
MessageBody mBody = new MessageBody ();
// Replace the default body with my body
this._envelop.setBody (mBody);
_message.send ("http://myDomain/SomeService/SomeService.asmx","http://myDomain/SomeService/SomeService.asmx/getEncryption", this._envelop);
try {
this.soapMessage_ = this._message.receive();
XMLReader reader = (XMLReader)Class.forName("org.apache.xerces.parsers.SAXParser").newInstance();
SAXHandler handler = new SAXHandler();
// .......Some Parsing Code
}
catch (Exception exception) {
exception.printStackTrace ();
}
}
Here i have made my own body (obviously by extending Body )and setted in envelop.
Send the message and try to parse the response given by service.
But i am getting the Exception as follows :
System.Web.Services.Protocols.SoapException: Server did not recognize the value of HTTP Header SOAPAction .
i am little bit confused with send method of Message class. what exactly actionURI (arg no. 2) is.
API Specifies as Follows
public void send(java.net.URL url,java.lang.String actionURI,Envelope env) throws SOAPException
Send an envelope to the given URL via the SOAPTransport that has been configured for this instance (or SOAPHTTPConnection by default).
The envelope is sent exactly as-is.
Parameters:
url - the url to send to ( ?? )
actionURI - the value of the SOAPAction header ( ?? )
env - envelope to send
If any one have some hint ,example code or any
thread link please tell me.
Actually I am Following This Link
Demo Code Thanks & Regards,
Vijay Saraf.
[ August 10, 2006: Message edited by: vijay saraf ]