You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by lllgg <sl...@cashq.ac.cn> on 2007/08/08 05:33:39 UTC
org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime(value)
i just want to use the org.apache.cxf.tools.common.DataTypeAdapter class in
my client
to change the date type databinding
which the dependence jars i need to add to the client project.
i once added all the CXF jars.
but it sounds like didn't work well. without the cxf jars i can run the
wsdl2java client fine,but
when i add the jars to the wsdl2java client, it cann't work well. there
were some errors
like:
org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:189)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.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(ApplicationFilterChain.java:290)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
at
org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)
at
org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
at java.lang.Thread.run(Unknown Source)
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
at [row,col {unknown-source}]: [1,0]
at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
... 22 more
i configure the spring client and it didn't work either, the error was the
same, i don't know what
is the problem. i used the lastest snapshot version.someone has any ideas?
--
View this message in context: http://www.nabble.com/org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime%28value%29-tf4234097.html#a12046524
Sent from the cxf-user mailing list archive at Nabble.com.
Re: org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime(value)
Posted by James Mao <ja...@iona.com>.
I remember i added this adapter, and it's for the jaxb
marshall/unmarshall the java.util.Date and java.util.Calendar,
If you start with code, if you have the java.util.Date
java.util.Calendar as parameter,
then the java2wsdl will generate a jaxws binding file along with the
wsdl file, (you can discard the wsdl, since you already have one, if you
know how to write a jaxws binding file, then you can skip the whole step)
then you generate the types and stubs with the wsdl2java -b
generated_binding_file, after that you will have couple adapter types
generated.
I tried this way with a simple test case, you don't need to use the
DataTypeAdapter directly, it should in your type classes.
If there's a bug, feel free to log in jira, please attach your test
case, and descriptions about how to reproduce.
James
> i just want to use the org.apache.cxf.tools.common.DataTypeAdapter class in
> my client
> to change the date type databinding
> which the dependence jars i need to add to the client project.
> i once added all the CXF jars.
> but it sounds like didn't work well. without the cxf jars i can run the
> wsdl2java client fine,but
> when i add the jars to the wsdl2java client, it cann't work well. there
> were some errors
> like:
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
> at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:189)
> at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:57)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:78)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:231)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.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(ApplicationFilterChain.java:290)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
> at
> org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104)
> at
> org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
> at
> org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:261)
> at
> org.apache.coyote.http11.Http11AprProcessor.process(Http11AprProcessor.java:852)
> at
> org.apache.coyote.http11.Http11AprProtocol$Http11ConnectionHandler.process(Http11AprProtocol.java:584)
> at org.apache.tomcat.util.net.AprEndpoint$Worker.run(AprEndpoint.java:1508)
> at java.lang.Thread.run(Unknown Source)
> Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
> at [row,col {unknown-source}]: [1,0]
> at com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
> at com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
> at
> com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
> at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
> at com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
> at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:87)
> ... 22 more
>
> i configure the spring client and it didn't work either, the error was the
> same, i don't know what
> is the problem. i used the lastest snapshot version.someone has any ideas?
>