1. create interface and bean on dynamic web project. Codes are seen like below :
package com.aaa.ws;
import javax.jws.WebMethod;
import javax.jws.WebParam;
import javax.jws.WebResult;
import javax.jws.WebService;
@WebService
public interface IHelloWorldPort {
@WebMethod
@WebResult
public String sayHello(@WebParam String name);
}
=====
package com.aaa.ws;
import javax.jws.WebService;
@WebService
public class HelloWorldBean implements IHelloWorldPort {
@Override
public String sayHello(String name) {
// TODO Auto-generated method stub
return "Hello " + name;
}
}
2. To contain the generated codes, make the user-defined folder named ‘apt_src’
3. After setting “Project Facets”, the web service project is deployed.
4. The web service project is deployed well.
16:07:41,297 INFO [org.jboss.wsf.stack.cxf.deployment.aspect.DescriptorDeploymentAspect] (MSC service thread 1-2) Spring not available, skipping check for user provided jbossws-cxf.xml / cxf.xml configuration files.
16:07:41,297 INFO [org.jboss.wsf.stack.cxf.metadata.MetadataBuilder] (MSC service thread 1-2) Add Service
id=HelloWorldBean
address=http://localhost:8080/WSHelloWorld/HelloWorldBean
implementor=com.aaa.ws.HelloWorldBean
invoker=org.jboss.wsf.stack.cxf.JBossWSInvoker
serviceName={http://ws.aaa.com/}HelloWorldBeanService
portName={http://ws.aaa.com/}HelloWorldBeanPort
wsdlLocation=null
mtomEnabled=false
16:07:41,297 INFO [org.jboss.ws.common.management.DefaultEndpointRegistry] (MSC service thread 1-2) register: jboss.ws:context=WSHelloWorld,endpoint=HelloWorldBean
16:07:41,313 정보 [org.apache.cxf.service.factory.ReflectionServiceFactoryBean] (MSC service thread 1-2) Creating Service {http://ws.aaa.com/}HelloWorldBeanService from class com.aaa.ws.IHelloWorldPort
16:07:41,344 정보 [org.apache.cxf.endpoint.ServerImpl] (MSC service thread 1-2) Setting the server's publish address to be http://localhost:8080/WSHelloWorld/HelloWorldBean
16:07:41,344 WARN [org.jboss.wsf.stack.cxf.resolver.JBossWSResourceResolver] (MSC service thread 1-2) Cannot resolve resource: cxf
16:07:41,344 INFO [org.jboss.wsf.stack.cxf.deployment.WSDLFilePublisher] (MSC service thread 1-2) WSDL published to: file:/C:/jboss-as-7.0.2.Final/standalone/data/wsdl/WSHelloWorldEAR.ear/WSHelloWorld.war/HelloWorldBeanService.wsdl
16:07:41,360 INFO [org.jboss.as.webservices.service.EndpointService] (MSC service thread 1-3) Starting service jboss.ws.endpoint.WSHelloWorld.HelloWorldBean
16:07:41,375 INFO [org.jboss.web] (MSC service thread 1-8) registering web context: /WSHelloWorld
16:07:41,375 INFO [org.jboss.as.server.controller] (DeploymentScanner-threads - 2) Deployed "WSHelloWorldEAR.ear"
5. Try to generate client stub files in user-created folder.
6. You see? ‘clientsample’ codes are not generated.
7. In case ‘src’ folder be selected
8. As you see, “com.aaa.ws.clientsample” codes are generated only in “src” folder. I want “com.aaa.ws.clientsample” codes to be generated on user-defined folder.
9. “clientsample.java” works well. Thanks you for reading. J