Re: Apache camel mime-multipart usage and examples?

2016-04-08 Thread ekta.v.wadhwani

Stephan,


I am using JBOSS FUSE version  8.1.0.GA which supports maximum camel core 
version : 2.15.0.

So i would not be able to use 2.17.0.

To your point on CXF-endpoint, yes i am using CXF endpoint to invoke a 
webservice which provides SOAP response with attachments. However using Spring 
XML-DSL I can only invoke webservice using dataFormat as Message. My 
configuration looks like below:

https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService";
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2";>






(1) dataFormat=Message:-  doesnot provides raw response and DOESNOT 
understand/automatically process the SOAPEnvelopeResponse + Attachments. hence 
i have to process it manually somehow. 1 option i found is using 
mime-multiparts dataformat. but couldnt try ttest because jboss fuse isnt 
supporting camel 2.17.0

(2) dataFormat=CXF_MEssage:- This DOES automatic parsing of 
SOAPEnvelopeREsponse + Attachments.

However i couldnt even get the response from webservice using this dataFormat.  
I ended up with following error using CXF_MEssage:


CXF configuration:
https://fin-aufsn4x0cba.oracleoutsourcing.com:443/publicFinancialCommonErpIntegration/ErpIntegrationService";
wsdlURL="src/main/resources/ERP1.wsdl"
serviceClass="com.oracle.xmlns.apps.financials.commonmodules.shared.model.erpintegrationservice.ErpIntegrationService"
xmlns:ssp="http://xmlns.oracle.com/oxp/service/v2";>





Error with CXF_MESSAGE:
In this above confguration if i change dataformat from Message to CXF_MESSAGE, 
i am getting below error:
default-workqueue-1] PhaseInterceptorChain  WARN  Interceptor for 
{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}ErpIntegrationServiceService#{http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/}uploadFileToUcm
 has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Couldn't find MIME boundary: 
--=_Part_3434_428158164.1459969427807
at 
org.apache.cxf.interceptor.AttachmentInInterceptor.handleMessage(AttachmentInInterceptor.java:60)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:307)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:784)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponseInternal(HTTPConduit.java:1644)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream$1.run(HTTPConduit.java:1155)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$3.run(AutomaticWorkQueueImpl.java:428)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at 
org.apache.cxf.workqueue.AutomaticWorkQueueImpl$AWQThreadFactory$1.run(AutomaticWorkQueueImpl.java:353)
at java.lang.Thread.run(Thread.java:745)



Possible reason that i suspect is:

The webservice responds in MULTIPARTS(SOAPENvelope in 1 part + Attachments in 
2nd part) for which i may have to configure serviceInterfaceStrategy as 
specified in this link: http://camel.apache.org/soap.html

Again for this there is no online help/guide how to configure 
serviceInterfaceStrategy. hence i cudnt succeed here as well.


I suspect, Had my webservice responded in plain xml with no Multipart content, 
CXF_MEssage wud hv worked without the above error.

Problem here is with Multiparts. hence i chose to use raw option(i.e, 
dataformat=Message).

(3) What next?

-> Can you help with the proper complete example of

- Configuring serviceInterfaceStrategy?

- OR processing Manually the Multiparts response using some apache camel 
component?

- OR do u know if some version of jboss fuse supports camel core of 2.17.0 so 
that i can install that and try use mime-multipart

- OR anything else that u think could help me with a simple requirement: 
Processing SOAP Multiparts response using APache CXF or any other APAche camel 
components


Thanks in advance.

Ekta

-Original Message-

Hi,

Which camel version are you using? MIME-Multipart is only available starting
Camel 2.17.0.

I am not 100% sure, but your response looks somewhat like SOAP with attachments
or MTOM. If you are using some kind of Camel-CXF endpoint for receiving it, the
endpoint might parse it for you.

Best regards
Stephan

-Original Message-




From: Wadhwani

Apache camel mime-multipart usage and examples?

2016-04-07 Thread ekta.v.wadhwani
Hi Team,

Jboss Fuse Studio : Version: 8.1.0.GA
Jdk version: 1.8.0_73
Using XML DSL

Scenario:
Webservice SOAP response is received in multiparts as below:
response : --=_Part_4706_434840889.1459343688908
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: 


