[JBossWS] - Cannot expose EJB 3 as WS
by peiguo
Hi,
I developed a very simple EJB 3 bean, I can deploy it with no error, but the web service is not exposed.
This is what I did:
1) Wrote the code as shown below;
2) compile and jar into hello.jar;
3) copy the jar to server/default/deploy;
Please help, what did I miss? I am using 4.2.2.GA
Hello.java:
| package org.jboss.ws.hello;
|
|
| import java.rmi.Remote;
|
| import javax.jws.WebMethod;
| import javax.jws.WebService;
| import javax.jws.soap.SOAPBinding;
| import javax.jws.soap.SOAPBinding.Style;
|
| @WebService
| public interface Hello extends Remote {
| @WebMethod
| String echo(String e);
| }
|
HelloBean.java:
| package org.jboss.ws.hello;
|
|
| import javax.ejb.Remote;
| import javax.ejb.Stateless;
| import javax.jws.*;
| import javax.jws.soap.*;
|
| @Stateless
| @WebService(endpointInterface = "org.jboss.ws.hello.Hello")
| @Remote(Hello.class)
| public class HelloBean {
| public String echo(String e) {
| return "Web Service Echo + " + e;
| }
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4147022#4147022
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4147022
16 years, 9 months
[JBossWS] - Nullpointer at JBossXSEntityResolver.getXMLInputSource
by QPool.Char
Hi, there already is a similar thread here: http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124794#4124794 , but i think my situation is slightly different.
Using JBoss 4.2.2 with integrated jbossws, i have a locally published WSDL file that i cannot manipulate.
I have generated my client artifacts using Metro (wsimport tool), because i had to do some external binding customizations, which i dont know how to do with jbossws. I try to set up the service like this:
RepositoryService repositoryService =
| new RepositoryService(new URL("http://localhost:8080/alfresco/wsdl/repository-service.wsdl"),
| new QName("repositoryService"));
but i get this error:
| 19:03:51,328 WARN [JBossWSEntityResolver] Trying to resolve id as a non-file URL: http://www.alfresco.org/ws/model/content/1.0
| 19:03:52,703 ERROR [STDERR] java.lang.NullPointerException
| 19:03:52,703 ERROR [STDERR] at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.getXMLInputSource(JBossXSEntityResolver.java:167)
| 19:03:52,703 ERROR [STDERR] at org.jboss.ws.metadata.wsdl.xmlschema.JBossXSEntityResolver.resolveEntity(JBossXSEntityResolver.java:135)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.XMLEntityManager.resolveEntity(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.XMLSchemaLoader.resolveDocument(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.traversers.XSDHandler.resolveSchema(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.traversers.XSDHandler.constructTrees(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.traversers.XSDHandler.parseSchema(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.XMLSchemaLoader.loadSchema(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.apache.xerces.impl.xs.XMLSchemaLoader.loadGrammar(Unknown Source)
| 19:03:52,703 ERROR [STDERR] at org.jboss.ws.tools.JavaToXSD.parseSchema(JavaToXSD.java:182)
|
my wsd (excerptsl:
| <wsdl:definitions name="repository-service" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0">
| <!-- ************************************** -->
| <!-- Copyright Alfresco Software, Inc. 2005 -->
| <!-- ************************************** -->
| â
| <wsdl:types>
| âÃÂÃÂ
| <schema elementFormDefault="qualified" targetNamespace="http://www.alfresco.org/ws/service/repository/1.0">
| <xsd:import namespace="http://www.alfresco.org/ws/headers/1.0" schemaLocation="../wsdl/headers.xsd"/>
| <xsd:import namespace="http://www.alfresco.org/ws/cml/1.0" schemaLocation="../wsdl/cml.xsd"/>
| âÃÂÃÂ
| <element name="createStore">
| âÃÂÃÂ
| <complexType>
| âÃÂÃÂ
| <sequence>
| <element name="scheme" type="xsd:string"/>
| <element name="address" type="xsd:string"/>
| </sequence>
| </complexType>
| </element>
| âÃÂÃÂ
| <element name="createStoreResponse">
| âÃÂÃÂ
| <complexType>
| âÃÂÃÂ
| <sequence>
| <element name="createStoreReturn" type="cms:Store"/>
| </sequence>
| </complexType>
| </element>
| âÃÂÃÂ
| <element name="getStores">
| âÃÂÃÂ
| <complexType>
| <sequence/>
| </complexType>
| </element>
| âÃÂÃÂ
| <element name="getStoresResponse">
| âÃÂÃÂ
| <complexType>
| âÃÂÃÂ
| <sequence>
| <element name="getStoresReturn" type="cms:Store" minOccurs="1" maxOccurs="unbounded"/>
| </sequence>
| </complexType>
| </element>
| âÃÂÃÂ
| <element name="query">
| âÃÂÃÂ
| <complexType>
| âÃÂÃÂ
| <sequence>
| <element name="store" type="cms:Store"/>
| <element name="query" type="cms:Query"/>
| <element name="includeMetaData" type="xsd:boolean"/>
| </sequence>
| </complexType>
| </element>
| âÃÂÃÂ....................
| </schema>
| </wsdl:types>
| âÃÂÃÂ
| <wsdl:message name="Headers">
| <wsdl:documentation>Defines the SOAP headers used by this service.</wsdl:documentation>
| <wsdl:part element="rep:QueryConfiguration" name="QueryConfiguration"/>
| </wsdl:message>
| âÃÂÃÂ
| <wsdl:message name="createStoreRequest">
| <wsdl:part element="rep:createStore" name="parameters"/>
| </wsdl:message>
| âÃÂÃÂ
| <wsdl:message name="createStoreResponse">
| <wsdl:part element="rep:createStoreResponse" name="parameters"/>
| </wsdl:message>
| âÃÂÃÂ
| ............âÃÂÃÂ
| <wsdl:service name="RepositoryService">
| âÃÂÃÂ
| <wsdl:documentation>
| Provides read and write operations against a repository.
| </wsdl:documentation>
| âÃÂÃÂ
| <wsdl:port binding="rep:RepositoryServiceSoapBinding" name="RepositoryService">
| <wsdlsoap:address location="http://localhost:8080/alfresco/api/RepositoryService"/>
| </wsdl:port>
| </wsdl:service>
| </wsdl:definitions>
|
Injection also doesnt work, as expected. And using an empty constructor also doesnt work. Any hints on this? Do i have to upgrade jbossws? Or any workaround to show the method where to search for my xsd?
thx in advance
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146891#4146891
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146891
16 years, 9 months
[JBossWS] - Re: Cannot obtain wsdl service
by schmil
On changing to JAX-WS i got the following Error message:
2008-04-23 17:39:08,214 ERROR [OrderServiceClient] Exception during Webservice call:
| java.lang.IllegalArgumentException: Cannot obtain wsdl service: {http://localhost:8080/ina}DitaServiceHandlerService we have [{urn:ina:ws:dita:de}DitaServiceHandlerService]
| at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaDataInternal(JAXWSClientMetaDataBuilder.java:145)
| at org.jboss.ws.metadata.builder.jaxws.JAXWSClientMetaDataBuilder.buildMetaData(JAXWSClientMetaDataBuilder.java:87)
| at org.jboss.ws.core.jaxws.spi.ServiceDelegateImpl.<init>(ServiceDelegateImpl.java:131)
| at org.jboss.ws.core.jaxws.spi.ProviderImpl.createServiceDelegate(ProviderImpl.java:61)
| at javax.xml.ws.Service.<init>(Service.java:56)
| at javax.xml.ws.Service.create(Service.java:680)
| at OrderServiceClient.sendOrders(OrderServiceClient.java:155)
|
and after replacing
QName qname = new QName("http://localhost:8080/ina", "DitaServiceHandlerService");
with
QName qname = new QName("urn:ina:ws:dita:de", "DitaServiceHandlerService");
and copying
- jaxb-api.jar
- jboss-jaxws.jar
- jboss-saaj.jar
from client\ to lib\endorsed\
it works fine. Thanks
Lars
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4146738#4146738
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4146738
16 years, 9 months