[JBossWS] - Element or attribute do not match QName production: QName::=
by oskar.carlstedt
Hello!!
I'm getting a strange exception when invoking a simple client inside a stateless session bean. Everything has to do with the javax.xml.namespace.QName. I'm using xml beans which I had to modify because of an extra include of the javax.xml.namespace.QName, i.e. I have removed the javax.xml.namespace from the xbean.jar.
I have the following code:
| XmlOptions xmlOptions = new XmlOptions();
| xmlOptions.setSavePrettyPrint();
|
| // create target namespace
| String targetNamespace = "http://test/test-service";
|
| QName serviceQName = new QName(targetNamespace, "Test");
| QName portTypeQname = new QName(targetNamespace, "TestSoap11Port");
| URL wsdlURL = new URL("http://lpt-osca:8080/service-test-jaxws-web?wsdl");
|
| Service service = Service.create(wsdlURL, serviceQName);
| Dispatch<DOMSource> dispatch = service.createDispatch(portTypeQname, DOMSource.class, Mode.PAYLOAD);
|
| // creating xml beans request ...
| TestRequestDocument testRequestDocument = TestRequestDocument.Factory.newInstance();
| ...
|
| System.out.println("REQUEST");
| testRequestDocument.save(System.out, xmlOptions);
| System.out.println();
|
| DOMSource requestSource = new DOMSource(testRequestDocument.newDomNode());
| DOMSource responseSource = dispatch.invoke(requestSource);
| XmlObject xmlObject = XmlObject.Factory.parse(responseSource.getNode());
|
| System.out.println("RESPONSE");
| xmlObject.save(System.out, xmlOptions);
|
|
And I'm getting the following error:
| 2007-04-16 10:31:51,636 DEBUG [org.jboss.ws.core.soap.MessageFactoryImpl] createMessage: [contentType=text/xml; charset=UTF-8]
| 2007-04-16 10:31:51,665 ERROR [STDERR] [Fatal Error] :1:331: Element or attribute do not match QName production: QName::=(NCName':')?NCName.
| 2007-04-16 10:31:51,691 DEBUG [org.jboss.ws.metadata.umdm.EndpointMetaData] Configure SOAPBinding
| 2007-04-16 10:31:51,691 ERROR [org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS] SOAP request exception
| java.io.IOException: org.xml.sax.SAXParseException: Element or attribute do not match QName production: QName::=(NCName':')?NCName.
| at org.jboss.ws.core.utils.DOMUtils.parse(DOMUtils.java:125)
| at org.jboss.ws.core.soap.EnvelopeBuilderPayload.build(EnvelopeBuilderPayload.java:56)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:253)
| at org.jboss.ws.core.soap.MessageFactoryImpl.createMessage(MessageFactoryImpl.java:171)
| at org.jboss.ws.core.server.ServiceEndpoint.handleRequest(ServiceEndpoint.java:185)
| at org.jboss.ws.core.server.ServiceEndpointManager.processSOAPRequest(ServiceEndpointManager.java:440)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.doPost(AbstractServiceEndpointServlet.java:114)
| at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
| at org.jboss.ws.core.server.AbstractServiceEndpointServlet.service(AbstractServiceEndpointServlet.java:75)
| 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)
|
Can anyone explain this to me. I found the same error for someone using axis thread about using a different constructor when instantiating the QName (http://forums.crmsuccess.com/sforce/board/message?board.id=JAVA_developme...), but can it be that? Sounds strange to me. Is there a conflict between my jvm/jee (using std sun when compiling) and the JBoss environment.
I have JBoss 4.0.5.GA with EJB3 RC9 and JBossWS 1.2.0SP1. I'm running everything on a Windows Vista E.Ed. with JDK 1.5.11.
Best Regardsd
Oskar
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037472#4037472
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037472
17 years, 8 months
How to disable weak ciphersuites for a SSL secured webservice
by Wolfgang Moser
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256
Hello there at JBossWS,
I'm developing for a WebServices application that runs on
JBoss 4.0.5.GA with JBossWS 1.0.4.GA
We got managed to setup JBoss as well as the deployed
WebService to only allow SSL connections (with user
authentication).
Unfortunately we don't see a way to disable all the weak
ciphersuites (like DES40, RC4_40 or standard DES) for that
SSL secured webservice, so that the server acts in a way
that it will never accept such weak ciphersuites on the
initial SSL handshake.
I did already check out:
http://jira.jboss.com/jira/browse/JBAS-1983
but was not able to configure the ciphersuites accordingly
(this included JBAS-2785). I wasn't unable to check out,
if these settings would change anything on WebServices,
since JBoss doesn't start due to a null pointer exception
(see attachment). As some debugging reveals, this is
because the member "securityDomain" within:
org.jboss.security.ssl.ServerSocketFactory
seems to not get initialized.
Any hints on how to become able to select or to configure
the ciphersuites being accepted from our SSL enabled
WebServices application would be appreciated much.
- --
With kind regards,
Wolfgang Moser
_______________________________________________________________
SRC Security Research & Consulting GmbH
Graurheindorfer Str. 149 a Tel: +49(0)228-2806-149
53117 Bonn Fax: +49(0)228-2806-199
http://www.src-gmbh.de Mob: +49(0)
Handelsregister Bonn: HRB 9414 Geschäftsführer: Gerd Cimiotti
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (MingW32)
iQEVAwUBRgpPaV351eL5alt0AQh6+wf+Na9a4R1m7Q0InWpJMi860Zc9VwyNw9hS
klWpt9DPevLhdCopke2AFN2lbyvnbkx2FApBSsRItoowCmow1A6R0CGsY6cZsWo7
jersZe4Ee7U60V6CYreX1C7V6A1/vvPTPq9P0CU2Te4aamd80kOZhCjJ2nZ3vOJQ
aVqx3TK2PObTsIYRo01E4dVtfhYNkNznZGKjEdubXai1b4c7Sn3/Gwdid/SRN5jl
MpWMLoYhS763ZgXv71S3XFIDdNDTWh36kPpmqokb1baUl7ceUjEdprganBzhQeLE
4qF4dV/R2MCXdBAdcRjGR9/E7XRnP4riPH3OBa6o8wzRRVIF6jOMwA==
=RJpB
-----END PGP SIGNATURE-----
10:47:44,078 WARN [ServiceController] Problem starting service jboss:service=invoker,type=jrmp,socketType=SSLSocketFactory
java.lang.NullPointerException
at org.jboss.security.ssl.Context.forDomain(Context.java:66)
at org.jboss.security.ssl.DomainServerSocketFactory.initSSLContext(DomainServerSocketFactory.java:304)
at org.jboss.security.ssl.DomainServerSocketFactory.createServerSocket(DomainServerSocketFactory.java:225)
at org.jboss.security.ssl.DomainServerSocketFactory.createServerSocket(DomainServerSocketFactory.java:203)
at org.jboss.security.ssl.RMISSLServerSocketFactory.createServerSocket(RMISSLServerSocketFactory.java:120)
at sun.rmi.transport.tcp.TCPEndpoint.newServerSocket(TCPEndpoint.java:622)
at sun.rmi.transport.tcp.TCPTransport.listen(TCPTransport.java:231)
at sun.rmi.transport.tcp.TCPTransport.exportObject(TCPTransport.java:178)
at sun.rmi.transport.tcp.TCPEndpoint.exportObject(TCPEndpoint.java:382)
at sun.rmi.transport.LiveRef.exportObject(LiveRef.java:116)
at sun.rmi.server.UnicastServerRef.exportObject(UnicastServerRef.java:180)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:293)
at java.rmi.server.UnicastRemoteObject.exportObject(UnicastRemoteObject.java:256)
at org.jboss.invocation.jrmp.server.JRMPInvoker.exportCI(JRMPInvoker.java:451)
at org.jboss.invocation.jrmp.server.JRMPInvoker.startService(JRMPInvoker.java:373)
at org.jboss.invocation.jrmp.server.JRMPInvoker$1.startService(JRMPInvoker.java:150)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMBeanSupport.java:245)
at org.jboss.invocation.jrmp.server.JRMPInvoker.jbossInternalLifecycle(JRMPInvoker.java:645)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:264)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:659)
at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceController.java:978)
at $Proxy0.start(Unknown Source)
at org.jboss.system.ServiceController.start(ServiceController.java:417)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at org.jboss.system.ServiceController.start(ServiceController.java:435)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:86)
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)
at $Proxy4.start(Unknown Source)
at org.jboss.deployment.SARDeployer.start(SARDeployer.java:302)
at org.jboss.deployment.MainDeployer.start(MainDeployer.java:1025)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:819)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:782)
at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:766)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:155)
at org.jboss.mx.server.Invocation.dispatch(Invocation.java:94)
at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:133)
at org.jboss.mx.server.Invocation.invoke(Invocation.java:88)
at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:142)
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)
at $Proxy5.deploy(Unknown Source)
at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:482)
at org.jboss.system.server.ServerImpl.start(ServerImpl.java:362)
at org.jboss.Main.boot(Main.java:200)
at org.jboss.Main$1.run(Main.java:490)
at java.lang.Thread.run(Thread.java:595)
17 years, 8 months
[JBossWS] - java.sql.SQLException: File input/output error: Unexpected
by bittu.arvind
Hi all,
i am new in this area. i have installed netbeans ide 5.5 daily bundled with jboss-4.0.4, when i am strting the jboss server using netbeans "run time tab", i am geeting following error.
===============================================================================
.
JBoss Bootstrap Environment
.
JBOSS_HOME: C:\jboss-4.0.4.GA\bin\\..
.
JAVA: C:\Program Files\Java\jdk1.5.0_11\bin\java
.
JAVA_OPTS: -Dhttp.proxyHost=199.63.1.0 -Dhttp.proxyPort=80 -Dhttp.nonProxyHosts="*.honeywell.com|*|localhost|127.0.0.1|ie10dtxp6b3zl1s|ie10dtxp6b3zl1s.global.ds.honeywell.com" -Dhttps.proxyHost=199.63.1.0 -Dhttps.proxyPort=80 -Dprogram.name=run.bat -Xms128m -Xmx512m -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
.
CLASSPATH: C:\Program Files\Java\jdk1.5.0_11\lib\tools.jar;C:\jboss-4.0.4.GA\bin\\run.jar
.
===============================================================================
.
09:49:38,578 INFO [Server] Starting JBoss (MX MicroKernel)...
09:49:38,578 INFO [Server] Release ID: JBoss [Zion] 4.0.4.GA (build: CVSTag=JBoss_4_0_4_GA date=200605151000)
09:49:38,593 INFO [Server] Home Dir: C:\jboss-4.0.4.GA
09:49:38,593 INFO [Server] Home URL: file:/C:/jboss-4.0.4.GA/
09:49:38,593 INFO [Server] Patch URL: null
09:49:38,593 INFO [Server] Server Name: default
09:49:38,593 INFO [Server] Server Home Dir: C:\jboss-4.0.4.GA\server\default
09:49:38,593 INFO [Server] Server Home URL: file:/C:/jboss-4.0.4.GA/server/default/
09:49:38,703 INFO [Server] Server Log Dir: C:\jboss-4.0.4.GA\server\default\log
09:49:38,703 INFO [Server] Server Temp Dir: C:\jboss-4.0.4.GA\server\default\tmp
09:49:38,703 INFO [Server] Root Deployment Filename: jboss-service.xml
09:49:39,046 INFO [ServerInfo] Java version: 1.5.0_11,Sun Microsystems Inc.
09:49:39,046 INFO [ServerInfo] Java VM: Java HotSpot(TM) Client VM 1.5.0_11-b03,Sun Microsystems Inc.
09:49:39,046 INFO [ServerInfo] OS-System: Windows XP 5.1,x86
09:49:39,703 INFO [Server] Core system initialized
09:49:41,000 INFO [Log4jService$URLWatchTimerTask] Configuring from URL: resource:log4j.xml
09:49:46,453 INFO [SocketServerInvoker] Invoker started for locator: InvokerLocator [socket://199.63.66.250:3873/]
09:49:47,765 INFO [AspectDeployer] Deployed AOP: file:/C:/jboss-4.0.4.GA/server/default/deploy/ejb3-interceptors-aop.xml
09:50:00,609 INFO [WebService] Using RMI server codebase: http://ie10dtxp6b3zl1s:8083/
09:50:02,609 INFO [MailService] Mail Service bound to java:/Mail
09:50:02,937 INFO [NamingService] JNDI bootstrap JNP=/0.0.0.0:1099, RMI=/0.0.0.0:1098, backlog=50, no client SocketFactory, Server SocketFactory=class org.jboss.net.sockets.DefaultSocketFactory
09:50:02,937 WARN [NamingService] Context.PROVIDER_URL in server jndi.properties, url=localhost:1099
09:50:03,015 INFO [SubscriptionManager] Bound event dispatcher to java:/EventDispatcher
09:50:03,796 INFO [Embedded] Catalina naming disabled
09:50:03,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
09:50:03,859 INFO [ClusterRuleSetFactory] Unable to find a cluster rule set in the classpath. Will load the default rule set.
09:50:04,203 INFO [Http11BaseProtocol] Initializing Coyote HTTP/1.1 on http-0.0.0.0-8080
09:50:04,203 INFO [Catalina] Initialization processed in 344 ms
09:50:04,203 INFO [StandardService] Starting service jboss.web
09:50:04,203 INFO [StandardEngine] Starting Servlet Engine: Apache Tomcat/5.5.17
09:50:04,250 INFO [StandardHost] XML validation disabled
09:50:04,265 INFO [Catalina] Server startup in 62 ms
09:50:04,406 INFO [TomcatDeployer] deploy, ctxPath=/, warUrl=.../deploy/jbossweb-tomcat55.sar/ROOT.war/
09:50:04,890 INFO [WebappLoader] Dual registration of jndi stream handler: factory already defined
09:50:05,484 INFO [TomcatDeployer] deploy, ctxPath=/jbossws, warUrl=.../tmp/deploy/tmp17170jbossws-exp.war/
09:50:05,656 INFO [TomcatDeployer] deploy, ctxPath=/web-console, warUrl=.../deploy/management/console-mgr.sar/web-console.war/
09:50:06,781 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jboss-local-jdbc.rar
09:50:07,203 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/jms/jms-ra.rar
09:50:07,312 INFO [RARDeployment] Required license terms exist, view META-INF/ra.xml in .../deploy/quartz-ra.rar
09:50:07,328 INFO [QuartzResourceAdapter] start quartz!!!
09:50:07,406 INFO [SimpleThreadPool] Job execution threads will use class loader of thread: main
09:50:07,437 INFO [QuartzScheduler] Quartz Scheduler v.1.5.2 created.
09:50:07,437 INFO [RAMJobStore] RAMJobStore initialized.
09:50:07,546 INFO [StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
09:50:07,546 INFO [StdSchedulerFactory] Quartz scheduler version: 1.5.2
09:50:07,546 INFO [QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
09:50:08,218 WARN [ServiceController] Problem starting service jboss:service=Hypersonic,database=localDB
java.sql.SQLException: File input/output error: Unexpected token:
why this error is coming?? and how i can solve this???
please give reply as soon as possible.
thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037424#4037424
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037424
17 years, 8 months
[JBossWS] - Soap with attachments
by ltenmatay
Would like to know how to support soap message with attachments in jbossws 1.2.0 SP1. Do I need to define multipart section in my wsdl? The wsdl i got didn't specify any mime sections. I created my own provider. Whenever I send a soap with attachment, the jboss will throw a timeout error and it does not reach the provider.
I am using saaj and the message is something like this
------=_Part_0_22691179.1176653070718
Content-Type: text/xml; charset=UTF-8
Content-Transfer-Encoding: binary
Content-Id: <DBE397F2170DBC1661EAE25D43A5648C>
soap xml
------=_Part_0_22691179.1176653070718
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-Id: <BAA0447E233B834E9A84A6829880E34D>
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037378#4037378
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037378
17 years, 8 months
[JBossWS] - String[] with SOAP... Please help me!
by chui
Hello there! I'm trying to develop a HelloWorld with JBossWS1.0.4, JBossAS4.0.5 and EJB3, but instead of returning a string "Hello World", I'd like to receive a String[]...
If I don't create a wsdl, JBossAS autocreate a default file, where the String[] is mapped as a NMTOKENS type. I don't want that because my array [Hello World, Hello World] becomes [Hello, World, Hello, World]... So I used WStools for creating a wsdl. That's my wstools-config.xml:
anonymous wrote : <configuration xmlns="http://www.jboss.org/jbossws-tools" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
| - <java-wsdl>
|
| <namespaces target-namespace="http://interfaces/jaws" type-namespace="http://org.jboss.ws/samples/rpcstyle/types" />
|
| <webservices servlet-link="HelloService" />
| </java-wsdl>
|
I found something similar on the userguide and I used interfaces/jaws because JBoss complained if I didn't. WStools generated the wsdl and the mapping xml. Here is the wsdl: http://www.linux.ime.usp.br/~chui/HelloService.wsdl
However, isn't accepted when deploying the EJB, so I have to change that to HelloServicePort. And I don't know what I should write as <soap:address location> =/ Yeah, I'm newbie.
This is the generated jaxrpc-mapping.xml:
anonymous wrote : <?xml version="1.0" encoding="UTF-8" ?>
| - <java-wsdl-mapping 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://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
| - <package-mapping>
| <package-type>interfaces</package-type>
| http://org.jboss.ws/samples/rpcstyle/types
| </package-mapping>
| - <service-interface-mapping>
| <service-interface>interfaces.HelloService</service-interface>
| <wsdl-service-name xmlns:serviceNS="http://interfaces/jaws">serviceNS:HelloService</wsdl-service-name>
| - <port-mapping>
| <port-name>HelloSEIPort</port-name>
| <java-port-name>HelloSEIPort</java-port-name>
| </port-mapping>
| </service-interface-mapping>
| - <service-endpoint-interface-mapping>
| <service-endpoint-interface>interfaces.HelloSEI</service-endpoint-interface>
| <wsdl-port-type xmlns:portTypeNS="http://interfaces/jaws">portTypeNS:HelloSEI</wsdl-port-type>
| <wsdl-binding xmlns:bindingNS="http://interfaces/jaws">bindingNS:HelloSEIBinding</wsdl-binding>
| - <service-endpoint-method-mapping>
| <java-method-name>hello</java-method-name>
| <wsdl-operation>hello</wsdl-operation>
| - <method-param-parts-mapping>
| <param-position>0</param-position>
| <param-type>java.lang.String</param-type>
| - <wsdl-message-mapping>
| <wsdl-message xmlns:wsdlMsgNS="http://interfaces/jaws">wsdlMsgNS:HelloSEI_hello</wsdl-message>
| <wsdl-message-part-name>String_1</wsdl-message-part-name>
| <parameter-mode>IN</parameter-mode>
| </wsdl-message-mapping>
| </method-param-parts-mapping>
| - <wsdl-return-value-mapping>
| <method-return-value>java.lang.String[]</method-return-value>
| <wsdl-message xmlns:wsdlMsgNS="http://interfaces/jaws">wsdlMsgNS:HelloSEI_helloResponse</wsdl-message>
| <wsdl-message-part-name>result</wsdl-message-part-name>
| </wsdl-return-value-mapping>
| </service-endpoint-method-mapping>
| </service-endpoint-interface-mapping>
| </java-wsdl-mapping>
Finally I could deploy the bean. But, when I call it using a client application, I receive this error:
anonymous wrote : java.rmi.RemoteException: Call invocation failed; nested exception is:
| org.jboss.ws.WSException: org.jboss.ws.binding.BindingException: org.jboss.ws.jbossxb.UnmarshalException: Failed to parse source: Not supported xsdType: anyType, hashCode=-842881210
As you can see, I never used anyType. So I tried to find where's this term... And I found it here: http://www.w3.org/2001/XMLSchema.xsd
Now I ask you:
1-) Why do I need to use http://interfaces/jaws ??
2-) How can I receive the String[]??? The bean is being called, but the client can't receive the result =(
Please help me! I REALLY NEED this to function so I can apply it to my real (and also EJB3+WS) project...
Thanks in advance.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037307#4037307
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037307
17 years, 8 months
[JBossWS] - Issues with JBoss5 Beta 1 and WebService Annotations
by TTHUNT
Hi,
I'm trying to run a simple test in which I'd like to deploy an EJB in JBoss 5 Beta 1 (with Java 6). I've created an interface and implementation class (see below), put them in a JAR file and deploy the JAR. I can see on the console output that it is reading in the JAR file and creating an EJB, but there is nothing for the WebService. When I got to http://localhost:8080/jbossws/services there are no services listed. There are no errors reported either. I would expect something to come back. Is there a setting that needs to be changed for WebServices to auto deploy in JBoss 5? Is this a bug?
Thanks,
TTH
INTERFACE
package com.simple;
|
| import javax.jws.WebService;
| import javax.jws.WebMethod;
| import java.rmi.Remote;
|
| @WebService
| public interface Hello extends Remote {
| @WebMethod
| void speak();
|
| }
IMPLEMENTATION
package com.simple;
|
| import javax.jws.WebService;
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
|
| @WebService
| @Remote(Hello.class)
| @Stateless
| public class HelloBean implements Hello{
| public void speak(){
| System.out.println("Hello");
| }
| }
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037235#4037235
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037235
17 years, 8 months
[JBossWS] - SoapBodyImpl, JDK5 and JDom
by wilth
Hello,
I recently tried to upgrade from JDK 1.4 to JDK 5 (we are talking Jboss 4.0.5) but I'm having trouble with the following piece of code:
| org.jdom.Document doc = new org.jdom.Document();
| org.jdom.Element root = new org.jdom.Element("inputData");
| doc.setRootElement(root);
|
| MessageFactory messageFactory = MessageFactory.newInstance();
|
| // Create the SOAP Message
| SOAPMessage requestSoapMessage = messageFactory.createMessage();
|
| DOMOutputter converter = new DOMOutputter();
| org.w3c.dom.Document iDoc = converter.output(doc);
| requestSoapMessage.getSOAPBody().addDocument(iDoc);
|
As you can see, I'm creating an XML Document programmatically with JDom, then I'm converting it into a "standard" DOM and then I'm putting it into a SOAP envelope. The addDocument method throws:
org.w3c.dom.DOMException: NAMESPACE_ERR: An attempt is made to create or change an object in a way which is incorrect with regard to namespaces.
Now this error should be raised when a prefix is used, but no namespace or the qualified name is malformed. However, I'm not using namespaces in my document (other than the empty default NS).
I have tried to add a namespace to the Dom4j Document - that solves the problem. The document (when outputted through a transformer) is well-formed. The problem also does not occur with JDK 1.4 or JDK 6 u1. I'm not sure the problem is with the Jboss WS package either, so please let me know if this is not related to the jboss ws implementation.
Any ideas on why I'm facing this? Thanks for any pointers.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4037071#4037071
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4037071
17 years, 8 months