Hi,Freeman!
I think I did not express my meaning clear。
What i want to do is that:
The external service's response did not have a soap-header,I want to add a
soap-header to it before returning to the caller.
My Flow is:
cxf-bc-consumer=(1)=>servicemix-camel=(2)=>cxf-bc-
provider=(3)=>external
server=(4)=>back to==>cxf-
-bc-provider=(5)=>servicemix-camel=(6)=>cxf-bc-consumer--Ending(7)
>From (5) to (7),I think soap message was genrated from JBI message based on
consumer's wsdl model.
Does my understanding be right?
And in step (6),I enriched the jbi message by adding a <jbi:part> which
stands for the soap-header
<jbi:part>
<wsse:AuthResult
xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
"
mustUnderstand="true">
<wsse:ResultCode>0000</wsse:ResultCode>
<wsse:ResultDetail>success</wsse:ResultDetail>
</wsse:AuthResult>
</jbi:part>
In consumer's wsdl,I add soap-header to it's binding-output def:
<wsdl:output name="sayHelloResponse1">
<wsdlsoap:body parts="parameters" use ="literal"/>
<wsdlsoap:header message="tns:sayHelloResponse1"
part="AuthResultHeader" use="literal">
</wsdlsoap:header>
</wsdl:output>
Is there anything wrong with my approach ?
Freeman Fang wrote:
>
> Hi,
> Cxf bc provider parse JBI message and generate soap message based on
> wsdl model.
> So if the wsdl used for your cxf bc provider has no soap header in
> binding def, the soap message sent out from your cxf bc provider won't
> have soap header, it's expected behavior.
> You may need change your provider wsdl first.
>
> Freeman
> On 2009-9-6, at 上午11:58, inter wrote:
>
>>
>> I used cxf-bc-consumer,cxf-bc-provider and camel like follows:
>>
>> cxf-bc-consumer=(1)=>servicemix-camel=(2)=>cxf-bc-
>> provider=(3)=>external
>> server=(4)=>back to==>cxf-
>> -bc-provider=(5)=>servicemix-camel=(6)=>cxf-bc-consumer.
>>
>> The consumer and provider both have their own wsdl file.
>> The only difference of the two wsdl-files is that:the consumer's
>> wsdl has a
>> out-soap-header in binding def
>>
>> but the provider's does not have it.
>>
>> So in step(6),i add a camel-processor to add a soap-heaer part in
>> JBI msg
>> ,the whole msg after my processor like this:
>> -------------------------------------------------------------------------------------
>> <?xml version="1.0" encoding="UTF-8"?>
>> <jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-
>> wrapper"
>> xmlns:msg="http://server" xmlns:xsd="http://www.w3.org/2001/
>> XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> name="sayHelloResponse" type="msg:sayHelloResponse" version="1.0">
>> <jbi:part>
>> <ns1:sayHelloResponse xmlns:ns1="http://server">
>> <ns1:out>Hello!!!boy</ns1:out>
>> </ns1:sayHelloResponse>
>> </jbi:part>
>> <jbi:part>
>> <wsse:AuthResult
>>
>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd
>>
>> "
>> mustUnderstand="true">
>> <wsse:ResultCode>0000</wsse:ResultCode>
>> <wsse:ResultDetail>success</wsse:ResultDetail>
>> </wsse:AuthResult>
>> </jbi:part>
>> </jbi:message>
>> ------------------------------------------------------------------------------------------------
>>
>> But when out of servicemix-cxf-bc,the soap message does not contain
>> soap-header at all,it just contains
>> the body message.
>> I am sure that I have added a soap-header to the binding def of the
>> consumer's wsdl.
>>
>> I upload my whole sa ZIP , in the cxf-bc-su.zip,there are all the
>> wsdl
>> files.
>> The proxy.wsdl is the consumer's,and the service.wsdl is the
>> provider's,the
>> wsse.xsd is the imported schema in which the soap header is defined.
>>
>> http://www.nabble.com/file/p25314469/test.zip test.zip
>>
>> --
>> View this message in context:
>> http://www.nabble.com/Problems-with-adding-out-soap-header-for-cxf-bc..-tp25314469p25314469.html
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
>
--
View this message in context:
http://www.nabble.com/Problems-with-adding-out-soap-header-for-cxf-bc..-tp25314469p25316117.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.