[JBossWS] - org.jboss.ws.WSException: Cannot generate wsdl from interfac
by soni_rahul337
Hi,All
I have created the webservice that returns the user defined type. I have to use the jboss wstools for developing service. For that I have created the class that containts the getter and setter methods and the required interface and the and the class that implements the intreface with the logic. but now when I am returning the complex-type it will not allow me to generate the wsdl file and another artifacts neccesary for creating the service. The same webservice works fine for the String[] as a return parameter. I have read that wstools generate the response and request classes for the complex type but in my case it wont create. what to do in that case.
Here is the exception that i am getting while executing the wstools ant task:--
|
| [jbosswstools] org.jboss.ws.WSException: Cannot generate wsdl from: interface com.test.testdb.TestDataConnectionInterface
| [jbosswstools] at org.jboss.ws.tools.JavaToWSDL.generate(JavaToWSDL.java:348)
| [jbosswstools] at org.jboss.ws.tools.helpers.ToolsHelper.handleJavaToWSDLGeneration(ToolsHelper.java:122)
| [jbosswstools] at org.jboss.ws.tools.WSTools.process(WSTools.java:132)
| [jbosswstools] at org.jboss.ws.tools.WSTools.generate(WSTools.java:120)
| [jbosswstools] at org.jboss.ws.tools.ant.wstools.execute(wstools.java:103)
| [jbosswstools] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:275)
| [jbosswstools] at org.apache.tools.ant.Task.perform(Task.java:364)
| [jbosswstools] at org.apache.tools.ant.Target.execute(Target.java:341)
| [jbosswstools] at org.apache.tools.ant.Target.performTasks(Target.java:369)
| [jbosswstools] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1216)
| [jbosswstools] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
| [jbosswstools] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:40)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
| [jbosswstools] at org.apache.tools.ant.Project.executeTargets(Project.java:1068)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
| [jbosswstools] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
|
|
My Environment is:--
Jboss 4.0.5 GA
Apache Ant 1.6.5
Jdk 1.5.0_11
Regards and Thanks in Advace,
Rahul
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156715#4156715
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156715
16 years, 6 months
[JBossWS] - Re: JWSDP 2.0 with JBoss 4.0.4 ?
by tomstrummer
"jason.greene(a)jboss.com" wrote : We don't support soap encoding. We recommend using our tool, but if you prefer to stick with wscompile thats fine. Just make sure you are using rpcliteral or documentliteral.
|
| -Jason
Hi Jason -- sorry to resurrect an old thread but I'm seeing a similar problem.
I am consuming a web service that I don't have control over (I think it's a .NET WS). First I tried using Apache CXF's wsdl2java to generate the client stubs, which complained about soapenc:Array in the WSDL (I don't remember the exact error). Googling suggested I needed an XML-RPC client, which JBossWS supports.
So the JBossWS' wsconsume tool generates my stubs and jaxrpc-mapping.xml file correctly, and I can even create and call the web service. But I see this same warning about soap encoding. I am a WS noob -- what should I do?
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156398#4156398
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156398
16 years, 6 months
[JBossWS] - @WebServiceRef for JAX-RPC service?
by tomstrummer
Hi, does the @WebServiceRef annotation work for JAX-RPC services?
I can retrieve and use a service from the InitalContext (so I know it works) but I was hoping to get rid of the JNDI lookup. However if I use @WebServiceRef I just get a NullPointerException. Do I have to do anything fancy in my web.xml in order to enable the annotation scanning? This is all in a servlet.
I'm using JBossAS 4.2.2.GA upgraded to the latest JBossWS client (3.0.1-native-2.0.4.GA)
This doesn't work:
| public class TestServiceServlet extends HttpServlet {
|
| @WebServiceRef(wsdlLocation="META-INF/wsdl/IEnNET.wsdl")
| IEnNETService service;
|
| @Override
| protected void doGet(HttpServletRequest req, HttpServletResponse resp)
| throws ServletException, IOException {
|
| try {
| IEnNET port = service.getIEnNETPort(); // throws NPE
| // ...
|
This does work:
| public class TestServiceServlet extends HttpServlet {
|
| @Override
| protected void doGet(HttpServletRequest req, HttpServletResponse resp)
| throws ServletException, IOException {
|
| try {
| InitialContext ctx = new InitialContext();
| IEnNETService service = (IEnNETService)ctx.lookup("java:comp/env/service/EnNET");
| IEnNET port = service.getIEnNETPort();
|
web.xml looks like this:
| <service-ref>
| <service-ref-name>service/EnNET</service-ref-name>
| <service-interface>com.gridlogix.webservices.IEnNETService</service-interface>
| <wsdl-file>META-INF/wsdl/IEnNET.wsdl</wsdl-file>
| <jaxrpc-mapping-file>META-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
| <port-component-ref>
| <service-endpoint-interface>com.gridlogix.webservices.IEnNET</service-endpoint-interface>
| </port-component-ref>
| </service-ref>
|
Thanks.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4156382#4156382
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4156382
16 years, 6 months