I don't know how to deploy aar made by jax-ws.
[Configuration]
Axis2 1.5
Java 1.6
[behavior]
1) deploy jar into servicejars
service-name.port-name appeared in
http://localhost:8080/axis2/services/ like "EchoService.EchoServicePort"
The client can get correct response by accessing EPR
(http://localhost:8080/axis2/services/EchoService.EchoServicePort).
2) deploy aar into services
service-name appeared in http://localhost:8080/axis2/services/ like
"EchoService"
A) The client get error (A) by accessing EPR
(http://localhost:8080/axis2/services/EchoService.EchoServicePort).
javax.xml.ws.soap.SOAPFaultException: The service cannot be found
for the endpoint reference (EPR)
127.0.0.1/axis2/services/EchoService.EchoServicePort
B) The client get error (B) by accessing EPR
(http://localhost:8080/axis2/services/EchoService).
javax.xml.ws.soap.SOAPFaultException: The service class cannot be
found for this AxisService.
[test]
I used Axis2 1.5 Samples/jaxws-sample/echo.
1) changed location
/wsdl:definitions/wsdl:service/wsdl:port/soap:addr...@location in
Echo.wsdl to "http://localhost:8080/axis2/services/EchoService".
Server Side:
2) generated source by wsimprt(jdk1.6.0_13).
3) using implement class (EchoServicePortImpl.java)
comment out wsdLocation in @WebService and @HandlerChain
4) made aar (attachment:service.xml) and deployed services
Client Side:
5) generated source by wsimprt(jdk1.6.0_13).
6) using client (attachment:JaxwsClient.java)
//
package org.apache.axis2.jaxws.samples.echo;
public class JaxwsClient {
/**
* @param args
*/
public static void main(String[] args) {
new JaxwsClient();
}
public JaxwsClient() {
EchoService service = new EchoService();
EchoServicePortType port = service.getEchoServicePort();
try {
EchoStringInput in = new ObjectFactory().createEchoStringInput();
in.setEchoInput("client string");
EchoStringResponse res = port.echoOperation(in);
System.out.println(res.getEchoResponse());
} catch (Exception e) {
System.out.println(e.getLocalizedMessage());
}
}
}
<serviceGroup>
<service name="EchoService">
<parameter name="useOriginalwsdl">true</parameter>
<messageReceivers>
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="org.apache.axis2.jaxws.server.JAXWSMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass">org.apache.axis2.jaxws.samples.echo.EchoServicePortImpl</parameter>
<operation name="echoOperation" mep="http://www.w3.org/2004/08/wsdl/in-out">
<actionMapping/>
</operation>
</service>
</serviceGroup>