Hi All
I have created a .NET web service which doesnt need any
input. On invoking that it will create a row in the DB table and it is not
returning any value.. I have tested by accessing thru browser. If i access thru my java client it is throwing error. I will just
paste the code here..
public class WSClient
{
public static void main(String [] args) throws Exception
{
System.out.println("Before WEB SERVICE");
// The connection URL. Change the port number if you are using TCPMON
String endpoint = "http://eproindia30/SubscriptionBala/Service1.asmx";
Service service = new Service();
Call call = (Call) service.createCall();
call.setTargetEndpointAddress( new java.net.URL(endpoint) );
call.setOperationName("HelloWorld");
try
{
call.invoke(new Object[] { "prasanna" });
// call.invoke();
}
catch (Exception e)
{
e.printStackTrace();
}
System.out.println("AFTER WEB SERVICE --->");
}
}
If i use call.invoke() itz giving some null pointer exception.. i searched
in google and came to know that if the web service expects some input and if
the client didnt pass it will throw the exception....but in my case my web
service doesnt take any input and doent return any value...
if i use call.invoke(new Object[] { "prasanna" }); then it is giving the
following error...
AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Server did not recognize the value of HTTP Header SOAPAction:
.
faultActor:
faultNode:
faultDetail:
{http://xml.apache.org/axis/}stackTrace: AxisFault
faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Client
faultSubcode:
faultString: Server did not recognize the value of HTTP Header SOAPAction:
.
faultActor:
faultNode:
faultDetail:
Server did not recognize the value of HTTP Header SOAPAction: .
at
org.apache.axis.message.SOAPFaultBuilder.createFault(SOAPFaultBuild
.java:260)
at
org.apache.axis.message.SOAPFaultBuilder.endElement(SOAPFaultBuilde
java:169)
Please tell me where i am wrong.........
Thanks in Advance
Prasanna