java - Axis2 vs Apache Cxf -- Soap Webservice Client -


i have communicate soap webservice , consuming through client built using java library axis2, , going well, need migrate client apache cxf because have other clients through apache cxf , when have axis2 , apache cxf in same classpath have conflicts because of different implementations of xmlschema both libraries use.

the problem when using apache cxf response being sent in html , not soap can see through stacktrace receiving:

javax.xml.ws.soap.soapfaultexception: response of unexpected text/html contenttype.  incoming portion of html stream: <html> ... @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:157) ... @ org.apache.cxf.interceptor.staxininterceptor.handlemessage(staxininterceptor.java:84) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:272) @ org.apache.cxf.endpoint.clientimpl.onmessage(clientimpl.java:835) @ org.apache.cxf.transport.http.httpconduit$wrappedoutputstream.handleresponseinternal(httpconduit.java:1614) @ org.apache.cxf.transport.http.httpconduit$wrappedoutputstream.handleresponse(httpconduit.java:1504) @ org.apache.cxf.transport.http.httpconduit$wrappedoutputstream.close(httpconduit.java:1310) @ org.apache.cxf.transport.abstractconduit.close(abstractconduit.java:56) @ org.apache.cxf.transport.http.httpconduit.close(httpconduit.java:628) @ org.apache.cxf.interceptor.messagesenderinterceptor$messagesenderendinginterceptor.handlemessage(messagesenderinterceptor.java:62) @ org.apache.cxf.phase.phaseinterceptorchain.dointercept(phaseinterceptorchain.java:272) @ org.apache.cxf.endpoint.clientimpl.doinvoke(clientimpl.java:565) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:474) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:377) @ org.apache.cxf.endpoint.clientimpl.invoke(clientimpl.java:330) @ org.apache.cxf.frontend.clientproxy.invokesync(clientproxy.java:96) @ org.apache.cxf.jaxws.jaxwsclientproxy.invoke(jaxwsclientproxy.java:135) .. 27 more 

i have inspected both request , both seem same can see here:

axis 2 request

<soapenv:envelope xmlns:soapenv="http://www.w3.org/2003/05/soap-envelope">     <soapenv:header>         <axis2ns10:login xmlns:axis2ns10="http://auth.smssp.atech.br">login</axis2ns10:login>         <axis2ns11:password xmlns:axis2ns11="http://auth.smssp.atech.br">password</axis2ns11:password>         <axis2ns12:sistema xmlns:axis2ns12="http://auth.smssp.atech.br">system</axis2ns12:sistema>     </soapenv:header>        <soapenv:body>         <ser:pesquisar xmlns:ns2="http://service.smssp.atech.br">          <ser:numerocns>11111111</ser:numerocns>          <ser:carregarobjetocompleto>true</ser:carregarobjetocompleto>       </ser:pesquisar>    </soapenv:body>   </soapenv:envelope> 

apache cxf request

<soap:envelope         xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">         <soap:header>             <login xmlns="http://auth.smssp.atech.br">login</login>             <password xmlns="http://auth.smssp.atech.br">password</password>             <sistema xmlns="http://auth.smssp.atech.br">system</sistema>         </soap:header>         <soap:body>              <ns2:pesquisar xmlns="http://domain.smssp.atech.br/xsd" xmlns:ns2="http://service.smssp.atech.br" xmlns:ns3="http://searchfilter.infra.smssp.atech.br/xsd">             <ns2:numerocns>11111111</ns2:numerocns>             <ns2:carregarobjetocompleto>true</ns2:carregarobjetocompleto>         </ns2:pesquisar>     </soap:body> </soap:envelope> 

any idea problem can be?

best regards, joão


Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -