deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
Hi all,

I have created a web service and followed the instructions in
http://cwiki.apache.org/CXF20DOC/servlet-transport.html in order to deploy
it in JBoss. I am publishing the end point using the XML. As mentioned in
the instructions, i added edited the web.xml with the servelt information
and created a services.xml file which specifies the web service endpoint.
Now after doing all these configurations and then starting JBoss, i get the
following error log in JBoss..and the Web service is not getting deployed.
It looks like everything is fine, apart from reading the services.xml file.
Please advise as to what i need to do done here.


18:01:50,890 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf.xml
]
18:01:51,327 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ext
ension-soap.xml]
18:01:51,484 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ser
vlet.xml]
18:01:51,687 INFO  [DefaultNamespaceHandlerResolver] Ignoring handler [
org.springframework.transaction.config.TxNamespac
eHandler]: class not found
18:01:51,749 ERROR [ContextLoader] Context initialization failed
java.lang.IllegalArgumentException: Cannot locate BeanDefinitionParser for
element [endpoint].
at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement
(NamespaceHandlerSupport.ja
va:63)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseCustomElement
(DefaultXmlBeanDefinit
ionParser.java:415)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions
(DefaultXmlBeanDefin
itionParser.java:374)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions
(DefaultXmlBeanDe
finitionParser.java:206)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
(XmlBeanDefinitionReader
.java:388)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
(XmlBeanDefinitionReader.j
ava:259)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
(XmlBeanDefinitionReader.jav


This is my services.xml file contents:


http://www.springframework.org/schema/beans";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xmlns:jaxws="http://cxf.apache.org/jaxws";

xsi:schemaLocation="

http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>











Thanks in advance for any help


RE: Error with temporary files

2007-10-18 Thread Jean-François Daune

Creating the temp file works fine. I don't know what's wrong.

There is enough space on my disk, which uses NTFS. 

I noticed that turning logging feature off is a workaround.

I can live with it. I'll wait for 2.0.3 release.

J-F

-Message d'origine-
De : Daniel Kulp [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 octobre 2007 16:35
À : cxf-user@incubator.apache.org
Cc : Jean-François Daune
Objet : Re: Error with temporary files



Hmm  

> Caused by: java.io.IOException: No such file or directory
>   at java.io.WinNTFileSystem.createFileExclusively(Native Method)
>   at java.io.File.checkAndCreate(File.java:1345)
>   at java.io.File.createTempFile(File.java:1434)
>   at java.io.File.createTempFile(File.java:1471)

It's having issues creating a temp file.   Can you check to make sure 
your temp directory is available and is writable and has space?   Maybe 
write a simple program that does just File.createTempFile("cxf", null); 
or similar to see if that works?

I did do a bit of work in this area, so you might want to try tha latest 
2.0.3 snapshots.   With that, I can provide a system property to control 
where the temp files are created.

Dan



On Wednesday 17 October 2007, Jean-François Daune wrote:
> Hi,
>
> I got this error in some of my tests. I use version 2.0.1.
>
> The problem seems to relate more to Woodstox than CXF.
>
> Any idea?
>
> Cheers,
>
> J-F
>
>
> org.apache.cxf.binding.soap.SoapFault: Error writing to
> XMLStreamWriter. at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
>ngInterceptor.handleMessage(SoapOutInterceptor.java:244) at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
>ngInterceptor.handleMessage(SoapOutInterceptor.java:226) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:207) at
> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessa
>ge(AbstractFaultChainInitiatorObserver.java:90) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:224) at
> org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outg
>oingChainInterceptor.java:73) at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rChain.java:207) at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
>tionObserver.java:73) at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
>estination.java:78) at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
>ervletController.java:231) at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
>oller.java:139) at
> org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271
>) at
> org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249
>) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>cationFilterChain.java:269) at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>lterChain.java:188) at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>lve.java:213) at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>lve.java:174) at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>va:127) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>va:117) at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>e.java:108) at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>:151) at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>874) at
> org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
>ocessConnection(Http11BaseProtocol.java:665) at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
>nt.java:528) at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
>owerWorkerThread.java:81) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
>ol.java:689) at java.lang.Thread.run(Thread.java:595)
> Caused by: com.ctc.wstx.exc.WstxIOException: No such file or directory
>   at
> com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:
>1687) at
> com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.jav
>a:585) at
> org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
>ngInterceptor.handleMessage(SoapOutInterceptor.java:239) ... 28 more
> Caused by: java.io.IOException: No such file or directory
>   at java.io.WinNTFileSystem.createFileExclusively(Native Method)
>   at java.io.File.checkAndCreate(File.java:1345)
>   at java.io.File.createTempFile(File.java:1434)
>   at java.io.File.createTempFile(File.java:1471)
>   at
> org.apache.cxf.io.CachedOutputStream.createFileOutputStream(CachedOutp
>utStream.ja

Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jeff Yu

Hi,

I am not sure how you deploy the cxf libraries, uses the module-based 
jars or bundle jar, but the error stack seems to me
that spring didn't find the [jaxws:endpoint] custom tag, can you check 
the jaxws-frontend module jar is in your classpath.


Thanks
Jeff

shaminda perera wrote:

Hi all,

I have created a web service and followed the instructions in
http://cwiki.apache.org/CXF20DOC/servlet-transport.html in order to deploy
it in JBoss. I am publishing the end point using the XML. As mentioned in
the instructions, i added edited the web.xml with the servelt information
and created a services.xml file which specifies the web service endpoint.
Now after doing all these configurations and then starting JBoss, i get the
following error log in JBoss..and the Web service is not getting deployed.
It looks like everything is fine, apart from reading the services.xml file.
Please advise as to what i need to do done here.


18:01:50,890 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf.xml
]
18:01:51,327 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ext
ension-soap.xml]
18:01:51,484 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ser
vlet.xml]
18:01:51,687 INFO  [DefaultNamespaceHandlerResolver] Ignoring handler [
org.springframework.transaction.config.TxNamespac
eHandler]: class not found
18:01:51,749 ERROR [ContextLoader] Context initialization failed
java.lang.IllegalArgumentException: Cannot locate BeanDefinitionParser for
element [endpoint].
at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement
(NamespaceHandlerSupport.ja
va:63)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseCustomElement
(DefaultXmlBeanDefinit
ionParser.java:415)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions
(DefaultXmlBeanDefin
itionParser.java:374)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions
(DefaultXmlBeanDe
finitionParser.java:206)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
(XmlBeanDefinitionReader
.java:388)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
(XmlBeanDefinitionReader.j
ava:259)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
(XmlBeanDefinitionReader.jav


This is my services.xml file contents:


http://www.springframework.org/schema/beans";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xmlns:jaxws="http://cxf.apache.org/jaxws";

xsi:schemaLocation="

http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>











Thanks in advance for any help

  


Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jim Ma

Can you check the following  files on your classpath ?
META-INF/spring.handlers
META-INF/spring.schemas

-Jim


shaminda perera wrote:

Hi all,

I have created a web service and followed the instructions in
http://cwiki.apache.org/CXF20DOC/servlet-transport.html in order to deploy
it in JBoss. I am publishing the end point using the XML. As mentioned in
the instructions, i added edited the web.xml with the servelt information
and created a services.xml file which specifies the web service endpoint.
Now after doing all these configurations and then starting JBoss, i get the
following error log in JBoss..and the Web service is not getting deployed.
It looks like everything is fine, apart from reading the services.xml file.
Please advise as to what i need to do done here.


18:01:50,890 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf.xml
]
18:01:51,327 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ext
ension-soap.xml]
18:01:51,484 INFO  [XmlBeanDefinitionReader] Loading XML bean definitions
from class path resource [META-INF/cxf/cxf-ser
vlet.xml]
18:01:51,687 INFO  [DefaultNamespaceHandlerResolver] Ignoring handler [
org.springframework.transaction.config.TxNamespac
eHandler]: class not found
18:01:51,749 ERROR [ContextLoader] Context initialization failed
java.lang.IllegalArgumentException: Cannot locate BeanDefinitionParser for
element [endpoint].
at
org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement
(NamespaceHandlerSupport.ja
va:63)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseCustomElement
(DefaultXmlBeanDefinit
ionParser.java:415)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions
(DefaultXmlBeanDefin
itionParser.java:374)
at
org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions
(DefaultXmlBeanDe
finitionParser.java:206)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
(XmlBeanDefinitionReader
.java:388)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
(XmlBeanDefinitionReader.j
ava:259)
at
org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
(XmlBeanDefinitionReader.jav


This is my services.xml file contents:


http://www.springframework.org/schema/beans";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xmlns:jaxws="http://cxf.apache.org/jaxws";

xsi:schemaLocation="

http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>











Thanks in advance for any help

  


Re: Error with temporary files

2007-10-18 Thread Willem Jiang

Hi,
It is a known issue. You can found more information here[1]
[1]http://issues.apache.org/jira/browse/CXF-986

Willem.
Jean-François Daune wrote:

Creating the temp file works fine. I don't know what's wrong.

There is enough space on my disk, which uses NTFS. 


I noticed that turning logging feature off is a workaround.

I can live with it. I'll wait for 2.0.3 release.

J-F

-Message d'origine-
De : Daniel Kulp [mailto:[EMAIL PROTECTED]
Envoyé : mercredi 17 octobre 2007 16:35
À : cxf-user@incubator.apache.org
Cc : Jean-François Daune
Objet : Re: Error with temporary files



Hmm  

  

Caused by: java.io.IOException: No such file or directory
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1345)
at java.io.File.createTempFile(File.java:1434)
at java.io.File.createTempFile(File.java:1471)



It's having issues creating a temp file.   Can you check to make sure 
your temp directory is available and is writable and has space?   Maybe 
write a simple program that does just File.createTempFile("cxf", null); 
or similar to see if that works?


I did do a bit of work in this area, so you might want to try tha latest 
2.0.3 snapshots.   With that, I can provide a system property to control 
where the temp files are created.


Dan



On Wednesday 17 October 2007, Jean-François Daune wrote:
  

Hi,

I got this error in some of my tests. I use version 2.0.1.

The problem seems to relate more to Woodstox than CXF.

Any idea?

Cheers,

J-F


org.apache.cxf.binding.soap.SoapFault: Error writing to
XMLStreamWriter. at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
ngInterceptor.handleMessage(SoapOutInterceptor.java:244) at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
ngInterceptor.handleMessage(SoapOutInterceptor.java:226) at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:207) at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessa
ge(AbstractFaultChainInitiatorObserver.java:90) at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:224) at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(Outg
oingChainInterceptor.java:73) at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
rChain.java:207) at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
tionObserver.java:73) at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
estination.java:78) at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
ervletController.java:231) at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
oller.java:139) at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271
) at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249
) at javax.servlet.http.HttpServlet.service(HttpServlet.java:710) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:803) at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
cationFilterChain.java:269) at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
lterChain.java:188) at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
lve.java:213) at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
lve.java:174) at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
va:127) at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
va:117) at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
e.java:108) at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
:151) at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
874) at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.pr
ocessConnection(Http11BaseProtocol.java:665) at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
nt.java:528) at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
owerWorkerThread.java:81) at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
ol.java:689) at java.lang.Thread.run(Thread.java:595)
Caused by: com.ctc.wstx.exc.WstxIOException: No such file or directory
at
com.ctc.wstx.sw.BaseStreamWriter.finishDocument(BaseStreamWriter.java:
1687) at
com.ctc.wstx.sw.BaseStreamWriter.writeEndDocument(BaseStreamWriter.jav
a:585) at
org.apache.cxf.binding.soap.interceptor.SoapOutInterceptor$SoapOutEndi
ngInterceptor.handleMessage(SoapOutInterceptor.java:239) ... 28 more
Caused by: java.io.IOException: No such file or directory
at java.io.WinNTFileSystem.createFileExclusively(Native Method)
at java.io.File.checkAndCreate(File.java:1345)
at java.io.File.createTempFile(File.java:1434)
at java.io.File.createTempFile(File.java:1471)
at
org.apache.cxf.io.CachedOutputStream.

