Brian
Brian

Reputation: 616

Java java.lang.ClassCastException: some.package.SomeClass cannot be cast to some.package.SomeClass

I am calling a soap web service that has a structure that we generate from a wsdl, using wsdl2java. one of the packages/class is some.package.SomeClass. Once we get the result of that service in some.package.SomeClass, we call a jar, that has some.package.SomeClass as input to it. They truly are the same class, so how can I easily overcome this issue. I know I could change the input of the jar to a different package/object name, but it is truly the object that is also being generated from the wsdl, so I dont want to change it. How can I overcome this error in such a way so the class generated from the wsdl, and the input to the jar can be the same package and class name?

Any help would be great!

Thanks in advance!

Upvotes: 0

Views: 247

Answers (1)

NiNiCkNaMe
NiNiCkNaMe

Reputation: 181

Don't use the generated class if you have it packed in a jar that is given to you . just drop the thing that you have generated , and use the classes from the jar...

Upvotes: 1

Related Questions