You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@servicemix.apache.org by angeloNZ <an...@nz.fujitsu.com> on 2009/03/12 23:04:44 UTC

Re: cxf losing namespace declarations

Hi,

Here's my use case:

http:soap-consumer -> camel > cxf-provider-bc > external service

I'm using smx 3.3.  I am getting my expected soap response however I am not
getting the xmlns:xsd definition and the xsi namespace comes up as
"xmlns:xsi=xsi".

I've looked at JbiOutWsdl1Interceptor and saw the fix that saves the
namespaces.  I was also looking at JbiInWsdl1Interceptor and there was a
code portion that adds the xsi and xsd namespaces to the root element as
well.  However, this particular method call below always returns null for me
which forces the handleMessage() to exit and not have any of the namespace
changes applied.  

Element body = getBodyElement(message);
if (body == null) {            	
    return;
}

Since I'm getting a soap response I'm assuming that some other interceptors
were invoked afterwards but I'm not sure which.  If I use a
http:soap-provider instead, the xsd and xsi namespaces appear ok in the
operation element in the response.  Any idea how to fix this cxf problem?



Freeman Fang wrote:
> 
> Hi,
> 
> I think we already fix this issue in smx 3.2.3 SNAPSHOT. [1] tracked 
> this issue
> 
> [1]https://issues.apache.org/activemq/browse/SM-1556
> Freeman
> 
> servicer-mixer wrote:
>> I'm currently using smx 3.2.2 with the following endpoints
>> cxf-consumer-bc=>cxf-provider-bc=>external service
>>
>> The reply Envelope element from the external service looks like this:
>> <soap:Envelope xmlns:xop="http://www.w3.org/2004/08/xop/include"
>>    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
>>   
>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>>   
>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
>>
>> However, the reply returned from cxf-consumer-bc is:
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>
>> I'm failing to parse the reply because one of the elements in the reply
>> looks like this:
>> <DeclineReason xsi:nil="true" />
>>
>> I think this is similar to SM-1172, but the original namespace is
>> declared
>> on the external reply and not the jbi message.
>>
>> Is there any way to force the consumer to add namespace declarations to
>> the
>> reply?
>>
>> Thanks
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22486202.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Hi Angelo,

One more question, as you said, the response from your axis service is 
correct, as dumped from [1],
Where you get the incorrect response as you mentioned previously [2]
And your work flow is
http:soap-consumer -> camel > cxf-provider-bc > external service
Would you mind append your projects(the SA, SUs) to this jira, I know 
you are using SOAPUI to send request, it's also fine for me to reproduce 
the problem, as long as you append the request content you send using 
SOAPUI.
A testcase is very helpful to figure out this issue.
Btw, would you please use cxf bc consumer instead of http:soap-consumer 
in your work flow also, tell me if you still see the problem.

[1]http://www.nabble.com/file/p22529529/response.txt
[2]http://www.nabble.com/file/p22488949/soapresponse.xml

Thanks again
Freeman



