- This topic has 6 replies, 3 voices, and was last updated 11 years, 5 months ago by support-tony.
-
AuthorPosts
-
CS TanParticipantWe were trying to expose an existing java class Login.java as a web service by following the link below:
http://www.myeclipseide.com/documentation/quickstarts/blueedition/blue_jaxrpc/We encountered some errors when trying to create it. Attached is a document with all the screenshots. Appreciate your quick response.
Thanks.
Attachments:
You must be logged in to view attached files.
support-swapnaModeratorjoejess,
Sorry that you are seeing this issue.
1. Can you please share the Installation Details from MyEclipse > Installation Summary > Installation Details?
2.Java2WSDL error which indicates that the class cannot be converted into an xml schema type. Note that all java class files have mappings to xml schema types. Converting an existing java service into a Web service via Java2WSDL is not guaranteed.
All of the java classes that are part of your Web service interface must have appropriate mappings to wsdl. This is necessary so that a client to the service can automatically generate the interface and all related classes in order to access your Web service.
3. If possible can you please attach the .java which you are working with to help us replicate the issue at our end?
CS TanParticipantThanks for the reply.
Attached is the Login.java that we are working with.
Installation details:
*** Eclipse details:
MyEclipse Blue EditionVersion: 10.0 Blue
Build id: 10.0-Blue-20111028Eclipse Platform
Version: 3.7.0.v20110530-9gF7UHNFFt4cwE-pkZDJ7oz-mj4OSEIlu9SEv0f
Build id: I20110613-1736Eclipse Java Development Tools
Version: 3.7.0.v20110520-0800-7z8gFchFMTdFYKuLqBLqRja9B15B
Build id: I20110613-1736Eclipse Plug-in Development Environment
Version: 3.7.0.v20110504-0800-7b7qFVpFEx2XnmYtj_9RfO7
Build id: I20110613-1736Eclipse Graphical Editing Framework GEF
Version: 3.7.0.v20110425-2050-777D-81B2Bz0685C3A6E34272
Build id: 201105020958Eclipse RCP
Version: 3.7.0.v20110216-9DB5Fm1FpBGy_AaVz-mFamgY
Build id: I20110613-1736Eclipse startup command=-os
win32
-ws
win32
-arch
x86_64
-showsplash
-launcher
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\MyEclipse Blue Edition 10\myeclipse-blue.exe
-name
Myeclipse-blue
–launcher.library
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\MyEclipse Blue Edition 10\../Common/plugins/org.eclipse.equinox.launcher.i18n.win32.win32.x86_64_3.2.0.v201103301700\eclipse_3215.dll
-startup
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\MyEclipse Blue Edition 10\../Common/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar
-exitdata
1b60_5c
-install
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\MyEclipse Blue Edition 10
-configuration
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\MyEclipse Blue Edition 10\configuration
-vm
C:\Users\admin\AppData\Local\MyEclipse Blue Edition\Common\binary\com.sun.java.jdk.win32.x86_64_1.6.0.013\bin\javaw.exeAttachments:
You must be logged in to view attached files.
CS TanParticipantAttached is the Installation Details.
Thanks.
Attachments:
You must be logged in to view attached files.
support-tonyKeymasterJoe,
Thanks for the information. It seems that there are several errors that the generator can work round, by using the anyType schema. Many seem to be because there is no “default” constructor (a no-arguments constructor) on a class that will be part of the interface.
However, there is a fatal error concerning the overriding of the getMessageByKey method, which isn’t allowed for this kind of web service.
This seems to be a development issue, rather than a MyEclipse issue. Have you gone through the errors and warnings to try to work around them? From the attached Java class, it’s difficult to see where the problems lie as the class is dependent on its hierarchy and on referenced classes, so we can’t really replicate the problem from that single class.
I see that you have also posted this on StackOverflow (where I’ve added a comment). Hopefully, you can get help from web services developers but I think it would be helpful to spend some time going through the various errors and warnings yourself to see if you can track them down and work around them.
CS TanParticipantThanks for your reply. We have successfully expose a simple login java class as web service, however we encountered the below error when Invoke a WSDL Operation. Attached is a screenshot of the error. Much appreciate for your quick response.
Thanks.
**SOAP Response Envelope:**
– <soapenv:Envelope xmlns:soapenv=”http://schemas.xmlsoap.org/soap/envelope/” xmlns:soapenc=”http://schemas.xmlsoap.org/soap/encoding/” xmlns:xsd=”http://www.w3.org/2001/XMLSchema” xmlns:xsi=”http://www.w3.org/2001/XMLSchema-instance”>
– <soapenv:Body>
– <soapenv:Fault>
<faultcode>Server</faultcode>
<faultstring>Internal Error</faultstring>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>**LoginTest.java:**
public class LoginTest {
public static void main(String[] args) {
// TODO Auto-generated method stub}
public String doLogin_loginAction(String User, String Password) {
String _LOC = “[Login: doLogin_loginAction]”;Authenticate _au = null;
HashMap _login_map = _au.login(User, Password);String _status = (String) _login_map.get(“status”);
if (_status.equals(“success”)) {
return “success”;
}
return “failure”;
}
}Attachments:
You must be logged in to view attached files.
support-tonyKeymasterJoe,
Again, this looks like a development question, rather than a MyEclipse question but it seems that you need to add the user and password data to get a successful login.
-
AuthorPosts