Not valid wsdl from WCF IIS server

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Not valid wsdl from WCF IIS server

Stanislav Dzik
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 | Threaded
Open this post in threaded view
|

Re: Not valid wsdl from WCF IIS server

Lukas Jungmann-2
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

--lukas

[1]:
http://jaxb.java.net/guide/Dealing_with_errors.html#Two_declarations_cause_a_collision_in_the_ObjectFactory_class
[2]:
http://jax-ws.java.net/2.2.7/docs/release-documentation.html#users-guide-wsdl-customization

> 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
>
>
>
>
> --
> View this message in context: http://metro.1045641.n5.nabble.com/Not-valid-wsdl-from-WCF-IIS-server-tp5710188.html
> Sent from the Metro - Users mailing list archive at Nabble.com.