Java Mailing List Archive

http://www.junlu.com/

Google
Google
Mailing List
Home
Forum Home
JBoss - Java Application Server
Tomcat - JSP/Servlet container
Struts - A MVC web framework
iText - An open source PDF Java Library
JDOM - JDOM XML Parser
J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition
JSP - A mailing list about Java Server Pages specification and reference
J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog
Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology
Struts & Hibernate
Subjects
JSP editor plugin for eclipse ?
org apache jasper JasperException: Unable to compile class for JSP
Tomcat: Connection reset by peer: socket write error
Cannot retrieve definition for form bean null
Struts Tiles Tutorial (free Struts training)
Where do I download Tomcat 4 0 6?
Data Access Object (DAO) pattern, example DAO 's
Where to download Tomcat v 4 1 24 from?
Tomcat 5 0 16 Requested resource not available
Oracle Connection Pooling in 3 2 2
Servlet : Session invalidate
Servlet action is currently unavailable
Tomcat/Struts Unicode Encoding/Decoding problems
Tomcat and webapplication specific java library path
Running a Simple JMS Example
Mapping in workers2 properties
org apache jasper JasperException
Cannot find message resources under key org apache struts action
   MESSAGE
problem with html:text bean throwing exception
Cannot find message resources under key org apache struts action MESSAGE
invalid direct reference problem with solution
Tool for jsp debug Try Sysdeo Eclipse Plugin
Tomcat 5 Cannot load JDBC driver class 'null ' SQL state: null
weblogic ejbc
java properties file
Jboss 3 2 3 Coyote Can 't re
Tomcat 5, Apache2 and mod jk2 integration problem
JBoss example problem new to J2EE
url string for connecting jboss to oracle
Value attribute of <html:checkbox
javax servlet ServletException: BeanUtils populate
HTTP Status 404 The requested resource is not available
5 0 18: Windows XP Pro vs Windows 2000
 
- consume WS error after update to JBossWS 2.0

- consume WS error after update to JBossWS 2.0

2007-07-12       - By M.Schumpa

 Back
Hi dear community,

I'm pretty new to the whole JBoss WebService  topic and I'm writing a diploma
thesis about it. to get startet, I wrote a simple example which consist of a
WebService and an Java Client connecting to that Service in order to consume it
.

Everything went fine with the JBoss 4.2.0 GA release.

Because I need some of the feature of JAXB 2.0, I upgraded to JBossWS 2.0. I
think everything went fine here, because I get the following message in the
console while starting JBoss.[ManagedEndpointRegistry] jbossws-native-2 (See http://ive-2.ora-code.com).0.0.GA
(build=200707051029)

I added the all the jars in %JBOSS_HOME%\client and %JBOSS_HOME%\lib\endorsed
to classpath, like I did it while using the JBoss 4.2.0 GA release.

My problem is:
If I try to reach the service with the following code I get an
WebServiceException


 |           URL url = new URL("http://127.0.0.1:8080/BspDog/Examples?wsdl");
 |           QName qname = new QName("http://dogstapler.com/","ExamplesService"
);
 |           Service service = Service.create(url,qname);      
 |           ExamplesEndpoint ee = service.getPort(ExamplesEndpoint.class);
 |
The wsdl is reachable at the given location. The first lines of it look like
this:

 | <definitions name='ExamplesService' targetNamespace='http://dogstapler.com/
' xmlns='http://schemas.xmlsoap.org/wsdl/' xmlns:soap='http://schemas.xmlsoap
.org/wsdl/soap/' xmlns:tns='http://dogstapler.com/' xmlns:xsd='http://www.w3.org
/2001/XMLSchema'>
 |  <types>
 |   <xs:schema targetNamespace='http://dogstapler.com/' version='1.0' xmlns
:tns='http://dogstapler.com/' xmlns:xs='http://www.w3.org/2001/XMLSchema'>
 |

The error thrown by the client while executing the 3rd line of the sample code:

 | Exception in thread "main" javax.xml.ws.WebServiceException: Unable to load
Provider: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi
.ProviderImpl
 |   at javax.xml.ws.spi.Provider.provider(Provider.java:98)
 |   at javax.xml.ws.Service.<init>(Service.java:83)
 |   at javax.xml.ws.Service.create(Service.java:721)
 |   at com.dogstapler.client.ClientBspDog3.main(ClientBspDog3.java:31)
 | Caused by: java.lang.IllegalStateException Source code of java.lang.IllegalStateException: Failed to load javax.xml.ws.spi
.Provider: com.sun.xml.ws.spi.ProviderImpl
 |   at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
 |   at javax.xml.ws.spi.Provider.provider(Provider.java:90)
 |   ... 3 more
 | Caused by: java.lang.ExceptionInInitializerError Source code of java.lang.ExceptionInInitializerError
 |   at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
 |   at sun.reflect.NativeConstructorAccessorImpl.newInstance
(NativeConstructorAccessorImpl.java:39)
 |   at sun.reflect.DelegatingConstructorAccessorImpl.newInstance
(DelegatingConstructorAccessorImpl.java:27)
 |   at java.lang.reflect.Constructor Source code of java.lang.reflect.Constructor(Constructor.java:494)
 |   at java.lang.Class Source code of java.lang.Class(Class.java:350)
 |   at java.lang.Class Source code of java.lang.Class(Class.java:303)
 |   at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
 |   ... 4 more
 | Caused by: javax.xml.ws.WebServiceException: Error creating JAXBContext for
W3CEndpointReference.
 |   at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:188)
 |   at com.sun.xml.ws.spi.ProviderImpl.<clinit>(ProviderImpl.java:65)
 |   ... 11 more
 | Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 2
