You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Srinadh Karumuri <sk...@bbn.com> on 2005/05/13 16:18:38 UTC
RE: problem integrating the client in another web application:
AxisServlet threw exception
Michael,
Thanks for your reply.
I just started calling the web service in the .jsp file.
Here is my client code from .jsp file:
<%
String endpoint =
"http://localhost:8080/bserv/services/EmployeeDataService";
String[] args = {"getEmployeeLateTSDataArray", "22624", "8524"};
String method = args[0];
String arg1 = args[1];;
String arg2 = args[2];;
Service service = new Service();
Call call = null;
QName qname = null;
Class cls = null;
qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBean");
TypeMappingRegistry tmr = service.getTypeMappingRegistry();
TypeMapping tmlts = tmr.createTypeMapping();
try {
tmlts.register(
Class.forName("com.bbn.ws.EmployeeLateTSBean"),
qname,
new
org.apache.axis.encoding.ser.BeanSerializerFactory(EmployeeLateTSBean.class,qname),
new
org.apache.axis.encoding.ser.BeanDeserializerFactory(EmployeeLateTSBean.class,qname));
} catch (ClassNotFoundException e1) {
e1.printStackTrace();
}
tmr.register("http://schemas.xmlsoap.org/soap/encoding/", tmlts);
qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBeanArray");
call = (Call) service.createCall();
call.setReturnType (qname);
try {
call.setTargetEndpointAddress(new java.net.URL(endpoint));
} catch (MalformedURLException e2) {
e2.printStackTrace();
}
call.setOperationName(method);
call.addParameter("admnum", XMLType.XSD_INTEGER, ParameterMode.IN);
call.addParameter("mgrnum", XMLType.XSD_INTEGER, ParameterMode.IN);
call.setReturnType(qname);
System.out.println("Called method: " + method + "(" + arg1 + "," + arg2 + ")");
EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(new Object[] {
new Integer(arg1), new Integer(arg2) });
%>
<%= e[0].toString(); %>
I will look into using HttpClient as you suggested.
Thanks again,
Sri
At 05:47 PM 5/12/2005, Michael Oliver wrote:
>Sri,
>
>Its hard to tell what you are doing because we don't see any of the
>source, but I can tell you that I use commons HttpClient to access one
>servlet from another servlet all day long with no problems so you can at
>least know that should work.
>
>Michael Oliver
>CTO
>Alarius Systems LLC
>6800 E. Lake Mead Blvd, #1096
>Las Vegas, NV 89156
>Phone:(702)643-7425
>Fax:(702)974-0341
>*Note new email changed from oliverm@matrix-media.com
>
>-----Original Message-----
>From: Srinadh Karumuri [mailto:skarumur@bbn.com]
>Sent: Thursday, May 12, 2005 1:11 PM
>To: axis-user@ws.apache.org
>Subject: problem integrating the client in another web application:
>AxisServlet threw exception
>
>Well,
>
>Now it's scary.
>
>I wrote test client code and my services work quite well. Now I am
>trying
>to call these services from my web application which is residing on the
>same Tomcat and getting the following exception.
>
>Can anyone direct/guide me? If this doesn't work then I will have to
>dump
>the Axis altogether and go to plan B which I am reluctant to do.
>
>Thanks for any help,
>-Sri
>
>2005-05-12 15:42:28 StandardWrapperValve[AxisServlet]: Servlet.service()
>
>for servlet AxisServlet threw exception
>javax.servlet.ServletException: Servlet execution threw an exception
> at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>tionFilterChain.java:222)
> at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>erChain.java:146)
> at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>e.java:209)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:596)
> at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>33)
> at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
>org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
>e.java:144)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:596)
> at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>33)
> at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
>org.apache.catalina.core.StandardContext.invoke(StandardContext.java:235
>8)
> at
>org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
>:133)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:596)
> at
>org.apache.catalina.valves.ErrorDispatcherValve.invoke(ErrorDispatcherVa
>lve.java:118)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:594)
> at
>org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
>:116)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:594)
> at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>33)
> at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
>org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
>java:127)
> at
>org.apache.catalina.core.StandardPipeline$StandardPipelineValveContext.i
>nvokeNext(StandardPipeline.java:596)
> at
>org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:4
>33)
> at
>org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:948)
> at
>org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:152)
> at
>org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:79
>9)
> at
>org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processC
>onnection(Http11Protocol.java:705)
> at
>org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:57
>7)
> at
>org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool
>.java:683)
> at java.lang.Thread.run(Thread.java:534)
>----- Root Cause -----
>java.lang.LinkageError: loader constraints violated when linking
>javax/xml/soap/SOAPMessage class
> at
>org.apache.axis.transport.http.AxisServlet.createMessageContext(AxisServ
>let.java:1041)
> at
>org.apache.axis.transport.http.AxisServlet.doPost(AxisServlet.java:799)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:716)
> at
>org.apache.axis.transport.http.AxisServletBase.service(AxisServletBase.j
>ava:339)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:809)
> at
>org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
>tionFilterChain.java:200)
> at
>org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
>erChain.java:146)
> at
>org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
>e.java:209)
Re: problem integrating the client in another web application:
AxisServlet threw exception
Posted by Srinadh Karumuri <sk...@bbn.com>.
Don,
Thanks for the sample code. I am stranger to NetBeans so... :(
BTW, I tried my client code in the Servlet(.java) and it's working. I will
try forwarding from .java to .jsp. Hopefully it will work on time for my
deadline next week.
:)
-Sri
At 01:57 PM 5/13/2005, you wrote:
>I've been working on integrating Axis with Netbeans and I just finished
>the trivial case of using a JSP to consume a WebService.
>
>------------------
><%@page contentType="text/html"%>
><%@page pageEncoding="UTF-8"%>
><%@page import="play.*"%>
><html>
> <head><title>JSP Page</title></head>
> <body>
><%
> String val="earnest";
> try{
> HiSEI hiStub = new HiSEIServiceLocator().getHiSEIPort();
> out.println(hiStub.sayHi("Allison"));
> }catch (Exception ex){}%>
>
> </body>
></html>
>----------------
>
>The import references the package play which was created by wsdl2java and
>contains the two classes referenced in the scriptlet.
>dga
>
>
>
>On 5/13/05, Srinadh Karumuri <<m...@bbn.com>
>wrote:
>Does any one have a sample code for calling an Axis Web service from a JSP
>page?
>
>Interesting thing is:
>
>Same code when I tried on Tomcat 3 gives me the following exception:
>Internal Servlet Error:
>
>
>java.lang.IllegalStateException: Response has already been
>
>committed
>
> at
>
>java.lang.Throwable.fillInStackTrace(Native Method)
>
> at
>
>java.lang.Throwable.fillInStackTrace(Compiled Code)
>
>
> at
>
>java.lang.Throwable.(Compiled Code)
>
> at
>
>java.lang.Exception.(Compiled Code)
>
> at
>
>java.lang.RuntimeException.(Compiled Code)
>
> at
>
>java.lang.IllegalStateException.(Compiled Code)
>
>
> at
>
>org.apache.tomcat.core.HttpServletResponseFacade.sendError(Compiled
>
>Code)
>
>:
>:
>-Sri
>
>At 01:05 PM 5/13/2005, you wrote:
>>Michael,
>>
>>I checked the HttpClient and understood what you meant. So, it should be
>>working with my web app on the same Tomcat.
>>
>>As it shows in the RootCouse:
>>
>>root cause
>>
>>
>>java.lang.LinkageError: loader constraints violated when linking
>>
>>javax/xml/soap/SOAPMessage class
>>
>> at
>>
>>org.apache.axis.client.Call.<init>(Call.java:263)
>>
>> at
>>
>>org.apache.axis.client.Service.createCall
>>
>>(Service.java:566)
>>
>>I started using a simple JSP page but still my Call.init is failing.
>>
>>-Sri
>>
>>At 10:18 AM 5/13/2005, you wrote:
>>>Michael,
>>>
>>>Thanks for your reply.
>>>
>>>I just started calling the web service in the .jsp file.
>>>Here is my client code from .jsp file:
>>>
>>><%
>>>String endpoint =
>>>"<http://localhost:8080/bserv/services/EmployeeDataService>http://localhost:8080/bserv/services/EmployeeDataService
>>>";
>>>
>>>String[] args = {"getEmployeeLateTSDataArray", "22624", "8524"};
>>>String method = args[0];
>>>String arg1 = args[1];;
>>>String arg2 = args[2];;
>>>Service service = new Service();
>>>Call call = null;
>>>QName qname = null;
>>>Class cls = null;
>>>
>>>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBean");
>>>TypeMappingRegistry tmr = service.getTypeMappingRegistry();
>>>TypeMapping tmlts = tmr.createTypeMapping();
>>>try {
>>> tmlts.register(
>>> Class.forName("com.bbn.ws.EmployeeLateTSBean"),
>>> qname,
>>> new
>>> org.apache.axis.encoding.ser.BeanSerializerFactory(EmployeeLateTSBean.class,qname),
>>> new
>>> org.apache.axis.encoding.ser.BeanDeserializerFactory(EmployeeLateTSBean.class,qname));
>>> } catch (ClassNotFoundException e1) {
>>> e1.printStackTrace();
>>> }
>>>tmr.register("<http://schemas.xmlsoap.org/soap/encoding/>http://schemas.xmlsoap.org/soap/encoding/
>>>", tmlts);
>>>
>>>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBeanArray");
>>>call = (Call) service.createCall();
>>>call.setReturnType (qname);
>>>try {
>>> call.setTargetEndpointAddress(new java.net.URL(endpoint));
>>>} catch (MalformedURLException e2) {
>>> e2.printStackTrace();
>>>}
>>>call.setOperationName(method);
>>>call.addParameter("admnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>>>call.addParameter("mgrnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>>>call.setReturnType(qname);
>>>System.out.println("Called method: " + method + "(" + arg1 + "," + arg2
>>>+ ")");
>>>EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(new Object[]
>>>{ new Integer(arg1), new Integer(arg2) });
>>>%>
>>><%= e[0].toString(); %>
>>>
>>>I will look into using HttpClient as you suggested.
>>>
>>>Thanks again,
>>>Sri
>>>
>>>At 05:47 PM 5/12/2005, Michael Oliver wrote:
>>>>Sri,
>>>>
>>>>Its hard to tell what you are doing because we don't see any of the
>>>>source, but I can tell you that I use commons HttpClient to access one
>>>>servlet from another servlet all day long with no problems so you can at
>>>>least know that should work.
>>>>
>>>>Michael Oliver
>>>>CTO
>>>>Alarius Systems LLC
>>>>6800 E. Lake Mead Blvd, #1096
>>>>Las Vegas, NV 89156
>>>>Phone:(702)643-7425
>>>>Fax:(702)974-0341
>>>>*Note new email changed from
>>>><ma...@matrix-media.com>oliverm@matrix-media.com
>
>
>
>
>--
>It used to be that machines automated work, giving us more time to do
>other things. But now machines automate the production of
>attention-consuming information, which takes our time. For example, if
>one person sends the same e-mail message to 10 people, then 10 people
>have to respond.
>Esther Dyson
Re: problem integrating the client in another web application: AxisServlet threw exception
Posted by Don Albertson <do...@gmail.com>.
I've been working on integrating Axis with Netbeans and I just finished the
trivial case of using a JSP to consume a WebService.
------------------
<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@page import="play.*"%>
<html>
<head><title>JSP Page</title></head>
<body>
<%
String val="earnest";
try{
HiSEI hiStub = new HiSEIServiceLocator().getHiSEIPort();
out.println(hiStub.sayHi("Allison"));
}catch (Exception ex){}%>
</body>
</html>
----------------
The import references the package play which was created by wsdl2java and
contains the two classes referenced in the scriptlet.
dga
On 5/13/05, Srinadh Karumuri <sk...@bbn.com> wrote:
>
> Does any one have a sample code for calling an Axis Web service from a JSP
> page?
>
> Interesting thing is:
>
> Same code when I tried on Tomcat 3 gives me the following exception:
> *Internal Servlet Error:
>
> *
>
> java.lang.IllegalStateException: Response has already been
> committed
> at
> java.lang.Throwable.fillInStackTrace(Native Method)
> at
> java.lang.Throwable.fillInStackTrace(Compiled Code)
> at
> java.lang.Throwable.(Compiled Code)
> at
> java.lang.Exception.(Compiled Code)
> at
> java.lang.RuntimeException.(Compiled Code)
> at
> java.lang.IllegalStateException.(Compiled Code)
> at
> org.apache.tomcat.core.HttpServletResponseFacade.sendError(Compiled
> Code)
>
> :
> :
> -Sri
> At 01:05 PM 5/13/2005, you wrote:
>
> Michael,
>
> I checked the HttpClient and understood what you meant. So, it should be
> working with my web app on the same Tomcat.
>
> As it shows in the RootCouse:
>
> *root cause*
>
> java.lang.LinkageError: loader constraints violated when linking
> javax/xml/soap/SOAPMessage class
> at
> org.apache.axis.client.Call.<init>(Call.java:263)
> at
> org.apache.axis.client.Service.createCall(Service.java:566)
>
> I started using a simple JSP page but still my Call.init is failing.
>
> -Sri
>
> At 10:18 AM 5/13/2005, you wrote:
>
> Michael,
>
> Thanks for your reply.
>
> I just started calling the web service in the .jsp file.
> *Here is my client code from .jsp file:
>
> *<%
> String endpoint =
> "http://localhost:8080/bserv/services/EmployeeDataService";
>
> String[] args = {"getEmployeeLateTSDataArray", "22624", "8524"};
> String method = args[0];
> String arg1 = args[1];;
> String arg2 = args[2];;
> Service service = *new* Service();
> Call call = *null*;
> QName qname = *null*;
> Class cls = *null*;
>
> qname = *new* QName("EmployeeLateTSArray", "EmployeeLateTSBean");
> TypeMappingRegistry tmr = service.getTypeMappingRegistry();
> TypeMapping tmlts = tmr.createTypeMapping();
> *try* {
> tmlts.register(
> Class.forName("com.bbn.ws.EmployeeLateTSBean"),
> qname,
> * new* org.apache.axis.encoding.ser.BeanSerializerFactory
> (EmployeeLateTSBean.*class*,qname),
> * new* org.apache.axis.encoding.ser.BeanDeserializerFactory
> (EmployeeLateTSBean.*class*,qname));
> } *catch* (ClassNotFoundException e1) {
> e1.printStackTrace();
> }
> tmr.register("http://schemas.xmlsoap.org/soap/encoding/", tmlts);
>
> qname = *new* QName("EmployeeLateTSArray", "EmployeeLateTSBeanArray");
> call = (Call) service.createCall();
> call.setReturnType (qname);
> *try* {
> call.setTargetEndpointAddress(*new* java.net.URL(endpoint));
> } *catch* (MalformedURLException e2) {
> e2.printStackTrace();
> }
> call.setOperationName(method);
> call.addParameter("admnum", XMLType.XSD_INTEGER, ParameterMode.IN);
> call.addParameter("mgrnum", XMLType.XSD_INTEGER, ParameterMode.IN);
> call.setReturnType(qname);
> System.out.println("Called method: " + method + "(" + arg1 + "," + arg2 +
> ")");
> EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(*new* Object[]
> { *new* Integer(arg1), *new* Integer(arg2) });
> %>
> <%= e[0].toString(); %>
>
> I will look into using HttpClient as you suggested.
>
> Thanks again,
> Sri
>
> At 05:47 PM 5/12/2005, Michael Oliver wrote:
>
> Sri,
>
> Its hard to tell what you are doing because we don't see any of the
> source, but I can tell you that I use commons HttpClient to access one
> servlet from another servlet all day long with no problems so you can at
> least know that should work.
>
> Michael Oliver
> CTO
> Alarius Systems LLC
> 6800 E. Lake Mead Blvd, #1096
> Las Vegas, NV 89156
> Phone:(702)643-7425
> Fax:(702)974-0341
> *Note new email changed from oliverm@matrix-media.com
>
>
--
It used to be that machines automated work, giving us more time to do other
things. But now machines automate the production of attention-consuming
information, which takes our time. For example, if one person sends the same
e-mail message to 10 people, then 10 people have to respond.
Esther Dyson
RE: problem integrating the client in another web application:
AxisServlet threw exception
Posted by Srinadh Karumuri <sk...@bbn.com>.
Does any one have a sample code for calling an Axis Web service from a JSP
page?
Interesting thing is:
Same code when I tried on Tomcat 3 gives me the following exception:
Internal Servlet Error:
java.lang.IllegalStateException: Response has already been committed
at java.lang.Throwable.fillInStackTrace(Native Method)
at java.lang.Throwable.fillInStackTrace(Compiled Code)
at java.lang.Throwable.(Compiled Code)
at java.lang.Exception.(Compiled Code)
at java.lang.RuntimeException.(Compiled Code)
at java.lang.IllegalStateException.(Compiled Code)
at
org.apache.tomcat.core.HttpServletResponseFacade.sendError(Compiled Code)
:
:
-Sri
At 01:05 PM 5/13/2005, you wrote:
>Michael,
>
>I checked the HttpClient and understood what you meant. So, it should be
>working with my web app on the same Tomcat.
>
>As it shows in the RootCouse:
>
>root cause
>
>java.lang.LinkageError: loader constraints violated when linking
>javax/xml/soap/SOAPMessage class
> at
>org.apache.axis.client.Call.<init>(Call.java:263)
> at
>org.apache.axis.client.Service.createCall(Service.java:566)
>
>I started using a simple JSP page but still my Call.init is failing.
>
>-Sri
>
>At 10:18 AM 5/13/2005, you wrote:
>>Michael,
>>
>>Thanks for your reply.
>>
>>I just started calling the web service in the .jsp file.
>>Here is my client code from .jsp file:
>>
>><%
>>String endpoint =
>>"http://localhost:8080/bserv/services/EmployeeDataService";
>>
>>String[] args = {"getEmployeeLateTSDataArray", "22624", "8524"};
>>String method = args[0];
>>String arg1 = args[1];;
>>String arg2 = args[2];;
>>Service service = new Service();
>>Call call = null;
>>QName qname = null;
>>Class cls = null;
>>
>>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBean");
>>TypeMappingRegistry tmr = service.getTypeMappingRegistry();
>>TypeMapping tmlts = tmr.createTypeMapping();
>>try {
>> tmlts.register(
>> Class.forName("com.bbn.ws.EmployeeLateTSBean"),
>> qname,
>> new
>> org.apache.axis.encoding.ser.BeanSerializerFactory(EmployeeLateTSBean.class,qname),
>> new
>> org.apache.axis.encoding.ser.BeanDeserializerFactory(EmployeeLateTSBean.class,qname));
>> } catch (ClassNotFoundException e1) {
>> e1.printStackTrace();
>> }
>>tmr.register("http://schemas.xmlsoap.org/soap/encoding/", tmlts);
>>
>>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBeanArray");
>>call = (Call) service.createCall();
>>call.setReturnType (qname);
>>try {
>> call.setTargetEndpointAddress(new java.net.URL(endpoint));
>>} catch (MalformedURLException e2) {
>> e2.printStackTrace();
>>}
>>call.setOperationName(method);
>>call.addParameter("admnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>>call.addParameter("mgrnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>>call.setReturnType(qname);
>>System.out.println("Called method: " + method + "(" + arg1 + "," + arg2 +
>>")");
>>EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(new Object[] {
>>new Integer(arg1), new Integer(arg2) });
>>%>
>><%= e[0].toString(); %>
>>
>>I will look into using HttpClient as you suggested.
>>
>>Thanks again,
>>Sri
>>
>>At 05:47 PM 5/12/2005, Michael Oliver wrote:
>>>Sri,
>>>
>>>Its hard to tell what you are doing because we don't see any of the
>>>source, but I can tell you that I use commons HttpClient to access one
>>>servlet from another servlet all day long with no problems so you can at
>>>least know that should work.
>>>
>>>Michael Oliver
>>>CTO
>>>Alarius Systems LLC
>>>6800 E. Lake Mead Blvd, #1096
>>>Las Vegas, NV 89156
>>>Phone:(702)643-7425
>>>Fax:(702)974-0341
>>>*Note new email changed from oliverm@matrix-media.com
RE: problem integrating the client in another web application:
AxisServlet threw exception
Posted by Srinadh Karumuri <sk...@bbn.com>.
Michael,
I checked the HttpClient and understood what you meant. So, it should be
working with my web app on the same Tomcat.
As it shows in the RootCouse:
root cause
java.lang.LinkageError: loader constraints violated when linking
javax/xml/soap/SOAPMessage class
at org.apache.axis.client.Call.<init>(Call.java:263)
at org.apache.axis.client.Service.createCall(Service.java:566)
I started using a simple JSP page but still my Call.init is failing.
-Sri
At 10:18 AM 5/13/2005, you wrote:
>Michael,
>
>Thanks for your reply.
>
>I just started calling the web service in the .jsp file.
>Here is my client code from .jsp file:
>
><%
>String endpoint =
>"http://localhost:8080/bserv/services/EmployeeDataService";
>
>String[] args = {"getEmployeeLateTSDataArray", "22624", "8524"};
>String method = args[0];
>String arg1 = args[1];;
>String arg2 = args[2];;
>Service service = new Service();
>Call call = null;
>QName qname = null;
>Class cls = null;
>
>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBean");
>TypeMappingRegistry tmr = service.getTypeMappingRegistry();
>TypeMapping tmlts = tmr.createTypeMapping();
>try {
> tmlts.register(
> Class.forName("com.bbn.ws.EmployeeLateTSBean"),
> qname,
> new
> org.apache.axis.encoding.ser.BeanSerializerFactory(EmployeeLateTSBean.class,qname),
> new
> org.apache.axis.encoding.ser.BeanDeserializerFactory(EmployeeLateTSBean.class,qname));
> } catch (ClassNotFoundException e1) {
> e1.printStackTrace();
> }
>tmr.register("http://schemas.xmlsoap.org/soap/encoding/", tmlts);
>
>qname = new QName("EmployeeLateTSArray", "EmployeeLateTSBeanArray");
>call = (Call) service.createCall();
>call.setReturnType (qname);
>try {
> call.setTargetEndpointAddress(new java.net.URL(endpoint));
>} catch (MalformedURLException e2) {
> e2.printStackTrace();
>}
>call.setOperationName(method);
>call.addParameter("admnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>call.addParameter("mgrnum", XMLType.XSD_INTEGER, ParameterMode.IN);
>call.setReturnType(qname);
>System.out.println("Called method: " + method + "(" + arg1 + "," + arg2 +
>")");
>EmployeeLateTSBean e[] = (EmployeeLateTSBean[])call.invoke(new Object[] {
>new Integer(arg1), new Integer(arg2) });
>%>
><%= e[0].toString(); %>
>
>I will look into using HttpClient as you suggested.
>
>Thanks again,
>Sri
>
>At 05:47 PM 5/12/2005, Michael Oliver wrote:
>>Sri,
>>
>>Its hard to tell what you are doing because we don't see any of the
>>source, but I can tell you that I use commons HttpClient to access one
>>servlet from another servlet all day long with no problems so you can at
>>least know that should work.
>>
>>Michael Oliver
>>CTO
>>Alarius Systems LLC
>>6800 E. Lake Mead Blvd, #1096
>>Las Vegas, NV 89156
>>Phone:(702)643-7425
>>Fax:(702)974-0341
>>*Note new email changed from oliverm@matrix-media.com