AlexCartio1
AlexCartio1

Reputation: 238

Developing JAX-WS Web Service Clients runs into error

I am following Netbean's tutorial and eclipse tutorial to generate code from this wsdl but in netbeans it runs into following error

"Two declarations cause a collision in the ObjectFactory class". 

In Eclipse it runs into following error.

"WAB0399E Error in generating Java from WSDL:  java.io.IOException: Emitter failure.  There is an undefined portType (I3Service) in the WSDL document http://i3-cert.vueling.com/Vueling.I3.WCF.WebService/I3Service.svc?wsdl=wsdl0.
Hint: make sure <binding type=".."> is fully qualified."

What should I do?

Upvotes: 2

Views: 1058

Answers (2)

vzamanillo
vzamanillo

Reputation: 10564

JAX-WS uses JAXB to generate artifacts from a WSDL, if you have two or more types defined in your schema with the same name JAXB can not generate an artifact for that type twice (collision) in the same package. You may resolve the problem with a JAXB bindings file, by this way JAXB can generate the artifacts into different packages for duplicate types but requires time to detect that types and some detailed configuration. Check the Oracle wsimport tool and try to get the artifacts for the WSDL with - verbose option to trace and get the conflicting types, look at http://docs.oracle.com/javase/7/docs/technotes/tools/share/wsimport.html, wsimport is available for javase 6 too. That WSDL is not well defined, try to parse it with some validation tool like xmlspy or simillar and check results.

Upvotes: 4

Ankit Zalani
Ankit Zalani

Reputation: 3168

There can be many issues for example I have faced the same problem when my location specified by soap:address was blank.

You need to post your xml to help us solve the issue.

Please look into wsdl and it's specification.

Upvotes: 0

Related Questions