2012-11-01 2 views
2

저는 웹 서비스 개발의 초보자입니다. wsgen.exe를 사용하여 아티팩트를 생성하려고합니다.WSGEN을 사용하여 아티팩트를 생성 할 때 "누락 된 SEI"

C:\Program Files\Java\jdk1.7.0_05\bin\wsgen 
    -cp "c:\users\mico\workspaceSOA\calcWS\src\com.calc.ws.Calculator" 
    -verbose 
    -d "C:\users\mico\classes\" 

I :이 명령 (한 라이너)로 명령 행에서 아티팩트를 생성 할 때

package com.calc.ws; 

    import javax.jws.WebService; 

    @WebService 
    public class Calculator { 
     public int add(int a, int b) { 
      return (a + b); 
     } 
     public int sub(int a, int b) { 
      return (a - b); 
     } 
    } 

내가 직면 해요 문제는 다음과 같습니다

내 코드입니다 이 오류가 발생합니다 :

Missing SEI. 

이 오류의 원인은 무엇입니까?

답변

3

Wsgen.exe는 다음과 같은 방법으로 호출됩니다

WSGEN [options] <SEI> 

reads a web service endpoint implementation class (SEI) 및 웹 서비스 배포 및 호출에 필요한 모든 아티팩트를 생성합니다.

게시 한 명령 줄에 옵션 만 표시되고 SEI가 지정되지 않았습니다. 여기에서 '누락 된 SEI'라는 메시지가 표시됩니다 (즉, 필수 명령 줄 인수를 제공하지 않은 경우).

내가 당신의 정확한 설정을 알고하지 않습니다하지만 난다면이 구조를 가지고 : 나는 (한 줄에) 실행하면

c:\temp 
├───classpath 
│ └───com 
│  └───calc 
│   └───ws 
│    └───Calculator.class 
└───generated 

을 : 내 수업을 얻을 것이다

wsgen -cp c:\temp\classpath 
     -keep 
     -s c:\temp\generated 
     com.calc.ws.Calculator 

, 난 그냥 실행하는 경우 만 :

wsgen -cp c:\temp\classpath 
     -keep 
     -s c:\temp\generated 

내가 얻을 것이다 :

,369을
Missing SEI 
+0

여기에 Calculator.class에 대한 내 전체 경로는 다음과 같습니다. "c : \ users \ mico \ workspaceSOA \ calcWS \ bin \ com.calc.ws.Calculator"여기 생성 된 출력 경로는 다음과 같습니다. "c : \ users \ mico \ workspaceSOA \ calcWS \ src \ com.calc.ws.jaxws " 여기 클래스 경로가 있습니까,이 경로가 클래스 파일입니까? 귀하의 라인을 실행했지만 오류 클래스를 찾을 수 없습니다 "com.calc.ws.jaxws" –

+0

신경 쓰지 마세요, 나는 그것을 알아낼. 도움을 주셔서 감사합니다 :) –

+0

덕분에, 그것은 많이 도움이되었습니다. – Anubha

1
The error "Missing SEI" means Service Endpoint Interface is missing. Please create an interface for your service. please refer below code: 

Service Interface: 
package com; 
import javax.jws.WebService; 

@WebService 
public interface Calculator { 
    public int add(int a, int b); 
    public int sub(int a, int b); 
} 

Service Class implementing Service Interface: 
package com; 

import javax.jws.WebService; 

@WebService 
public class CalculatorImpl implements Calculator { 
    public int add(int a, int b) { 
     return (a + b); 
    } 
    public int sub(int a, int b) { 
     return (a - b); 
    } 
} 

Command which i have used is: 
>wsgen -cp . com.CalculatorImpl -keep -verbose -d ./stub 

Before executing above please make sure that destination folder stub is already created. 

Please try and let me know if still you are facing issue in this... 
+2

** JAX-WS 끝점을 만들 때 서비스 끝점 인터페이스 (SEI)가 필요하지 않습니다. ** 메시지는 잘못된 것입니다. 서비스 끝점이 아닌 SEI (서비스 끝점 구현) wsgen.exe 매개 변수를 참조합니다. 인터페이스 (SEI라고도 약칭 함). – Bogdan

0

필자의 경우 JAX-RPC에서 JAX-WS로 마이그레이션하고 패키지 이름을 변경했습니다. 이것을 변경하면 webservices.xml과 같이 xml 파일의 모든 매핑을 변경해야합니다. "SEI 누락" 오류가 발생할 경우 webservices.xml 파일을 찾아서 삭제하면됩니다. 그러면 JAX-WS를 사용하는 것이 좋습니다.

관련 문제