Problem with illegal characters I guess...

View: New views
10 Messages — Rating Filter:   Alert me  

Problem with illegal characters I guess...

by vlaladim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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



Re: Problem with illegal characters I guess...

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <vlad.bitbul@...> 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.
>
>

Re: Problem with illegal characters I guess...

by vlaladim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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:schema[@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 <vlad.bitbul@gmail.com> 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.
>
>

Re: Problem with illegal characters I guess...

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <vlad.bitbul@...> 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:schema[@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 <vlad.bitbul@...> 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.
>
>

Re: Problem with illegal characters I guess...

by Andreas Veithen-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

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 <bimargulies@...> 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 <vlad.bitbul@...> 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:schema[@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 <vlad.bitbul@...> 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.
>>
>>
>

Re: Problem with illegal characters I guess...

by vlaladim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"Are you just using a CXF client to talk to someone else's service?"
Yes, I am using CXF to talk to the betfair service, the wsdl url is in my previous message.

"It would be interesting to intercept the request and response using TCPMon or Wireshark."
I will try to do that tomorrow, but I am pretty sure that the problem is on my (client) side and that some illegal characters are messing the things up. If you give me some recommendation which CXF classes to debug and what to search for I will do that...

Want to mention here that I am using the latest version of Ubuntu, I am thinking to test that thing under Windows also, do you think that the reason can be in the OS?

Vlad


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 <bimargulies@gmail.com> 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.
>
>

Re: Problem with illegal characters I guess...

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Roughly, it looks to me as if the server is rejecting your input and
then CXF is having trouble with the fault message. In particular, the
'illegal char' error is trying to process the fault.

I had a quick look at the WSDL, and I was perplexed by the presence of
"<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>"
for no apparent reason.

However, before watching the wire, how about just turned on CXF
logging and seeing what messages are going back and forth?


On Wed, Nov 4, 2009 at 6:44 PM, vlaladim <vlad.bitbul@...> wrote:

>
> "Are you just using a CXF client to talk to someone else's service?"
> Yes, I am using CXF to talk to the betfair service, the wsdl url is in my
> previous message.
>
> "It would be interesting to intercept the request and response using TCPMon
> or Wireshark."
> I will try to do that tomorrow, but I am pretty sure that the problem is on
> my (client) side and that some illegal characters are messing the things up.
> If you give me some recommendation which CXF classes to debug and what to
> search for I will do that...
>
> Want to mention here that I am using the latest version of Ubuntu, I am
> thinking to test that thing under Windows also, do you think that the reason
> can be in the OS?
>
> Vlad
>
>
> 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 <bimargulies@...>
> 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.
>>
>>
> --
> View this message in context: http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26206627.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Problem with illegal characters I guess...

by vlaladim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

"the server is rejecting your input"
Yes I think so...

"I was perplexed by the presence of
<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
for no apparent reason."
What problems can occur because of that, I was also wondering about that line.

I tried to see what I have on the wire but as long as the message is GZIPped I cannot understand anything, maybe I do not know what to search for... please give me some recommendations where to search for the reason for the problem.

P.S.
As I said in my first message if I add in the PlaceBetsReqArray one or two PlaceBets everything is working fine but when I add three or more PlaceBets I am getting the exception.



bimargulies wrote:
Roughly, it looks to me as if the server is rejecting your input and
then CXF is having trouble with the fault message. In particular, the
'illegal char' error is trying to process the fault.

I had a quick look at the WSDL, and I was perplexed by the presence of
"<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>"
for no apparent reason.

However, before watching the wire, how about just turned on CXF
logging and seeing what messages are going back and forth?


On Wed, Nov 4, 2009 at 6:44 PM, vlaladim <vlad.bitbul@gmail.com> wrote:
>
> "Are you just using a CXF client to talk to someone else's service?"
> Yes, I am using CXF to talk to the betfair service, the wsdl url is in my
> previous message.
>
> "It would be interesting to intercept the request and response using TCPMon
> or Wireshark."
> I will try to do that tomorrow, but I am pretty sure that the problem is on
> my (client) side and that some illegal characters are messing the things up.
> If you give me some recommendation which CXF classes to debug and what to
> search for I will do that...
>
> Want to mention here that I am using the latest version of Ubuntu, I am
> thinking to test that thing under Windows also, do you think that the reason
> can be in the OS?
>
> Vlad
>
>
> 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 <bimargulies@gmail.com>
> 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.
>>
>>
> --
> View this message in context: http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26206627.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Problem with illegal characters I guess...

by bimargulies :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

If you turn on CXF logging, you'll see the traffic even with gzip I believe.

On Thu, Nov 5, 2009 at 2:47 PM, vlaladim <vlad.bitbul@...> wrote:

>
> "the server is rejecting your input"
> Yes I think so...
>
> "I was perplexed by the presence of
> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> for no apparent reason."
> What problems can occur because of that, I was also wondering about that
> line.
>
> I tried to see what I have on the wire but as long as the message is
> GZIPped
> I cannot understand anything, maybe I do not know what to search for...
> please give me some recommendations where to search for the reason for the
> problem.
>
> P.S.
> As I said in my first message if I add in the PlaceBetsReqArray one or two
> PlaceBets everything is working fine but when I add three or more PlaceBets
> I am getting the exception.
>
>
>
>
> bimargulies wrote:
> >
> > Roughly, it looks to me as if the server is rejecting your input and
> > then CXF is having trouble with the fault message. In particular, the
> > 'illegal char' error is trying to process the fault.
> >
> > I had a quick look at the WSDL, and I was perplexed by the presence of
> > "<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>"
> > for no apparent reason.
> >
> > However, before watching the wire, how about just turned on CXF
> > logging and seeing what messages are going back and forth?
> >
> >
> > On Wed, Nov 4, 2009 at 6:44 PM, vlaladim <vlad.bitbul@...> wrote:
> >>
> >> "Are you just using a CXF client to talk to someone else's service?"
> >> Yes, I am using CXF to talk to the betfair service, the wsdl url is in
> my
> >> previous message.
> >>
> >> "It would be interesting to intercept the request and response using
> >> TCPMon
> >> or Wireshark."
> >> I will try to do that tomorrow, but I am pretty sure that the problem is
> >> on
> >> my (client) side and that some illegal characters are messing the things
> >> up.
> >> If you give me some recommendation which CXF classes to debug and what
> to
> >> search for I will do that...
> >>
> >> Want to mention here that I am using the latest version of Ubuntu, I am
> >> thinking to test that thing under Windows also, do you think that the
> >> reason
> >> can be in the OS?
> >>
> >> Vlad
> >>
> >>
> >> 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 <bimargulies@...>
> >> 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.
> >>>
> >>>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26206627.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...-tp26195769p26219831.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>

Re: Problem with illegal characters I guess...

by vlaladim :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi there and thanks to all.
First of all I guess that this is a BUG because I resolved the issue in a very strange way...
Creating a CXF.XML file in my target/classes directory made it work. I created that file in order to log the messages and it just worked. Here is the current cxf.xml file (without lgging enabled) that made everything to be running without any exceptions:

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd">
</beans>

If anyone needs any info from me I will collaborate.

Thanks again :!)



bimargulies wrote:
If you turn on CXF logging, you'll see the traffic even with gzip I believe.

On Thu, Nov 5, 2009 at 2:47 PM, vlaladim <vlad.bitbul@gmail.com> wrote:

>
> "the server is rejecting your input"
> Yes I think so...
>
> "I was perplexed by the presence of
> <xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>
> for no apparent reason."
> What problems can occur because of that, I was also wondering about that
> line.
>
> I tried to see what I have on the wire but as long as the message is
> GZIPped
> I cannot understand anything, maybe I do not know what to search for...
> please give me some recommendations where to search for the reason for the
> problem.
>
> P.S.
> As I said in my first message if I add in the PlaceBetsReqArray one or two
> PlaceBets everything is working fine but when I add three or more PlaceBets
> I am getting the exception.
>
>
>
>
> bimargulies wrote:
> >
> > Roughly, it looks to me as if the server is rejecting your input and
> > then CXF is having trouble with the fault message. In particular, the
> > 'illegal char' error is trying to process the fault.
> >
> > I had a quick look at the WSDL, and I was perplexed by the presence of
> > "<xsd:import namespace="http://schemas.xmlsoap.org/soap/encoding/"/>"
> > for no apparent reason.
> >
> > However, before watching the wire, how about just turned on CXF
> > logging and seeing what messages are going back and forth?
> >
> >
> > On Wed, Nov 4, 2009 at 6:44 PM, vlaladim <vlad.bitbul@gmail.com> wrote:
> >>
> >> "Are you just using a CXF client to talk to someone else's service?"
> >> Yes, I am using CXF to talk to the betfair service, the wsdl url is in
> my
> >> previous message.
> >>
> >> "It would be interesting to intercept the request and response using
> >> TCPMon
> >> or Wireshark."
> >> I will try to do that tomorrow, but I am pretty sure that the problem is
> >> on
> >> my (client) side and that some illegal characters are messing the things
> >> up.
> >> If you give me some recommendation which CXF classes to debug and what
> to
> >> search for I will do that...
> >>
> >> Want to mention here that I am using the latest version of Ubuntu, I am
> >> thinking to test that thing under Windows also, do you think that the
> >> reason
> >> can be in the OS?
> >>
> >> Vlad
> >>
> >>
> >> 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 <bimargulies@gmail.com>
> >> 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.
> >>>
> >>>
> >> --
> >> View this message in context:
> >>
> http://old.nabble.com/Problem-with-illegal-characters-I-guess...-tp26195769p26206627.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...-tp26195769p26219831.html
> Sent from the cxf-user mailing list archive at Nabble.com.
>
>