angeloNZ wrote:
> Done.   https://issues.apache.org/activemq/browse/SM-1825
> https://issues.apache.org/activemq/browse/SM-1825 
>
> Thanks for giving attention to this issue.
>
>
> Freeman Fang wrote:
>   
>> Hi Angelo,
>>
>> Would you please create a jira ticket for this issue?
>> Thanks
>> Freeman
>>
>> angeloNZ wrote:
>>     
>>> Hi Freeman,
>>>
>>> I managed to setup tcpmon to listen between the cxf-provider and the
>>> external web service.  Here's the request dump.  The soap request looks
>>> weird to me as the <rem:getXMLFeed> was repeated twice (tcpmon problem
>>> ?),
>>> however the response body looked ok as the xsd and xsi namespaces were
>>> all
>>> returned correctly by the external web service.  So something must be
>>> happening inside ServiceMix as the response is brought back that strips
>>> the
>>> xsd namespace and makes the xsi namespace appear as "xmlns:xsi=xsi".
>>>
>>> tcpmon request:
>>>
>>> POST /TREISFeedWeb/services/FeedService HTTP/1.1
>>> Content-Type: text/xml; charset=UTF-8
>>> SOAPAction: ""
>>> Content-Type: text/xml
>>> Accept: *
>>> Cache-Control: no-cache
>>> Pragma: no-cache
>>> User-Agent: Java/1.5.0_12
>>> Host: wl0438.solutions.infinity.co.nz:9070
>>> Connection: keep-alive
>>> Content-Length: 487
>>>
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>    <soap:Body>
>>>       <rem:getXMLFeed
>>> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>>>          <rem:userName>chris</rem:userName>         
>>>          <rem:password>password</rem:password>      
>>>       </rem:getXMLFeed>
>>>       <rem:getXMLFeed
>>> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>>>          <rem:userName>chris</rem:userName>         
>>>          <rem:password>password</rem:password>      
>>>       </rem:getXMLFeed>
>>>    </soap:Body></soap:Envelope>
>>>
>>> http://www.nabble.com/file/p22529529/response.txt response.txt 
>>>
>>> Angelo
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> Hi,
>>>> Thanks.
>>>> And I really want to see the soap message send out by your cxf bc 
>>>> provider, you can insert some tool like tcpmonitor between your cxf bc 
>>>> provider and externel Axis services to dump the onwire soapmessage.
>>>> Freeman
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: cxf losing namespace declarations

Posted by angeloNZ <an...@nz.fujitsu.com>.
Done.   https://issues.apache.org/activemq/browse/SM-1825
https://issues.apache.org/activemq/browse/SM-1825 

Thanks for giving attention to this issue.


Freeman Fang wrote:
> 
> Hi Angelo,
> 
> Would you please create a jira ticket for this issue?
> Thanks
> Freeman
> 
> angeloNZ wrote:
>> Hi Freeman,
>>
>> I managed to setup tcpmon to listen between the cxf-provider and the
>> external web service.  Here's the request dump.  The soap request looks
>> weird to me as the <rem:getXMLFeed> was repeated twice (tcpmon problem
>> ?),
>> however the response body looked ok as the xsd and xsi namespaces were
>> all
>> returned correctly by the external web service.  So something must be
>> happening inside ServiceMix as the response is brought back that strips
>> the
>> xsd namespace and makes the xsi namespace appear as "xmlns:xsi=xsi".
>>
>> tcpmon request:
>>
>> POST /TREISFeedWeb/services/FeedService HTTP/1.1
>> Content-Type: text/xml; charset=UTF-8
>> SOAPAction: ""
>> Content-Type: text/xml
>> Accept: *
>> Cache-Control: no-cache
>> Pragma: no-cache
>> User-Agent: Java/1.5.0_12
>> Host: wl0438.solutions.infinity.co.nz:9070
>> Connection: keep-alive
>> Content-Length: 487
>>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>    <soap:Body>
>>       <rem:getXMLFeed
>> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>>          <rem:userName>chris</rem:userName>         
>>          <rem:password>password</rem:password>      
>>       </rem:getXMLFeed>
>>       <rem:getXMLFeed
>> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>>          <rem:userName>chris</rem:userName>         
>>          <rem:password>password</rem:password>      
>>       </rem:getXMLFeed>
>>    </soap:Body></soap:Envelope>
>>
>> http://www.nabble.com/file/p22529529/response.txt response.txt 
>>
>> Angelo
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>> Thanks.
>>> And I really want to see the soap message send out by your cxf bc 
>>> provider, you can insert some tool like tcpmonitor between your cxf bc 
>>> provider and externel Axis services to dump the onwire soapmessage.
>>> Freeman
>>>
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22530922.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Hi Angelo,

Would you please create a jira ticket for this issue?
Thanks
Freeman

