Invalid WSDL files produced by AXIS2 utility java2wsdl
If you use the WSDL file produced by the AXIS2 version 1.4 sample "soapwithattachments", that WSDL file is designated invalid by both XMLSpy WSDL validator, and by the Microsoft utility svcutil. The two utilities produce different error messages.
Is this a bug in java2wsdl?
-----------------------------------------------------------------------------------------------------
XMLSpy 2008 release 2 produces the following error:
"File SWASampleService.wsdl is not valid.
element 'IOException' in operation 'uploadFile' (portType 'AttachmentServicePortType') has no match in operstion 'uploadFile'(binding 'AttachmentServiceHttpBinding')"
svcutil produces the following errors:
1. "Error: Cannot import wsdl:binding
Detail: The given key was not present in the dictionary.
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://service.soapwithattachments.sample']/wsdl:binding[@name='SWASampleServiceHttpBinding']"
and
2."Error: Cannot import wsdl:port
Detail: There was an error importing a wsdl:binding that the wsdl:port is dependent on.
XPath to wsdl:binding: //wsdl:definitions[@targetNamespace='http://service.soapwithattachments.sample']/wsdl:binding[@name='SWASampleServiceHttpBinding']
XPath to Error Source: //wsdl:definitions[@targetNamespace='http://service.soapwithattachments.sample']/wsdl:service[@name='SWASampleService']/wsdl:port[@name='SWASampleServiceHttpEndpoint']"
-------------------------------------------------------------------------------------------------
- Login or register to post comments
- Printer friendly version
- 223 reads











Additional information
Jibx2Wsdl gives the following error message when examining the class created by building soapwithattachments server:
...\soapwithattachments>java org.jibx.ws.wsdl.Jibx2Wsdl -v -t .\out sample.soapwithattachments.service.AttachmentService
Starting from service classes:
sample.soapwithattachments.service.AttachmentService
Output to directory .\out
Exception in thread "main" java.lang.IllegalStateException: No data object field found for exception class java.io.IOException
at org.jibx.ws.wsdl.FaultCustom.apply(FaultCustom.java:147)
at org.jibx.ws.wsdl.WsdlCustom.forceFaultCustomization(WsdlCustom.java:146)
at org.jibx.ws.wsdl.Jibx2Wsdl.generate(Jibx2Wsdl.java:463)
at org.jibx.ws.wsdl.Jibx2Wsdl.main(Jibx2Wsdl.java:588)