Hi Johan,
You needn't specify soap version for cxf component. Cxf component will
detect it automatically from the wsdl you specified.
From the log, the soap request from client is soap version 1.1, so you
need ensure the soap version specified in your wsdl is 1.1 as well.
What's your wsdl looks like?
Btw, which servicemix version you are using now?
Regards
Freeman
johanp wrote:
Hi,
Trying to move from HTTP BC to CXF BC but my Axis2 Web Service
is not invoked.
This HTTP BC works (when using soapVersion=1.1):
===================================
<http:endpoint service="front:GetCustomerService"
endpoint="endpoint"
role="consumer"
locationURI="http://0.0.0.0:8182/GetCustomerService/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
wsdlResource="http://localhost:8080/axis2/services/GetCustomerService?wsdl"
soap="true"
soapVersion="1.1"/>
<http:endpoint service="front:GetCustomerService"
endpoint="endpoint"
role="provider"
locationURI="http://localhost:8080/axis2/services/GetCustomerService"
wsdlResource="http://localhost:8080/axis2/services/GetCustomerService?wsdl"
soap="true"
soapVersion="1.1"/>
When moving to CXF it does not work but no errors in log:
=======================================
<cxfbc:consumer wsdl="classpath:GetCustomer.wsdl"
service="front:GetCustomerService"
endpoint="CustomerServicePort"
targetService="front:GetCustomerService"
targetInterface="front:GetCustomerPortType">
</cxfbc:consumer>
<cxfbc:provider
wsdl="http://localhost:8080/axis2/services/GetCustomerService?wsdl"
locationURI="http://localhost:8080/axis2/services/GetCustomerService/"
endpoint="CustomerServiceProxy"
service="front:GetCustomerService"
interfaceName="front:GetCustomerPortType">
</cxfbc:provider>
----------------------------------------------------------
2008-mar-19 12:53:36 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {Content-Length=[568], Host=[localhost:8182], User-Agent=[Mindreef
HTTP Client], SOAPAction=["(could not determ
ine SOAPAction)"], content-type=[text/xml; charset=UTF-8]}
Messages:
Message:
Payload: <soapenv:Envelope
xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Body>
<s1:CustomerNumberRequest
xmlns:s1="http://www.exampleURI.com/GetCustomer"
xmlns:soapenc="http://schemas.xmlsoap.o
rg/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<CompanyID>comp</CompanyID>
<Password>pass</Password>
<UserName>usr</UserName>
<CustomerNumber>1230</CustomerNumber>
</s1:CustomerNumberRequest>
</soapenv:Body>
</soapenv:Envelope>
--------------------------------------
DEBUG - CxfBcComponent - Created correlation id:
ID:192.168.0.187-118c6baaa65-14:1
DEBUG - DeliveryChannelImpl - SendSync
ID:192.168.0.187-118c6baaa65-14:1 in DeliveryChannel{servicemix-cxf-bc
}
DEBUG - SedaFlow - Called Flow send
DEBUG - DeliveryChannelImpl - Waiting for exchange
ID:192.168.0.187-118c6baaa65-14:1 (1896c52) to be answered
in DeliveryChannel{servicemix-cxf-bc} from sendSync
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange:
InOut[
id: ID:192.168.0.187-118c6baaa65-14:1
status: Active
role: provider
interface: {http://www.exampleURI.com/GetCustomer}GetCustomerPortType
service: {http://www.exampleURI.com/GetCustomer}GetCustomerService
endpoint: CustomerServiceProxy
operation: {http://www.exampleURI.com/GetCustomer}GetCustomer
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmln
s:msg="http://www.exampleURI.com/GetCustomer" name="GetCustomerInput"
type="msg:GetCustomerInput" version="1.0"><jbi:par
t><s1:CustomerNumberRequest xmlns:s1="http://www.exampleURI.com/GetCustomer"
xmlns:soapenc="http://schemas.xmlsoap.org/s
oap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyID>comp</CompanyID>
<Password>pass</Password>
<UserName>usr</UserName>
<CustomerNumber>1230</CustomerNumber>
</s1:CustomerNumberRequest></jbi:part></jbi:message>
]
DEBUG - CxfBcComponent - Received exchange: status: Active,
role: provider
DEBUG - CxfBcComponent - Retrieved correlation id:
ID:192.168.0.187-118c6baaa65-14:1
2008-mar-19 12:53:36 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message
----------------------------
Encoding: UTF-8
Headers: {connection=[Close], Date=[Wed, 19 Mar 2008 11:53:36 GMT],
transfer-encoding=[chunked], Server=[Simple-Server/1
.1], content-type=[application/xml; charset=UTF-8]}
Messages:
Message:
Payload:
--------------------------------------
DEBUG - DeliveryChannelImpl - Send
ID:192.168.0.187-118c6baaa65-14:1 in DeliveryChannel{servicemix-cxf-bc}
DEBUG - SedaFlow - Called Flow send
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange:
InOut[
id: ID:192.168.0.187-118c6baaa65-14:1
status: Active
role: consumer
interface: {http://www.exampleURI.com/GetCustomer}GetCustomerPortType
service: {http://www.exampleURI.com/GetCustomer}GetCustomerService
endpoint: CustomerServiceProxy
operation: {http://www.exampleURI.com/GetCustomer}GetCustomer
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmln
s:msg="http://www.exampleURI.com/GetCustomer" name="GetCustomerInput"
type="msg:GetCustomerInput" version="1.0"><jbi:par
t><s1:CustomerNumberRequest xmlns:s1="http://www.exampleURI.com/GetCustomer"
xmlns:soapenc="http://schemas.xmlsoap.org/s
oap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyID>comp</CompanyID>
<Password>pass</Password>
<UserName>usr</UserName>
<CustomerNumber>1230</CustomerNumber>
</s1:CustomerNumberRequest></jbi:part></jbi:message>
out: null
]
DEBUG - DeliveryChannelImpl - Notifying exchange
ID:192.168.0.187-118c6baaa65-14:1(1896c52) in DeliveryChanne
l{servicemix-cxf-bc} from processInboundSynchronousExchange
DEBUG - DeliveryChannelImpl - Notified:
ID:192.168.0.187-118c6baaa65-14:1(1896c52) in DeliveryChannel{service
mix-cxf-bc} from sendSync
2008-mar-19 12:53:36
org.apache.cxf.interceptor.LoggingOutInterceptor$LoggingCallback onClose
INFO: Outbound Message
---------------------------
Encoding: UTF-8
Headers: {SOAPAction=[""]}
Messages:
Payload: <soap:Envelope
xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body
/></soap:Envelope>
--------------------------------------
DEBUG - DeliveryChannelImpl - Send
ID:192.168.0.187-118c6baaa65-14:1 in DeliveryChannel{servicemix-cxf-bc}
DEBUG - SedaFlow - Called Flow send
DEBUG - SedaQueue -
[EMAIL PROTECTED] dequeued
exchange: I
nOut[
id: ID:192.168.0.187-118c6baaa65-14:1
status: Done
role: provider
interface: {http://www.exampleURI.com/GetCustomer}GetCustomerPortType
service: {http://www.exampleURI.com/GetCustomer}GetCustomerService
endpoint: CustomerServiceProxy
operation: {http://www.exampleURI.com/GetCustomer}GetCustomer
in: <?xml version="1.0" encoding="UTF-8"?><jbi:message
xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper" xmln
s:msg="http://www.exampleURI.com/GetCustomer" name="GetCustomerInput"
type="msg:GetCustomerInput" version="1.0"><jbi:par
t><s1:CustomerNumberRequest xmlns:s1="http://www.exampleURI.com/GetCustomer"
xmlns:soapenc="http://schemas.xmlsoap.org/s
oap/encoding/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<CompanyID>comp</CompanyID>
<Password>pass</Password>
<UserName>usr</UserName>
<CustomerNumber>1230</CustomerNumber>
</s1:CustomerNumberRequest></jbi:part></jbi:message>
out: null
]
DEBUG - CxfBcComponent - Received exchange: status: Done,
role: provider
DEBUG - CxfBcComponent - Retrieved correlation id:
ID:192.168.0.187-118c6baaa65-14:1
---------------------------------------------------------------
Since SOAP enabled HTTP BC does not work when using default soapVersion 1.2
but with soapVersion 1.1 set maybe this is a SOAP version issue in CXF ?
Can I configure CXF to use soapVersion 1.1 ?
Tia
Johan