angeloNZ wrote:
> Hi Freeman,
>
> I managed to setup tcpmon to listen between the cxf-provider and the
> external web service.  Here's the request dump.  The soap request looks
> weird to me as the <rem:getXMLFeed> was repeated twice (tcpmon problem ?),
> however the response body looked ok as the xsd and xsi namespaces were all
> returned correctly by the external web service.  So something must be
> happening inside ServiceMix as the response is brought back that strips the
> xsd namespace and makes the xsi namespace appear as "xmlns:xsi=xsi".
>
> tcpmon request:
>
> POST /TREISFeedWeb/services/FeedService HTTP/1.1
> Content-Type: text/xml; charset=UTF-8
> SOAPAction: ""
> Content-Type: text/xml
> Accept: *
> Cache-Control: no-cache
> Pragma: no-cache
> User-Agent: Java/1.5.0_12
> Host: wl0438.solutions.infinity.co.nz:9070
> Connection: keep-alive
> Content-Length: 487
>
> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>    <soap:Body>
>       <rem:getXMLFeed
> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>          <rem:userName>chris</rem:userName>         
>          <rem:password>password</rem:password>      
>       </rem:getXMLFeed>
>       <rem:getXMLFeed
> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
>          <rem:userName>chris</rem:userName>         
>          <rem:password>password</rem:password>      
>       </rem:getXMLFeed>
>    </soap:Body></soap:Envelope>
>
> http://www.nabble.com/file/p22529529/response.txt response.txt 
>
> Angelo
>
>
> Freeman Fang wrote:
>   
>> Hi,
>> Thanks.
>> And I really want to see the soap message send out by your cxf bc 
>> provider, you can insert some tool like tcpmonitor between your cxf bc 
>> provider and externel Axis services to dump the onwire soapmessage.
>> Freeman
>>
>>
>>     
>
>   


Re: cxf losing namespace declarations

Posted by angeloNZ <an...@nz.fujitsu.com>.
Hi Freeman,

I managed to setup tcpmon to listen between the cxf-provider and the
external web service.  Here's the request dump.  The soap request looks
weird to me as the <rem:getXMLFeed> was repeated twice (tcpmon problem ?),
however the response body looked ok as the xsd and xsi namespaces were all
returned correctly by the external web service.  So something must be
happening inside ServiceMix as the response is brought back that strips the
xsd namespace and makes the xsi namespace appear as "xmlns:xsi=xsi".

tcpmon request:

POST /TREISFeedWeb/services/FeedService HTTP/1.1
Content-Type: text/xml; charset=UTF-8
SOAPAction: ""
Content-Type: text/xml
Accept: *
Cache-Control: no-cache
Pragma: no-cache
User-Agent: Java/1.5.0_12
Host: wl0438.solutions.infinity.co.nz:9070
Connection: keep-alive
Content-Length: 487

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <rem:getXMLFeed
xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
         <rem:userName>chris</rem:userName>         
         <rem:password>password</rem:password>      
      </rem:getXMLFeed>
      <rem:getXMLFeed
xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">         
         <rem:userName>chris</rem:userName>         
         <rem:password>password</rem:password>      
      </rem:getXMLFeed>
   </soap:Body></soap:Envelope>

http://www.nabble.com/file/p22529529/response.txt response.txt 

Angelo


Freeman Fang wrote:
> 
> Hi,
> Thanks.
> And I really want to see the soap message send out by your cxf bc 
> provider, you can insert some tool like tcpmonitor between your cxf bc 
> provider and externel Axis services to dump the onwire soapmessage.
> Freeman
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22529529.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Thanks.
And I really want to see the soap message send out by your cxf bc 
provider, you can insert some tool like tcpmonitor between your cxf bc 
provider and externel Axis services to dump the onwire soapmessage.
Freeman

