You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by pchakinala <pr...@planetsoft.com> on 2011/07/22 13:32:18 UTC
RE:
org.xml.sax.SAXException:SimpleDeserializerencountered a
child element,
Hi Freeman,
Thanks for the reply. I have written cxf standalone client to call cxf bc consumer and Its working fine. My usecase flow is like below.
[1]HTTP Client =è [2]http-consumer -à cxf bc consumer -àcxf bc provider -à external websercive
As per the requirement [1] client is using http protocol to send request xml [plane request XML ]to cxf bc consumer to call outside webservice.
How does http consumer send request xml to cxf consumer?
To implement the functionality I have used below flow.
http client --- http:consumer ----http:provider ---cxf bc consumer -àcxf bc provider -àexternal service
<http:endpoint service="picf:httpCaseImport"
endpoint="endpoint"
targetService="picf:httpMEF"
role="consumer"
locationURI="http://0.0.0.0:8192/CaseImport/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-only" />
<http:endpoint service="picf:httpMEF" endpoint="endpoint"
role="provider"
soap="true" // convert plane request xml to soap format
defaultMep="http://www.w3.org/2004/08/wsdl/in-only"
wsdlResource="classpath:caseimport.wsdl"
locationURI="http://localhost:8001/tpp-web/services/CaseImport"/>
<cxfbc:consumer wsdl="classpath:caseimport.wsdl"
locationURI="http://localhost:8001/tpp-web/services/CaseImport"
targetService="ci:CaseImportService"
targetInterface="ci:CaseImportSoapBinding"
targetEndpoint="TPPProcessPort1"
useJBIWrapper="false"
useSOAPEnvelope="false" >
Here attached wsdl along sample request xml file for your reference.
Please suggest me my understanding is correct or not.
Regards,
Praveen Chakinala
From: Freeman-2 [via ServiceMix] [mailto:ml-node+4621369-207217343-113647@n5.nabble.com]
Sent: Friday, July 22, 2011 5:46 AM
To: pchakinala
Subject: Re: <faultstring>org.xml.sax.SAXException:SimpleDeserializerencountered a child element,
Hi,
As I mentioned before, you'd better use cxf bc consumer but not http
consumer here, it's better to handle soap request and with cxf bc
consumer, it's unnecessary to specify operationName, it can exact
operationName automatically from incoming soap payload.
Freeman
On 2011-7-21, at 下午9:41, pchakinala wrote:
> Hi Freeman,
>
>
>
> I have not added methodName to cxf bc provider. However If I do not
> add methodName to http:consumer found below exception msg.
>
>
>
> ?xml version='1.0' encoding='UTF-8'?><error><!
> [CDATA[org.apache.cxf.interceptor.Fault: Operation not bound on this
> MessageExchange
>
> at
> org
> .apache
> .servicemix.cxfbc.CxfBcProvider.findOperation(CxfBcProvider.java:550)
>
> at
> org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:
> 219)
>
> at
> org
> .apache
> .servicemix
> .common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:651)
>
> at
> org
> .apache
> .servicemix
> .common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:
> 606)
>
> at
> org
> .apache
> .servicemix
> .common
> .AsyncBaseLifeCycle.processExchangeInTx(AsyncBaseLifeCycle.java:501)
>
> at org.apache.servicemix.common.AsyncBaseLifeCycle
> $2.run(AsyncBaseLifeCycle.java:370)
>
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.runTask(ThreadPoolExecutor.java:886)
>
> at java.util.concurrent.ThreadPoolExecutor
> $Worker.run(ThreadPoolExecutor.java:908)
>
> at java.lang.Thread.run(Thread.java:662)
>
> Caused by: java.lang.Exception: Operation not bound on this
> MessageExchange
>
> ... 9 more
>
>
>
> After adding method name to http:consumer i got other exception
> which i had sent you earlier
>
>
>
>
>
> <?xml version='1.0' encoding='UTF-8'?><soapenv:Fault xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/
> "><faultcode>soapenv:Server.userException</
> faultcode><faultstring>org.xml.sax.SAXException: SimpleDeserializer
> encountered a child element, which is NOT expected, in something it
> was trying to deserialize.</faultstring><detail><ns1:hostname
> xmlns:ns1="http://xml.apache.org/axis/">Arunkarthik</ns1:hostname></
> detail></soapenv:Fault>
>
>
>
> Here attached http su,cxf su files for your reference.cxf su
> contains wsdl file also.
>
>
>
> Regards,
>
> Praveen Chakinala
>
>
>
> From: Freeman-2 [via ServiceMix] [mailto:[hidden email]
> ]
> Sent: Wednesday, July 20, 2011 7:07 PM
> To: pchakinala
> Subject: Re: <faultstring>org.xml.sax.SAXException:
> SimpleDeserializerencountered a child element,
>
>
>
> Hi,
>
> With cxf bc consumer you needn't specify the operationName, cxf bc
> endpoint can extract it automatically from the soap message payload.
>
> Freeman
> On 2011-7-20, at 下午8:37, pchakinala wrote:
>
>
>> Hi Freeman,
>> 1) is it issue with operationname used in http:consumer element.
>>
>>
>> 2 ) Earlier i have tried with cxf:bc consumer also.
>> I did not find attribute (targetOperation attribute is not
>> available )to
>> mention operation name in cxf:bc consumer element.
>>
>> Please update me which attribute will be used to specify operation
>> name with
>> cxf:bc consumer
>>
>> Regards,
>> Praveen Chakinala
>>
>>
>>
>> --
>> View this message in context: http://servicemix.396122.n5.nabble.com/faultstring-org-xml-sax-SAXException-SimpleDeserializer-encountered-a-child-element-tp4615628p4615713.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------
> Freeman Fang
>
> FuseSource
> Email:[hidden email]
> Web: fusesource.com
> Twitter: freemanfang
> Blog: http://freemanfang.blogspot.com
>
>
>
>
>
>
>
>
>
>
>
>
> _____
>
> If you reply to this email, your message will be added to the
> discussion below:
>
> http://servicemix.396122.n5.nabble.com/faultstring-org-xml-sax-SAXException-SimpleDeserializer-encountered-a-child-element-tp4615628p4615862.html
>
> To unsubscribe from <faultstring>org.xml.sax.SAXException:
> SimpleDeserializer encountered a child element,, click here <
> > .
>
>
>
> --
> View this message in context: http://servicemix.396122.n5.nabble.com/faultstring-org-xml-sax-SAXException-SimpleDeserializer-encountered-a-child-element-tp4615628p4619362.html
> Sent from the ServiceMix - User mailing list archive at Nabble.com.
---------------------------------------------
Freeman Fang
FuseSource
Email:[hidden email]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com
_____
If you reply to this email, your message will be added to the discussion below:
http://servicemix.396122.n5.nabble.com/faultstring-org-xml-sax-SAXException-SimpleDeserializer-encountered-a-child-element-tp4615628p4621369.html
To unsubscribe from <faultstring>org.xml.sax.SAXException: SimpleDeserializer encountered a child element,, click here <http://servicemix.396122.n5.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=4615628&code=cHJhdmVlbi5jaGFraW5hbGFAcGxhbmV0c29mdC5jb218NDYxNTYyOHwtMjAwNDE3OTQwNg==> .
--
View this message in context: http://servicemix.396122.n5.nabble.com/faultstring-org-xml-sax-SAXException-SimpleDeserializer-encountered-a-child-element-tp4615628p4622729.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.