从wsdl创建SOAP请求

时间:2014-04-09 10:09:39

标签: java xml web-services soap wsdl

我需要为wsdl中的一个操作创建SOAP请求xml。我研究并尝试了博客的解决方案" Java: Get Sample Request XML from wsdl" ,但我得到了异常" java.lang.NoClassDefFoundError:org / fife / ui / rtextarea / RTextArea"在线" WsdlProject项目=新的WsdlProject();"

我导入了最新的jar(soapui-xmlbeans-4.5.0,wsdl-xmlbeans-1.1,soapui-4.5.0),但仍然抛出异常。任何人都可以" http://www.soapui.org/repository/eviware/"请建议我如何纠正它。还有其他方法可以解决这个问题吗?

提前致谢!!

1 个答案:

答案 0 :(得分:0)

1. Create a Java Project: File->New->Other->Java Project. (TestWSDL)
2. Create a WSDL File: File->New->Other->Web Services->WSDL File-> Name the file->Next->finish. (NewWSDLFile.wsdl)
3. Modify the WSDL File: Open NewWSDLFile.wsdl and replace all its content by your desired WSDL file.Save it. (Suppose I have saved my desired wsdl file at D:\sampleWSDL.xml, which i want to convert. Open this xml file using Notepad++,copy all its content and paste it to NewWSDLFile.wsdl)
4. Create Web Service Client: File->New->Other->Web Services->Web Service Client->Next->Browse Service definition and show the path of the NewWSDLFile.wsdl file we created at step 2 ->OK-> 5. Click Client Project(blue colored link at right) and set it to the project we created at step
6. Press Next -> Set Output Folder->Finish.
7. You will have all the converted Java files at the folder you set at step 5.
相关问题