开发者

Java | Webservices WSDL validation error

开发者 https://www.devze.com 2023-01-09 08:25 出处:网络
I have successfully built and deployed a jax-ws webservice on myecplise with java 5 and tomcat 5.0 but when I try to create a webservice client I\'m getting a validation error on the validation screen

I have successfully built and deployed a jax-ws webservice on myecplise with java 5 and tomcat 5.0 but when I try to create a webservice client I'm getting a validation error on the validation screen

W开发者_开发百科S-I: A problem occurred while running the WS-I WSDL conformance check: org.eclipse.wst.wsi.internal.analyzer.WSIAnalyzerException. The WS-I Test Assertion Document(TAD) was not found or could not be processed. The WSDLAnalyzer was not able to validate the given WSDL file.

even if I ignore the case myecplise doesn't allow me to create the client.

Ignore screen #01

src-resolve: Cannot resolve the name
'impl:Arrayof_tns1_MatchingDoc' to a(n) 'type definition' component

Ignore screen #02

src-resolve: Cannot resolve the name 
'soapenc:Array' to a(n) 'type definition component

After ignoring the 2 screens it gives me an error

undefined simple or complex type 'soapenc:Array'

and exist the wizard...


This error mentioning soapenc:Array may occur if you are trying to compile the WSDL of a RPC encoded webservice that is generated by Axis1. At least that was the case for me.
This was a real pain, because there is no way to compile this WSDL with wsconsume or even with wsdl2java bundled with a Axis2 distribution or with xfire.

I ended up downloading the 1.4 release ofAxis1 and using the bundled WSDL2java. You will have to call it from inside the axis.jar as org.apache.axis.wsdl.WSDL2Java. The most comfortable way for that IMHO is to run the .jar from eclipse using arguments in a run configuration.

Unfortunately this is not the end of the story as the generated classes have a tendency to come out with errors (like duplicate methods and such) which you will have to fix manually. So be careful when integrating the WSDL2java task into you ant build.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号