Re: deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
 Thanks Jeff and Jim for the quick replies.

Jeff , yes the jaxws-frontend module jar is in my classpath.
I use maven to get all the required libraries to my web application.. as
described in
http://cwiki.apache.org/CXF20DOC/maven-integration-and-plugin.html

Jim,  yes I have those files in the classpath. I mean they are inside the
spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
classpath.

I even now added a spring.schemas file to my web module under
META-INF\spring.schemas and added the following entry to it.
http\://cxf.apache.org/schemas/jaxws.xsd=/schemas/jaxws.xsd
 thinking that spring cant find the jaxws.xsd file.

but still i am getting the same result.

Thanks


On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:
>
> Can you check the following  files on your classpath ?
> META-INF/spring.handlers
> META-INF/spring.schemas
>
> -Jim
>
>
> shaminda perera wrote:
> > Hi all,
> >
> > I have created a web service and followed the instructions in
> > http://cwiki.apache.org/CXF20DOC/servlet-transport.html in order to
> deploy
> > it in JBoss. I am publishing the end point using the XML. As mentioned
> in
> > the instructions, i added edited the web.xml with the servelt
> information
> > and created a services.xml file which specifies the web service
> endpoint.
> > Now after doing all these configurations and then starting JBoss, i get
> the
> > following error log in JBoss..and the Web service is not getting
> deployed.
> > It looks like everything is fine, apart from reading the services.xmlfile.
> > Please advise as to what i need to do done here.
> >
> >
> > 18:01:50,890 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions
> > from class path resource [META-INF/cxf/cxf.xml
> > ]
> > 18:01:51,327 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions
> > from class path resource [META-INF/cxf/cxf-ext
> > ension-soap.xml]
> > 18:01:51,484 INFO  [XmlBeanDefinitionReader] Loading XML bean
> definitions
> > from class path resource [META-INF/cxf/cxf-ser
> > vlet.xml]
> > 18:01:51,687 INFO  [DefaultNamespaceHandlerResolver] Ignoring handler [
> > org.springframework.transaction.config.TxNamespac
> > eHandler]: class not found
> > 18:01:51,749 ERROR [ContextLoader] Context initialization failed
> > java.lang.IllegalArgumentException: Cannot locate BeanDefinitionParser
> for
> > element [endpoint].
> > at
> >
> org.springframework.beans.factory.xml.NamespaceHandlerSupport.findParserForElement
> > (NamespaceHandlerSupport.ja
> > va:63)
> > at
> >
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseCustomElement
> > (DefaultXmlBeanDefinit
> > ionParser.java:415)
> > at
> >
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.parseBeanDefinitions
> > (DefaultXmlBeanDefin
> > itionParser.java:374)
> > at
> >
> org.springframework.beans.factory.xml.DefaultXmlBeanDefinitionParser.registerBeanDefinitions
> > (DefaultXmlBeanDe
> > finitionParser.java:206)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions
> > (XmlBeanDefinitionReader
> > .java:388)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions
> > (XmlBeanDefinitionReader.j
> > ava:259)
> > at
> >
> org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions
> > (XmlBeanDefinitionReader.jav
> >
> >
> > This is my services.xml file contents:
> >
> >
> > http://www.springframework.org/schema/beans";
> >
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >
> > xmlns:jaxws="http://cxf.apache.org/jaxws";
> >
> > xsi:schemaLocation="
> >
> > http://www.springframework.org/schema/beans
> > http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
> >
> > http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
> >
> > 
> >
> > 
> >
> > 
> >
> >  >
> > implementor="com.company.WebServiceImpl"
> >
> > address="/CompanyService"/>
> >
> > 
> >
> > Thanks in advance for any help
> >
> >
>


Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jim Ma



Jim,  yes I have those files in the classpath. I mean they are inside the
spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
classpath.

  
These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd  is 
also packaged into this jar file. Can you

confirm this jar file on your classpath ?

CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring version 
to 2.0.6.


-Jim


Re: deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
Hi Jim,
Thanks again,,

updating the spring version to 2.0.6 did the trick..
now that error is not coming...
however,, now i am getting the following error:

11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic
eFromClass
INFO: Creating Service {
http://server.webservice.search.services.company.com}CompanySearchServicefrom
class
com.company.services.search.webservice.server.CompanySearchServiceImpl
11:50:42,876 INFO  [STDOUT] 11:50:42,876 INFO  [DefaultListableBeanFactory]
Destroying singletons in org.springframework
[EMAIL PROTECTED]: defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
g.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,
org.apache.cxf.transport.ConduitInitiatorMana
ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,org.apac
he.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleMa
nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,
org.apache.cxf.catalog.OASISCatalogManager,org.ap
ache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.cu
stomEditorConfigurer,
org.apache.cxf.transport.servlet.ServletTransportFactory,ricallTrackSearch];
root of factory hierar
chy
11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is java.lang.ClassCastException:
com.company.services.search.webservice.server.Mai
nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
com.sun.xml.bind.v2.runtime.reflect.Accessor
Caused by:
java.lang.ClassCastException:
com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc
annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate
(OptimizedAccessorFactory.java:15
1)
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:143)
at
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
Accessor.java:204)
at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty
.(SingleElementLeafProperty.java:45)
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.newInstance(Constructor.java:513)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(
PropertyFactory.java:88)

I think this is something to do with a library/jar issue, since when i
publish this same web service to Jetty HTTP server using Endpoint.publish()
, it is working fine. I mean i was also able to access the WSDL using the
URL.

Please help.

On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:
>
>
> > Jim,  yes I have those files in the classpath. I mean they are inside
> the
> > spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
> > classpath.
> >
> >
> These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd  is
> also packaged into this jar file. Can you
> confirm this jar file on your classpath ?
>
> CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring version
> to 2.0.6.
>
> -Jim
>


Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jim Ma



11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is java.lang.ClassCastException:
It seems to me this is caused by the error configuration in your 
services.xml.

Can you paste the related segment  for the bean companyTrackSearch ?

-Jim


Re: deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
This is my full services.xml file contents :


http://www.springframework.org/schema/beans";

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xmlns:jaxws="http://cxf.apache.org/jaxws";

xsi:schemaLocation="

http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd

http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>










Thanks


On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:
>
>
> > 11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
> > initialization failed
> > org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> > with name 'companyTrackSearch': Invocation o
> > f init method failed; nested exception is java.lang.ClassCastException:
> It seems to me this is caused by the error configuration in your
> services.xml.
> Can you paste the related segment  for the bean companyTrackSearch ?
>
> -Jim
>


Re: deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
Yes, i put the CXF libraries in the war file. and then use maven to deploy a
EAR file which contains the war file.

Does JBoss have a JAXB jar file? if so where can i locate it?

On 10/18/07, Jeff Yu <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> When I see the "ClassCastException", the "ClassLoader issue" would pop
> up in my mind.. ;-), I  stuck with the classloader issues these days.
>
> Can you show how you deploy the cxf libraries? put the required jars in
> the war, and then deploy the war to JBoss with scoping classloader? I am
> guessing it might be conflict with the JAXB  jar that JBoss had with the
> CXF's.
>
> Thanks
> Jeff
>
> shaminda perera wrote:
> > Hi Jim,
> > Thanks again,,
> >
> > updating the spring version to 2.0.6 did the trick..
> > now that error is not coming...
> > however,, now i am getting the following error:
> >
> > 11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
> > org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic
> > eFromClass
> > INFO: Creating Service {
> >
> http://server.webservice.search.services.company.com}CompanySearchServicefrom
> > class
> > com.company.services.search.webservice.server.CompanySearchServiceImpl
> > 11:50:42,876 INFO  [STDOUT] 11:50:42,876
> INFO  [DefaultListableBeanFactory]
> > Destroying singletons in org.springframework
> > [EMAIL PROTECTED]: defining beans
> > [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
> > cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
> > org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
> > g.BindingFactoryManager,
> org.apache.cxf.transport.DestinationFactoryManager,
> > org.apache.cxf.transport.ConduitInitiatorMana
> > ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
> > org.apache.cxf.workqueue.WorkQueueManager,org.apac
> > he.cxf.buslifecycle.BusLifeCycleManager,
> > org.apache.cxf.endpoint.ServerRegistry,
> > org.apache.cxf.endpoint.ServerLifeCycleMa
> > nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
> > org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
> > endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,
> > org.apache.cxf.catalog.OASISCatalogManager,org.ap
> > ache.cxf.binding.soap.SoapBindingFactory,
> > org.apache.cxf.binding.soap.SoapTransportFactory,
> > org.apache.cxf.binding.soap.cu
> > stomEditorConfigurer,
> > org.apache.cxf.transport.servlet.ServletTransportFactory
> ,ricallTrackSearch];
> > root of factory hierar
> > chy
> > 11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
> > initialization failed
> > org.springframework.beans.factory.BeanCreationException: Error creating
> bean
> > with name 'companyTrackSearch': Invocation o
> > f init method failed; nested exception is java.lang.ClassCastException:
> > com.company.services.search.webservice.server.Mai
> > nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
> > com.sun.xml.bind.v2.runtime.reflect.Accessor
> > Caused by:
> > java.lang.ClassCastException:
> >
> com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc
> > annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
> > at
> >
> com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate
> > (OptimizedAccessorFactory.java:15
> > 1)
> > at
> > com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
> > OptimizedAccessorFactory.java:143)
> > at
> > com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
> > Accessor.java:204)
> > at
> com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty
> > .(SingleElementLeafProperty.java:45)
> > 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.newInstance(Constructor.java
> :513)
> > at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(
> > PropertyFactory.java:88)
> >
> > I think this is something to do with a library/jar issue, since when i
> > publish this same web service to Jetty HTTP server using
> Endpoint.publish()
> > , it is working fine. I mean i was also able to access the WSDL using
> the
> > URL.
> >
> > Please help.
> >
> > On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:
> >
> >>
> >>> Jim,  yes I have those files in the classpath. I mean they are inside
> >>>
> >> the
> >>
> >>> spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
> >>> classpath.
> >>>
> >>>
> >>>
> >> These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd  is
> >> also packaged into this jar file. Can you
> >> confirm this jar file on your classpath ?
> >>
> >> CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring
> version
> >> to 2.0.6.
> >>
> 

Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jeff Yu

Hi,

When I see the "ClassCastException", the "ClassLoader issue" would pop 
up in my mind.. ;-), I  stuck with the classloader issues these days.


Can you show how you deploy the cxf libraries? put the required jars in 
the war, and then deploy the war to JBoss with scoping classloader? I am 
guessing it might be conflict with the JAXB  jar that JBoss had with the 
CXF's.


Thanks
Jeff

shaminda perera wrote:

Hi Jim,
Thanks again,,

updating the spring version to 2.0.6 did the trick..
now that error is not coming...
however,, now i am getting the following error:

11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic
eFromClass
INFO: Creating Service {
http://server.webservice.search.services.company.com}CompanySearchServicefrom
class
com.company.services.search.webservice.server.CompanySearchServiceImpl
11:50:42,876 INFO  [STDOUT] 11:50:42,876 INFO  [DefaultListableBeanFactory]
Destroying singletons in org.springframework
[EMAIL PROTECTED]: defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
g.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,
org.apache.cxf.transport.ConduitInitiatorMana
ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,org.apac
he.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleMa
nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,
org.apache.cxf.catalog.OASISCatalogManager,org.ap
ache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.cu
stomEditorConfigurer,
org.apache.cxf.transport.servlet.ServletTransportFactory,ricallTrackSearch];
root of factory hierar
chy
11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is java.lang.ClassCastException:
com.company.services.search.webservice.server.Mai
nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
com.sun.xml.bind.v2.runtime.reflect.Accessor
Caused by:
java.lang.ClassCastException:
com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc
annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate
(OptimizedAccessorFactory.java:15
1)
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:143)
at
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
Accessor.java:204)
at com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty
.(SingleElementLeafProperty.java:45)
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.newInstance(Constructor.java:513)
at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(
PropertyFactory.java:88)

