Web Services 正在从wsdl创建SOAP请求

9lowa7mx  于 2022-11-15  发布在  其他
关注(0)|答案(1)|浏览(181)

我需要为wsdl中的一个操作创建SOAP请求xml。从wsdl”“中获取示例请求XML,但出现异常“java.lang.NoClassDefFoundError:WsdlProject项目=新的WsdlProject();“
我导入了最新的jar文件(soapui-xmlbeans-4.5.0,wsdl-xmlbeans-1. 1,soapui-4. 5. 0),但仍然抛出异常。任何人”http://www.soapui.org/repository/eviware/“都可以建议我如何纠正它。除了这个,还有其他方法吗?
提前感谢!!

idv4meu8

idv4meu81#

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.

相关问题