Hi,
         the one i posted my Client program is ".java" version and it is working fine.I have written the JSP version of it which iam posting it below..,I copied this to my "$Catalina_Home/webapps/axis" directory and tried using http://localhost:8080/axis/MyClient.jsp and cant see the output on my browser.(I want to add one more point my output is in XML format which is assigning to a String).
 
******************************************************
<%@ page language="java"%>

<%@ page import="java.io.*" %>

<%@ page import="org.apache.axis.client.Call" %>

<%@ page import="org.apache.axis.client.Service" %>

<%@ page import="javax.xml.namespace.QName" %>

<%@ page import="java.net.*" %>

<%@ page import="MyService.*" %>

<%

try

{

Service service = new Service();

Call call = (Call) service.createCall();

String endpointURL="http://localhost:8080/axis/servlet/AxisServlet";

call.setTargetEndpointAddress(new java.net.URL(endpointURL));

call.setOperationName(new QName("MyService","msqinput"));

call.addParameter("msq",XMLType.XSD_STRING,ParameterMode.IN);

call.setReturnType(XMLType.XSD_STRING);

String msqstr=new String("005;498 002 002;205 027;374 145;3");

 String result=(String) call.invoke(new Object[] {msqstr});

 // Object result=call.invoke(new Object[] {msqstr});

out.println(result);

}

catch(AxisFault fault)

{

out.println(fault.toString());

//System.err.println(fault.toString());

}

catch(Exception e)

{

System.err.println(e.toString());

}

%>

Can you please go through my CLient program and let me know where iam going wrong..?

Basically I want to know where do we need to keep ,my JSP client program to acess a Webservice.Iam using Tomcat.

Thanks

Rao.,

 

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 


[EMAIL PROTECTED] wrote:




You are writing the result to System.out, so the result will not go to the
browser, but to the console, or wherever you have out going.... Check
$CATALINA_HOME/logs/catalina.out the result is likely in there.

If you want the result of the call to go to the browser, you should grab
the stream for the browser and send it there. Good luck.




siva kondapalli
<[EMAIL PROTECTED]
oo.com> cc:
Subject: Writing JSP Client for a deployed Web Service
01/21/2004 05:07
AM
Please respond to
axis-user






Hi,
I posted this question(not in detail) before in this forum.I have
deployed amy own Web service and written an Client.java program and it
worked fine,which including below
*********************************************
import org.apache.axis.AxisFault;
import org.apache.axis.client.Call;
import org.apache.axis.client.Service;
import org.apache.axis.utils.Options;
import org.apache.axis.encoding.XMLType;
import javax.xml.namespace.QName;
import javax.xml.rpc.ParameterMode;
import MyService.*;
public class MyServiceClient
{
public static void main(String[] args) throws Exception
{
Service service = new Service();
Call call = (Call) service.createCall();
String endpointURL="http://localhost:8080/axis/servlet/AxisServlet";

try
{
call.setTargetEndpointAddress(new java.net.URL(endpointURL));
call.setOperationName(new QName("MyService","msqinput"));
call.addParameter("msq",XMLType.XSD_STRING,ParameterMode.IN);
call.setReturnType(XMLType.XSD_STRING);

String msqstr=new String("005;498 002 002;205 027;374 145;3");


String result=(String) call.invoke(new Object[] {msqstr});

System.out.println("RESULT: " + result);
}
catch(AxisFault fault)
{
System.out.println(fault.toString());
}
}
}
***************************************************************
I have rewritten the Same Client program using JSP and copied that to
"$Tomcat_HOME/webapps/axis/" directory and tried accessing it using
http://localhost:8080/axis/MyClient.jsp and couldnt see the Output(result).

Can anyone please tell me where to place my Client JSP program to invoke a
web service under Tomcat.

Thanks in advance
Rao.,



Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes






Do you Yahoo!?
Yahoo! Hotjobs: Enter the "Signing Bonus" Sweepstakes

Reply via email to