I think this is something to do with a library/jar issue, since when i
publish this same web service to Jetty HTTP server using Endpoint.publish()
, it is working fine. I mean i was also able to access the WSDL using the
URL.

Please help.

On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:
  


Jim,  yes I have those files in the classpath. I mean they are inside
  

the


spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
classpath.


  

These files should be in cxf-rt-frontend-jaxws.jar. And jaxws.xsd  is
also packaged into this jar file. Can you
confirm this jar file on your classpath ?

CXF2.0.2 use spring 2.0.6 . I also suggest you update the spring version
to 2.0.6.

-Jim




  


Faults

2007-10-18 Thread Egor Samarkhanov
Hi !

I haven't found any documentation on how to work with faults
in CXF. Am I missing something?
Please let me know how to declare my own fault in my service?
Do I need to extend some base class (exception) to create my
own fault? What if I don't use Aegis binding?



Thanks,
Egor Samarkhanov ([EMAIL PROTECTED])




Re: deploying CXF Web service in JBoss

2007-10-18 Thread Andrew Dinn

shaminda perera wrote:

Yes, i put the CXF libraries in the war file. and then use maven to deploy a
EAR file which contains the war file.

Does JBoss have a JAXB jar file? if so where can i locate it?


$JBOSS_HOME/lib has jaxb-api.jar and jaxb-impl.jar.

regards,


Andrew Dinn
---


Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jeff Yu

Hi,

The simple way to verify whether it is the JAXB jar issue, you can put 
the jaxb-api, jaxb-impl in the $JBoss_HOME/lib/endorsed folder,
and then see if it works or not. 

If it is the issue, you might need to refer to the this [1] to see how 
to configure a scoped classloader in JBoss to resolve classloader stuff.


Hope This Helps.
Jeff

[1] http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

shaminda perera wrote:

Yes, i put the CXF libraries in the war file. and then use maven to deploy a
EAR file which contains the war file.

Does JBoss have a JAXB jar file? if so where can i locate it?

On 10/18/07, Jeff Yu <[EMAIL PROTECTED]> wrote:
  

Hi,

When I see the "ClassCastException", the "ClassLoader issue" would pop
up in my mind.. ;-), I  stuck with the classloader issues these days.

Can you show how you deploy the cxf libraries? put the required jars in
the war, and then deploy the war to JBoss with scoping classloader? I am
guessing it might be conflict with the JAXB  jar that JBoss had with the
CXF's.

Thanks
Jeff

shaminda perera wrote:


Hi Jim,
Thanks again,,

updating the spring version to 2.0.6 did the trick..
now that error is not coming...
however,, now i am getting the following error:

11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
org.apache.cxf.service.factory.ReflectionServiceFactoryBean buildServic
eFromClass
INFO: Creating Service {

  

http://server.webservice.search.services.company.com}CompanySearchServicefrom


class
com.company.services.search.webservice.server.CompanySearchServiceImpl
11:50:42,876 INFO  [STDOUT] 11:50:42,876
  

INFO  [DefaultListableBeanFactory]


Destroying singletons in org.springframework
[EMAIL PROTECTED]: defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
g.BindingFactoryManager,
  

org.apache.cxf.transport.DestinationFactoryManager,


org.apache.cxf.transport.ConduitInitiatorMana
ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,org.apac
he.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleMa
nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,
org.apache.cxf.catalog.OASISCatalogManager,org.ap
ache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.cu
stomEditorConfigurer,
org.apache.cxf.transport.servlet.ServletTransportFactory
  

,ricallTrackSearch];


root of factory hierar
chy
11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
  

bean


with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is java.lang.ClassCastException:
com.company.services.search.webservice.server.Mai
nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
com.sun.xml.bind.v2.runtime.reflect.Accessor
Caused by:
java.lang.ClassCastException:

  

com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc


annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
at

  

com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate


(OptimizedAccessorFactory.java:15
1)
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:143)
at
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
Accessor.java:204)
at
  

com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty


.(SingleElementLeafProperty.java:45)
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.newInstance(Constructor.java
  

:513)


at com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(
PropertyFactory.java:88)

I think this is something to do with a library/jar issue, since when i
publish this same web service to Jetty HTTP server using
  

Endpoint.publish()


, it is working fine. I mean i was also able to access the WSDL using
  

the


URL.

Please help.

On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:

  

Jim,  yes I have those files in the classpath. I mean they are inside

  

the



spring-beans-2.0-m2.jar\META-INF folder. this spring jar is in the
classpath.



  

These files should be in cxf-rt-frontend-ja

Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jim Ma


It is jaxb jar issue . FYI : 
http://forums.java.net/jive/message.jspa?messageID=212259 .


-Jim

Jeff Yu wrote:

Hi,

The simple way to verify whether it is the JAXB jar issue, you can put 
the jaxb-api, jaxb-impl in the $JBoss_HOME/lib/endorsed folder,

and then see if it works or not.
If it is the issue, you might need to refer to the this [1] to see how 
to configure a scoped classloader in JBoss to resolve classloader stuff.


Hope This Helps.
Jeff

[1] http://www.jboss.org/wiki/Wiki.jsp?page=ClassLoadingConfiguration

shaminda perera wrote:
Yes, i put the CXF libraries in the war file. and then use maven to 
deploy a

EAR file which contains the war file.

Does JBoss have a JAXB jar file? if so where can i locate it?

On 10/18/07, Jeff Yu <[EMAIL PROTECTED]> wrote:
 

Hi,

When I see the "ClassCastException", the "ClassLoader issue" would pop
up in my mind.. ;-), I  stuck with the classloader issues these days.

Can you show how you deploy the cxf libraries? put the required jars in
the war, and then deploy the war to JBoss with scoping classloader? 
I am
guessing it might be conflict with the JAXB  jar that JBoss had with 
the

CXF's.

Thanks
Jeff

shaminda perera wrote:
   

Hi Jim,
Thanks again,,

updating the spring version to 2.0.6 did the trick..
now that error is not coming...
however,, now i am getting the following error:

11:50:41,860 ERROR [STDERR] 18-Oct-2007 11:50:41
org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
buildServic

eFromClass
INFO: Creating Service {

  
http://server.webservice.search.services.company.com}CompanySearchServicefrom 

   

class
com.company.services.search.webservice.server.CompanySearchServiceImpl
11:50:42,876 INFO  [STDOUT] 11:50:42,876
  

INFO  [DefaultListableBeanFactory]
   

Destroying singletons in org.springframework
[EMAIL PROTECTED]: defining 
beans

[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostPro
cessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,
org.apache.cxf.resource.ResourceManager,org.apache.cxf.bindin
g.BindingFactoryManager,
  

org.apache.cxf.transport.DestinationFactoryManager,
   

org.apache.cxf.transport.ConduitInitiatorMana
ger,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,
org.apache.cxf.workqueue.WorkQueueManager,org.apac
he.cxf.buslifecycle.BusLifeCycleManager,
org.apache.cxf.endpoint.ServerRegistry,
org.apache.cxf.endpoint.ServerLifeCycleMa
nager,org.apache.cxf.endpoint.ClientLifeCycleManager,
org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.
endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager, 


org.apache.cxf.catalog.OASISCatalogManager,org.ap
ache.cxf.binding.soap.SoapBindingFactory,
org.apache.cxf.binding.soap.SoapTransportFactory,
org.apache.cxf.binding.soap.cu
stomEditorConfigurer,
org.apache.cxf.transport.servlet.ServletTransportFactory
  

,ricallTrackSearch];
   

root of factory hierar
chy
11:50:42,892 INFO  [STDOUT] 11:50:42,892 ERROR [ContextLoader] Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error 
creating
  

bean
   

with name 'companyTrackSearch': Invocation o
f init method failed; nested exception is 
java.lang.ClassCastException:

com.company.services.search.webservice.server.Mai
nCompanySearchInput$JaxbAccessorF_clientID cannot be cast to
com.sun.xml.bind.v2.runtime.reflect.Accessor
Caused by:
java.lang.ClassCastException:

  
com.company.services.search.webservice.server.MainCompanySearchInput$JaxbAccessorF_clientIDc 

   

annot be cast to com.sun.xml.bind.v2.runtime.reflect.Accessor
at

  
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.instanciate 

   

(OptimizedAccessorFactory.java:15
1)
at
com.sun.xml.bind.v2.runtime.reflect.opt.OptimizedAccessorFactory.get(
OptimizedAccessorFactory.java:143)
at
com.sun.xml.bind.v2.runtime.reflect.Accessor$FieldReflection.optimize(
Accessor.java:204)
at
  

com.sun.xml.bind.v2.runtime.property.SingleElementLeafProperty
   

.(SingleElementLeafProperty.java:45)
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.newInstance(Constructor.java
  

:513)
   
at 
com.sun.xml.bind.v2.runtime.property.PropertyFactory.create(

PropertyFactory.java:88)

I think this is something to do with a library/jar issue, since when i
publish this same web service to Jetty HTTP server using
  

Endpoint.publish()
   

, it is working fine. I mean i was also able to access the WSDL using
  

the
   

URL.

Please help.

On 10/18/07, Jim Ma <[EMAIL PROTECTED]> wrote:

 
Jim,  yes I have those files in the classpath. I mean they are 
inside


  

the

   

spring-beans-2.0

Re: deploying CXF Web service in JBoss

2007-10-18 Thread shaminda perera
I put the jaxb jars to \lib\endorsed.

and now its working fine. I mean that error which cam earlier is not
coming..
however,, the spring context is not getting started because of another
(unrelated) error

This is the error log..

13:10:16,890 INFO  [Lifecycle] starting up:
org.jboss.seam.ioc.spring.springELResolver
13:10:16,921 INFO  [STDOUT] 13:10:16,921 ERROR [[/company]] Exception
sending context initialized event to listener insta
nce of class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: exception invoking: initialize
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java
:133)
at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
at org.jboss.seam.Component.newInstance(Component.java:1746)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
at org.jboss.seam.contexts.Lifecycle.endInitialization(
Lifecycle.java:145)
at org.jboss.seam.init.Initialization.init(Initialization.java:504)
at org.jboss.seam.servlet.SeamListener.contextInitialized(
SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:3854)
at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4359)
at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java
:553)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(
BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(
RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java
:659)
at org.apache.catalina.core.StandardContext.init(
StandardContext.java:5310)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(
BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(
RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java
:659)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal
(TomcatDeployer.java:301)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(
TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java
:375)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(
ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(
ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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(MBean

Re: deploying CXF Web service in JBoss

2007-10-18 Thread Jim Ma
jboss-el.jar  is missing?  It looks like a jboss issue , you can ask  
jboss mailing list .


-Jim.

shaminda perera wrote:

I put the jaxb jars to \lib\endorsed.

and now its working fine. I mean that error which cam earlier is not
coming..
however,, the spring context is not getting started because of another
(unrelated) error

This is the error log..

13:10:16,890 INFO  [Lifecycle] starting up:
org.jboss.seam.ioc.spring.springELResolver
13:10:16,921 INFO  [STDOUT] 13:10:16,921 ERROR [[/company]] Exception
sending context initialized event to listener insta
nce of class org.jboss.seam.servlet.SeamListener
java.lang.RuntimeException: exception invoking: initialize
at org.jboss.seam.util.Reflections.invokeAndWrap(Reflections.java
:133)
at org.jboss.seam.Component.callComponentMethod(Component.java:1834)
at org.jboss.seam.Component.callCreateMethod(Component.java:1757)
at org.jboss.seam.Component.newInstance(Component.java:1746)
at org.jboss.seam.contexts.Lifecycle.startup(Lifecycle.java:175)
at org.jboss.seam.contexts.Lifecycle.endInitialization(
Lifecycle.java:145)
at org.jboss.seam.init.Initialization.init(Initialization.java:504)
at org.jboss.seam.servlet.SeamListener.contextInitialized(
SeamListener.java:33)
at org.apache.catalina.core.StandardContext.listenerStart(
StandardContext.java:3854)
at org.apache.catalina.core.StandardContext.start(
StandardContext.java:4359)
at org.apache.catalina.core.ContainerBase.addChildInternal(
ContainerBase.java:761)
at org.apache.catalina.core.ContainerBase.addChild(
ContainerBase.java:741)
at org.apache.catalina.core.StandardHost.addChild(StandardHost.java
:553)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(
BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(
RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java
:659)
at org.apache.catalina.core.StandardContext.init(
StandardContext.java:5310)
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:597)
at org.apache.tomcat.util.modeler.BaseModelMBean.invoke(
BaseModelMBean.java:297)
at org.jboss.mx.server.RawDynamicInvoker.invoke(
RawDynamicInvoker.java:164)
at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java
:659)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeployInternal
(TomcatDeployer.java:301)
at org.jboss.web.tomcat.service.TomcatDeployer.performDeploy(
TomcatDeployer.java:104)
at org.jboss.web.AbstractWebDeployer.start(AbstractWebDeployer.java
:375)
at org.jboss.web.WebModule.startModule(WebModule.java:83)
at org.jboss.web.WebModule.startService(WebModule.java:61)
at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(
ServiceMBeanSupport.java:289)
at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(
ServiceMBeanSupport.java:245)
at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
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 

@HandlerChain problems..

2007-10-18 Thread Cencio

Hi all,

i would add some handlers to my service.

i add 
@HandlerChain(file="handlers.xml")

and i put in the same path of service class the handlers.xml file:


http://java.sun.com/xml/ns/javaee";>



org.test.HandlerTest





where HandlerTest is a class that implements Handler.


When i deploy it gives me this error:


org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'PD': Invocation of init method failed; nested exception is
javax.xml.ws.WebServiceException: Chain not specified
Caused by: 
javax.xml.ws.WebServiceException: Chain not specified
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:109)
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:124)
at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.buildHandlerChain(JaxWsServerFactoryBean.java:176)
.

at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
at
org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
Caused by: javax.xml.ws.WebServiceException: Failed to instantiate handler
at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:123)
at
org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:105)
... 111 more
Caused by: java.lang.NullPointerException
at
org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:111)
... 112 more



