All
I am having problem with a JAX-WS based web service using Axis2. Below is
the Exception stack when client tries to reach this service:
[ERROR] The service class cannot be found for this AxisService.
java.lang.RuntimeException: The service class cannot be found for this
AxisService.
at
org.apache.axis2.jaxws.server.JAXWSMessageReceiver.receive(JAXWSMessageReceiver.java:95)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:176)
at
org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:275)
at
org.apache.axis2.transport.http.AxisServlet.doPost(AxisServlet.java:133)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:637)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
My configuration is:
Axis2 1.4.1
Tomcat 6.0.18
Java 1.6_12
Top down development model (service and client code is generated using
wsimport tool)
Schema file:
------------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<xs:schema version="1.0"
targetNamespace="http://service/"
xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="GetQuoteRequest">
<xs:complexType>
<xs:sequence>
<xs:element name="arg0" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name = "GetQuoteResponse">
<xs:complexType>
<xs:sequence>
<xs:element name="return" type="xs:double"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
WSDL file:
----------------
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<!-- Generated by JAX-WS RI at http://jax-ws.dev.java.net. RI's version is
JAX-WS RI 2.1.1 in JDK 6. -->
<wsdl:definitions name="Prj4Service" targetNamespace="http://service/"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
xmlns:tns="http://service/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
<wsdl:types>
<xsd:schema>
<xsd:import namespace="http://service/"
schemaLocation="Prj4Service_schema1.xsd"/>
</xsd:schema>
</wsdl:types>
<wsdl:message name="getQuoteRequest">
<wsdl:part name="parameters" element="tns:GetQuoteRequest"/>
</wsdl:message>
<wsdl:message name="getQuoteResponse">
<wsdl:part name="parameters" element="tns:GetQuoteResponse"/>
</wsdl:message>
<wsdl:portType name="Prj4">
<wsdl:operation name="getQuote">
<wsdl:input message="tns:getQuoteRequest"/>
<wsdl:output message="tns:getQuoteResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:binding name="Prj4PortBinding" type="tns:Prj4">
<soap:binding transport="http://schemas.xmlsoap.org/soap/http"
style="document"/>
<wsdl:operation name="getQuote">
<soap:operation soapAction="tns:getQuote"/>
<wsdl:input>
<soap:body use="literal"/>
</wsdl:input>
<wsdl:output>
<soap:body use="literal"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
<wsdl:service name="Prj4Service">
<wsdl:port name="Prj4Port" binding="tns:Prj4PortBinding">
<soap:address
location="http://localhost:8080/axis2/services/Prj4Service"/>
</wsdl:port>
</wsdl:service>
</wsdl:definitions>
services.xml file
------------------------
<?xml version="1.0" encoding="UTF-8"?>
<serviceGroup>
<service name="Prj4Service">
<messageReceivers>
<messageReceiver
mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
</messageReceivers>
<parameter
name="ServiceClass">service.Prj4Port</parameter>
<parameter name="useOriginalwsdl">false</parameter>
</service>
</serviceGroup>
Service implementation class:
--------------------------------------------
package service;
import javax.jws.WebService;
@WebService(endpointInterface = "service.Prj4",
serviceName = "Prj4Service", name="Prj4", targetNamespace =
"http://service/")
public class Prj4Port implements Prj4 {
public GetQuoteResponse
getQuote(GetQuoteRequest req) {
GetQuoteResponse res = new GetQuoteResponse();
return res;
}
}
I am suspecting some thing is wrong with services.xml file. Please some
one can point out what I am missing.
Thanks in Advance
Ramesh
-----------------------------------------
________________________________________________________
DTCC DISCLAIMER: This email and any files transmitted with it are
confidential and intended solely for the use of the individual or
entity to whom they are addressed. If you have received this email
in error, please notify us immediately and delete the email and any
attachments from your system. The recipient should check this email
and any attachments for the presence of viruses. The company
accepts no liability for any damage caused by any virus transmitted
by this email.