IT: WseWsdl2.exe troubles

I would like to point out few problems which I’ve experienced during my experiments with WseWsdl2.exe tool. I am using WseWsdl2.exe from Microsoft Web Services Enhancements 2.0 SP2. The WseWsdl2.exe is WSDL to SoapClient Tool. It should replace current .NET Wsdl.exe tool. What I find quite disappointing are the error messages produced by this tool. WSDLs we use in our project are compilable without any problems with Wsdl.exe but WseWsdl2.exe complains. What is worse, that the error messages are very unclear. Documentation didn’t help us, neither the Google search. We had to take our WSDLs and remove element after element to find out what’s wrong with them. Here are the findings, maybe it will help someone having similar troubles. This is the reason for this post.



First problems occur when the WSDL definition contains more than one message part in the (SOAP) message. But the error message says this:





An error occurred processing this WSDL. More information:

System.Exception: Invalid WSDL file from SoapService

at ClientGen.ClientGen.GetBindingType(…)

at ClientGen.ClientGen.WriteCSOperationBinding(…)

at ClientGen.ClientGen.WriteOperationBinding(…)

at ClientGen.ClientGen.WriteClass(…)

at ClientGen.ClientGen.GenerateCode(…)

at ClientGen.ClientGen.GenerateCode(…)

at ClientGen.Class1.Main(String[] arguments)



I know that WSDLs describing messages with more than one message part (referring element) in SOAP body should not be used. It is stated in the WS-I Basic Profile 1.1. We can change the WSDL to wrapped-literal, no problem. But the tool should not produce this general error!



The second problem I would like to point occurs when the WSDL contains unsupported extension element. We are using custom extesion elements within the soap:binding. The extension element present in our WSDL is not marked with wsdl:required="true". So it should be silently ignored if the consumer does not understand him or cannot process him (as stated in the WS-I Basic Profile 1.1, which also clarifies and tights up the rules from the WSDL specification). WseWsdl2.exe does not ignore them – but fails:





An error occurred processing this WSDL. More information:

System.InvalidCastException: Specified cast is not valid.

at ClientGen.ClientGen.WriteCSOperationBinding(…)

at ClientGen.ClientGen.WriteOperationBinding(…)

at ClientGen.ClientGen.WriteClass(…)

at ClientGen.ClientGen.GenerateCode(…)

at ClientGen.ClientGen.GenerateCode(…)

at ClientGen.Class1.Main(String[] arguments)



Again, the error message is very, very unclear! For me it seems that the level of WSDL specifications support is much lower than it was in previous version. Without any warning in the documentation. Or Am I missing something?


Reklamy

One thought on “IT: WseWsdl2.exe troubles

  1. Anonymous 16/04/2005 / 15:53

    Hide,I am having this problem and I can’t find a way to overcome it. I donwloaded WSE SP3 and it still does not work!!!!

    To se mi líbí

Zanechat Odpověď

Vyplňte detaily níže nebo klikněte na ikonu pro přihlášení:

WordPress.com Logo

Komentujete pomocí vašeho WordPress.com účtu. Odhlásit / Změnit )

Twitter picture

Komentujete pomocí vašeho Twitter účtu. Odhlásit / Změnit )

Facebook photo

Komentujete pomocí vašeho Facebook účtu. Odhlásit / Změnit )

Google+ photo

Komentujete pomocí vašeho Google+ účtu. Odhlásit / Změnit )

Připojování k %s