Where did i make errors?

There is a way to put the handler config file in another path? (for example
in WEB-INF dir)


Thx for any help,
Lorenzo

-- 
View this message in context: 
http://www.nabble.com/%40HandlerChain-problems..-tf4646259.html#a13272238
Sent from the cxf-user mailing list archive at Nabble.com.



JAXB and serialVersionID

2007-10-18 Thread Benson Margulies
I was surprised to see that JAXB schematizes the private static final
long serialVersionUID from my exception class. Is there some special
case for these, in spite of being private?



Guys, help, can't manage to use CXF faults

2007-10-18 Thread Egor Samarkhanov
Hi !

I have a simple exception class:

@WebFault(name = "faultDetail")
public class NotLoggedInException extends Exception
{
private NotLoggedInFaultDetail faultDetail;


public NotLoggedInException( String message )
{
super( message );
}

public NotLoggedInException( String message, NotLoggedInFaultDetail 
faultDetail )
{
super( message );
this.faultDetail = faultDetail;
}

public NotLoggedInException( String message, NotLoggedInFaultDetail 
faultDetail, Throwable cause )
{
super( message, cause );
this.faultDetail = faultDetail;
}

public NotLoggedInFaultDetail getFaultInfo() {
return this.faultDetail;
}
}


and a fault detail class

@XmlRootElement(name = "faultDetail")
public class NotLoggedInFaultDetail
{
private String detail;

public NotLoggedInFaultDetail( String detail )
{
this.detail = detail;
}

public String getDetail()
{
return detail;
}

public void setDetail( String detail )
{
this.detail = detail;
}
}


And I'm constantly getting the following exception when
I try to access the (SERVLET TRANSPORT):

java.lang.NullPointerException
at 
org.apache.cxf.jaxb.JAXBSchemaInitializer.end(JAXBSchemaInitializer.java:213)
at 
org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:89)
at 
org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:48)
at 
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:255)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:244)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:272)
at 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:146)
at 
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:89)
at 
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83)
at 
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:107)
at 
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:147)
at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:287)
at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:227)
at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
at 
org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderImpl.java:74)
at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
at com.actimind.actitime.dtr.ws.CXFServlet.init(CXFServlet.java:23)
at 
org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
at 
org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java:750)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:130)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
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:856)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Unknown Source)

The interesing thing is that if i remove the method
getFaultInfo() from the NotLoggedInException the exception
disappears, but I suppose in this case such a fault is incorectly
declared.

To publish my service I've extended your CFXServlet and
call Endpoint.publish(...) just after the servlet initialization.



Thanks,
Egor Samarkhanov ([EMAIL PROTECTED])




Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Cencio

Hi Dan,

i tryed the snap apache-cxf-2.0.3-incubator-20071016.175632-4 to check if
attachments are ok, but there is still some problem...

After tons of testing i finally reproduce thos scenarios (Message send have
2 zip attachments):

Client send and service simply echo the message:
   Client throws org.xml.sax.SAXParseException: Content is not allowed in
prolog.
   With tcpmon i can see a little difference in attachment formatting..
tcpmon log [1]

Client send and service write attachments on files before send back
   Attachments are perfects.. then same errors of first scenario

Client send and service write the whole message, then the attachments, then
send back:
   Writing the whole message with writeTo seems to corrupt the content:
   Looking the file written the second attachment is gone...
   When iterate the attachments to write them only one is found
   The attachment written is corrupt 
   The message send back is cutted : tcpmon log [2]
   The client throws the same error


I hope this can help...
I wait 4 ur news
Tell me if u build a snapshot with some fix so i can deeply test it.

Thx,
Lorenzo

LOGS:
[1] http://www.nabble.com/file/p13276118/scenario_1and2.log
scenario_1and2.log 
[2] http://www.nabble.com/file/p13276118/scenario_3.log scenario_3.log 

-- 
View this message in context: 
http://www.nabble.com/SOAPMessage-with-Attachment-service-problems-tf4628726.html#a13276118
Sent from the cxf-user mailing list archive at Nabble.com.



Re: JAXB and serialVersionID

2007-10-18 Thread Daniel Kulp
On Thursday 18 October 2007, Benson Margulies wrote:
> I was surprised to see that JAXB schematizes the private static final
> long serialVersionUID from my exception class. Is there some special
> case for these, in spite of being private?

It's probably not JAXB.   JAXB cannot handle exceptions directly.   We 
pull the faultInfo out of it if it exists and pass that to JAXB.   If 
there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or so 
of JAXBSchemaInitializer.   Looking at it, we map all the declared 
fields.   We don't check if the fields are static/final things.You 
could update that and see if it helps.   If so, commit it.   :-)

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Cencio

I notice in both scenarios that 

Content-Transfer-Encoding: binary
Content-Id: 


lines in the first part (Soap envelope part) are missing... that's wrong?
-- 
View this message in context: 
http://www.nabble.com/SOAPMessage-with-Attachment-service-problems-tf4628726.html#a13276436
Sent from the cxf-user mailing list archive at Nabble.com.



RE: JAXB and serialVersionID

2007-10-18 Thread Benson Margulies
Got it.

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 10:27 AM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: JAXB and serialVersionID
> 
> On Thursday 18 October 2007, Benson Margulies wrote:
> > I was surprised to see that JAXB schematizes the private static
final
> > long serialVersionUID from my exception class. Is there some special
> > case for these, in spite of being private?
> 
> It's probably not JAXB.   JAXB cannot handle exceptions directly.   We
> pull the faultInfo out of it if it exists and pass that to JAXB.   If
> there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or
so
> of JAXBSchemaInitializer.   Looking at it, we map all the declared
> fields.   We don't check if the fields are static/final things.You
> could update that and see if it helps.   If so, commit it.   :-)
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Cencio

And the HTTP header content type is wrong


Cencio wrote:
> 
> I notice in both scenarios that 
> 
> Content-Transfer-Encoding: binary
> Content-Id: 
> 
> 
> lines in the first part (Soap envelope part) are missing... that's wrong?
> 

-- 
View this message in context: 
http://www.nabble.com/SOAPMessage-with-Attachment-service-problems-tf4628726.html#a13276628
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Cencio

The content type is right in the received SOAPMessage, but for some reason it
changes when it is send back...

Sorry 4 so many mails.. i hope that helps..

I test also with apache-cxf-2.0.3-incubator-20071017.210232-4 with same
results.

/Lorenzo



Cencio wrote:
> 
> And the HTTP header content type is wrong
> 
> 
> 
> 
> Cencio wrote:
>> 
>> I notice in both scenarios that 
>> 
>> Content-Transfer-Encoding: binary
>> Content-Id: 
>> 
>> 
>> lines in the first part (Soap envelope part) are missing... that's wrong?
>> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/SOAPMessage-with-Attachment-service-problems-tf4628726.html#a13277743
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Daniel Kulp

I think I'm going to need an actual reproducable test case.   I've tried 
duplicating this here and cannot.   It all seems to work OK.

(That is providing the input messages are correct.The logs you sent 
definitely had some issues, but that may be due to the mailers or 
similar trying to text format it and converting some cr/lf type 
things. )

Couple things to try:
1) In your provider, call msg.saveChanges() before returning.   I notice 
we're not doing that.  (I'll go ahead and add that)

2) Try in tomcat standalone instead of in JBoss.   I'm wondering if 
you're getting a different SAAJ implementation.

Dan


On Thursday 18 October 2007, Cencio wrote:
> Hi Dan,
>
> i tryed the snap apache-cxf-2.0.3-incubator-20071016.175632-4 to check
> if attachments are ok, but there is still some problem...
>
> After tons of testing i finally reproduce thos scenarios (Message send
> have 2 zip attachments):
>
> Client send and service simply echo the message:
>Client throws org.xml.sax.SAXParseException: Content is not allowed
> in prolog.
>With tcpmon i can see a little difference in attachment
> formatting.. tcpmon log [1]
>
> Client send and service write attachments on files before send back
>Attachments are perfects.. then same errors of first scenario
>
> Client send and service write the whole message, then the attachments,
> then send back:
>Writing the whole message with writeTo seems to corrupt the
> content: Looking the file written the second attachment is gone...
>When iterate the attachments to write them only one is found
>The attachment written is corrupt
>The message send back is cutted : tcpmon log [2]
>The client throws the same error
>
>
> I hope this can help...
> I wait 4 ur news
> Tell me if u build a snapshot with some fix so i can deeply test it.
>
> Thx,
> Lorenzo
>
> LOGS:
> [1] http://www.nabble.com/file/p13276118/scenario_1and2.log
> scenario_1and2.log
> [2] http://www.nabble.com/file/p13276118/scenario_3.log scenario_3.log



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: deploying CXF Web service in JBoss

2007-10-18 Thread Andrew Dinn

So you get this message:

Caused by: java.lang.NoClassDefFoundError: 
com/sun/el/ExpressionFactoryImpl

at org.jboss.seam.ioc.spring.SpringELResolver.initialize(
SpringELResolver.java:45)
... 149 more


