Hi Florent,
Do you mean
http://localhost:9080/PROTOServiceMixWeb/services/ProtoBean use
soap1.1 and http://localhost:8092/ProtoBeanService/ use soap 1.2?
Which soap toolkit are the third party webservice using?
Would you please append the wsdl used for two webservices?
Best Regards
Freeman
Florent wrote:
If i use the following code to access to my web service, it works fine :
String endpoint =
"http://localhost:9080/PROTOServiceMixWeb/services/ProtoBean";
String xml = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +
"<env:Envelope
xmlns:env=\"http://schemas.xmlsoap.org/soap/envelope/\"
" +
"xmlns:tns=\"http://ejb.proto.mycompany.com\">"
+
"<env:Body>" +
"<tns:getProtoDTO>" +
"<tns:getProtoDTORequest>0</tns:getProtoDTORequest>" +
"</tns:getProtoDTO>" +
"</env:Body>" +
"</env:Envelope>";
MessageFactory mf = MessageFactory.newInstance();
SOAPMessage smsg = mf.createMessage(new MimeHeaders(), new
ByteArrayInputStream(xml.getBytes()));
SOAPConnection conn =
SOAPConnectionFactory.newInstance().createConnection();
SOAPMessage response = conn.call(smsg, url);
SOAPEnvelope env = response.getSOAPPart().getEnvelope();
If i try to call the fellowing url : http://localhost:8092/ProtoBeanService/
i get an error : No SOAPAction header (Application server log)... That's why
i was wondering about the soap version.
I get the following error in servicemix log :
javax.jbi.messaging.MessagingException: Out not supported
at
org.apache.servicemix.jbi.messaging.MessageExchangeImpl.setMessage(MessageExchangeImpl.java:357)
at
org.apache.servicemix.cxfbc.CxfBcProviderMessageObserver.onMessage(CxfBcProviderMessageObserver.java:125)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1932)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1790)
at
org.apache.servicemix.cxfbc.CxfBcProvider.process(CxfBcProvider.java:166)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.doProcess(AsyncBaseLifeCycle.java:538)
at
org.apache.servicemix.common.AsyncBaseLifeCycle.processExchange(AsyncBaseLifeCycle.java:490)
at
org.apache.servicemix.common.BaseLifeCycle.onMessageExchange(BaseLifeCycle.java:46)
at
org.apache.servicemix.jbi.messaging.DeliveryChannelImpl.processInBound(DeliveryChannelImpl.java:610)
at
org.apache.servicemix.jbi.nmr.flow.AbstractFlow.doRouting(AbstractFlow.java:170)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaFlow.doRouting(SedaFlow.java:167)
at
org.apache.servicemix.jbi.nmr.flow.seda.SedaQueue$1.run(SedaQueue.java:134)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
at java.lang.Thread.run(Thread.java:595)
Any idea?
Thank you in advance,
Florent.
Freeman Fang wrote:
Hi,
You needn't specify it in cxf bc endpint configuration. Cxf bc should
support both of it by default.
Cxf bc will parse the wsdl you provided and create service model
accordingly, extract soap version from your wsdl binding part.
Best Regards
Freeman
Florent wrote:
Hello,
I'm trying to expose a third party webservice to the bus, using cxf.
I'd like to know if i can set the soap version. For example, when i was
using service-http, there was a SoapVersion attribute, but i didn't find
one
for the servicemix-cxf-bc-3.2-schema.
Is soap 1.1 or 1.2 used?
Here is my xbean.xml :
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:cxfbc="http://servicemix.apache.org/cxfbc/1.0"
xmlns:ns1="http://ejb.proto.mycompany.com">
<cxfbc:consumer
wsdl="classpath:ProtoBean.wsdl"
endpoint="ProtoBeanPort"
targetEndpoint="ProtoBean"
targetService="ns1:ProtoBeanService"
targetInterface="ns1:ProtoBean"
>
</cxfbc:consumer>
<cxfbc:provider
wsdl="classpath:ProtoBean.wsdl"
locationURI="http://localhost:9080/PROTOServiceMixWeb/services/ProtoBean"
service="ns1:ProtoBeanService"
endpoint="ProtoBean"
interfaceName="ns1:ProtoBean"
>
</cxfbc:provider>
</beans>