hi,
I copied the method and i was able to extract the message, but then I got a
new exception, this one
ERROR - CxfBcComponent - Error processing exchange InOut[
id: ID:129.177.20.229-12490bff30f-2:27
status: Active
role: provider
interface: {http://www.bccs.uib.no/EchoService.wsdl}EchoServicePortType
service: {http://www.bccs.uib.no/EchoService.wsdl}EchoService
endpoint: EchoServiceProxy
operation: {http://www.bccs.uib.no/EchoService.wsdl}SayHi
in: null
]
I guess the message for outgoing for some reason is null, so I looked at [1]
some more and added this to my code
Document messageDocument = DomUtil.createDocument();
Element soapEnv = DomUtil.createElement(messageDocument,
new QName(soapVersion.getEnvelope().getNamespaceURI(),
soapVersion.getEnvelope().getLocalPart(),
soapVersion.getPrefix()));
Element soapBody = DomUtil.createElement(soapEnv, new QName(
soapVersion.getBody().getNamespaceURI(), soapVersion
.getBody().getLocalPart(), soapVersion
.getPrefix()));
soapEnv.appendChild(soapBody);
Element body = getBodyElement(arg0);
soapBody.appendChild(soapBody.getOwnerDocument().importNode(
body, true));
arg0.setContent(Source.class, new DOMSource(messageDocument));
But this gives also gives me an error,
INFO - PhaseInterceptorChain - Interceptor has thrown exception,
unwinding now null
Not sure what to do, I've tried changing the Phase I have my Interceptor,
first I had it in Phase.READ, and tried some others but no luck.
Any tips on how to solve it??
cheers, Håkon
2009/10/26 Freeman Fang <[email protected]>
> Hi,
>
> You can take a look at JbiInWsdl1Interceptor.getBodyElement() [1] as an
> example.
> [1]
> https://svn.apache.org/repos/asf/servicemix/components/bindings/servicemix-cxf-bc/trunk/src/main/java/org/apache/servicemix/cxfbc/interceptors/JbiInWsdl1Interceptor.java
>
> Freeman
>
>
> On 2009-10-26, at 下午10:09, Håkon Sagehaug wrote:
>
> Hi all,
>>
>> I know this is not a specific servicemix question, but hopefully someone
>> can
>> answer it. I'm having cxf-bc that proxy out a web service, and having a
>> interceptor in he xbean configuration for looking for a pattern in the
>> soap
>> message. I can extract the soap header in the soap envelope fine, but I
>> couldn't figure out how to extract the soap body. So does anyone have a
>> tip
>> how to easily extracting the soap body inside the cxf interceptor?
>>
>> cheers, Håkon
>>
>> --
>> Håkon Sagehaug, Scientific Programmer
>> Parallab, Bergen Center for Computational Science (BCCS)
>> UNIFOB AS (University of Bergen Research Company)
>>
>
>
> --
> Freeman Fang
> ------------------------
> Open Source SOA: http://fusesource.com
>
>
--
Håkon Sagehaug, Scientific Programmer
Parallab, Bergen Center for Computational Science (BCCS)
UNIFOB AS (University of Bergen Research Company)