2012-10-05 3 views
1

내가 자바 1.7이 tutorial을 시도했지만, 난 자바 1.6을 선택한 경우 내가이 예외 얻었다없이 JAX-WS 웹 서비스 :자바 EE 컨테이너 1.6 및 1.7

Exception in thread "main" com.sun.xml.internal.ws.model.RuntimeModelerException: runtime modeler error: Wrapper class com.company.jaxws.stockquote.service.jaxws.GetQuote is not found. Have you run APT to generate them? 
at com.sun.xml.internal.ws.model.RuntimeModeler.getClass(RuntimeModeler.java:256) 
at com.sun.xml.internal.ws.model.RuntimeModeler.processDocWrappedMethod(RuntimeModeler.java:567) 
at com.sun.xml.internal.ws.model.RuntimeModeler.processMethod(RuntimeModeler.java:514) 
at com.sun.xml.internal.ws.model.RuntimeModeler.processClass(RuntimeModeler.java:341) 
at com.sun.xml.internal.ws.model.RuntimeModeler.buildRuntimeModel(RuntimeModeler.java:227) 
at com.sun.xml.internal.ws.server.EndpointFactory.createSEIModel(EndpointFactory.java:308) 
at com.sun.xml.internal.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:174) 
at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:420) 
at com.sun.xml.internal.ws.api.server.WSEndpoint.create(WSEndpoint.java:439) 
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.createEndpoint(EndpointImpl.java:208) 
at com.sun.xml.internal.ws.transport.http.server.EndpointImpl.publish(EndpointImpl.java:138) 
at com.company.jaxws.stockquote.service.StockQuoteService.publish(StockQuoteService.java:49) 
at com.company.jaxws.stockquote.service.StockQuoteService.main(StockQuoteService.java:81) 
Java Result: 1 

소스가 avaible이다 here

모든 제안을 환영합니다.

+0

외부 비디오 및 기사 대신 관련 정보를 질문에 포함하십시오. – Keppil

답변

0
Try to add @SOAPBinding to your server endpoint implementation class.it may resolve the problem. 


@WebService(name = "StockQuote", serviceName = "StockQuoteService") 
@SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL) 
public class StockQuoteImpl { 
    @WebMethod(operationName = "getQuote") 
    public double getQuote(String ticker) { 
     double result = 0.0; 
     if (ticker.equals("MHP")) { 
      result = 50.0; 
     } else if (ticker.equals("IBM")) { 
      result = 83.0; 
     } 
     return result; 
    } 
}