WebServiceException: An operation with name already exists in this service

Corso Live Part-time Su Fondamenti Di Java Forum Java WebServiceException: An operation with name already exists in this service

  • Il topic è vuoto.
Stai visualizzando 2 post - dal 1 a 2 (di 2 totali)
  • Autore
    Post
  • #1136
    JavaFox
    Ospite
    Up
    0
    Down
    ::

    Espondendo questo webservice:

    
    package it;
    
    import javax.jws.WebService;
    
    @WebService
    public class PersonaWS {
    
    	
    	public void prova(String nome) {
    		
    	}
    	
    	
    	public void prova(String nome, int count) {
    		
    	}
    	
    }
    

    il server va in errore. Perchè?

    
    Caused by: javax.xml.ws.WebServiceException: java.lang.IllegalArgumentException: An operation with name [{http://it/}prova] already exists in this service
    	at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:375)
    	at org.jboss.wsf.stack.cxf.deployment.EndpointImpl.doPublish(EndpointImpl.java:79)
    	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:255)
    	at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:543)
    	at org.jboss.wsf.stack.cxf.configuration.BusHolder.configure(BusHolder.java:234)
    	at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.startDeploymentBus(BusDeploymentAspect.java:97)
    	at org.jboss.wsf.stack.cxf.deployment.aspect.BusDeploymentAspect.start(BusDeploymentAspect.java:59)
    	at org.jboss.as.webservices.deployers.AspectDeploymentProcessor.deploy(AspectDeploymentProcessor.java:73)
    	at org.jboss.as.server.deployment.DeploymentUnitPhaseService.start(DeploymentUnitPhaseService.java:147)
    
    
    #1139
    JavaRe
    Ospite
    Up
    1
    Down
    ::

    L’overloading dei metodi non è consentito nei web service. E’ esplicitamente proibito da WS-BP and WSDL 1.2

Stai visualizzando 2 post - dal 1 a 2 (di 2 totali)
  • Devi essere connesso per rispondere a questo topic.