counts of IllegalAnnotationExceptions
 | Two classes have the same XML type name "address". Use @(protected) and
@(protected) to assign different names to them.
 |   this problem is related to the following location:
 |     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Address
 |     at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference
$Address com.sun.xml.ws.developer.MemberSubmissionEndpointReference.addr
 |     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
 |   this problem is related to the following location:
 |     at javax.xml.ws.wsaddressing.W3CEndpointReference$Address
 |     at private javax.xml.ws.wsaddressing.W3CEndpointReference$Address javax
.xml.ws.wsaddressing.W3CEndpointReference.address
 |     at javax.xml.ws.wsaddressing.W3CEndpointReference
 | Two classes have the same XML type name "elements". Use @(protected) and
@(protected) to assign different names to them.
 |   this problem is related to the following location:
 |     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference$Elements
 |     at public com.sun.xml.ws.developer.MemberSubmissionEndpointReference
$Elements com.sun.xml.ws.developer.MemberSubmissionEndpointReference
.referenceProperties
 |     at com.sun.xml.ws.developer.MemberSubmissionEndpointReference
 |   this problem is related to the following location:
 |     at javax.xml.ws.wsaddressing.W3CEndpointReference$Elements
 |     at private javax.xml.ws.wsaddressing.W3CEndpointReference$Elements javax
.xml.ws.wsaddressing.W3CEndpointReference.referenceParameters
 |     at javax.xml.ws.wsaddressing.W3CEndpointReference
 |
 |   at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check
(IllegalAnnotationsException.java:66)
 |   at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet
(JAXBContextImpl.java:422)
 |   at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java
:270)
 |   at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java
:103)
 |   at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:81)
 |   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 Source code of java.lang.reflect.Method(Method.java:585)
 |   at javax.xml.bind.ContextFinder.newInstance(ContextFinder.java:210)
 |   at javax.xml.bind.ContextFinder.find(ContextFinder.java:366)
 |   at javax.xml.bind.JAXBContext Source code of javax.xml.bind.JAXBContext(JAXBContext.java:574)
 |   at javax.xml.bind.JAXBContext Source code of javax.xml.bind.JAXBContext(JAXBContext.java:522)
 |   at com.sun.xml.ws.spi.ProviderImpl.getEPRJaxbContext(ProviderImpl.java:186)
 |   ... 12 more
 |

I'm looking foreward for your replies. Thanks in advance.

M.Schumpa

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic
&p=4063438#4063438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode
=reply&p=4063438
__ ____ ____ ____ ____ ____ ____ ____ ____ ____
jboss-user mailing list
jboss-user@(protected)
https://lists.jboss.org/mailman/listinfo/jboss-user

©2008 junlu.com - Jax Systems, LLC, U.S.A.