angeloNZ wrote:
> The external service is an Axis 1.2 web service application being hosted on a
> Websphere server.
>
> In JbiOutWsdl1Interceptor I logged the request message body after the call
> to saveLaterUsedNS(element) and here's the DOM body:
>
> <?xml version="1.0" encoding="UTF-8"?>
>    <jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
> xmlns:msg="http://wl0438.solutions.infinity.co.nz:9080/TREISFeedWeb/services/FeedService"
> name="getXMLFeedRequest" type="msg:getXMLFeedRequest" version="1.0">
>       <jbi:part>
>         <rem:getXMLFeed
> xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">
>           <rem:userName>myUser</rem:userName>
>           <rem:password>password</rem:password>
>         </rem:getXMLFeed>
>       </jbi:part>
>     </jbi:message>
>
> I've also tried modifying the saveLaterUsedNS() method to add the xsd and
> xsi namespaces in the jbi:message element in hope that it would be added
> later on but no luck.  I'll have another go and try adding it in the
> getXMLFeed element instead.
>
>
> Freeman Fang wrote:
>   
>> Ok, I saw the namespace in the page source now, and I saw the incorrect 
>> namespace xmlns:xsi="xsi"
>> Could you also append the soap message cxf bc provider send to your 
>> external service?
>> And would you tell me what's the kind of external service are you using?
>> Freeman
>>
>> angeloNZ wrote:
>>     
>>> Hi,
>>>
>>> If you're viewing the xml in a browser you need to view the page source
>>> to
>>> see the namespace definitions but they're there.
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> Hi,
>>>> Your soap response message looks really strange for me, there is no 
>>>> prefix "soapenv" defined in your message, moreover, there's no any 
>>>> prefix defined in your message, so it's an invalid soap message, that 
>>>> can explain why getBodyElement(message) return null.
>>>> What kind of external service are you use?
>>>>
>>>> Freeman
>>>>
>>>> angeloNZ wrote:
>>>>     
>>>>         
>>>>> Hi,
>>>>>
>>>>> Yes, I'm getting the full soap response I expect and yes the
>>>>> getBodyElement(message) is always null.
>>>>> Attached is the wsdl file being referenced from my cxf-bc xbean.xml.
>>>>>
>>>>> Sorry, I'm not clear what you meant with 'onwire soap message", were
>>>>> you
>>>>> referring to the soap response received by the requesting client? I've
>>>>> attached a copy of that as well.
>>>>>
>>>>> I don't have a testcase currently as I'm using soapUI as the soap
>>>>> client
>>>>> and
>>>>> I just discovered this problem as I was creating integration tests
>>>>> using
>>>>> the
>>>>> Spring approach meantioned in the site.
>>>>>
>>>>> http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 
>>>>>
>>>>> http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 
>>>>>
>>>>>
>>>>> Freeman Fang wrote:
>>>>>   
>>>>>       
>>>>>           
>>>>>> Hi,
>>>>>>
>>>>>> You get your soap response from external service, and then in 
>>>>>> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
>>>>>> right?
>>>>>> Can you dump the onwire soap message returned from your external
>>>>>> service 
>>>>>> and also append your wsdl used by cxf bc provider?
>>>>>> I suspect the soap version mismatch cause this problem.
>>>>>> Also if you can attach a testcase, that's would be great.
>>>>>> Freeman
>>>>>>
>>>>>>
>>>>>>     
>>>>>>         
>>>>>>             
>>>>>   
>>>>>       
>>>>>           
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: cxf losing namespace declarations

Posted by angeloNZ <an...@nz.fujitsu.com>.
The external service is an Axis 1.2 web service application being hosted on a
Websphere server.

In JbiOutWsdl1Interceptor I logged the request message body after the call
to saveLaterUsedNS(element) and here's the DOM body:

<?xml version="1.0" encoding="UTF-8"?>
   <jbi:message xmlns:jbi="http://java.sun.com/xml/ns/jbi/wsdl-11-wrapper"
xmlns:msg="http://wl0438.solutions.infinity.co.nz:9080/TREISFeedWeb/services/FeedService"
name="getXMLFeedRequest" type="msg:getXMLFeedRequest" version="1.0">
      <jbi:part>
        <rem:getXMLFeed
