[JBossWS] - org.jboss.ws.WSException: Cannot find java method
by ZazzaZ
Hi,
I used wscompile to generate a webservice starting from a correct WSDL.
Deploy went OK, but when I run the client class to test the service I got the following exception in server-side log.
|
| org.jboss.ws.WSException: Cannot find java method: controlloAccessoOperation
| at org.jboss.ws.metadata.OperationMetaData.getJavaMethod(OperationMetaData.java:213)
| at org.jboss.ws.binding.EndpointInvocation.getJavaMethod(EndpointInvocation.java:82)
| at org.jboss.ws.server.ServiceEndpointInvokerJSE.invokeServiceEndpoint(ServiceEndpointInvokerJSE.java:87)
| at org.jboss.ws.server.ServiceEndpointInvoker.invoke(ServiceEndpointInvoker.java:115)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:209)
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:355)
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:115)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:76)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
| at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
| at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
| at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
| at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
| at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:175)
| at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:74)
| at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
| at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
| at org.jboss.web.tomcat.tc5.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
| at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
| at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
| at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
| at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
| at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
| at java.lang.Thread.run(Thread.java:595)
|
|
|
|
I generated the files with the following files:
wscompile input
|
| <?xml version="1.0" encoding="UTF-8"?>
| <configuration xmlns="http://java.sun.com/xml/ns/jax-rpc/ri/config">
| <wsdl location="src/main/resources/web/wsdl/ControlloAccesso.wsdl"
| packageName="org.jbpm.bpel.login">
| <!--<namespaceMappingRegistry>
| <namespaceMapping namespace="http://j2ee.netbeans.org/xsd/ControlloAccesso"
| packageName="org.jbpm.bpel.types" />
| </namespaceMappingRegistry>-->
| </wsdl>
| </configuration>
|
|
WSDL file
|
| <?xml version="1.0" encoding="UTF-8"?>
| <definitions name="ControlloAccesso" targetNamespace="http://j2ee.netbeans.org/wsdl/ControlloAccesso"
| xmlns="http://schemas.xmlsoap.org/wsdl/"
| xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
| xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
| xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://j2ee.netbeans.org/wsdl/ControlloAccesso" xmlns:ns="http://xml.netbeans.org/schema/LoginTypes" xmlns:plink="http://schemas.xmlsoap.org/ws/2004/03/partner-link/">
| <types>
| <xsd:schema targetNamespace="http://j2ee.netbeans.org/wsdl/ControlloAccesso">
| <xsd:import namespace="http://xml.netbeans.org/schema/LoginTypes" schemaLocation="types.xsd"/>
| </xsd:schema>
| </types>
| <message name="ControlloAccessoOperationRequest">
| <part name="part1" type="ns:Credenziali"/>
| </message>
| <message name="ControlloAccessoOperationReply">
| <part name="part1" type="ns:Identificato"/>
| </message>
| <portType name="ControlloAccessoPortType">
| <operation name="ControlloAccessoOperation">
| <input name="input1" message="tns:ControlloAccessoOperationRequest"/>
| <output name="output1" message="tns:ControlloAccessoOperationReply"/>
| </operation>
| </portType>
| <binding name="ControlloAccessoBinding" type="tns:ControlloAccessoPortType">
| <soap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="ControlloAccessoOperation">
| <soap:operation/>
| <input name="input1">
| <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/ControlloAccesso"/>
| </input>
| <output name="output1">
| <soap:body use="literal" namespace="http://j2ee.netbeans.org/wsdl/ControlloAccesso"/>
| </output>
| </operation>
| </binding>
| <service name="ControlloAccessoService">
| <port name="ControlloAccessoPort" binding="tns:ControlloAccessoBinding">
| <soap:address location="http://localhost:18181/ControlloAccessoService/ControlloAccessoPort"/>
| </port>
| </service>
| <plink:partnerLinkType name="ControlloAccessoPartner">
| <!-- partnerLinkType are automatically generated when a new portType is added. partnerLinkType are used by BPEL processes.
| In a BPEL process, a partner link represents the interaction between the BPEL process and a partner service. Each partner link is associated with a partner link type.
| A partner link type characterizes the conversational relationship between two services. The partner link type can have one or two roles.-->
| <plink:role name="ControlloAccessoPortTypeRole" portType="tns:ControlloAccessoPortType"/>
| </plink:partnerLinkType>
| </definitions>
|
|
Imported schema
|
| <?xml version="1.0" encoding="UTF-8"?>
|
| <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
| targetNamespace="http://xml.netbeans.org/schema/LoginTypes"
| xmlns:tns="http://xml.netbeans.org/schema/LoginTypes">
| <xsd:complexType name="Credenziali">
| <xsd:sequence>
| <xsd:element name="nome" type="xsd:string"></xsd:element>
| <xsd:element name="password" type="xsd:string"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| <xsd:complexType name="Identificato">
| <xsd:sequence>
| <xsd:element name="Esito" type="xsd:string"></xsd:element>
| </xsd:sequence>
| </xsd:complexType>
| </xsd:schema>
|
|
web.xml file
|
| <?xml version="1.0" encoding="UTF-8"?>
| <web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
|
| <!-- Production Scheduling Process -->
| <servlet>
| <servlet-name>controlloServlet</servlet-name>
| <servlet-class>
| org.jbpm.bpel.login.Impl
| </servlet-class>
| </servlet>
| <servlet-mapping>
| <servlet-name>controlloServlet</servlet-name>
| <url-pattern>/controllo</url-pattern>
| </servlet-mapping>
|
| </web-app>
|
|
And finally the webservices.xml file
|
| <?xml version="1.0" encoding="UTF-8"?>
| <webservices version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
| http://java.sun.com/xml/ns/j2ee/j2ee_web_services_1_1.xsd">
|
| <webservice-description>
|
| <webservice-description-name>
| Controllo Autenticazione
| </webservice-description-name>
| <wsdl-file>WEB-INF/wsdl/ControlloAccesso.wsdl</wsdl-file>
| <jaxrpc-mapping-file>WEB-INF/jaxrpc-mapping.xml</jaxrpc-mapping-file>
|
| <port-component>
|
| <port-component-name>ControlloAccessoPort</port-component-name>
| <wsdl-port xmlns:portNS="http://j2ee.netbeans.org/wsdl/ControlloAccesso">portNS:ControlloAccessoPort</wsdl-port>
| <service-endpoint-interface>
| org.jbpm.bpel.login.ControlloAccessoPortType
| </service-endpoint-interface>
| <service-impl-bean>
| <servlet-link>controlloServlet</servlet-link>
| </service-impl-bean>
|
| </port-component>
|
| </webservice-description>
|
| </webservices>
|
|
I hope my information are enought to get a solution. Bye
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097381#4097381
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097381
18Â years, 8Â months
[JBoss Seam] - restrict tag in pages.xml
by slavach
Hi, I've encountered quite strange Seam behavior in my project.
I setup security framework and it works great for restricting access to mehods
(in EJB) and to UI elements (in *.xhtml with s:hasRole).
All security exceptions redirected to default security page.
Now I setup page security in page.xml:
| <page view-id="/page1.xhtml" login-required="true">
| <restrict>#{s:hasRole('admin')}</restrict>
| </page>
|
Access to this page granted although I see AuthorizationException in log file.
If I redefine default exception page:
| <exception class="org.jboss.seam.security.AuthorizationException">
| <end-conversation/>
| <redirect view-id="/error.xhtml">
| <message severity="WARN">Access denied</message>
| </redirect>
| </exception>
|
Than access to page1 restricted and I redirected to error.xhtml.
Did I miss something and exception page definition is mandatory for security configuration in page.xml?
My environment is glassfish-v2 and jboss-seam 2.0.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097380#4097380
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097380
18Â years, 8Â months
[Security & JAAS/JBoss] - Jboss Web wth SSl
by Amit_verma
Hi Guys ,
Can someone help me to solve my problem given below,
When i put my server.keystore file in the server/default/conf .i got this errror!!!
java.lang.ClassNotFoundException: Error loading SSL Implementation org.apache.tomcat.util.net.puretls.PureTLSImplementation :java.lang.ClassNotFoundException: No ClassLoaders found for: org.apache.tomcat.util.net.puretls.PureTLSImplementation
My server.xml (deploy/jboss-web.deployer/server.xml ) is given below
<connector port="8443" address="$(jboss.bind.address)"
maxThreads="100" strategy="ms" maxHttpHeaderSize=""8192
emptySessionPath="true"
scheme="https" secure="true" clientAuth="false"
keystoreFile="${jboss.server.home.dir}cong/server.keystore)
keystorepass="123456" sslprotocol="TLS"/>
Aimz
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097377#4097377
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097377
18Â years, 8Â months
[Persistence, JBoss/CMP, Hibernate, Database] - Changing DB from mySql - oracle having persistance problems
by gubisoul
Hey.
We had our tests with EJB3 in an mysql db and it worked fine, but we have to change db to Oracle now, and that caused alot of problems.
I hope someone can give me some pointers to what i am doing wrong, and what i am doing right, i have tried with transaktions, but without any effect.
The error i get is:
anonymous wrote : 10:53:10,147 ERROR [STDERR] javax.ejb.EJBException: javax.persistence.PersistenceException: org.hibernate.HibernateException: this instance does not yet exist as a row in the database
| 10:53:10,147 ERROR [STDERR] at org.jboss.ejb3.tx.Ejb3TxPolicy.handleExceptionInOurTx(Ejb3TxPolicy.java:69)
| 10:53:10,147 ERROR [STDERR] at org.jboss.aspects.tx.TxPolicy.invokeInOurTx(TxPolicy.java:83)
| 10:53:10,147 ERROR [STDERR] at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:191)
| 10:53:10,147 ERROR [STDERR] at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
At this point of my code after the Sysout 4:
anonymous wrote :
| public CustomerBean addNewCustomerBean(ServiceProviderBean serviceProviderBean, CustomerBean customerBean) throws Exception {
| System.out.println("1");
| serviceProviderBean = em.find(ServiceProviderBean.class, serviceProviderBean.getId());
| System.out.println("2");
| serviceProviderBean.getCustomerBeans().add(customerBean);
| System.out.println("3");
| em.persist(customerBean);
| System.out.println("4");
| em.refresh(customerBean);
| System.out.println("5");
| em.merge(serviceProviderBean);
| System.out.println("6");
| return customerBean;
| }
Here is the DS file:
anonymous wrote : <xa-datasource>
| <jndi-name>OracleDS</jndi-name>
| <track-connection-by-tx/>
| <isSameRM-override-value>false</isSameRM-override-value>
| <xa-datasource-class>oracle.jdbc.xa.client.OracleXADataSource</xa-datasource-class>
| <xa-datasource-property name="URL">jdbc:oracle:thin:@url ending (this is correct at my end)UK</xa-datasource-property>
| <xa-datasource-property name="User">***Username***</xa-datasource-property>
| <xa-datasource-property name="Password">***password***</xa-datasource-property>
| <!-- Uses the pingDatabase method to check a connection is still valid before handing it out from the
| pool -->
| <valid-connection-checker-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleValidConnectionChecker</valid-connection-checker-class-name>
| <!-- Checks the Oracle error codes and messages for fatal errors -->
| <exception-sorter-class-name>org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter</exception-sorter-class-name>
| <!-- Oracles XA datasource cannot reuse a connection outside a transaction once enlisted in a global
| transaction and vice-versa -->
| <no-tx-separate-pools/>
|
| <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml -->
|
| <type-mapping>Oracle9i</type-mapping>
|
| <min-pool-size>1</min-pool-size>
| <max-pool-size>10</max-pool-size>
| <blocking-timeout-millis>5000</blocking-timeout-millis>
| <idle-timeout-minutes>2</idle-timeout-minutes>
| </xa-datasource>
And here is the Persistance file:
anonymous wrote : <?xml version="1.0" encoding="UTF-8"?>
| <persistence xmlns="http://java.sun.com/xml/ns/persistence"
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
| xsi:schemaLocation="http://java.sun.com/xml/ns/persistence
| http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd" version="1.0">
|
| <persistence-unit name="forums" transaction-type="JTA">
| <jta-data-source>java:/OracleDS</jta-data-source>
|
|
|
|
| </persistence-unit>
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097373#4097373
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097373
18Â years, 8Â months
[JBoss Seam] - Re: Redirect on value change
by thatrichard
1. This may sound like an unbelievably silly question, but:
What do you mean by my "submit method"? With, for example, h:commandButton, you specifiy the method via the action parameter.
The submit method in my example is a javascript call fired by the browser when the field changes. That, I image, cases a postback, but I don't know how I would hook into that. Do you know what method gets invoked for a non-specific postback?
2. To answer your question about auto and manual submits:
As I understand it, when a submit button (incl. h:commandButton, h:commandLink) is fired it invokes a JSF Action, which returns a string value to drive navigation.
ValueChangeListeners on the other hand raise an ActionListener event, which do not participate in navigation.
The ValueChangeEvent happens first, so if I could hook into the submit, I could certainly make this work via pages.xml.
Thanks for your input, though.
Richard
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4097371#4097371
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4097371
18Â years, 8Â months