[JBossWS] - Re: NoClassDefFoundError: RuntimeWSDLParser.createReader
by electren
In according to the problem above:
To get nearer to the solution, i had wrote a main-Methode which calls the Webservice....
Here i got another Exception.
First the main-Methode:
File wsdl = new File("D:/workspace/app-webservice-connector/src/main/resources/META-INF/Cow.wsdl");
| URL wsdlUrl = null;
| try {
| wsdlUrl = new URL("http://localhost:8080/app-cs-api/services/Cow?wsdl");
| // wsdlUrl = wsdl.toURL();
| } catch (MalformedURLException e1) {
| // TODO Auto-generated catch block
| e1.printStackTrace();
| }
| QName serviceName = new QName("http://cow.service.app.fm.business.de", "Cow");
|
| Service service = Service.create(wsdlUrl, serviceName);
| /*
| * DEBUG!!!
| */
| System.out.println(service.getServiceName().getLocalPart());
| System.out.println(service.getServiceName().getNamespaceURI());
| System.out.println(service.getWSDLDocumentLocation().getPath());
|
| //Cow_Service service = (Cow_Service) Cow_Service.createCall(serviceName, wsdlUrl);
|
| Cow_PortType port = (Cow_PortType) service.getPort(Cow_PortType.class);
|
| try {
| boolean response = port.pruefeLogin("user", "x");
| } catch (RemoteException e) {
| // TODO Auto-generated catch block
| e.printStackTrace();
| }
|
The exception:
| Exception in thread "main" com.sun.xml.ws.model.RuntimeModelerException: A WebService annotation is not present on class: de.business.fm.app.service.cow.Cow_PortType
| at com.sun.xml.ws.model.RuntimeModeler.getPortTypeName(RuntimeModeler.java:1252)
| at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:296)
| at com.sun.xml.ws.client.WSServiceDelegate.getPort(WSServiceDelegate.java:306)
| at javax.xml.ws.Service.getPort(Service.java:161)
| at WSLogin.main(WSLogin.java:48)
|
The Interface generated by wstools:
| /*
| * JBossWS WS-Tools Generated Source
| *
| * Generation Date: Tue Apr 17 19:06:34 CEST 2007
| *
| * This generated source code represents a derivative work of the input to
| * the generator that produced it. Consult the input for the copyright and
| * terms of use that apply to this source code.
| */
| package de.business.fm.app.service.cow;
| public interface Cow_PortType extends java.rmi.Remote
| {
|
| public boolean pruefeLogin(java.lang.String anmeldenamen, java.lang.String kennwort) throws java.rmi.RemoteException;
| }
|
How i have to place some annotation in this interface?
Is it possible that wstools generated not correctly??
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038079#4038079
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038079
19 years, 2 months
[JBoss Seam] - Re: Problems Starting Page Flows
by Delphi's Ghost
Hey Peter, thanks for the reply.
I changed my page flow to use :
| <start-state name="teststart">
| <transition to="test1"/>
| </start-state>
|
|
| <page name="test1" view-id="/testpage1.xhtml">
| <transition name="next" to="test2" />
| </page>
|
and when I click my links I get :
pageflow is not currently at a <page> or <start-page> node
| (note that pageflows that begin during the RENDER_RESPONSE phase should use <start-page> instead of <start-state>)
Which I had already tried.
So, I think most of my cases involve going to a new page when I start a flow, therefore, I need to use start-state, hence thereforth, I need to determine how to start a page flow that is compatable with the start-state syntax.
After a bit of messing around, browsing the examples (DVD Store checkout flow) it looks like I have it working.
(Steps included for the benefit of the next poor soul with this problem)
I added a function which returns void, and annotate it with the begin(pageflow). I also added one without the annotation so I could test the inline pageflow/conversation starters :
| @Begin(pageflow="TestFlow")
| public void annotatedVoidFunc() {
| log.info("Annotated Voidfunc Called");
| }
|
| public void voidFunc() {
| log.info("Voidfunc Called");
| }
|
|
In my page, I created new links :
| <s:link value="Annotated Void Func" action="#{TestAction.annotatedVoidFunc}"/><br/>
| <s:link value="inline Void Func" action="#{TestAction.voidFunc}" propagation="begin" pageflow="TestFlow"/><br/>
|
I compiled, deployed, ran, and both links work fine.
So, I guess if you want to jump to the first page of the pageflow and have navigation handled for you by the page flow, you need to use a void function that doesn't return a string.
I have to confess, I am a little unclear on how action methods are handled when they return void vs returning null vs returning a string. From this example, it seems that it does make a difference.
Thanks again peter,
DG
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4038076#4038076
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4038076
19 years, 2 months