xmlns:rem="http://remote.service.callcenter.nzta.govt.nz">
          <rem:userName>myUser</rem:userName>
          <rem:password>password</rem:password>
        </rem:getXMLFeed>
      </jbi:part>
    </jbi:message>

I've also tried modifying the saveLaterUsedNS() method to add the xsd and
xsi namespaces in the jbi:message element in hope that it would be added
later on but no luck.  I'll have another go and try adding it in the
getXMLFeed element instead.


Freeman Fang wrote:
> 
> Ok, I saw the namespace in the page source now, and I saw the incorrect 
> namespace xmlns:xsi="xsi"
> Could you also append the soap message cxf bc provider send to your 
> external service?
> And would you tell me what's the kind of external service are you using?
> Freeman
> 
> angeloNZ wrote:
>> Hi,
>>
>> If you're viewing the xml in a browser you need to view the page source
>> to
>> see the namespace definitions but they're there.
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>> Your soap response message looks really strange for me, there is no 
>>> prefix "soapenv" defined in your message, moreover, there's no any 
>>> prefix defined in your message, so it's an invalid soap message, that 
>>> can explain why getBodyElement(message) return null.
>>> What kind of external service are you use?
>>>
>>> Freeman
>>>
>>> angeloNZ wrote:
>>>     
>>>> Hi,
>>>>
>>>> Yes, I'm getting the full soap response I expect and yes the
>>>> getBodyElement(message) is always null.
>>>> Attached is the wsdl file being referenced from my cxf-bc xbean.xml.
>>>>
>>>> Sorry, I'm not clear what you meant with 'onwire soap message", were
>>>> you
>>>> referring to the soap response received by the requesting client? I've
>>>> attached a copy of that as well.
>>>>
>>>> I don't have a testcase currently as I'm using soapUI as the soap
>>>> client
>>>> and
>>>> I just discovered this problem as I was creating integration tests
>>>> using
>>>> the
>>>> Spring approach meantioned in the site.
>>>>
>>>> http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 
>>>>
>>>> http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 
>>>>
>>>>
>>>> Freeman Fang wrote:
>>>>   
>>>>       
>>>>> Hi,
>>>>>
>>>>> You get your soap response from external service, and then in 
>>>>> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
>>>>> right?
>>>>> Can you dump the onwire soap message returned from your external
>>>>> service 
>>>>> and also append your wsdl used by cxf bc provider?
>>>>> I suspect the soap version mismatch cause this problem.
>>>>> Also if you can attach a testcase, that's would be great.
>>>>> Freeman
>>>>>
>>>>>
>>>>>     
>>>>>         
>>>>   
>>>>       
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22489791.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Ok, I saw the namespace in the page source now, and I saw the incorrect 
namespace xmlns:xsi="xsi"
Could you also append the soap message cxf bc provider send to your 
external service?
And would you tell me what's the kind of external service are you using?
Freeman

angeloNZ wrote:
> Hi,
>
> If you're viewing the xml in a browser you need to view the page source to
> see the namespace definitions but they're there.
>
>
> Freeman Fang wrote:
>   
>> Hi,
>> Your soap response message looks really strange for me, there is no 
>> prefix "soapenv" defined in your message, moreover, there's no any 
>> prefix defined in your message, so it's an invalid soap message, that 
>> can explain why getBodyElement(message) return null.
>> What kind of external service are you use?
>>
>> Freeman
>>
>> angeloNZ wrote:
>>     
>>> Hi,
>>>
>>> Yes, I'm getting the full soap response I expect and yes the
>>> getBodyElement(message) is always null.
>>> Attached is the wsdl file being referenced from my cxf-bc xbean.xml.
>>>
>>> Sorry, I'm not clear what you meant with 'onwire soap message", were you
>>> referring to the soap response received by the requesting client? I've
>>> attached a copy of that as well.
>>>
>>> I don't have a testcase currently as I'm using soapUI as the soap client
>>> and
>>> I just discovered this problem as I was creating integration tests using
>>> the
>>> Spring approach meantioned in the site.
>>>
>>> http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 
>>>
>>> http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 
>>>
>>>
>>> Freeman Fang wrote:
>>>   
>>>       
>>>> Hi,
>>>>
>>>> You get your soap response from external service, and then in 
>>>> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
>>>> right?
>>>> Can you dump the onwire soap message returned from your external service 
>>>> and also append your wsdl used by cxf bc provider?
>>>> I suspect the soap version mismatch cause this problem.
>>>> Also if you can attach a testcase, that's would be great.
>>>> Freeman
>>>>
>>>>
>>>>     
>>>>         
>>>   
>>>       
>>
>>     
>
>   