http://schemas.xmlsoap.org/soap/envelope/";
xmlns:wsa="http://www.w3.org/2005/08/addressing";>
http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService//ErpIntegrationService/downloadESSJobExecutionDetailsResponseurn:uuid:82d7d264-ef7f-41da-8d51-79e940413b13http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";
xmlns:ns1="http://xmlns.oracle.com/adf/svc/types/"; xmlns:ns0="
http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:type="ns0:DocumentDetails">http://www.w3.org/2004/08/xop/include";
href="cid:51e0b71c-160b-4921-a8a7-8fe7f87ccc3b"/>zipESS_L_157463G4S.Integration.UserAttachments157463.zip
--=_Part_4706_434840889.1459343688908
Content-Transfer-Encoding: binary
Content-ID: <51e0b71c-160b-4921-a8a7-8fe7f87ccc3b>

PK157463.log?XKS?8??W??jTL?  .. blah blah some binary content
--=_Part_4706_434840889.1459343688908--


Can i use apache camel mime-multipart to process this soap response
http://camel.apache.org/mime-multipart.html

As mentioned in this document, i have included the dependency. however i am not 
able to declare this dataFormat in  element.
Can you please help guide with some example using" XML DSL" ? There is no 
example available online.


Thanks,

Ekta



This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited. Where allowed by local law, electronic 
communications with Accenture and its affiliates, including e-mail and instant 
messaging (including content), may be scanned by our systems for the purposes 
of information security and assessment of internal compliance with Accenture 
policy.
__

www.accenture.com


How to process Multipart SOAP response

2016-03-30 Thread ekta.v.wadhwani
Hi Camel team,


Jboss Fuse Studio : Version: 8.1.0.GA

Jdk version: 1.8.0_73

Using XML DSL

No server involved. since i am yet trying to run camel context locally on dev 
studio


I am trying to connect send and receive a SOAP request&response message to a 
third party webservice(Oracle).

I am succesfully able to send and receive. However i am not able to process the 
soap response received since its a multipart messasge as follows:

SOAP response 1st : --=_Part_4694_423702238.1459343682692
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: <44e5cd34-e05d-41d2-8231-e3e23f2440a1>


http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService//ErpIntegrationService/uploadFileToUcmResponseurn:uuid:46417381-5e12-448d-968f-0e8e824a1828http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";>111837
--=_Part_4694_423702238.1459343682692--



[   default-workqueue-3] route7 INFO  SOAP 
response 4th : --=_Part_4706_434840889.1459343688908
Content-Type: application/xop+xml;charset=UTF-8;type="text/xml"
Content-Transfer-Encoding: 8bit
Content-ID: 


http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:wsa="http://www.w3.org/2005/08/addressing";>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService//ErpIntegrationService/downloadESSJobExecutionDetailsResponseurn:uuid:82d7d264-ef7f-41da-8d51-79e940413b13http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";>http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/types/";
 xmlns:ns1="http://xmlns.oracle.com/adf/svc/types/"; 
xmlns:ns0="http://xmlns.oracle.com/apps/financials/commonModules/shared/model/erpIntegrationService/";
 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"; 
xsi:type="ns0:DocumentDetails">http://www.w3.org/2004/08/xop/include"; 
href="cid:51e0b71c-160b-4921-a8a7-8fe7f87ccc3b"/>zipESS_L_157463G4S.Integration.UserAttachments157463.zip
--=_Part_4706_434840889.1459343688908
Content-Transfer-Encoding: binary
Content-ID: <51e0b71c-160b-4921-a8a7-8fe7f87ccc3b>

PK157463.log�XKS�8��W��jTL�  .. blah blah some binary content
--=_Part_4706_434840889.1459343688908--


I am using below XML DSL code:











Basic ZzRzLmludGVncmF0aW9uLnVzZXI6RnVzaW9uQDEyMw==





...





Marshalling works fine since i can see my webservice call has been invoked and 
response coming back. unmarshalling would obviously not work directly since the 
message is not a pure soap msg but A multipart message

I checked online for mime multipart data format however i do not see any 
example of xml DSL + i could not use it in my jboss dev studio since it does 
not have this dataformat at all (dont know why)

My objectives:
1. to be able to process/ fetch out the soap envelope part from this multipart 
soap response using XML DSL
2. to be able to process the binary content of multipart message since that is 
my attachment using XML DSL.

Request you all to help. Badly stuck at this point
Thanks,
Ekta




This message is for the designated recipient only and may contain privileged, 
proprietary, or otherwise confidential information. If you have received it in 
error, please notify the sender immediately and delete the original. Any other 
use of the e-mail by you is prohibited. Where allowed by local law, electronic 
communications with Accenture and its affiliates, including e-mail and instant 
messaging (including content), may be scanned by our systems for the purposes 
of information security and assessment of internal compliance with Accenture 
policy.
__

www.accenture.com