简体   繁体   English

从 wsdl 创建 SOAP 请求

[英]Creating SOAP request from wsdl

I have a requirement of creating SOAP request xml for one operation from wsdl.我需要为 wsdl 的一项操作创建 SOAP 请求 xml。 I researched and tried the solution of the blog " Java: Get Sample Request XML from wsdl " , but I was getting exception "java.lang.NoClassDefFoundError: org/fife/ui/rtextarea/RTextArea" in line "WsdlProject project = new WsdlProject();"我研究并尝试了博客“ Java: Get Sample Request XML from wsdl ”的解决方案,但我在“WsdlProject project = new WsdlProject”行中得到异常“java.lang.NoClassDefFoundError: org/fife/ui/rtextarea/RTextArea” ();"

I imported latest jars (soapui-xmlbeans-4.5.0,wsdl-xmlbeans-1.1,soapui-4.5.0) but still throwing exception.我导入了最新的 jars (soapui-xmlbeans-4.5.0,wsdl-xmlbeans-1.1,soapui-4.5.0) 但仍然抛出异常。 Could anybody" http://www.soapui.org/repository/eviware/ " please suggest how can I rectify it.任何人都可以“ http://www.soapui.org/repository/eviware/ ”请建议我如何纠正它。 Is there any other approach which I can take apart from this?除了这个,我还有其他方法吗?

Thanks in advance !!提前致谢 !!

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.

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM