cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vlaladim <vlad.bit...@gmail.com>
Subject Problem with illegal characters I guess...
Date Wed, 04 Nov 2009 12:50:45 GMT

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.


Mime
View raw message