2010-07-21 1 views
1

나는 지금가 축 웹 서비스 오류

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

다음과 같이 간단한 자바 파일 Calculator.java을 작성했습니다, 나는 Calculator.jws에 이름과 내 웹 응용 프로그램의 루트 디렉토리에 넣어. (WEB-INF 디렉토리와 동일한 디렉토리에 있음). 내가 http://localhost:8680/webappcontextroot/Calculator.jws를 사용하여이 웹 서비스에 액세스하려고하면 내가

을 말하는 메시지가 "웹 서비스가 여기에있다. WSDL에보기 :"나는이를 얻을 WSDL 파일을 볼 수있는 링크를 클릭하면

을 오류,

AXIS 오류

WSDL을 생성 할 수 없습니다!

이 위치

내가 웹 서비스를 호출하는 클라이언트를 썼다에서 더 SOAP 서비스가 없다, 나는 AXIS 엔진이 호출 대상 서비스를 찾을 수 없습니다

- Unable to find required classes (javax.activation.DataHandler and javax.mail.internet.MimeMultipart). Attachment support is disabled. 
Exception in thread "main" AxisFault 
faultCode: {http://xml.apache.org/axis/}Server.NoService 
faultSubcode: 
faultString: The AXIS engine could not find a target service to invoke! targetService is null 
faultActor: 
faultNode: 
faultDetail: 
    {http://xml.apache.org/axis/}hostname:D78D46BS 

축 오류를 얻을 ! targetService is null

WSDL 파일이 누락 된 것 같습니다. oreilly 튜토리얼은 자바 파일을 .jws 파일로 복사하고 webapp에 넣으면 웹 서비스를 사용할 준비가되었다는 것을 알려줍니다.

누군가가 도와 줄 수 있습니까?

답변

1

전적으로 오류 메시지가 나타나면 classpath에 mailapi.jar 및 activation.jar 라이브러리가 누락 된 것 같습니다. 그것들을 여러분의 axis.jar가있는 폴더에 넣고 웹 서버를 다시 시작하십시오.