[JBossWS] - A service endpoint interface should extend Remote
by erkinda
hi
I try to publish ejb as webservice
ide: JBossIDE-200701290313-nightly-ALL.zip
project: ejb3
ejb3 code (generated by wizard!):
package main;
import javax.ejb.Stateless;
import main.LoanProcessor;
public @Stateless class LoanProcessorBean implements LoanProcessor {
public String processApplication(String socialSecurityNumber, String applicantName, String applicantAddress, String applicantEmailAddress, int applicantAge, String applicantGender, float annualSalary, float amountRequested)
{
...
}
}
interface:
package main;
import javax.ejb.Remote;
@Remote
public interface LoanProcessor {
public String processApplication(String socialSecurityNumber, String applicantName, String applicantAddress, String applicantEmailAddress, int applicantAge, String applicantGender, float annualSalary, float amountRequested);
}
result:
Running JBossWS wstools for [LoanProcessor]
directory: C:\jboss\projects\ide\loanProcessing\LoanProcessor
command: cmd.exe /C C:\jboss\as-4.0.4.GA\bin\wstools.bat -cp bin -config c:\temp\wstools-config47877.xml -dest C:\jboss\projects\ide\loanProcessing\LoanProcessor\src
========================================================================="
.
WSTools Environment
.
JBOSS_HOME: C:\jboss\as-4.0.4.GA\bin\\..
.
JAVA: c:\jdk1.6.0_01\bin\java
.
JAVA_OPTS:
.
========================================================================="
.
Exception in thread "main" org.jboss.ws.WSException: A service endpoint interface should extend Remote
help me solve this problem, please
thanks
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4008187#4008187
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4008187
17 years, 11 months
[JBossWS] - enumerations in jboss ws...
by mwiles
I have an xsd which has an enumeration type:
<xsd:simpleType name="IncomeTypeEnum">
<xsd:restriction base="xsd:string">
<xsd:enumeration value="pension" id="pension"/>
<xsd:enumeration value="salary" />
</xsd:restriction>
</xsd:simpleType>
The mapping snippet for that enum looks like this:
<java-xml-type-mapping>
<java-type>za.co.sanlam.employeebenefits.IncomeTypeEnum</java-type>
<root-type-qname xmlns:rtq="http://sanlam.co.za/employeebenefits/dto/1">rtq:IncomeTypeEnum</root-type-qname>
<qname-scope>simpleType</qname-scope>
<variable-mapping>
<java-variable-name>pension</java-variable-name>
<xml-element-name>pension</xml-element-name>
</variable-mapping>
<variable-mapping>
<java-variable-name>salary</java-variable-name>
<xml-element-name>salary</xml-element-name>
</variable-mapping>
</java-xml-type-mapping>
But when I deploy the web service I get the following error:
19:10:45,359 ERROR [MainDeployer] Could not start deployment: file:/C:/usr/jboss-4.0.5.GA/server/default/tmp/deploy/tmp50100EAR.ear-contents/EJB.jar
org.jboss.ws.WSException: Attribute pension found in jaxrpc-mapping but not in the schema: {http://sanlam.co.za/employeebenefits/dto/1}IncomeTypeEnum
at org.jboss.ws.jaxb.SchemaBindingBuilder.processXmlAttributeName(SchemaBindingBuilder.java:260)
at org.jboss.ws.jaxb.SchemaBindingBuilder.processNonArrayType(SchemaBindingBuilder.java:207)
at org.jboss.ws.jaxb.SchemaBindingBuilder.processJavaXmlTypeMapping(SchemaBindingBuilder.java:147)
at org.jboss.ws.jaxb.SchemaBindingBuilder.bindSchemaToJava(SchemaBindingBuilder.java:119)
at org.jboss.ws.jaxb.SchemaBindingBuilder.buildSchemaBinding(SchemaBindingBuilder.java:99)
at org.jboss.ws.metadata.ServiceMetaData.getSchemaBinding(ServiceMetaData.java:332)
at org.jboss.ws.metadata.ServiceMetaData.eagerInitialize(ServiceMetaData.java:400)
at org.jboss.ws.metadata.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:147)
at org.jboss.ws.server.ServiceEndpoint.start(ServiceEndpoint.java:106)
at org.jboss.ws.server.ServiceEndpointManager.startServiceEndpoint(ServiceEndpointManager.java:529)
at org.jboss.ws.deployment.ServiceEndpointDeployer.start(ServiceEndpointDeployer.java:144)
at org.jboss.ws.integration.jboss.DeployerInterceptor.start(DeployerInterceptor.java:104)
at org.jboss.deployment.SubDeployerInterceptorSupport$XMBeanInterceptor.start(SubDeployerInterceptorSupport.java:188)
at org.jboss.deployment.SubDeployerInterceptor.invoke(SubDeployerInterceptor.java:95)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:210)
Has anyone done enumerations with jboss and could shed some light on what is going on? I
The java code for the enumration is as follows...
It does not seem as this is the problem as if I remove the java class, the error persists.
public class IncomeTypeEnum {
private java.lang.String _value_;
private static java.util.HashMap _table_ = new java.util.HashMap();
// Constructor
protected IncomeTypeEnum(java.lang.String value) {
_value_ = value;
_table_.put(_value_,this);
};
public static final java.lang.String _pension = "pension";
public static final java.lang.String _salary = "salary";
public static final IncomeTypeEnum pension = new IncomeTypeEnum(_pension);
public static final IncomeTypeEnum salary = new IncomeTypeEnum(_salary);
public java.lang.String getValue() { return _value_;}
public static IncomeTypeEnum fromValue(java.lang.String value)
throws java.lang.IllegalArgumentException {
IncomeTypeEnum enum = (IncomeTypeEnum)
_table_.get(value);
if (enum==null) throw new java.lang.IllegalArgumentException();
return enum;
}
public static IncomeTypeEnum fromString(java.lang.String value)
throws java.lang.IllegalArgumentException {
return fromValue(value);
}
public boolean equals(java.lang.Object obj) {return (obj == this);}
public int hashCode() { return toString().hashCode();}
public java.lang.String toString() { return _value_;}
}
I've tried everything to find the answer to my problem but just can't get anything. Hopefully it's quite a simple solution.
Michael Wiles
Java Developer
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007917#4007917
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007917
17 years, 11 months
[JBossWS] - jsr181pojo - java 1.5 - SOAPMessageImpl
by bentzys
I get the following error while trying to onnect to jsr181pojo ws example: :
16:06:39,165 INFO [ServiceEndpointManager] WebService started: http://bentzys-nb:8080/jaxws-samples-jsr181pojo
| 16:07:28,022 ERROR [[TestService]] Servlet.service() for servlet TestService threw exception
| java.lang.NoSuchMethodError: org.jboss.ws.soap.SOAPMessageImpl.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
| at org.jboss.ws.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:77)
As written in install.text I copied lib/jboss-jdk1.5/jbossws-client.jar to $JBOSS_HOME/client/
I also try by copying it to /thirdparty directory, but didn't help.
Thanks in advance.
--bentzy
here is the complete log:
| "C:\Program Files\Java\jdk1.5.0_09\bin\java" -ms64m -mx384m -classpath "C:\Program Files\Java\jdk1.5.0_09\lib\tools.jar;C:\runtimeJB4\jboss\bin\run.jar;" -Xdebug -Xrunjdwp:transport=dt_socket,address=127.0.0.1:1487,suspend=y,server=n -Dfile.encoding=windows-1252 org.jboss.Main -c atomica
| Connected to the target VM, address: '127.0.0.1:1487', transport: 'socket'
| 16:05:38,279 INFO [Server] Starting JBoss (MX MicroKernel)...
| 16:05:38,289 INFO [Server] Release ID: JBoss [Zion] 4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)
| 16:05:38,289 INFO [Server] Home Dir: C:\runtimeJB4\jboss
| 16:05:38,289 INFO [Server] Home URL: file:/C:/runtimeJB4/jboss/
| 16:05:38,289 INFO [Server] Patch URL: null
| 16:05:38,289 INFO [Server] Server Name: atomica
| 16:05:38,289 INFO [Server] Server Home Dir: C:\runtimeJB4\jboss\server\atomica
| 16:05:38,289 INFO [Server] Server Home URL: file:/C:/runtimeJB4/jboss/server/atomica/
| 16:05:38,289 INFO [Server] Server Log Dir: C:\runtimeJB4\jboss\server\atomica\log
| 16:05:38,289 INFO [Server] Server Temp Dir: C:\runtimeJB4\jboss\server\atomica\tmp
| 16:05:38,289 INFO [Server] Root Deployment Filename: jboss-service.xml
| 16:05:38,760 INFO [ServerInfo] Java version: 1.5.0_09,Sun Microsystems Inc.
| 16:05:38,760 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_09-b03,Sun Microsystems Inc.
| 16:05:38,760 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
| 16:05:40,412 INFO [Server] Core system initialized
| 16:05:44,268 INFO [WebService] Using RMI server codebase: http://bentzys-nb:8083/
| 16:05:44,318 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
| 16:05:48,255 INFO [TreeCache] setting cluster properties from xml to: UDP(ip_mcast=true;ip_ttl=64;loopback=false;mcast_addr=228.1.20.12;mcast_port=48866;mcast_recv_buf_size=80000;mcast_send_buf_size=150000;ucast_recv_buf_size=80000;ucast_send_buf_size=150000):PING(down_thread=false;num_initial_members=3;timeout=2000;up_thread=false):MERGE2(max_interval=20000;min_interval=10000):FD_SOCK:VERIFY_SUSPECT(down_thread=false;timeout=1500;up_thread=false):pbcast.NAKACK(down_thread=false;gc_lag=50;max_xmit_size=8192;retransmit_timeout=600,1200,2400,4800;up_thread=false):UNICAST(down_thread=false;min_threshold=10;timeout=600,1200,2400;window_size=100):pbcast.STABLE(desired_avg_gossip=20000;down_thread=false;up_thread=false):FRAG(down_thread=false;frag_size=8192;up_thread=false):pbcast.GMS(join_retry_timeout=2000;join_timeout=5000;print_local_addr=true;shun=true):pbcast.STATE_TRANSFER(down_thread=true;up_thread=true)
| 16:05:48,275 INFO [TreeCache] setEvictionPolicyConfig(): <?xml version="1.0" encoding="UTF-16"?>
| <config>
| <attribute name="wakeUpIntervalSeconds">3</attribute>
| <!-- Cache wide default -->
| <region name="/_default_" policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="maxNodes">200000</attribute>
| <attribute name="timeToLiveSeconds">0</attribute>
| </region>
| <region name="/2112" policyClass="org.jboss.cache.eviction.LRUPolicy">
| <attribute name="maxNodes">1</attribute>
| <attribute name="timeToLiveSeconds">1</attribute>
| </region>
| </config>
| 16:05:48,465 INFO [InterceptorChainFactory] interceptor chain is:
| class org.jboss.cache.interceptors.CallInterceptor
| class org.jboss.cache.interceptors.EvictionInterceptor
| class org.jboss.cache.interceptors.PessimisticLockInterceptor
| class org.jboss.cache.interceptors.UnlockInterceptor
| class org.jboss.cache.interceptors.TxInterceptor
| class org.jboss.cache.interceptors.CacheMgmtInterceptor
| 16:05:48,555 INFO [TreeCache] cache mode is local, will not create the channel
| 16:05:48,555 INFO [RegionManager] Starting eviction timer
| 16:05:52,722 INFO [ServiceEndpointManager] jbossws-1.0.4.GA (date=200611151648)
| 16:05:55,666 INFO [Embedded] Catalina naming disabled
| 16:05:55,807 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
| 16:05:55,807 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
| 16:05:56,448 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
| 16:05:57,129 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8443
| 16:05:57,129 INFO [Catalina] Initialization processed in 1322 ms
| 16:05:57,129 INFO [StandardService] Starting service jboss.web
| 16:05:57,149 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.20
| 16:05:57,239 INFO [StandardHost] XML validation disabled
| 16:05:57,299 INFO [Catalina] Server startup in 170 ms
| 16:05:57,880 INFO [TomcatDeployer] deploy, ctxPath=/invoker, warUrl=.../deploy/http-invoker.sar/invoker.war/
| 16:05:58,571 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
| 16:05:58,992 WARN [SecurityCollection] Suspicious url pattern: "/restricted/*" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD... section 11.2
| 16:05:59,683 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
| 16:06:00,053 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp48576jbossws-context-exp.war/
| 16:06:00,394 INFO [TomcatDeployer] deploy, ctxPath=/jbossmq-httpil, warUrl=.../deploy/jms/jbossmq-httpil.sar/jbossmq-httpil.war/
| 16:06:00,634 WARN [SecurityCollection] Suspicious url pattern: "/restricted/*" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD... section 11.2
| 16:06:02,617 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
| 16:06:03,969 INFO [MailService] Mail Service bound to java:/Mail
| 16:06:04,480 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-local-jdbc.rar
| 16:06:04,580 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-ha-xa-jdbc.rar
| 16:06:04,671 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
| 16:06:04,771 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-xa-jdbc.rar
| 16:06:04,861 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
| 16:06:04,931 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/mail-ra.rar
| 16:06:07,245 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=DefaultDS' to JNDI name 'java:DefaultDS'
| 16:06:07,685 INFO [A] Bound to JNDI name: queue/A
| 16:06:07,685 INFO [B] Bound to JNDI name: queue/B
| 16:06:07,685 INFO [C] Bound to JNDI name: queue/C
| 16:06:07,685 INFO [D] Bound to JNDI name: queue/D
| 16:06:07,685 INFO [ex] Bound to JNDI name: queue/ex
| 16:06:07,765 INFO [testTopic] Bound to JNDI name: topic/testTopic
| 16:06:07,765 INFO [securedTopic] Bound to JNDI name: topic/securedTopic
| 16:06:07,765 INFO [testDurableTopic] Bound to JNDI name: topic/testDurableTopic
| 16:06:07,775 INFO [testQueue] Bound to JNDI name: queue/testQueue
| 16:06:07,886 INFO [UILServerILService] JBossMQ UIL service available at : /0.0.0.0:8093
| 16:06:08,036 INFO [DLQ] Bound to JNDI name: queue/DLQ
| 16:06:08,436 INFO [ConnectionFactoryBindingService] Bound ConnectionManager 'jboss.jca:service=ConnectionFactoryBinding,name=JmsXA' to JNDI name 'java:JmsXA'
| 16:06:08,947 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/atomica' to JNDI name 'java:jdbc/atomica'
| 16:06:09,017 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/users' to JNDI name 'java:jdbc/users'
| 16:06:09,047 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/subscribe' to JNDI name 'java:jdbc/subscribe'
| 16:06:09,067 INFO [WrapperDataSourceService] Bound ConnectionManager 'jboss.jca:service=DataSourceBinding,name=jdbc/dw' to JNDI name 'java:jdbc/dw'
| 16:06:09,148 INFO [TomcatDeployer] deploy, ctxPath=/jmx-console, warUrl=.../deploy/jmx-console.war/
| 16:06:09,578 INFO [EARDeployer] Init J2EE application: file:/C:/runtimeJB4/jboss/server/atomica/deploy/Atomica.ear/
| 16:06:10,960 INFO [EjbModule] Deploying AtomicaPropertiesBean
| 16:06:11,431 INFO [ProxyFactory] Bound EJB Home 'AtomicaPropertiesBean' to jndi 'com.atomica.dataServer.AtomicaProperties'
| 16:06:11,441 INFO [EJBDeployer] Deployed: file:/C:/runtimeJB4/jboss/server/atomica/deploy/Atomica.ear/TopicServer.jar/
| 16:06:11,531 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/Atomica.ear/AtomicaWeb.war/
| 16:06:12,192 WARN [SecurityCollection] Suspicious url pattern: "/retrieval*" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD... section 11.2
| 16:06:12,192 WARN [SecurityCollection] Suspicious url pattern: "/gurunetwsapi*" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD... section 11.2
| 16:06:12,192 WARN [SecurityCollection] Suspicious url pattern: "/publishing*" - see http://java.sun.com/aboutJava/communityprocess/first/jsr053/servlet23_PFD... section 11.2
| 16:06:23,991 INFO [DisambigContext] Loaded spell checker dictionary from file
| 16:06:24,462 INFO [EARDeployer] Started J2EE application: file:/C:/runtimeJB4/jboss/server/atomica/deploy/Atomica.ear/
| 16:06:24,762 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8080
| 16:06:25,133 INFO [ChannelSocket] JK: ajp13 listening on /0.0.0.0:8009
| 16:06:25,173 INFO [JkMain] Jk running ID=0 time=0/120 config=null
| 16:06:25,193 INFO [Http11BaseProtocol] Starting Coyote HTTP/1.1 on http-0.0.0.0-8443
| 16:06:25,273 INFO [Server] JBoss (MX MicroKernel) [4.0.5.GA (build: CVSTag=Branch_4_0 date=200610162339)] Started in 46s:984ms
| 16:06:38,534 INFO [TomcatDeployer] deploy, ctxPath=/jaxws-samples-jsr181pojo, warUrl=.../tmp/deploy/tmp48606jaxws-samples-jsr181pojo-exp.war/
| 16:06:39,165 INFO [WSDLFilePublisher] WSDL published to: file:/C:/runtimeJB4/jboss/server/atomica/data/wsdl/jaxws-samples-jsr181pojo.war/TestService48607.wsdl
| 16:06:39,165 INFO [ServiceEndpointManager] WebService started: http://bentzys-nb:8080/jaxws-samples-jsr181pojo
| 16:07:28,022 ERROR [[TestService]] Servlet.service() for servlet TestService threw exception
| java.lang.NoSuchMethodError: org.jboss.ws.soap.SOAPMessageImpl.setProperty(Ljava/lang/String;Ljava/lang/Object;)V
| at org.jboss.ws.soap.SOAPMessageImpl.<init>(SOAPMessageImpl.java:77)
| at org.jboss.ws.soap.MessageFactoryImpl.createMessageInternal(MessageFactoryImpl.java:208)
| at org.jboss.ws.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:145)
| at org.jboss.ws.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:176)
| at org.jboss.ws.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:373)
| at org.jboss.ws.server.StandardEndpointServlet.doPost(StandardEndpointServlet.java:116)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.server.StandardEndpointServlet.service(StandardEndpointServlet.java:77)
| 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.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)
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4007834#4007834
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4007834
17 years, 11 months