That doesn't look like a character encoding problem, but more like a problem with chunked encoding at the HTTP level. It would be interesting to intercept the request and response using TCPMon or Wireshark.
Andreas On Wed, Nov 4, 2009 at 19:13, Benson Margulies <[email protected]> wrote: > Um, now I'm more confused than before. > > Are you just using a CXF client to talk to someone else's service? > > The indications here are someone or something is confused about using > UTF-8 (or not) as the character encoding, or else you have a very > picky schema. > > > On Wed, Nov 4, 2009 at 9:14 AM, vlaladim <[email protected]> wrote: >> >> Thanks for the questions. >> >> The answers are: >> >> 1) First I tried with 2.2.2 then I tried with 2.2.4 also tried with 2.1.X I >> think it was 2.1.6 and finally before an hour I tested it with >> 2.3.0-SNAPSHOT. It has the same behavior for all versions. >> >> 2) I have binding file: >> <jaxws:bindings >> wsdlLocation="https://api-au.betfair.com/exchange/v5/BFExchangeService.wsdl" >> xmlns:jaxws="http://java.sun.com/xml/ns/jaxws" >> xmlns:xs="http://www.w3.org/2001/XMLSchema" >> xmlns:jxb="http://java.sun.com/xml/ns/jaxb" >> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"> >> <jaxws:bindings >> node="wsdl:definitions/wsdl:types/xs:sche...@targetnamespace='http://www.betfair.com/publicapi/v5/BFExchangeService/']"> >> <jxb:globalBindings xmlns:jxb="http://java.sun.com/xml/ns/jaxb" >> xmlns:xs="http://www.w3.org/2001/XMLSchema"> >> <jxb:javaType name="java.util.Date" xmlType="xs:dateTime" >> >> parseMethod="org.apache.cxf.tools.common.DataTypeAdapter.parseDateTime" >> >> printMethod="org.apache.cxf.tools.common.DataTypeAdapter.printDateTime"/> >> </jxb:globalBindings> >> </jaxws:bindings> >> </jaxws:bindings> >> >> 3) I do not know, is there any way to understand that? I guess it is not a >> CXF server but I am not sure >> >> Thnx, >> >> Vlad >> >> >> bimargulies wrote: >>> >>> 1) What version of CXF? >>> 2) How did you configure your service? >>> 3) Are both server and client CXF? >>> >>> >>> On Wed, Nov 4, 2009 at 7:50 AM, vlaladim <[email protected]> wrote: >>> >>>> >>>> Hi to all, >>>> I am new in the forum and registered here because I am having a problem >>>> that >>>> I cannot resolve in the last dew days. >>>> I tried different versions of CXF and all of them are giving me the same >>>> exception. >>>> I am using wsdl2java with maven 2. >>>> The wsdl that i am using is provided by betfair and you can see it here >>>> https://api-au.betfair.com/exchange/v5/BFExchangeService.wsdl . >>>> All the generated classes are working as they should but before few day I >>>> decided to use ArrayOfPlaceBets with more than one PlaceBets in it (you >>>> can >>>> see this also in the WSDL). >>>> <xsd:complexType name="ArrayOfPlaceBets"> >>>> <xsd:sequence> >>>> <xsd:element form="qualified" maxOccurs="unbounded" minOccurs="0" >>>> name="PlaceBets" nillable="true" type="types:PlaceBets"/> >>>> </xsd:sequence> >>>> </xsd:complexType> >>>> >>>> The strange thing is that the PlaceBetsReq works as it should with one >>>> and >>>> two bets but when I try to place more than 2 bets, 3,4,5... with only one >>>> request I get the exception that is copy pasted here in the post. >>>> I am doing this betsRequestArray.getPlaceBets().add(singleBet); in order >>>> to >>>> add the bets in the betsReqestArray and I am 100% sure that I am doing >>>> this >>>> correctly. >>>> >>>> I was debugging the CXF code and was also trying to change the code in >>>> order >>>> to correct the issue. >>>> The strange thing is that I am getting different exceptions sometimes it >>>> is >>>> saying expected '=', got '`' the next time it is saying expected '=', >>>> got >>>> '>' other time it is expecting something like �. >>>> I guess that this is a special characters problem but I cannot find a >>>> solution. I still cannot find the critical part of the CXF code in order >>>> to >>>> correct the problem (if it is a CXF bug). >>>> There are cases in which it is throwing a different kind of exception >>>> WstxUnexpectedCharException. >>>> >>>> The strangest thing for me is that it is working fine with 1 and 2 bets >>>> in >>>> the array but when I have 3 or more bets there I am alway getting the >>>> exception. >>>> >>>> THE FIRST TYPE OF EXCEPTION: >>>> Caused by: org.apache.cxf.binding.soap.SoapFault: java.io.IOException: >>>> expected '=', got '`' >>>> line 1, char 21: ... � >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:75) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at >>>> >>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at >>>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:652) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2132) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940) >>>> at >>>> java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:149) >>>> at >>>> >>>> org.apache.cxf.io.AbstractWrappedOutputStream.close(AbstractWrappedOutputStream.java:72) >>>> at >>>> >>>> org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:102) >>>> at >>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627) >>>> at >>>> >>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:477) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253) >>>> at >>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) >>>> at >>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121) >>>> ... 4 more >>>> >>>> >>>> >>>> THE SECOND TYPE OF EXCETION: >>>> Caused by: com.ctc.wstx.exc.WstxUnexpectedCharException: Illegal >>>> character >>>> ((CTRL-CHAR, code 31)) >>>> at [row,col {unknown-source}]: [3,21] >>>> at >>>> com.ctc.wstx.sr.StreamScanner.throwInvalidSpace(StreamScanner.java:675) >>>> at >>>> >>>> com.ctc.wstx.sr.BasicStreamReader.readTextPrimary(BasicStreamReader.java:4556) >>>> at >>>> com.ctc.wstx.sr.BasicStreamReader.nextFromTree(BasicStreamReader.java:2888) >>>> at >>>> com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1019) >>>> at >>>> >>>> com.ctc.wstx.sr.BasicStreamReader.getElementText(BasicStreamReader.java:669) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.unmarshalFault(Soap11FaultInInterceptor.java:61) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:46) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.Soap11FaultInInterceptor.handleMessage(Soap11FaultInInterceptor.java:35) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at >>>> >>>> org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:96) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:69) >>>> at >>>> >>>> org.apache.cxf.binding.soap.interceptor.CheckFaultInterceptor.handleMessage(CheckFaultInterceptor.java:34) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at >>>> org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:652) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:2132) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:2015) >>>> at >>>> >>>> org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1940) >>>> at >>>> java.util.zip.DeflaterOutputStream.close(DeflaterOutputStream.java:149) >>>> at >>>> >>>> org.apache.cxf.io.AbstractWrappedOutputStream.close(AbstractWrappedOutputStream.java:72) >>>> at >>>> >>>> org.apache.cxf.io.AbstractThresholdOutputStream.close(AbstractThresholdOutputStream.java:102) >>>> at >>>> org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66) >>>> at >>>> org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:627) >>>> at >>>> >>>> org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62) >>>> at >>>> >>>> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:236) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:477) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:301) >>>> at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:253) >>>> at >>>> org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73) >>>> at >>>> org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:121) >>>> ... 4 more >>>> >>>> I am going mad and will be happy if someone gives me some advices. >>>> >>>> Thanks, >>>> >>>> Vlad >>>> >>>> >>>> >>>> -- >>>> View this message in context: >>>> http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26195769.html >>>> Sent from the cxf-user mailing list archive at Nabble.com. >>>> >>>> >>> >>> >> >> -- >> View this message in context: >> http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26196998.html >> Sent from the cxf-user mailing list archive at Nabble.com. >> >> >
