Ferguson
Ferguson

Reputation: 547

Jax-ws from netbeans 8.1 to WildFly 8

I have done a simple webservice with two methods. I'am using WildFly 8 App server. From Netbeans I try to deploy the webservice on the server but get this kind of error:

Deploying C:\wildfly-8.1.0.Final\standalone\deployments\WebservisTestPeter.war {"JBAS014671: Failed services" => {"jboss.deployment.unit.\"WebservisTestPeter.war\".PARSE" => "org.jboss.msc.service.StartException in service jboss.deployment.unit.\"WebservisTestPeter.war\".PARSE: JBAS018733: Failed to process phase PARSE of deployment \"WebservisTestPeter.war\" Caused by: java.lang.RuntimeException: JBAS017312: com.in2.in2ws has the wrong component type, it cannot be used as a web component"}} C:\Users\peterv.IN2KOPER\Documents\NetBeansProjects\WebservisTestPeter\nbproject\build-impl.xml:1046: The module has not been deployed.

The source code is:

package com.in2; 
import javax.jws.WebService; 
import javax.jws.WebMethod; 
import javax.jws.WebParam; 
import javax.ejb.Stateless;

@WebService(serviceName = "in2ws") 
@Stateless() 
public class in2ws {         

@WebMethod(operationName = "hello")
public String hello(@WebParam(name = "name") String txt) {
    return "Hello " + txt + " !";
}

@WebMethod
public int add(@WebParam(name = "i") int i, @WebParam(name = "j") int j) {
    int k = i + j;
    return k;
  }
}

thank you for any info. regards Peter

Upvotes: 0

Views: 169

Answers (1)

ehsavoie
ehsavoie

Reputation: 3527

Looks like your issue is there: JBAS017312: com.in2.in2ws has the wrong component type, it cannot be used as a web component Can't help you more without code / configuration but it looks like your code is wrong

Upvotes: 1

Related Questions