[JBossWS] - NullPointerException in ServiceEndpointManagerFactory
by tweedledee
I'm currently running a fresh install of JBoss AS 4.2.0 and have installed JBossWS 1.2.1 using the installation notes i.e. via the Ant script.
I've tried to run the examples that come with the 1.2.1 release but I keep getting a NullPointerException within the ServiceEndpointManagerFactory class:
| java.lang.NullPointerException
| org.jboss.ws.core.server.ServiceEndpointManagerFactory.getServiceEndpointManager(ServiceEndpointManagerFactory.java:52)
| org.jboss.ws.core.server.AbstractServiceEndpointServlet.initServiceEndpointManager(AbstractServiceEndpointServlet.java:135)
| org.jboss.ws.core.server.AbstractServiceEndpointServlet.init(AbstractServiceEndpointServlet.java:60)
| org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179)
| org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
| org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
| org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
| org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
| org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
| org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
| org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
| java.lang.Thread.run(Thread.java:619)
|
|
It appears that the code is trying to obtain a KernelRegistry object but is failing:
public ServiceEndpointManager getServiceEndpointManager()
| {
| KernelRegistry registry = KernelLocator.getKernel().getRegistry();
| KernelRegistryEntry entry = registry.getEntry(ServiceEndpointManager.BEAN_NAME);
| return (ServiceEndpointManager)entry.getTarget();
| }
Does anyone know if this is an installation issue or a bug?
Regards.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059969#4059969
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059969
17 years, 5 months
[JBossWS] - Writing WS client returning complex object
by andrea.le
Hi this is my problem, i hope someone help me...
i'm trying to deploy a simple web service that returns a complex Object.
The class that I want to return is:
package esempio;
|
| public class TestClass {
| private String name;
| public TestClass() {
| }
|
| public String getName() {
| return name;
| }
| public void setName(String name) {
| System.out.println("settato il nome: "+name);
| this.name = name;
| }
| }
|
and this is the service class I wrote:
package esempio;
|
| import javax.ejb.Stateless;
| import javax.jws.WebMethod;
| import javax.jws.WebParam;
| import javax.jws.WebResult;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
|
| @WebService(targetNamespace="urn:testws")
| @SOAPBinding(style= SOAPBinding.Style.DOCUMENT)
| @Stateless(name="provaServizio")
| public class ProvaServizioImpl {
| @WebMethod
| @WebResult(name="testClassResult")
| public TestClass getTestClass(
| @WebParam(name = "nome") String name) {
| TestClass ritorno = new TestClass();
| ritorno.setName(name);
| return ritorno;
| }
| }
|
I packaged this two classe in a jar that I named "ws2.jar" and copied this jar in jboss 4.05GA server/default/deploy folder.
The service seems deployed, because if put the address "localhost:8080/ws2/provaServizio?wsdl" on a browser it returns this WSDL:
<definitions name="ProvaServizioImplService" targetNamespace="urn:testws">
| <types>
| <schema elementFormDefault="qualified" targetNamespace="http://esempio/jaws">
| <import namespace="urn:testws"/>
| <complexType name="TestClass">
| <sequence>
| <element name="name" nillable="true" type="string"/>
| </sequence>
| </complexType>
| </schema>
| <schema elementFormDefault="qualified" targetNamespace="urn:testws">
| <import namespace="http://esempio/jaws"/>
| <complexType name="getTestClass">
| <sequence>
| <element name="nome" nillable="true" type="string"/>
| </sequence>
| </complexType>
| <complexType name="getTestClassResponse">
| <sequence>
| <element name="testClassResult" nillable="true" type="ns2:TestClass"/>
| </sequence>
| </complexType>
| <element name="getTestClass" type="tns:getTestClass"/>
| <element name="getTestClassResponse" type="tns:getTestClassResponse"/>
| </schema>
| </types>
| <message name="ProvaServizioImpl_getTestClass">
| <part element="tns:getTestClass" name="parameters"/>
| </message>
| <message name="ProvaServizioImpl_getTestClassResponse">
| <part element="tns:getTestClassResponse" name="result"/>
| </message>
| <portType name="ProvaServizioImpl">
| <operation name="getTestClass">
| <input message="tns:ProvaServizioImpl_getTestClass"/>
| <output message="tns:ProvaServizioImpl_getTestClassResponse"/>
| </operation>
| </portType>
| <binding name="ProvaServizioImplBinding" type="tns:ProvaServizioImpl">
| <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
| <operation name="getTestClass">
| <soap:operation soapAction=""/>
| <input>
| <soap:body use="literal"/>
| </input>
| <output>
| <soap:body use="literal"/>
| </output>
| </operation>
| </binding>
| <service name="ProvaServizioImplService">
| <port binding="tns:ProvaServizioImplBinding" name="ProvaServizioImplPort">
| <soap:address location="http://sviluppo-012:8080/ws2/provaServizio"/>
| </port>
| </service>
| </definitions>
|
So I think the service is working.
Then I wrote this simple Client, including in its classpath the jar containing the TestClass file:
import java.net.URL;
|
| import javax.naming.Context;
| import javax.xml.namespace.QName;
| import javax.xml.rpc.Service;
| import javax.xml.rpc.ServiceFactory;
| import esempio.ProvaServizioImpl;
| import esempio.TestClass;
|
| public class Client {
| public static void main(String[] args) throws Exception {
|
| System.out.println("Start");
|
| ServiceFactory factory= ServiceFactory.newInstance();
|
| Service factoryTest = factory.createService(new URL("http://localhost:8080/ws2/provaServizio?wsdl"),
| new QName("http://esempio/jaws", "ProvaServizioImplService"));
| ProvaServizioImpl proxyTest = (ProvaServizioImpl)factoryTest.getPort(ProvaServizioImpl.class);
|
| TestClass ritorno = (TestClass)proxyTest.getTestClass("test");
|
| System.out.println("ritorno del secondo servizio "+ritorno.getName());
| }
| }
|
Running the Client it returns this error:
"
Exception in thread "main" org.jboss.ws.WSException: Cannot obtain java type mapping for: {urn:testws}getTestClass
at org.jboss.ws.deployment.JSR109MetaDataBuilder.buildParameterMetaDataDoc(JSR109MetaDataBuilder.java:451)
at org.jboss.ws.deployment.JSR109MetaDataBuilder.setupOperationsFromWSDL(JSR109MetaDataBuilder.java:200)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaDataInternal(JSR109ClientMetaDataBuilder.java:208)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:126)
at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:82)
at org.jboss.ws.jaxrpc.ServiceImpl.(ServiceImpl.java:96)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
at Client.main(Client.java:19)
"
Now i know that there is error in mapping but i dont know if i wrong something in client or if i need some kind of configuration file(xml).
I read thousands over thousands of examples about WS and clients, but I'm confused... using EJB3 i must generate some mapping file?
In which way?
I read examples that just return primitives types, but never complex Object types...
Can u help me pls?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059850#4059850
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059850
17 years, 5 months
[JBossWS] - JBossWS supports pluggable Web Service stacks
by thomas.diesler@jboss.com
Starting with JBossWS-2.1.0, which is targeted for 1-Aug-2007, JBossWS will provide a general web service integration layer. For the first time, our users will have the choice to deploy one of three possible certified JAXWS stacks in JBoss-5.0, JBoss-4.2 and JBoss-4.0. The supported stacks are JBossWS Native, Sun's Metro and Apache CFX. Since each stack comes with its own specific functional feature set and performance characteristics users will be able to deploy the stack that best suits their needs. There will be a common deployment model and management interface to all deployable stacks. Over the next few months the JBossWS team will focus on advanced functionality such as WS-ReliableMessaging, WS-Trust, WS-AtomicTransaction, WS-BusinessActivity, etc. We would love to get your feedback on this topic this will help us to prioritize the integration work and hence provide you with a web service offering that combines the best of what is currently out there.
I am especially happy to hear that both the Sun Metro and Apache CXF community and project leads endorse this move and are committed to the success of their respective stacks in JBoss. Here is what they have to say ...
Sun: Metro
anonymous wrote :
| The GlassFish[1] community very much welcomes JBoss use of our Web Services stack (JAX-WS RI and Project Tango, now combined as Project Metro[2]) and we look forward to feedback and synergies with the expanded developer community", said Eduardo Pelegri-Llopart, Distinguished Engineer at Sun and overall lead of the GlassFish Community
|
| [1] http://glassfish.java.net
| [2] http://metro.dev.java.net
|
| Eduardo Pelegri-Llopart
|
IONA: Apache CXF
anonymous wrote :
| We're excited that on the strength of the CXF project and its growing user base, the JBoss community has decided to incorporate CXF into its offerings for Web service integration. This move is indicative of the power of open source to drive innovation and speed the adoption of new technologies.
|
| Dan Kulp, Principal Engineer at IONA Technologies and Apache CXF Committer
|
EnvoiSolutions: Apache CXF
anonymous wrote :
| I'm very excited to see JBossWS take such a strong user and community centric approach. Many CXF users have been already been deploying inside JBoss due to CXF's unique capabilities and JBoss's strength as an application server. I'm excited to see this integration grow even deeper in future.
|
| Dan Diephouse
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4059614#4059614
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4059614
17 years, 5 months