1
votes

Trying to use wsimport to generate a client for a SOAP endpoint. wsdl was published by one of our clients. I am getting the below error when I am using wsimport or cxf , if I am using Axis2 the binding are generated properly.

Could anyone please offer any advice for how to get this to work?

Command Used :

wsimport -s src -d bin wsdlurl

Error:

parsing WSDL... [ERROR] Two declarations cause a collision in the ObjectFactory class. line 1 of wsdlurl?xsd=xsd4

[wsimport] [WARNING] unknown extensibility element or attribute "EndpointReference" (in namespace "http://www.w3.org/2005/08/addressing")

1

1 Answers

0
votes

The Error is due to improper xsd formation in wsdl.

I have used NetBeans to generate the Webservice client .

When we try to generate the client Bindings it will give error, we need to change

the xsd files located in NetBeans Project

\NetBeansProject\src\META-INF\wsdl\packgestructure\wcflib-tc

and copy them to xmlresources path

\NetBeansProject\xml-resources\web-service-references\service\wsdl\packagestructure\wcflib-tc\ Folder and Refresh the service in project NetBeans client binding will be generated.