从wsdl创建SOAP请求

问题描述 投票:1回答:1

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

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

提前致谢 !!

java xml web-services soap wsdl
1个回答
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.
© www.soinside.com 2019 - 2024. All rights reserved.