Re: cxf losing namespace declarations

Posted by angeloNZ <an...@nz.fujitsu.com>.
Hi,

If you're viewing the xml in a browser you need to view the page source to
see the namespace definitions but they're there.


Freeman Fang wrote:
> 
> Hi,
> Your soap response message looks really strange for me, there is no 
> prefix "soapenv" defined in your message, moreover, there's no any 
> prefix defined in your message, so it's an invalid soap message, that 
> can explain why getBodyElement(message) return null.
> What kind of external service are you use?
> 
> Freeman
> 
> angeloNZ wrote:
>> Hi,
>>
>> Yes, I'm getting the full soap response I expect and yes the
>> getBodyElement(message) is always null.
>> Attached is the wsdl file being referenced from my cxf-bc xbean.xml.
>>
>> Sorry, I'm not clear what you meant with 'onwire soap message", were you
>> referring to the soap response received by the requesting client? I've
>> attached a copy of that as well.
>>
>> I don't have a testcase currently as I'm using soapUI as the soap client
>> and
>> I just discovered this problem as I was creating integration tests using
>> the
>> Spring approach meantioned in the site.
>>
>> http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 
>>
>> http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 
>>
>>
>> Freeman Fang wrote:
>>   
>>> Hi,
>>>
>>> You get your soap response from external service, and then in 
>>> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
>>> right?
>>> Can you dump the onwire soap message returned from your external service 
>>> and also append your wsdl used by cxf bc provider?
>>> I suspect the soap version mismatch cause this problem.
>>> Also if you can attach a testcase, that's would be great.
>>> Freeman
>>>
>>>
>>>     
>>
>>   
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22489397.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Hi,
Your soap response message looks really strange for me, there is no 
prefix "soapenv" defined in your message, moreover, there's no any 
prefix defined in your message, so it's an invalid soap message, that 
can explain why getBodyElement(message) return null.
What kind of external service are you use?

Freeman

angeloNZ wrote:
> Hi,
>
> Yes, I'm getting the full soap response I expect and yes the
> getBodyElement(message) is always null.
> Attached is the wsdl file being referenced from my cxf-bc xbean.xml.
>
> Sorry, I'm not clear what you meant with 'onwire soap message", were you
> referring to the soap response received by the requesting client? I've
> attached a copy of that as well.
>
> I don't have a testcase currently as I'm using soapUI as the soap client and
> I just discovered this problem as I was creating integration tests using the
> Spring approach meantioned in the site.
>
> http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 
>
> http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 
>
>
> Freeman Fang wrote:
>   
>> Hi,
>>
>> You get your soap response from external service, and then in 
>> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
>> right?
>> Can you dump the onwire soap message returned from your external service 
>> and also append your wsdl used by cxf bc provider?
>> I suspect the soap version mismatch cause this problem.
>> Also if you can attach a testcase, that's would be great.
>> Freeman
>>
>>
>>     
>
>   


Re: cxf losing namespace declarations

Posted by angeloNZ <an...@nz.fujitsu.com>.
Hi,

Yes, I'm getting the full soap response I expect and yes the
getBodyElement(message) is always null.
Attached is the wsdl file being referenced from my cxf-bc xbean.xml.