JBoss AS 4.2.1 and 4.0.5 both supply the API class ExpressionFactory in

  server//lib/el-api.jar

and implementation class ExpressionFactoryImpl in

  server//deployers/jboss-web.deployer/jbossweb.jar

However, the latter is the org.apache.el implementation not the sun one.

So, you are still in classloader hell :-) I think the problem starts 
with selection of the JSP Factory implementation but I am not sure.


regards,

Andrew Dinn
---
JBoss, a Division of Red Hat
Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod 
Street, Windsor, Berkshire,

SI4 1TE, United Kingdom.
Registered in UK and Wales under Company Registration No. 3798903
Directors: Michael Cunningham (USA), Charlie Peters (USA) and David 
Owens (Ireland)





Re: Guys, help, can't manage to use CXF faults

2007-10-18 Thread Daniel Kulp

The NotLoggedInFaultDetail object needs a default constructor.   All JAXB 
beans need to have a default constructor.  If you add that, it should 
work.

Dan


On Thursday 18 October 2007, Egor Samarkhanov wrote:
> Hi !
>
> I have a simple exception class:
>
> @WebFault(name = "faultDetail")
> public class NotLoggedInException extends Exception
> {
> private NotLoggedInFaultDetail faultDetail;
>
>
> public NotLoggedInException( String message )
> {
> super( message );
> }
>
> public NotLoggedInException( String message,
> NotLoggedInFaultDetail faultDetail ) {
> super( message );
> this.faultDetail = faultDetail;
> }
>
> public NotLoggedInException( String message,
> NotLoggedInFaultDetail faultDetail, Throwable cause ) {
> super( message, cause );
> this.faultDetail = faultDetail;
> }
>
> public NotLoggedInFaultDetail getFaultInfo() {
> return this.faultDetail;
> }
> }
>
>
> and a fault detail class
>
> @XmlRootElement(name = "faultDetail")
> public class NotLoggedInFaultDetail
> {
> private String detail;
>
> public NotLoggedInFaultDetail( String detail )
> {
> this.detail = detail;
> }
>
> public String getDetail()
> {
> return detail;
> }
>
> public void setDetail( String detail )
> {
> this.detail = detail;
> }
> }
>
>
> And I'm constantly getting the following exception when
> I try to access the (SERVLET TRANSPORT):
>
> java.lang.NullPointerException
> at
> org.apache.cxf.jaxb.JAXBSchemaInitializer.end(JAXBSchemaInitializer.ja
>va:213) at
> org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModel
>Visitor.java:89) at
> org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.ja
>va:48) at
> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:25
>5) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
>ceFromClass(ReflectionServiceFactoryBean.java:244) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>ServiceModel(ReflectionServiceFactoryBean.java:272) at
> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
>lectionServiceFactoryBean.java:146) at
> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServi
>ceFactoryBean.java:89) at
> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(Abstrac
>tEndpointFactory.java:83) at
> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
>a:107) at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
>ean.java:147) at
> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:287) at
> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:227) at
> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179) at
> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(Provide
>rImpl.java:74) at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
> at
> com.actimind.actitime.dtr.ws.CXFServlet.init(CXFServlet.java:23) at
> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.j
>ava:1091) at
> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java
>:750) at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>lve.java:130) at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>lve.java:178) at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>va:126) at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>va:105) at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>e.java:107) at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>:148) at
> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>856) at
> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
>sConnection(Http11Protocol.java:744) at
> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
>nt.java:527) at
> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
>owerWorkerThread.java:80) at
> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
>ol.java:684) at java.lang.Thread.run(Unknown Source)
>
> The interesing thing is that if i remove the method
> getFaultInfo() from the NotLoggedInException the exception
> disappears, but I suppose in this case such a fault is incorectly
> declared.
>
> To publish my service I've extended your CFXServlet and
> call Endpoint.publish(...) just after the servlet initialization.
>
>
>
> Thanks,
> Egor Samarkhanov ([EMAIL PROTECTED])



-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re[2]: Guys, help, can't manage to use CXF faults

2007-10-18 Thread Egor Samarkhanov
Hello !

Thank you, now it works. I think it would be helpful
to provide this info right in the exception.

Thursday, October 18, 2007, 8:06:42 PM, you wrote:

DK> The NotLoggedInFaultDetail object needs a default constructor.   All JAXB
DK> beans need to have a default constructor.  If you add that, it should 
DK> work.

DK> Dan


DK> On Thursday 18 October 2007, Egor Samarkhanov wrote:
>> Hi !
>>
>> I have a simple exception class:
>>
>> @WebFault(name = "faultDetail")
>> public class NotLoggedInException extends Exception
>> {
>> private NotLoggedInFaultDetail faultDetail;
>>
>>
>> public NotLoggedInException( String message )
>> {
>> super( message );
>> }
>>
>> public NotLoggedInException( String message,
>> NotLoggedInFaultDetail faultDetail ) {
>> super( message );
>> this.faultDetail = faultDetail;
>> }
>>
>> public NotLoggedInException( String message,
>> NotLoggedInFaultDetail faultDetail, Throwable cause ) {
>> super( message, cause );
>> this.faultDetail = faultDetail;
>> }
>>
>> public NotLoggedInFaultDetail getFaultInfo() {
>> return this.faultDetail;
>> }
>> }
>>
>>
>> and a fault detail class
>>
>> @XmlRootElement(name = "faultDetail")
>> public class NotLoggedInFaultDetail
>> {
>> private String detail;
>>
>> public NotLoggedInFaultDetail( String detail )
>> {
>> this.detail = detail;
>> }
>>
>> public String getDetail()
>> {
>> return detail;
>> }
>>
>> public void setDetail( String detail )
>> {
>> this.detail = detail;
>> }
>> }
>>
>>
>> And I'm constantly getting the following exception when
>> I try to access the (SERVLET TRANSPORT):
>>
>> java.lang.NullPointerException
>> at
>> org.apache.cxf.jaxb.JAXBSchemaInitializer.end(JAXBSchemaInitializer.ja
>>va:213) at
>> org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModel
>>Visitor.java:89) at
>> org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.ja
>>va:48) at
>> org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:25
>>5) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServi
>>ceFromClass(ReflectionServiceFactoryBean.java:244) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initialize
>>ServiceModel(ReflectionServiceFactoryBean.java:272) at
>> org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Ref
>>lectionServiceFactoryBean.java:146) at
>> org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServi
>>ceFactoryBean.java:89) at
>> org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(Abstrac
>>tEndpointFactory.java:83) at
>> org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.jav
>>a:107) at
>> org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryB
>>ean.java:147) at
>> org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:287) at
>> org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:227) at
>> org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179) at
>> org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(Provide
>>rImpl.java:74) at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
>> at
>> com.actimind.actitime.dtr.ws.CXFServlet.init(CXFServlet.java:23) at
>> org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.j
>>ava:1091) at
>> org.apache.catalina.core.StandardWrapper.allocate(StandardWrapper.java
>>:750) at
>> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>>lve.java:130) at
>> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>>lve.java:178) at
>> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>>va:126) at
>> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.ja
>>va:105) at
>> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValv
>>e.java:107) at
>> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java
>>:148) at
>> org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:
>>856) at
>> org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.proces
>>sConnection(Http11Protocol.java:744) at
>> org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoi
>>nt.java:527) at
>> org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFoll
>>owerWorkerThread.java:80) at
>> org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPo
>>ol.java:684) at java.lang.Thread.run(Unknown Source)
>>
>> The interesing thing is that if i remove the method
>> getFaultInfo() from the NotLoggedInException the exception
>> disappears, but I suppose in this case such a fault is incorectly
>> declared.
>>
>> To publish my service I've extended your CFXServlet and
>> call Endpoint.publish(...) just after the servlet initialization.
>>
>>
>>
>> Thanks,
>> Egor Samarkhanov ([EMAIL PROTECTED])






-

Re: SOAPMessage with Attachment service problems

2007-10-18 Thread Cencio



dkulp wrote:
> 
> 1) In your provider, call msg.saveChanges() before returning.   I notice 
> we're not doing that.  (I'll go ahead and add that)
> 

Nothing change...


dkulp wrote:
> 
> 2) Try in tomcat standalone instead of in JBoss.   I'm wondering if 
> you're getting a different SAAJ implementation.
> Dan
> 

request.getClass().getName()   gives 
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl 
It's correct... anyway i'll try in a standalone tomcat..


If u need i can send you my client and service...

Thx for your help,
Lorenzo

-- 
View this message in context: 
http://www.nabble.com/SOAPMessage-with-Attachment-service-problems-tf4628726.html#a13278232
Sent from the cxf-user mailing list archive at Nabble.com.



Unmarshalling Error : unexpected element (uri:"", local:"starttime")

2007-10-18 Thread Andreas Bucksteeg
Hi, 

right now our in CXF implemented service is throwing the following
exception: 
Unmarshalling Error : unexpected element (uri:"", local:"starttime").
Expected elements are (none)

I checked our code & configuration but we couldnt find a bug in it,
right now I think that an 
exception occurs, when the value should be converted into a Calendar
object, but I have no clue, who
to solve the problem. I hope someone where has an idea... 

Cheers, Andreas

Below you can see the related part of the WSDL, which clearly includes
an element starttime. 
WSDL
   
  
  
  
  
  
   

The service interface includes this element also:
=
  @WebMethod
@WebResult(name = "autocometSetStartReturn")
public AutocometSetStartResult autocometSetStart(   
@WebParam(name =
"sessionId") String sessionId, 
@WebParam(name = "id")
int id, 
@WebParam(name =
"starttime") Calendar starttime,
@WebParam(name =
"status") int status,
@WebParam(name =
"client") String client );

The soap request send by an other client looks like (and triggers the
exception): 

=
Host: 127.0.0.1:9003
User-Agent: gSOAP/2.7
Content-Type: text/xml; charset=utf-8
Content-Length: 679
Connection: keep-alive
SOAPAction: "autocometSetStart"


   http://schemas.xmlsoap.org/soap/envelope/";
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:cometxsd="http://werk-ii.de/soap/comet/Schema";
xmlns:comet="http://werk-ii.de/soap/comet";>
  http://schemas.xmlsoap.org/soap/encoding/";>
 
s6460748655808
5
2007-10-18T14:46:31+02:00
1002
HYTEST1
 
  
   

The response caused by the exception: 
=
HTTP/1.1 500 Internal Server Error
Server: Apache-Coyote/1.1
Content-Type: text/xml;charset=utf-8
Content-Length: 294
Date: Thu, 18 Oct 2007 12:46:30 GMT
Connection: close

http://schemas.xmlsoap.org/soap/envelope/";>
   
  
 soap:Server
 Unmarshalling Error : unexpected element (uri:"",
local:"starttime"). Expected elements are (none) 
  
   

And the stacktrace from the Tomcat log:
===
INFO: Interceptor has thrown exception, unwinding now

org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected
element (uri:"", local:"starttime
"). Expected elements are (none)

at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
a:368)   
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.jav
a:274)   
at
org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)

at
org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage(R
PCInInterceptor.j
ava:120)

at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)   
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:7
3)

at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDes
tination.java:78)
 

at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(Ser
vletController.ja
va:231)

at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletControl
ler.java:139)
at
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271)

at
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)

at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Applica
tionFilterChain.j
ava:290)

at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilt
erChain.java:206)
 

at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValv
e.java:233)  
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValv
e.java:175)  
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java
:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
:102)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.
java:109)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563
)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:2
63) 

Re: Unmarshalling Error : unexpected element (uri:"", local:"starttime")

2007-10-18 Thread Daniel Kulp

CXF does not support RCP/Encoded.   Just RPC/Literal.

Dan


