axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Duseja, Sushil" <Sushil.Dus...@fiserv.co.in>
Subject Document/literal web service
Date Tue, 26 Feb 2008 07:21:11 GMT
Hello,



I am having a strange problem with an echo service (doc/literal) in Axis
1.4. I have running on my machine a JBoss 4.0.2 server and have
successfully deployed service under the deploy directory of the JBoss
installation.



Ironically, the service is working fine when deployed under tomcat 5.5.

 

Here's the code:-

 

MyService

 

public class MyService {

      public Element[] serviceMethod(Element[] elems) {

            String xmlStr = elems[0].getTextContent();

            return elems;

    }

}

 

Client

 

Service service = new Service();

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

call.setTargetEndpointAddress("http://localhost:8080/axis/services/MySer
vice");

call.setOperationStyle(Style.DOCUMENT);

call.setOperationName(new QName(NAMESPACE, "serviceMethod"));

call.addParameter("elems", Constants.XSD_ANY,ParameterMode.IN);

call.setReturnType(Constants.XSD_ANY);

String result = (String) call.invoke(new Object[] { "Hello World"});

 



There is a message that was returned to me (via TCPMonitor):



HTTP/1.1 500 Internal Server Error

Server: Apache-Coyote/1.1

X-Powered-By: Servlet 2.4; JBoss-4.0.2 (build: CVSTag=JBoss_4_0_2
date=200505022023)/Tomcat-5.5

Content-Type: text/xml;charset=utf-8

Date: Tue, 26 Feb 2008 06:16:24 GMT

Connection: close

 

<?xml version="1.0" encoding="utf-8"?>

   <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">

      <soapenv:Body>

         <soapenv:Fault>

            <faultcode>soapenv:Server.userException</faultcode>

 
<faultstring>java.lang.reflect.InvocationTargetException</faultstring>

            <detail>

               <ns1:hostname
xmlns:ns1="http://xml.apache.org/axis/">F108</ns1:hostname>

            </detail>

         </soapenv:Fault>

      </soapenv:Body>

   </soapenv:Envelope>



Can anybody help me with this problem? In addition, please let me know
as to what are the changes that one needs to make to the client as well
the service (working fine under tomcat), when we move them under jboss?


Thanks in anticipation.

Regards,
Sushil Duseja


Mime
View raw message