2013-12-09 10 views
0

자바 파일을 생성 할 수 있으며, 서비스는 내가 WSDL 파일 우리는 WSDL 파일에서 자바 파일을 생성 할 수우리는 내가 나와 함께 WSDL 파일이

에서 모의 ​​서비스를 수행하고자 이렇게까지 재치 아닌가요? 내가 CXF 승리 WSDL2Java의 노력하지만 오류가

실패가 WSDL_definition에게

C:\Users\malnassar\Desktop\cxf3\apache-cxf-3.0.0-milestone1\bin>wsdl2java -impl ContributorSummaryService_1.wsdl 

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: FAIL_TO_CREATE_WSDL_DEFINITION 


C:\Users\malnassar\Desktop\cxf3\apache-cxf-3.0.0-milestone1\bin>wsdl2java ContributorSummaryService_1.wsdl 

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: FAIL_TO_CREATE_WSDL_DEFINITION 


C:\Users\malnassar\Desktop\cxf3\apache-cxf-3.0.0-milestone1\bin>wsdl2java ContributorSummaryService_1.wsdl 

WSDLToJava Error: org.apache.cxf.wsdl11.WSDLRuntimeException: FAIL_TO_CREATE_WSDL_DEFINITION 


C:\Users\malnassar\Desktop\cxf3\apache-cxf-3.0.0-milestone1\bin> 

를 만드는 말과는 파일을 찾을 수 없습니다 제외하고 끝 axis1.6에 WSDL2Java가 함께 노력

C:\Users\malnassar\Desktop\axis2-1.6.2\bin>wsdl2java.bat -uri ContributorSummaryService_1.wsdl -o c:\WebService\ -uw

로그

사용

AXIS2_HOME: C:\Users\malnassar\Desktop\axis2-1.6.2 Using JAVA_HOME: C:\Program Files (x86)\Java\jdk1.6.0_33 Retrieving document at 'ContributorSummaryService_1.wsdl'. Retrieving schema at 'ContributorSummaryService_1_2.xsd', relative to 'file:/C:/Users/malnassar/Desktop/axis2-1.6.2/bin/ContributorSummaryService_1.wsdl'. log4j:WARN No appenders could be found for logger (org.apache.axis2.i18n.ProjectResourceBundle). log4j:WARN Please initialize the log4j system properly. Exception in thread "main" org.apache.axis2.wsdl.codegen.CodeGenerationException: Error parsing WSDL at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:178) at org.apache.axis2.wsdl.WSDL2Code.main(WSDL2Code.java:35) at org.apache.axis2.wsdl.WSDL2Java.main(WSDL2Java.java:24) Caused by: javax.wsdl.WSDLException: WSDLException (at /wsdl:definitions/wsdl:types/xsd:schema): faultCode=OTHER_ERROR: An error occurred trying to resolve schema referenced at 'ContributorSummaryServ ice_1_2.xsd', relative to 'file:/C:/Users/malnassar/Desktop/axis2-1.6.2/bin/ContributorSummaryService_1.wsdl'.: java.io.FileNotFoundException: This file was not found: file:/C:/Users/malnassar/Desktop /axis2-1.6.2/bin/ContributorSummaryService_1_2.xsd at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseSchema(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseTypes(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.parseDefinitions(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at com.ibm.wsdl.xml.WSDLReaderImpl.readWSDL(Unknown Source) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.readInTheWSDLFile(CodeGenerationEngine.java:320) at org.apache.axis2.wsdl.codegen.CodeGenerationEngine.(CodeGenerationEngine.java:133) ... 2 more Caused by: java.io.FileNotFoundException: This file was not found: file:/C:/Users/malnassar/Desktop/axis2-1.6.2/bin/ContributorSummaryService_1_2.xsd at com.ibm.wsdl.util.StringUtils.getContentAsInputStream(Unknown Source) ... 13 more C:\Users\malnassar\Desktop\axis2-1.6.2\bin>

3. SOAPUI가 오류 아래에있는 프로젝트를 만들려고 할 때

Error loading [file:\C:\Users\kpane\Desktop\ContributorSummaryService.xsd]: java.io.FileNotFoundException: C:\Users\kpane\Desktop\ContributorSummaryService.xsd (The system cannot find the file specified

+1

wsdl2java를 실행하려고하면 로그에서 오류를 공유 할 수 있습니까? 커뮤니티는 더 많은 정보없이 도움을 줄 수 없습니다. – derdc

+1

파일 ContirbutorSummaryService_1_2.xsd가 있어야하는 위치에 있지 않은 것으로 보입니다. – Omar

+0

@kapildas - 한 번 더 요청합니다. "WSDLRuntimeException : FAIL_TO_CREATE_WSDL_DEFINITION"은 그 자체로는별로 없으며 처음에 게시하지 않은 이유를 알 수 있습니다. "wsdl2java -impl ContributorSummaryService_1.wsdl -verbose"를 사용하여 한 번 더 실행할 수 있습니까? – derdc

답변

2

웹 서비스를 조롱하고 놀고 싶다면 soapui를 사용해보십시오. souapui.org

SoapUI를 사용하여 웹 서비스를 도발하기 : WSDL을 사용하여 생성 CLASSE를 들어 http://www.soapui.org/Getting-Started/mock-services.html

, JDK가 내장 된 wsimport의 도구에서 그렇게한다. 한번 해봐.

+0

@ Kumar 나는 클라이언트를 사용하고 싶지 않다. –

+0

SOAPUI로 여는 동안 오류를 게시했다. –

+0

웹 서비스를 조롱하고 싶다면 SoapUI가 완벽한 선택이다. http://www.soapui.org/Getting-Started/mock-services.html. 찾을 수없는 파일 예외와 관련하여 wsdl 파일을 배치 한 폴더와 동일한 폴더에 ContributorSummaryService.xsd 파일이 있는지 확인하십시오. 웹 서비스 공급자가 해당 파일을 제공 할 수 있어야합니다. –