MyEclipse: Problem with creating a client for WS
msalman86 - Oct 13, 2011 - 03:28 PM
Post subject: Problem with creating a client for WS
I am trying to create a java project (client for a web service). I followed the instructions from here. But I when try to import WS from a URL it gives me following error:
|The following errors occurred while running WsImport. Generation aborted.
WSVR0615W: The user.install.root system property is not set. Some product classes might not be found.
WSVR0027I: The product will expire in 30 days.
[ERROR] generator error: com.sun.codemodel.internal.JClassAlreadyExistsException
The WS is not on local server, it is on our DIT environment. I am totally new to javax-ws; I have also tried to search for a solution but no luck.
I would really appreciate if someone could help me to resolve this, thanking in advance
support-tony - Oct 14, 2011 - 09:02 AM
Are you following the tutorial exactly, using only MyEclipse tools? At what point does the error occur? You say it's when importing the WS; do you mean the WSDL? If you could supply a screenshot at the point of failure and the WSDL URL you are, it might help us track down the problem. If you can attach the WSDL, that may also help.
Also, which edition/version of MyEclipse are you using, what is your OS and what do you mean by DIT?
The last error might be caused by two classes having the same case insensitive name, differing only in capitalization. Does your WSDL contain that problem?
msalman86 - Oct 14, 2011 - 03:25 PM
Thank you for your reply.
yes, I am following it exactly.
|Are you following the tutorial exactly, using only MyEclipse tools?|
Yes, I meant WSDL, It occurs right at the beginning.
|At what point does the error occur? You say it's when importing the WS; do you mean the WSDL?|
I'm attaching screen shot and WSDL. I can provide you the WDSL URL but I don't think it is accessible outside of my work network. But you can give it a try: [url=http://10.3.243.146:9080/ECMSSws/ecmssSOAPService/WEB-INF/wsdl/EcmSharedServices.wsdl]WSDL URL[/code]
|If you could supply a screenshot at the point of failure and the WSDL URL you are, it might help us track down the problem. If you can attach the WSDL, that may also help.|
After entering URL and going to next step, it gives failed validation warning:
and then when I click on finish it right away gives this error:
Notice the progress bar, it says 18% done, not sure if that's helpful.
I'm using MyEclipse blue 8.6 on Windows XP. DIT is our development environment.
|Also, which edition/version of MyEclipse are you using, what is your OS and what do you mean by DIT?|
No, that doesn't seem the case.
|The last error might be caused by two classes having the same case insensitive name, differing only in capitalization. Does your WSDL contain that problem?|
support-tony - Oct 17, 2011 - 07:59 AM
I'm not sure why the validation didn't work. Can you try running the wizard using the WSDL file, instead of the WSDL URL? When I tried it from the file, the validation found no errors.
As far as the JClassAlreadyExistsException, I did find two classes with the same file name, in your WSDL/XSD. The names have different case but are otherwise the same. This works on Linux, but not on Windows. The two classes are:
The former occurs from the wsdl.message element with the name "ecmssFault", the latter occurs because of the name of the type of the fault, specified in the ECMSSFault.xsd file, which is "ecmSSFault".
If you want the client to be generated on Windows, you'll have to change one of the names. For example, I reproduced the exception with the files you attached and then changed the type of the fault to "ecmSSFaultType" (and changed the name of the complexType element to "ecmSSFaultType", also); after that the code generation worked fine.
Let me know if this works for you.
msalman86 - Oct 19, 2011 - 02:35 PM
Tony, thank you for your quick support. I was able to resolve JClassAlreadyExistsException but validation warning is still there. As you suggested, I ran the wizard using WSDL file but that didn't change the outcome for me.
Anyway, my main issue was JClassAlreadyExistsException and that's resolved now so I can move on with rest of my task.
Once again, thank you!
support-tony - Oct 20, 2011 - 05:58 AM
Thanks for letting us know. It's a shame that we couldn't sort out the validation problem but I'm glad you can now get the client generated.
Let us know if you have any other problems.
All times are GMT - 6 Hours
Powered by PNphpBB2
© 2003-2004 The PNphpBB GroupCredits