I am asking the experts and the community to share the "best practice" views on
the following architecture: standalone application (JVM) uses web services
(soap) for communication with the JBoss server side application, using J2EE or
JSE web services endpoints.
I have had my bit of experience and read through a few books on the topic, wiki
documents, etc. So my experience so far....
In fact, I had no problems with the deployment of web services (server side) on
the JBoss (all the latest versions till 4.0.3) .
As for the
client ... still struggling with finding an acceptable solution.
In our case it is a standalone JVM application(s) running on the user PC
(i.e.not on the jboss server host). The appealing path to follow was to use
j2ee client application paradigm with JNDI lookup for the WS proxy.
For the sake of consistency and and to save
time, for the client side I preferred to use jboss's collection of the client
jars, rather than using sun's wsdk.
Leaving the details aside (document/literal, wrapped style, top dow design from
wsdl description, jndi.properties, all the deployment artifacts, etc), I
report, that everything worked fine when the standalone client was tested on
the same host, that ran Jboss server.
When I attempted to run the same client (with all the jboss client jars)
from another host, I consistently received the following error message, despite
the mapping file (DataMgr-mapping.xml) being present in the client's jar:
[java] Context client name: datamgr-client
[java] javax.naming.NamingException: Could
not dereference object [Root exception is java.lang.IllegalStateException:
Cannot find resource: META-INF/DataMgr-mapping.xml]
[java] at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1135)
[java] at
org.jnp.interfaces.NamingContext.lookup(NamingContext.java:690)
[java] at
org.jboss.naming.client.java.javaURLContextFactory$EncContextProxy.invoke(javaURLContextFactory.java:120)
[java] at $Proxy0.lookup(Unknown Source)
[java] at
javax.naming.InitialContext.lookup(InitialContext.java:347)
[java] at
org.imvs.qc.service.BaseProxy.getServiceProxy(BaseProxy.java:146)
[java] at
org.imvs.qc.service.BaseProxy.init(BaseProxy.java:96)
[java] at org.imvs.qc.service.BaseProxy.(BaseProxy.java:80)
[java] at
org.imvs.qc.service.datamgr.client.DataMgrProxy.(DataMgrProxy.java:65)
[java] at
org.imvs.qc.client.WebServiceTest.main(WebServiceTest.java:47)
[java] Caused by: java.lang.IllegalStateException: Cannot find resource:
META-INF/DataMgr-mapping.xml
[java] at
org.jboss.webservice.metadata.serviceref.ServiceRefMetaData.getJavaWsdlMappingURL(ServiceRefMetaData.java:111)
[java] at
org.jboss.webservice.metadata.serviceref.ServiceRefMetaData.getJavaWsdlMapping(ServiceRefMetaData.java:118)
[java] at
org.jboss.webservice.client.ServiceObjectFactory.getObjectInstance(ServiceObjectFactory.java:133)
[java] at
javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
[java] at
org.jnp.interfaces.NamingContext.getObjectInstance(NamingContext.java:1110)
[java] at
org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1127)
[java] ... 9 more
[java] Could not initialise BaseProxy object: Could not dereference object
[java] java.lang.NullPointerException
[java] at
org.imvs.qc.service.datamgr.client.DataMgrProxy.getInstruments(DataMgrProxy.java:75)
[java] at
org.imvs.qc.client.WebServiceTest.main(WebServiceTest.java:49)
That was the end of what seemed to be the final stretch before finalizing with
the web services adapter(services locator, etc) between the client and the
server side.
The idea of utilizing JNDI lookup for the remote client seems very appealing
and elegant,especially, if JBoss can be configured, if I get it right, to serve
jndi request via http protocol.
Otherwise, j2ee style of webservice appears to be applicable only for the case
when one j2ee container deployed application communicates with another j2ee
container deployed application.
Our application with rich GUI and supposed to be installed on the user's
desktop is a classical example of a "thick" client, however not to the
extent, that we need to run an instance of JBoss server on each user's PC.
Believing that dynamic proxy is the cleanest solution, I am now trying to make
use of JBoss's ServiceFactoryImpl. Errors, erros - trying to resolve step by
step ....
Yet, can anyone tell me, if I need to abandon ws4ee/jndi web services client
solution in my case?
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3900532#3900532
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3900532
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user