On Thursday 18 October 2007, Andreas Bucksteeg wrote:
> Hi,
>
> right now our in CXF implemented service is throwing the following
> exception:
> Unmarshalling Error : unexpected element (uri:"", local:"starttime").
> Expected elements are (none)
>
> I checked our code & configuration but we couldnt find a bug in it,
> right now I think that an
> exception occurs, when the value should be converted into a Calendar
> object, but I have no clue, who
> to solve the problem. I hope someone where has an idea...
>
> Cheers, Andreas
>
> Below you can see the related part of the WSDL, which clearly includes
> an element starttime.
> WSDL
>
>   
>   
>   
>   
>   
>
>
> The service interface includes this element also:
> =
>   @WebMethod
>   @WebResult(name = "autocometSetStartReturn")
>   public AutocometSetStartResult autocometSetStart(
>   @WebParam(name =
> "sessionId") String sessionId,
>   @WebParam(name = "id")
> int id,
>   @WebParam(name =
> "starttime") Calendar starttime,
>   @WebParam(name =
> "status") int status,
>   @WebParam(name =
> "client") String client );
>
> The soap request send by an other client looks like (and triggers the
> exception):
> ==
>== =
> Host: 127.0.0.1:9003
> User-Agent: gSOAP/2.7
> Content-Type: text/xml; charset=utf-8
> Content-Length: 679
> Connection: keep-alive
> SOAPAction: "autocometSetStart"
>
> 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> xmlns:cometxsd="http://werk-ii.de/soap/comet/Schema";
> xmlns:comet="http://werk-ii.de/soap/comet";>
>SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
>  
> s6460748655808
> 5
> 2007-10-18T14:46:31+02:00
> 1002
> HYTEST1
>  
>   
>
>
> The response caused by the exception:
> =
> HTTP/1.1 500 Internal Server Error
> Server: Apache-Coyote/1.1
> Content-Type: text/xml;charset=utf-8
> Content-Length: 294
> Date: Thu, 18 Oct 2007 12:46:30 GMT
> Connection: close
>
> http://schemas.xmlsoap.org/soap/envelope/";>
>
>   
>  soap:Server
>  Unmarshalling Error : unexpected element
> (uri:"", local:"starttime"). Expected elements are (none)
>  
>
>
> And the stacktrace from the Tomcat log:
> ===
> INFO: Interceptor has thrown exception, unwinding now
>
> org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected
> element (uri:"", local:"starttime
> "). Expected elements are (none)
>
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.j
>av a:368)
> at
> org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder.j
>av a:274)
> at
> org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
>
> at
> org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessage
>(R PCInInterceptor.j
> ava:120)
>
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercepto
>rC hain.java:207)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitia
>ti onObserver.java:7
> 3)
>
> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletD
>es tination.java:78)
>
>
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(S
>er vletController.ja
> va:231)
>
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletContr
>ol ler.java:139)
> at
> org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:271
>)
>
> at
> org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:249
>)
>
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
>
> at
> javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(Appli
>ca tionFilterChain.j
> ava:290)
>
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFi
>lt erChain.java:206)
>
>
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperVa
>lv e.java:233)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextVa
>lv e.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.ja
>va
>
> :128)
>
> at
> org.apache.ca

AegisDatabinding prob: Schema .... already contains type 'Acknowledgement

2007-10-18 Thread Dan Connelly

http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";
	xmlns:http="http://schemas.xmlsoap.org/wsdl/http/";
	xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
	xmlns:s="http://www.w3.org/2001/XMLSchema";
	xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
	xmlns:tns="http://streamlinedsalestax.org/efile";
	xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/";
	xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/";
	targetNamespace="http://streamlinedsalestax.org/efile";
	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";>
	
		http://streamlinedsalestax.org/efile";>
			

	
		
	

			
			

	
		
	

			
			

	
		
			

	

			
		
	

			
			

	
		
			

	

			
		
	

			
			

	
		
			

	

			
		
	

			
			

	
		
			

	

			
		
	

			
			

	
		
			

	

			
		
	

			
			

	
		
			

	

			
		
	

			
		
		http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd";>
			
			

	

			
			

	
	

			
			

	
		
	

			
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
	
	
		
			http://schemas.xmlsoap.org/wsdl/";>
Verifies connection and returns information about the
service.
			
			
			
		
		
			http://schemas.xmlsoap.org/wsdl/";>
Sends a SSTPTransmission and receives a SSTPReceipt.
			
			
			
		
		
			http://schemas.xmlsoap.org/wsdl/";>
Gets the next available SSTPAcknowledgement.
			
			
			
		
		
			http://schemas.xmlsoap.org/wsdl/";>
Gets the previous SSTPAcknowledgement in case of error.
			
			
			
		
	
	
		http://schemas.xmlsoap.org/soap/http";
			style="document" />
		
			http://streamlinedsalestax.org/efile/Ping";
style="document" />
			


			
			

			
		
		
			http://streamlinedsalestax.org/efile/Send";
style="document" />
			


			
			

			
		
		
			http://streamlinedsalestax.org/efile/Ack";
style="document" />
			


			
			

			
		
		
			http://streamlinedsalestax.org/efile/LastAck";
style="document" />
			


			
			

			
		
	
	
		http://schemas.xmlsoap.org/wsdl/"; />
		
			http://localhost/efile/EFileService.asmx"; />
		
	

package test;

import java.util.HashMap;
import java.util.Map;

import org.apache.cxf.aegis.databinding.AegisDatabinding;
import org.apache.cxf.frontend.ServerFactoryBean;
import org.apache.cxf.jaxb.JAXBDataBinding;
import org.apache.cxf.service.factory.ReflectionServiceFactoryBean;

public class My_EFileService_Server {

	public static void main(String args[]) {

		try {
			My_EFileService_Server ts = new My_EFileService_Server();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}

	}

	public My_EFileService_Server() throws Exception {
		
		ServerFactoryBean sf = new ServerFactoryBean();

		Class clazz = getClass().getClassLoader().loadClass(
"org.streamlinedsalestax.efile.EFileServiceSoapImpl");
		sf.setServiceClass(clazz);
		sf.setAddress("http://localhost:6980/EFileService";);
		sf.setDataBinding(new AegisDatabinding());
		sf.create();

	}

}

Re: Unmarshalling Error : unexpected element (uri:"", local:"starttime")

2007-10-18 Thread Daniel Kulp

One more note:

Judging from the line numbers on the stack trace, you're using version 
2.0.   2.0.1 contained a BUNCH of fixes for RPC/Lit.  I'd suggest 
upgrading to 2.0.2.   

Dan


On Thursday 18 October 2007, Daniel Kulp wrote:
> CXF does not support RCP/Encoded.   Just RPC/Literal.
>
> Dan
>
> On Thursday 18 October 2007, Andreas Bucksteeg wrote:
> > Hi,
> >
> > right now our in CXF implemented service is throwing the following
> > exception:
> > Unmarshalling Error : unexpected element (uri:"",
> > local:"starttime"). Expected elements are (none)
> >
> > I checked our code & configuration but we couldnt find a bug in it,
> > right now I think that an
> > exception occurs, when the value should be converted into a Calendar
> > object, but I have no clue, who
> > to solve the problem. I hope someone where has an idea...
> >
> > Cheers, Andreas
> >
> > Below you can see the related part of the WSDL, which clearly
> > includes an element starttime.
> > WSDL
> >
> >   
> >   
> >   
> >   
> >   
> >
> >
> > The service interface includes this element also:
> > =
> >   @WebMethod
> > @WebResult(name = "autocometSetStartReturn")
> > public AutocometSetStartResult autocometSetStart(
> > @WebParam(name =
> > "sessionId") String sessionId,
> > @WebParam(name = "id")
> > int id,
> > @WebParam(name =
> > "starttime") Calendar starttime,
> > @WebParam(name =
> > "status") int status,
> > @WebParam(name =
> > "client") String client );
> >
> > The soap request send by an other client looks like (and triggers
> > the exception):
> > 
> >== == =
> > Host: 127.0.0.1:9003
> > User-Agent: gSOAP/2.7
> > Content-Type: text/xml; charset=utf-8
> > Content-Length: 679
> > Connection: keep-alive
> > SOAPAction: "autocometSetStart"
> >
> > 
> > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/";
> > xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/";
> > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > xmlns:cometxsd="http://werk-ii.de/soap/comet/Schema";
> > xmlns:comet="http://werk-ii.de/soap/comet";>
> >> SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/";>
> >  
> > s6460748655808
> > 5
> > 2007-10-18T14:46:31+02:00
> > 1002
> > HYTEST1
> >  
> >   
> >
> >
> > The response caused by the exception:
> > =
> > HTTP/1.1 500 Internal Server Error
> > Server: Apache-Coyote/1.1
> > Content-Type: text/xml;charset=utf-8
> > Content-Length: 294
> > Date: Thu, 18 Oct 2007 12:46:30 GMT
> > Connection: close
> >
> >  > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";> 
> >   
> >  soap:Server
> >  Unmarshalling Error : unexpected element
> > (uri:"", local:"starttime"). Expected elements are (none)
> >  
> >
> >
> > And the stacktrace from the Tomcat log:
> > ===
> > INFO: Interceptor has thrown exception, unwinding now
> >
> > org.apache.cxf.interceptor.Fault: Unmarshalling Error : unexpected
> > element (uri:"", local:"starttime
> > "). Expected elements are (none)
> >
> > at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder
> >.j av a:368)
> > at
> > org.apache.cxf.jaxb.JAXBEncoderDecoder.unmarshall(JAXBEncoderDecoder
> >.j av a:274)
> > at
> > org.apache.cxf.jaxb.io.DataReaderImpl.read(DataReaderImpl.java:40)
> >
> > at
> > org.apache.cxf.binding.soap.interceptor.RPCInInterceptor.handleMessa
> >ge (R PCInInterceptor.j
> > ava:120)
> >
> > at
> > org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseIntercep
> >to rC hain.java:207)
> > at
> > org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInit
> >ia ti onObserver.java:7
> > 3)
> >
> > at
> > org.apache.cxf.transport.servlet.ServletDestination.doMessage(Servle
> >tD es tination.java:78)
> >
> >
> > at
> > org.apache.cxf.transport.servlet.ServletController.invokeDestination
> >(S er vletController.ja
> > va:231)
> >
> > at
> > org.apache.cxf.transport.servlet.ServletController.invoke(ServletCon
> >tr ol ler.java:139)
> > at
> > org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:2
> >71 )
> >
> > at
> > org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:2
> >49 )
> >
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
> >
> > at
> > javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
> >
> > at
> > org.apa

RE: JAXB and serialVersionID

2007-10-18 Thread Benson Margulies
Commit coming soon, but shouldn't this code be respecting bean-nature
and dealing with getFoo() and isFoo() and such?

> -Original Message-
> From: Daniel Kulp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 10:27 AM
> To: cxf-user@incubator.apache.org
> Cc: Benson Margulies
> Subject: Re: JAXB and serialVersionID
> 
> On Thursday 18 October 2007, Benson Margulies wrote:
> > I was surprised to see that JAXB schematizes the private static
final
> > long serialVersionUID from my exception class. Is there some special
> > case for these, in spite of being private?
> 
> It's probably not JAXB.   JAXB cannot handle exceptions directly.   We
> pull the faultInfo out of it if it exists and pass that to JAXB.   If
> there ISN'T a faultInfo thing, we map it ourselves.   See line 276 or
so
> of JAXBSchemaInitializer.   Looking at it, we map all the declared
> fields.   We don't check if the fields are static/final things.You
> could update that and see if it helps.   If so, commit it.   :-)
> 
> --
> J. Daniel Kulp
> Principal Engineer
> IONA
> P: 781-902-8727C: 508-380-7194
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog


DynamicClientFactory prob: No compiled schema element could be found ....