Sorry, I'm not clear what you meant with 'onwire soap message", were you
referring to the soap response received by the requesting client? I've
attached a copy of that as well.

I don't have a testcase currently as I'm using soapUI as the soap client and
I just discovered this problem as I was creating integration tests using the
Spring approach meantioned in the site.

http://www.nabble.com/file/p22488949/soapresponse.xml soapresponse.xml 

http://www.nabble.com/file/p22488949/FeedService.wsdl FeedService.wsdl 


Freeman Fang wrote:
> 
> Hi,
> 
> You get your soap response from external service, and then in 
> JbiInWsdl1Interceptor the getBodyElement(message) always return null,
> right?
> Can you dump the onwire soap message returned from your external service 
> and also append your wsdl used by cxf bc provider?
> I suspect the soap version mismatch cause this problem.
> Also if you can attach a testcase, that's would be great.
> Freeman
> 
> 

-- 
View this message in context: http://www.nabble.com/cxf-losing-namespace-declarations-tp20119972p22488949.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


Re: cxf losing namespace declarations

Posted by Freeman Fang <fr...@gmail.com>.
Hi,

You get your soap response from external service, and then in 
JbiInWsdl1Interceptor the getBodyElement(message) always return null, right?
Can you dump the onwire soap message returned from your external service 
and also append your wsdl used by cxf bc provider?
I suspect the soap version mismatch cause this problem.
Also if you can attach a testcase, that's would be great.
Freeman

angeloNZ wrote:
> Hi,
>
> Here's my use case:
>
> http:soap-consumer -> camel > cxf-provider-bc > external service
>
> I'm using smx 3.3.  I am getting my expected soap response however I am not
> getting the xmlns:xsd definition and the xsi namespace comes up as
> "xmlns:xsi=xsi".
>
> I've looked at JbiOutWsdl1Interceptor and saw the fix that saves the
> namespaces.  I was also looking at JbiInWsdl1Interceptor and there was a
> code portion that adds the xsi and xsd namespaces to the root element as
> well.  However, this particular method call below always returns null for me
> which forces the handleMessage() to exit and not have any of the namespace
> changes applied.  
>
> Element body = getBodyElement(message);
> if (body == null) {            	
>     return;
> }
>
> Since I'm getting a soap response I'm assuming that some other interceptors
> were invoked afterwards but I'm not sure which.  If I use a
> http:soap-provider instead, the xsd and xsi namespaces appear ok in the
> operation element in the response.  Any idea how to fix this cxf problem?
>
>
>
> Freeman Fang wrote:
>   
>> Hi,
>>
>> I think we already fix this issue in smx 3.2.3 SNAPSHOT. [1] tracked 
>> this issue
>>
>> [1]https://issues.apache.org/activemq/browse/SM-1556
>> Freeman
>>
>> servicer-mixer wrote:
>>     
>>> I'm currently using smx 3.2.2 with the following endpoints
>>> cxf-consumer-bc=>cxf-provider-bc=>external service
>>>
>>> The reply Envelope element from the external service looks like this:
>>> <soap:Envelope xmlns:xop="http://www.w3.org/2004/08/xop/include"
>>>    xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>>>    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>>> xmlns:wsa="http://schemas.xmlsoap.org/ws/2004/08/addressing"
>>>   
>>> xmlns:wsse="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd"
>>>   
>>> xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd">
>>>
>>> However, the reply returned from cxf-consumer-bc is:
>>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
>>>
>>> I'm failing to parse the reply because one of the elements in the reply
>>> looks like this:
>>> <DeclineReason xsi:nil="true" />
>>>
>>> I think this is similar to SM-1172, but the original namespace is
>>> declared
>>> on the external reply and not the jbi message.
>>>
>>> Is there any way to force the consumer to add namespace declarations to
>>> the
>>> reply?
>>>
>>> Thanks
>>>   
>>>       
>>
>>     
>
>