Call the WebService client Method Runtime Modeler Error:wrapper Classxxxis not found. Do you run the APT to generate them?

Source: Internet
Author: User

After generating the WebService client with Wsimport, the runtime Modeler Error:wrapper class Stardand.nrcms.ncking.com.Login is always present when invoking the client generation method Found. You run an APT to generate them? This error;

The interface of the company I have done, and now different is, a change of address, and the original environment is the same, jdk1.6.20, and then joined the MyEclipse inside the Jax-WS 2.1 Runtime libraries and JAX-WS 2.1 API Libraries, since Wsimport generates the client, the specified package name is always reported as a class/interface with the same name "xxx**" is already in use error, resulting in not being able to generate client code, so there is no Specify the package name, generate the code, and then, in MyEclipse, rename the package name I want. The same steps, why would this be an error?

Baidu a bit, this error, found there are several answers.

1.JDK version to rise to jdk1.6.22 above, this I use jdk1.6.23, still use jdk1.6.43, all still exist this problem.

2. Need Jaxws-api-2.1.jar and Jaxb-api-2.1.jar, this I tried to myeclipse inside the Jax-WS 2.1 Runtime libraries and JAX-WS 2.1 API libraries are removed, Then the jaxws-ri-2.2.8 inside all the jar copied to the project under the Lib, the call did not find this one class error. Later thought that jdk1.6 inside already contains JAX-WS 2.1, so should not this problem.

3. The. apt_generated source package does not automatically generate JAX-ws corresponding classes, I think this should be for the server

All tried, no way, today and find a colleague originally generated, can use the client's code to call, the same problem occurs.

Front of the method are not, so back to the original point, the JDK version or back to the original jdk1.6.20,myeclipse inside the same plus JAX-WS 2.1 Runtime libraries and JAX-WS 2.1 API libraries

Since it is not found this class, is not the problem of the namespace, that is, I began to rename the client's package name when the reference has not been changed, and the result is not found this class? If there is a comment reference renaming, will not be changed at the same time, so back to why the client generated, will appear a class/interface with the same name "xxx**" was already in the error of use, Baidu after the http:/ /chenlin10058.iteye.com/blog/1558591 found the answer inside.

Currently available options:

1. Automatic Processing using-autonameresolution

Wsdl2java-autonameresolution http://localhost:8060/soa/services/otherTrackedVehicleSoapService?wsdl

2.wsimport-p com.test.client-keep Http://localhost:8060/soa/services/otherTrackedVehicleSoapService? Wsdl-b-xautonameresolution

I used the second method.

Wsimport-s d:\\temp-p com.**.** http://***.***.***  -b-xautonameresolution

After generating the client, it is found that all of the client's code is generated under a package, rather than the default package name, the code is divided into two packages, and then the original reference to the relevant client's package name to the current registration

When I call this method again, I find it's okay.

Why is that? Whether the class is in a package inside, but the Webserivce namespace should be the same, for this does not affect it, no theoretical basis, can only continue to try, stones, such a journey is really scary.

Call the WebService client Method Runtime Modeler Error:wrapper Classxxxis not found. Do you run the APT to generate them?

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.