2007-10-18 Thread Dan Connelly
package test;

import org.apache.cxf.endpoint.Client;
import org.apache.cxf.endpoint.dynamic.DynamicClientFactory;
import org.streamlinedsalestax.efile.Send;

public class My_EFileService_Client {


	public static void main(String[] args) {
		
		My_EFileService_Client driver = new My_EFileService_Client();
		try {
			driver.go();
		} catch (Exception e) {
			e.printStackTrace();
		}
	}
	
	private void go() throws Exception {
		
		Client client = DynamicClientFactory.newInstance().
			createClient("http://localhost:6980/efile/EFileService?wsdl";, getClass().getClassLoader());
		
//		Send s = new Send();   // fix this
//		Object result = client.invoke("send", s);
//		System.out.println(result.toString());
	}

}


Re: AegisDatabinding prob: Schema .... already contains type 'Acknowledgement

2007-10-18 Thread Dan Connelly




[Again, Thunderbird threw away my message text.   Here is the message
that should have appeared.]

I ran "wsdl2java -all" on the attached wsdl using the apache-cxf-2.0.2-incubator
release.

The generated server driver runs fine.

However, if I write my own server driver using a ServerFactoryBean (see
attached) and if I set its DataBinding to a new AegisDatabinding,
then I get this error:

INFO: Creating Service
{http://efile.streamlinedsalestax.org/}EFileServiceSoapImpl
from class
org.streamlinedsalestax.efile.EFileServiceSoapImpl
java.lang.RuntimeException: Schema for namespace
'http://efile.streamlinedsalestax.org'
already contains type
'Acknowledgement
    at
org.apache.ws.commons.schema.XmlSchema.addType(XmlSchema.java:229)
    at
org.apache.ws.commons.schema.SchemaBuilder.handleXmlSchemaElement(SchemaBuilder.java:139)
    at
org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:315)
    at
org.apache.cxf.aegis.databinding.AegisDatabinding.createSchemas(AegisDatabinding.java:332)
    at
org.apache.cxf.aegis.databinding.AegisDatabinding.initialize(AegisDatabinding.java:170)
    at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromClass(ReflectionServiceFactoryBean.java:244)
    at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:272)
    at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:146)
    at
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractEndpointFactory.java:83)
    at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:107)
    at
test.My_EFileService_Server.(My_EFileService_Server.java:33)
    at test.My_EFileService_Server.main(My_EFileService_Server.java:16)

No error if the Databinding is defaulted, or is explicitly
set to JAXBDatabinding.







Re: DynamicClientFactory prob: No compiled schema element could be found ....

2007-10-18 Thread Dan Connelly




[Again.   Here is the orginal message.]

ame scenario as my previous post.

I now run the generated server driver
("org.streamlinedsalestax.efile.EFileServiceSoap_EFileServiceSoap_Server").  
Runs ok.

I use the attached generic client to get use the service dynamically.  
However, I get the following error:

INFO: Pre-instantiating singletons in
[EMAIL PROTECTED]:
defining beans
[cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.xml.XMLBindingFactory,org.a

pache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.management.jmx.InstrumentationManagerImpl,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyConstants,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.poli

cy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider];
root of factory hierarchy
Oct 18, 2007 2:50:08 PM
org.apache.cxf.endpoint.dynamic.DynamicClientFactory outputDebug
INFO: Created classes: 
org.streamlinedsalestax.efile.Ack, 
org.streamlinedsalestax.efile.AckResponse, 
org.streamlinedsalestax.efile.LastAck, 
org.streamlinedsalestax.efile.LastAckResponse, 
org.streamlinedsalestax.efile.ObjectFactory, 
org.streamlinedsalestax.efile.Ping, 
org.streamlinedsalestax.efile.PingResponse, 
org.streamlinedsalestax.efile.Send, 
org.streamlinedsalestax.efile.SendResponse, 
org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.ObjectFactory,
org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.Password,
org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.SecurityHeader,
org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.UsernameToken
org.apache.cxf.service.factory.ServiceConstructionException: No
compiled schema element could be found for type
{http://streamlinedsalestax.org/efile}Transmission
    at
org.apache.cxf.endpoint.dynamic.TypeClassInitializer.begin(TypeClassInitializer.java:81)
    at
org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:62)
    at
org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:95)
    at
org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:48)
    at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:250)
    at
org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:138)
    at test.My_EFileService_Client.go(My_EFileService_Client.java:23)
    at test.My_EFileService_Client.main(My_EFileService_Client.java:14)

In the code generated using wsdl2java, this (missing) schema element
class is 
"org.streamlinedsalestax.efile.Send.Transmission", which is an inner
class of Send.


       -- Dan Connelly







RE: DynamicClientFactory and ant

2007-10-18 Thread Glen Mazza
Ant is more than just a development tool, and its code is probably among
the most rigorous and well-tested at Apache.  Regardless, if there are
political concerns involved you can rename it cxf-helper.jar or whatever
and it should still work fine.

Glen

Am Donnerstag, den 18.10.2007, 22:37 -0400 schrieb Lee Breisacher:
> It's not just internal - I need to deliver these jars with my application. 
> Just seems strange to deliver ant.jar with a web service client application.
> 
> Lee
> 
> 
> > -Original Message-
> > From: Glen Mazza [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, October 18, 2007 7:00 PM
> > To: cxf-user@incubator.apache.org
> > Subject: Re: DynamicClientFactory and ant
> >
> > Why does it matter which JAR files it internally uses?  Code is code.
> >
> > Glen
> >
> > Am Donnerstag, den 18.10.2007, 20:42 -0400 schrieb Lee Breisacher:
> > > It seems a bit odd to me that DynamicClientFactory (a
> > runtime facility) depends on ant (a development tool). Is
> > there any plan to remove this dependency?
> > >
> > > Thanks,
> > >
> > > Lee
> >
> >



Re: DynamicClientFactory and ant

2007-10-18 Thread Willem Jiang
If you just set the wsdl url to the ClientFactoryBean , CXF can't start 
up the data binding work, (XML marshal and unmarshal)  if it do not do 
any code generation work.
Current ClientFactoryBean do not support to call the wsdl2java tool to 
generate the SEI dynamically, so it is till marked with TODO.


BTW, you can fill your wishes to the JIRA[1], or you can contribute your 
patch for it :)


Willem.

Lee Breisacher wrote:

Hm. I see. Actually, I'm not sure I really want the fancy code generation and 
compiling. I see the docs mention a way to do a dynamic client without all that 
by using ClientFactoryBeans, but then the details are absent 
(http://cwiki.apache.org/CXF20DOC/dynamic-clients.html).  Are the details 
ClientFactoryBeans available anywhere?

Thanks,

Lee

  

-Original Message-
From: Willem Jiang [mailto:[EMAIL PROTECTED]
Sent: Thursday, October 18, 2007 7:23 PM
To: cxf-user@incubator.apache.org
Subject: Re: DynamicClientFactory and ant

We use the ant for searching the source in the directory for
using javac to compile the XJC generated file in the
DynamicClientFactory.
If you want to remove it , we have to write this part of
function codes ourself.

Willem.


Lee Breisacher wrote:


It seems a bit odd to me that DynamicClientFactory (a
  

runtime facility) depends on ant (a development tool). Is
there any plan to remove this dependency?


Thanks,

Lee


  


  


RE: DynamicClientFactory and ant

2007-10-18 Thread Lee Breisacher
Hm. I see. Actually, I'm not sure I really want the fancy code generation and 
compiling. I see the docs mention a way to do a dynamic client without all that 
by using ClientFactoryBeans, but then the details are absent 
(http://cwiki.apache.org/CXF20DOC/dynamic-clients.html).  Are the details 
ClientFactoryBeans available anywhere?

Thanks,

Lee

> -Original Message-
> From: Willem Jiang [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 7:23 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: DynamicClientFactory and ant
>
> We use the ant for searching the source in the directory for
> using javac to compile the XJC generated file in the
> DynamicClientFactory.
> If you want to remove it , we have to write this part of
> function codes ourself.
>
> Willem.
>
>
> Lee Breisacher wrote:
> > It seems a bit odd to me that DynamicClientFactory (a
> runtime facility) depends on ant (a development tool). Is
> there any plan to remove this dependency?
> >
> > Thanks,
> >
> > Lee
> >
> >
>


RE: DynamicClientFactory and ant

2007-10-18 Thread Lee Breisacher
It's not just internal - I need to deliver these jars with my application. Just 
seems strange to deliver ant.jar with a web service client application.

Lee


> -Original Message-
> From: Glen Mazza [mailto:[EMAIL PROTECTED]
> Sent: Thursday, October 18, 2007 7:00 PM
> To: cxf-user@incubator.apache.org
> Subject: Re: DynamicClientFactory and ant
>
> Why does it matter which JAR files it internally uses?  Code is code.
>
> Glen
>
> Am Donnerstag, den 18.10.2007, 20:42 -0400 schrieb Lee Breisacher:
> > It seems a bit odd to me that DynamicClientFactory (a
> runtime facility) depends on ant (a development tool). Is
> there any plan to remove this dependency?
> >
> > Thanks,
> >
> > Lee
>
>


DynamicClientFactory and ant

2007-10-18 Thread Lee Breisacher
It seems a bit odd to me that DynamicClientFactory (a runtime facility) depends 
on ant (a development tool). Is there any plan to remove this dependency?

Thanks,

Lee


JAXB + JAX-WS + faults

2007-10-18 Thread Benson Margulies
Since moving to the latest 2.0.3 snapshot, I'm getting an exception when
marshalling a fault declared on a 'throws' clause. No @WebFault. This
didn't happen with 2.0.2 afaik.

WARNING: Exception occurred while writing fault.
org.apache.cxf.interceptor.Fault: Marshalling Error:
com.basistech.ws.fortest.TestException is not known to this context
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:
179)
at
org.apache.cxf.jaxb.io.DataWriterImpl.write(DataWriterImpl.java:42)
at
org.apache.cxf.interceptor.FaultOutInterceptor.handleMessage(FaultOutInt
erceptor.java:75)
at
org.apache.cxf.jaxws.interceptors.WebFaultOutInterceptor.handleMessage(W
ebFaultOutInterceptor.java:127)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:207)
at
org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage
(AbstractFaultChainInitiatorObserver.java:90)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:224)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiati
onObserver.java:73)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.serviceRequest(
JettyHTTPDestination.java:282)
at
org.apache.cxf.transport.http_jetty.JettyHTTPDestination.doService(Jetty
HTTPDestination.java:238)
at
org.apache.cxf.transport.http_jetty.JettyHTTPHandler.handle(JettyHTTPHan
dler.java:54)
at
org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:712)
at
org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandler
Collection.java:211)
at
org.mortbay.jetty.handler.HandlerList.handle(HandlerList.java:49)
at
org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:139)
at org.mortbay.jetty.Server.handle(Server.java:313)
at
org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:506)
at
org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.j
ava:844)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:644)
at
org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:211)
at
org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:381)
at
org.mortbay.io.nio.SelectChannelEndPoint.run(SelectChannelEndPoint.java:
396)
at
org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.ja
va:442)
Caused by: javax.xml.bind.MarshalException
 - with linked exception:
[javax.xml.bind.JAXBException: com.basistech.ws.fortest.TestException is
not known to this context]
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:295
)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:2
21)
at
javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshaller
Impl.java:91)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.writeObject(JAXBEncoderDecoder.ja
va:192)
at
org.apache.cxf.jaxb.JAXBEncoderDecoder.marshall(JAXBEncoderDecoder.java:
167)
... 22 more
Caused by: javax.xml.bind.JAXBException:
com.basistech.ws.fortest.TestException is not known to this context
at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:223)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.reportError(XMLSerializer.java
:238)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementB
eanInfoImpl.java:85)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementB
eanInfoImpl.java:127)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeBody(ElementBea
nInfoImpl.java:244)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBea
nInfoImpl.java:251)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl.serializeRoot(ElementBea
nInfoImpl.java:33)
at
com.sun.xml.bind.v2.runtime.XMLSerializer.childAsRoot(XMLSerializer.java
:461)
at
com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:292
)
... 26 more
Caused by: javax.xml.bind.JAXBException:
com.basistech.ws.fortest.TestException is not known to this context
at
com.sun.xml.bind.v2.runtime.JAXBContextImpl.getBeanInfo(JAXBContextImpl.
java:538)
at
com.sun.xml.bind.v2.runtime.ElementBeanInfoImpl$1.serializeBody(ElementB
eanInfoImpl.java:82)
... 32 more
Oct 18, 2007 8:22:55 PM
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose


Re: Parameters in Restful services

2007-10-18 Thread Jervis Liu

Hi Make sure you have the annotation right. I.e., it needs to be sth like
below:

@Get
@HttpResource(location="/channelName/{id}")
public String getChannelName(@WebParam(name = "GetBook") GetChannel
getChannel);

If this still does not work, try to play with wrapped and unwrapped style.
eg, 
sf.getServiceFactory().setWrapped(false);

Let me know how you are getting on. 

Cheers,
Jervis


Tolan, Michael E wrote:
> 
> I'm having trouble with parameters in a RESTful service. 
> 
> After going over the User's guide, I think I understand that the {}
> element in a HttpResource annotation should name a bean property on the
> object argument to the implementation function. However, when I try to
> set this up, it doesn't seem that the bean is ever initialized
> correctly.
> 
>  
> 
> I suspect I'm doing something wrong, and would appreciate it if someone
> could point me at what that might be.
> 
> In case it's relevant, I'm using the 2.0.2 version of cxf.
> 
>  
> 
> -Mike
> 
>  
> 
>  
> 
> SEI:
> 
> --
> 
> import org.codehaus.jra.Get;
> 
> import org.codehaus.jra.HttpResource;
> 
>  
> 
> @Get
> 
> @HttpResource(location="/channelName/{id}")
> 
> public String getChannelName(GetChannel getChannel);
> 
>  
> 
>  
> 
>  
> 
> GetChannel.java:
> 
> --
> 
> public class GetChannel {
> 
> private String id;
> 
> public GetChannel() {}
> 
> public String getId() {return id;}
> 
> public void setId(String id) {this.id = id;}
> 
> }
> 
>  
> 
>  
> 
> Implementaiton:
> 
> ---
> 
> public String getChannelName(GetChannel getChannel) {
> 
> Logger log = Logger.getLogger(BoardServiceImpl.class);
> 
> log.debug("getChannelName: "+getChannel); //getChannel
> is null
> 
> }
> 
>  
> 
>  
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Parameters-in-Restful-services-tf4641537.html#a13286805
Sent from the cxf-user mailing list archive at Nabble.com.



Re: DynamicClientFactory prob: No compiled schema element could be found ....

2007-10-18 Thread Willem2

Hi,

Can you fill a JIAR and attach the wsdl with it.
So we can use it as a test case for debugging.

Willem.


Dan Connelly-3 wrote:
> 
> 
> 
> 
>   
> 
> 
> [Again.   Here is the orginal message.] 
> 
> ame scenario as my previous post. 
> 
> I now run the generated server driver
> ("org.streamlinedsalestax.efile.EFileServiceSoap_EFileServiceSoap_Server").  
> Runs ok. 
> 
> I use the attached generic client to get use the service
> dynamically.  
> However, I get the following error: 
> 
> INFO: Pre-instantiating singletons in
> [EMAIL PROTECTED]:
> defining beans
> [cxf,org.apache.cxf.bus.spring.Jsr250BeanPostProcessor,org.apache.cxf.bus.spring.BusExtensionPostProcessor,org.apache.cxf.resource.ResourceManager,org.apache.cxf.binding.BindingFactoryManager,org.apache.cxf.transport.DestinationFactoryManager,org.apache.cxf.transport.ConduitInitiatorManager,org.apache.cxf.wsdl.WSDLManager,org.apache.cxf.phase.PhaseManager,org.apache.cxf.workqueue.WorkQueueManager,org.apache.cxf.buslifecycle.BusLifeCycleManager,org.apache.cxf.endpoint.ServerRegistry,org.apache.cxf.endpoint.ServerLifeCycleManager,org.apache.cxf.endpoint.ClientLifeCycleManager,org.apache.cxf.transports.http.QueryHandlerRegistry,org.apache.cxf.endpoint.EndpointResolverRegistry,org.apache.cxf.headers.HeaderManager,org.apache.cxf.catalog.OASISCatalogManager,org.apache.cxf.ws.rm.RMManager,org.apache.cxf.ws.rm.policy.RMPolicyInterceptorProvider,org.apache.cxf.ws.rm.RMAssertionBuilder,org.apache.cxf.binding.object.ObjectBindingFactory,org.apache.cxf.binding.xml.XMLBindingFactory,org
 .a
> 
> pache.cxf.transport.http.policy.HTTPClientAssertionBuilder,org.apache.cxf.transport.http.policy.HTTPServerAssertionBuilder,org.apache.cxf.management.jmx.InstrumentationManagerImpl,org.apache.cxf.binding.http.HttpBindingFactory,org.apache.cxf.binding.soap.SoapBindingFactory,org.apache.cxf.binding.soap.SoapTransportFactory,org.apache.cxf.binding.soap.customEditorConfigurer,org.apache.cxf.transport.jms.JMSTransportFactory,org.apache.cxf.transport.local.LocalTransportFactory,org.apache.cxf.ws.addressing.policy.AddressingAssertionBuilder,org.apache.cxf.ws.addressing.policy.AddressingPolicyInterceptorProvider,org.apache.cxf.ws.addressing.policy.UsingAddressingAssertionBuilder,org.apache.cxf.transport.http_jetty.JettyHTTPTransportFactory,org.apache.cxf.ws.policy.AssertionBuilderRegistry,org.apache.cxf.ws.policy.PolicyConstants,org.apache.cxf.ws.policy.PolicyInterceptorProviderRegistry,org.apache.cxf.ws.policy.attachment.external.DomainExpressionBuilderRegistry,org.apache.cxf.ws.po
 li
> 
> cy.attachment.external.EndpointReferenceDomainExpressionBuilder,org.apache.cxf.ws.policy.PolicyBuilder,org.apache.cxf.ws.policy.PolicyEngine,org.apache.cxf.ws.policy.attachment.wsdl11.Wsdl11AttachmentPolicyProvider,org.apache.cxf.ws.policy.attachment.ServiceModelPolicyProvider,org.apache.cxf.ws.policy.mtom.MTOMAssertionBuilder,org.apache.cxf.ws.policy.mtom.MTOMPolicyInterceptorProvider];
> root of factory hierarchy 
> Oct 18, 2007 2:50:08 PM
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory outputDebug 
> INFO: Created classes: 
> org.streamlinedsalestax.efile.Ack, 
> org.streamlinedsalestax.efile.AckResponse, 
> org.streamlinedsalestax.efile.LastAck, 
> org.streamlinedsalestax.efile.LastAckResponse, 
> org.streamlinedsalestax.efile.ObjectFactory, 
> org.streamlinedsalestax.efile.Ping, 
> org.streamlinedsalestax.efile.PingResponse, 
> org.streamlinedsalestax.efile.Send, 
> org.streamlinedsalestax.efile.SendResponse, 
> org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.ObjectFactory,
> org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.Password,
> org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.SecurityHeader,
> org.oasis_open.docs.wss._2004._01.oasis_200401_wss_wssecurity_secext_1_0.UsernameToken
>  
> org.apache.cxf.service.factory.ServiceConstructionException: No
> compiled schema element could be found for type
> { http://streamlinedsalestax.org/efile }Transmission 
>     at
> org.apache.cxf.endpoint.dynamic.TypeClassInitializer.begin(TypeClassInitializer.java:81)
>  
>     at
> org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:62)
>  
>     at
> org.apache.cxf.service.ServiceModelVisitor.visitOperation(ServiceModelVisitor.java:95)
>  
>     at
> org.apache.cxf.service.ServiceModelVisitor.walk(ServiceModelVisitor.java:48) 
>     at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:250)
>  
>     at
> org.apache.cxf.endpoint.dynamic.DynamicClientFactory.createClient(DynamicClientFactory.java:138)
>  
>     at
> test.My_EFileService_Client.go(My_EFileService_Client.java:23) 
>     at
> test.My_EFileService_Client.main(My_EFileService_Client.java:14) 
> 
> In the code generated using wsdl2java, this (missing) schema element
> class is 
> "org.streamlinedsalestax.efile.Send.Transmission", which is an inner
> class of Send. 
> 
> 
>    

Re: @HandlerChain problems..

2007-10-18 Thread Jervis Liu

Hi you miss the  in your configuration file, it is not
optional. Handler configuration schema can be found in jsr-109.

Cheers,
Jervis



Cencio wrote:
> 
> Hi all,
> 
> i would add some handlers to my service.
> 
> i add 
> @HandlerChain(file="handlers.xml")
> 
> and i put in the same path of service class the handlers.xml file:
> 
> 
> http://java.sun.com/xml/ns/javaee";>
>   
>   
>   
>   org.test.HandlerTest
>   
>   
>   
> 
> 
> where HandlerTest is a class that implements Handler.
> 
> 
> When i deploy it gives me this error:
> 
> 
> org.springframework.beans.factory.BeanCreationException: Error creating
> bean with name 'PD': Invocation of init method failed; nested exception is
> javax.xml.ws.WebServiceException: Chain not specified
> Caused by: 
> javax.xml.ws.WebServiceException: Chain not specified
> at
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:109)
> at
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:124)
> at
> org.apache.cxf.jaxws.JaxWsServerFactoryBean.buildHandlerChain(JaxWsServerFactoryBean.java:176)
> .
> 
> at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:274)
> at
> org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:225)
> Caused by: javax.xml.ws.WebServiceException: Failed to instantiate handler
> at
> org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:123)
> at
> org.apache.cxf.jaxws.handler.AnnotationHandlerChainBuilder.buildHandlerChainFromClass(AnnotationHandlerChainBuilder.java:105)
> ... 111 more
> Caused by: java.lang.NullPointerException
> at
> org.apache.cxf.jaxws.handler.HandlerChainBuilder.buildHandlerChain(HandlerChainBuilder.java:111)
> ... 112 more
> 
> 
> 
> Where did i make errors?
> 
> There is a way to put the handler config file in another path? (for
> example in WEB-INF dir)
> 
> 
> Thx for any help,
> Lorenzo
> 
> 

-- 
View this message in context: 
http://www.nabble.com/%40HandlerChain-problems..-tf4646259.html#a13286014
Sent from the cxf-user mailing list archive at Nabble.com.



Re: DynamicClientFactory and ant

2007-10-18 Thread Glen Mazza
Why does it matter which JAR files it internally uses?  Code is code.

Glen

Am Donnerstag, den 18.10.2007, 20:42 -0400 schrieb Lee Breisacher:
> It seems a bit odd to me that DynamicClientFactory (a runtime facility) 
> depends on ant (a development tool). Is there any plan to remove this 
> dependency?
> 
> Thanks,
> 
> Lee



Re: DynamicClientFactory and ant

2007-10-18 Thread Willem Jiang
We use the ant for searching the source in the directory for using javac 
to compile the XJC generated file in the DynamicClientFactory.
If you want to remove it , we have to write this part of function codes 
ourself.


Willem.


Lee Breisacher wrote:

It seems a bit odd to me that DynamicClientFactory (a runtime facility) depends 
on ant (a development tool). Is there any plan to remove this dependency?

Thanks,

Lee