Skip to main content

Not valid wsdl from WCF IIS server

1 reply [Last post]
Anonymous

Hi,
I have wsdl which descibed secured web services (using STS token) provider
is on IIS server in .net.
I'm using metro framework.

When I wanted import into .net, it worked, but I cannot import definition
sucesfully.

I tried eclipse, soapUI, NetBeans and in the end command line for wsimport.

Error during wsimport:

[ERROR] Two declarations cause a collision in the ObjectFactory class.
line 1 of
file:/C:/NetBeans/source/Elvis/xml-resources/web-service-references/ElvisPublicService/wsdl/test.veoseleht.ee/Service/ElvisPublicService.svc.xsd_xsd2.xsd

Can I avoid this error during import and generate client side ?
Have I after first phase of importing set some atributes or parameters and
refresh this importing (NetBeans) or what I have to do with this problem?

Have I ask providers of that web services for regenerate this wsdl file?

How it is possible, that .net client worked and I cannot import wsdl into
java tool?

Thankx for your advice.

Stan

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Lukas Jungmann

Hi,

On 03/22/2013 08:44 AM, Stanislav Dzik wrote:
> Hi,
> I have wsdl which descibed secured web services (using STS token) provider
> is on IIS server in .net.
> I'm using metro framework.
>
> When I wanted import into .net, it worked, but I cannot import definition
> sucesfully.
>
> I tried eclipse, soapUI, NetBeans and in the end command line for wsimport.
>
> Error during wsimport:
>
> [ERROR] Two declarations cause a collision in the ObjectFactory class.
> line 1 of
> file:/C:/NetBeans/source/Elvis/xml-resources/web-service-references/ElvisPublicService/wsdl/test.veoseleht.ee/Service/ElvisPublicService.svc.xsd_xsd2.xsd

error means that there are two elements/types in the schema which are
mapped to one class/method, better description can be found in the
documentation[1]

>
>
> Can I avoid this error during import and generate client side ?

yes but it depends on what exactly is causing the error in your case.
You can try omitting '-p' (package) option for wsimport if you use it or
alter web service's schema to contain JAXB/JAXWS customizations or
create your own customization file[2] and pass it to the wsimport