Title: This email may contain confident
Thanks for your reply- it is reason why there are double tags.
I've done it that way because  when there is
                    useJBIWrapper="false"
                    useSOAPEnvelope="false"
in provider and consumer - the target of provider can't recognize the message - there are double tags in request.
In second case :
                    useJBIWrapper="false"
                    useSOAPEnvelope="true">
I don't know why my xpath _expression_ doesn't work, there is a payload:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:heal="http://myservice/aaa"><soap:Body><heal:getCommunitiesRequest xmlns:heal="http://myservice/aaa">
         <heal:dataSourceId>1</heal:dataSourceId>
      </heal:getCommunitiesRequest></soap:Body></soap:Envelope>

org.apache.cxf.interceptor.Fault: Invalid xpath: local-name(/soap:Envelope/soap:Body/*[1])='getCommunitiesRequest'. Reason: javax.xml.xpath.XPathExpressionException

but local-name(/soap:Envelope/soap:Body/*[1])='getCommunitiesRequest' I think is correct.

 
In my wrong configuration with false,false for consumer and false,true for provider  the payload  was just 
<heal:getCommunitiesRequest xmlns:heal="http://myservice/aaa">
         <heal:dataSourceId>1</heal:dataSourceId>
      </heal:getCommunitiesRequest>

so the xpath was simpler : local-name(/*[1])='getCommunitiesRequest'
and it worked...

So what - am I doing something wrong with xpath?  should I do something else with soap namespaces in serviecemix and camel?





On 05.01.2012 14:26, Freeman Fang wrote:
Hi,

Your cxfbc consumer and provider endpoint configuration mismatch,
The provider is
                   useJBIWrapper="false"
                   useSOAPEnvelope="true"
The consumer is
                   useJBIWrapper="false"
                   useSOAPEnvelope="false"

You should keep those same.

Freeman
On 2012-1-5, at 下午9:01, Rafal Janik wrote:

Hi,

I've got a problem with double <soap:Envelope> and <soap:Body> tags in my cxf bc component.
The idea of my my sa is to translate a message from one soap format to another.
The cxfbc configuration:

<cxfbc:provider wsdl="classpath:service_v1.wsdl"
                   locationURI="http://localhost:8080/my-ws/ws"
                   interfaceName="aaa:ImplPort2"
                   service="aaa:myService"
                   endpoint="ImplPort"
                   useJBIWrapper="false"
                   useSOAPEnvelope="true">
</cxfbc:provider>


<cxfbc:consumer wsdl="classpath:service_v2.wsdl"
                   targetService="test:AdapterService"
                   targetEndpoint="myEndpoint"
                   useJBIWrapper="false"
                   useSOAPEnvelope="false"
                   locationURI="https://0.0.0.0:8190/test/testService/"
                   busCfg="ssl.xml">
</cxfbc:consumer>


Then I use camel and processors to translate the message:


from("jbi:endpoint:http://test.pl/test/RoleAnalyzerAdapterService/RoleAnalyzerEndpoint")
               .to("log:entrance")
               .choice()
               .when(xpath(PROPER_METHOD_INVOKED)))
               .process(new MyTranslator())
               .to("jbi:endpoint:{cxf-bc-provider_endpoint}")
               .otherwise()
               .to("log:wrong_request")
               .setBody(constant(SoapResponseMessages.WRONG_METHOD));


and as a result I get almost good soap (but packed again in soap:Envelope/soap:Body):

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
<soap:Body>
<soap:Envelope>
<soap:Body>
<!--response here  -->
</soap:Body>
</soap:Envelope>
</soap:Body>
</soap:Envelope>


Am I doing something wrong, maybe the component should be configured in other way or should I use a processor for getting the body from response and then send it back?

apache-servicemix 3.6.0-fuse-00-35





---------------------------------------------
Freeman Fang

FuseSource
Email:[email protected]
Web: fusesource.com
Twitter: freemanfang
Blog: http://freemanfang.blogspot.com












--
Software Mind

Rafał Janik
Software Engineer
Software Mind SA
ul. Bociana 22A
31-231 Krakow
Polska

Tel. +48 12 252 34 00
Fax: +48 12 252 34 01
Mobile:+48 668 48 36 13
[email protected]
www.softwaremind.pl

Software Mind SA z siedzibą w Krakowie przy ul. Bociana 22A, 31-231 Krakow
NIP 9452012822, kapitał zakładowy PLN 500,000.00 (w całości wpłacony), KRS 0000300409
Sąd Rejonowy dla Krakowa Śródmieścia w Krakowie, XI Wydział Gospodarczy KRS
 
Ta wiadomość może zawierać materiały poufne i objęte tajemnicą zawodową, do wyłącznego użytku odbiorcy (odbiorców). Surowo wzbronione są wszelkie zmiany, wykorzystywanie, przechowywanie, dystrybucja lub ujawnienie przez inne osoby. Jeśli nie jest Pan/Pani zamierzonym odbiorcą (lub osobą upoważnioną do odbioru w imieniu odbiorcy), prosimy o kontakt z nadawcą przez wiadomość zwrotną oraz usunięcie wszelkich kopii niniejszej wiadomości. Poza tym poczta elektroniczna jest podatna na uszkodzenia danych, przechwytywanie, sabotaż, nieupoważnione zmiany i wirusy. Wysyłamy i odbieramy wiadomości poczty elektronicznej wyłącznie na takiej zasadzie, że nie ponosimy odpowiedzialności za jakiekolwiek tego typu uszkodzenia, przechwycenia, sabotaż, zmiany lub wirusy, ani jakichkolwiek konsekwencje tego typu okoliczności.

Reply via email to