JIRA

  • Log In Access more options
    • Online Help
    • GreenHopper Help
    • Agile Answers
    • Use Agile By Default
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What’s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Agile Access more options (Alt+g)
  • Create Issue
  • Mule
  • MULE-4103

Missing attachment using mtom proxy

  • Agile Board
  • More Actions
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 2.1.2
  • Fix Version/s: ITR15, 2.2
  • Component/s: Core: Streaming, Modules: CXF
  • Labels:
    • SR
  • Environment:

    JDK: 1.6.0_07 (mixed mode)
    Encoding: OS: ISO-8859-15, Mule: UTF-8
    OS: Linux (2.6.9-78.0.5.ELsmp, i386)

  • User impact:
    High
  • Effort points:
    1
  • Configuration:
    Hide

    <service name="sved">
    <inbound>
    <cxf:inbound-endpoint
    address="$config{SvedWebService.inbound.url}"
    proxy="true" mtomEnabled="true">
    </cxf:inbound-endpoint>
    </inbound>
    <outbound>
    <pass-through-router>
    <cxf:outbound-endpoint
    address="$config{SvedWebService.outbound.url}"
    proxy="true" mtomEnabled="true">
    </cxf:outbound-endpoint>
    </pass-through-router>
    </outbound>
    </service>

    Show
    <service name="sved"> <inbound> <cxf:inbound-endpoint address="$config{SvedWebService.inbound.url}" proxy="true" mtomEnabled="true"> </cxf:inbound-endpoint> </inbound> <outbound> <pass-through-router> <cxf:outbound-endpoint address="$config{SvedWebService.outbound.url}" proxy="true" mtomEnabled="true"> </cxf:outbound-endpoint> </pass-through-router> </outbound> </service>
  • Similar Issues:
    None

Description

We have a problem when using MTOM with a proxy endpoint in Mule. The problem is that the response from Mule
seem to miss the attachment? Please see the below examples (copied from SoapUI's raw content) when we use the
proxy or call the service directly. Further down is also the raw output sent from SoapUI.

I'm grateful for any help,

//Lennart

--------------------------------------------------------------------
– Response via Mule
--------------------------------------------------------------------
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Date: Fri, 16 Jan 2009 02:09:14 CET
Expires: Fri, 16 Jan 2009 02:09:14 CET
Connection: close
Content-Type: multipart/related; type="application/xop+xml"; boundary="----=_Part_0_25290750.1232111354368"; start="<root.message@cxf.apache.org>"; start-info="text/xml"
Server: Mule Core/2.1.2

------=_Part_0_25290750.1232111354368
Content-Type: application/xop+xml; charset=UTF-8; type="text/xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><ns2:encryptElementResponse xmlns:ns2="http://canis.ppm.nu/SvedWebService1"><return><data><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:a5f6e8c7-cfa8-43bd-888b-097994dcb021@http%3A%2F%2Fcxf.apache.org%2F" /></data></return></ns2:encryptElementResponse></soap:Body></soap:Envelope>
-----=_Part_0_25290750.1232111354368-

--------------------------------------------------------------------
– Direct from service:
--------------------------------------------------------------------

HTTP/1.1 200 OK
Date: Fri, 16 Jan 2009 13:09:47 GMT
Content-Length: 2938
Connection: close
Content-Type: multipart/related; type="application/xop+xml"; boundary="----=_Part_0_12189822.1232111387542"; start="<root.message@cxf.apache.org>"; start-info="application/soap+xml"
Server: Apache-Coyote/1.1

------=_Part_0_12189822.1232111387542
Content-Type: application/xop+xml; charset=UTF-8; type="application/soap+xml";
Content-Transfer-Encoding: binary
Content-ID: <root.message@cxf.apache.org>

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope"><soap:Body><ns2:encryptElementResponse xmlns:ns2="http://canis.ppm.nu/SvedWebService1"><return><data><xop:Include xmlns:xop="http://www.w3.org/2004/08/xop/include" href="cid:1dfda31b-ce38-48b0-b1f6-1e0c1e66e78c@http%3A%2F%2Fcxf.apache.org%2F"/></data></return></ns2:encryptElementResponse></soap:Body></soap:Envelope>
------=_Part_0_12189822.1232111387542
Content-Type: application/octet-stream
Content-Transfer-Encoding: binary
Content-ID: <1dfda31b-ce38-48b0-b1f6-1e0c1e66e78c@http%3A%2F%2Fcxf.apache.org%2F>

<?xml version="1.0" encoding="UTF-8"?>
<xenc:EncryptedData Type="http://www.w3.org/2001/04/xmlenc#Element" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#aes128-cbc" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"/><ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
<xenc:EncryptedKey xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:EncryptionMethod Algorithm="http://www.w3.org/2001/04/xmlenc#rsa-1_5" xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"/><xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">PbIhXZ/t6laTZEZ5qucxFA5HL2edgKILwscFNIB7N3+Z4rSb5sHe/8kV6pF7VExsTwHmxiyHM8G/
01wU2emW3KcuWzvRiMhxnYeF2NupHCFK1GV7oMHcNtxeLJSQxj9TD5iTdz1+0hrGO92EL04wMQC4
9NCg4svEQr6TFcCGJL4=</xenc:CipherValue></xenc:CipherData></xenc:EncryptedKey><ds:X509Data>
<ds:X509SubjectName>CN=signer.ppm.nu,OU=IT Avdelning,O=PPM,C=SE</ds:X509SubjectName>
<ds:X509Certificate>
MIICSjCCAbOgAwIBAgIESPXj7zANBgkqhkiG9w0BAQUFADBIMQswCQYDVQQGEwJTRTEMMAoGA1UE
ChMDUFBNMRUwEwYDVQQLEwxJVCBBdmRlbG5pbmcxFDASBgNVBAMTC1BQTSBUZXN0IENBMB4XDTA4
MTAxNTEyMzcwM1oXDTEwMTAxNDEyMzcwM1owSjELMAkGA1UEBhMCU0UxDDAKBgNVBAoTA1BQTTEV
MBMGA1UECxMMSVQgQXZkZWxuaW5nMRYwFAYDVQQDEw1zaWduZXIucHBtLm51MIGfMA0GCSqGSIb3
DQEBAQUAA4GNADCBiQKBgQCJwWVH9ihWDLd2uNOU0XBWPbc+oAH9oNC20QdhzJ/Pajyfz2m5K1Ml
F/JVsu++IeouMLvwXFijWmJU3l2fFMCtktf7OzEGa2zoEGR4PEO95xN6RCIV/VAzbXQN15RL95z2
5IsKdsjJ4ylLZiUwW6prgztdJesRb2lSQIC8/SHrLQIDAQABoz8wPTAdBgNVHQ4EFgQUtew+AV5X
zJqbxgZbIVXB2Q/w+9EwDgYDVR0PAQH/BAQDAgO4MAwGA1UdEwQFMAMCAQAwDQYJKoZIhvcNAQEF
BQADgYEAQiGkgwnl9kc1mNqs2G75f+5xvhbhNBX1Wn85+KT3v4ez1tFm1JcTUTCmIuuAJvYtHJhs
4aHZ/sXBWWtNhBPTqPedrwAXUQBMoST9qzhpUKX6BHzbP+HtipTF495W0heFjma4kYtFweCtYBZP
nD+u775zlp1Uf1CJATjbq3AwsH0=
</ds:X509Certificate>
</ds:X509Data>
</ds:KeyInfo><xenc:CipherData xmlns:xenc="http://www.w3.org/2001/04/xmlenc#"><xenc:CipherValue xmlns:xenc="http://www.w3.org/2001/04/xmlenc#">exX94lqZD7wUIaEkcni7l4QlLTuyC5oJCK1Rmslju617vlpGcS9ZOs/YYGZEXPyw</xenc:CipherValue></xenc:CipherData></xenc:EncryptedData>
-----=_Part_0_12189822.1232111387542-

--------------------------------------------------------------------
– Sent from SoapUI
--------------------------------------------------------------------
MIME-Version: 1.0
Host: dsoaesb1:18089
Content-Length: 801
User-Agent: Jakarta Commons-HttpClient/3.0.1
Content-Type: multipart/related; type="application/soap+xml"; start="<rootpart@soapui.org>"; boundary="----=_Part_11_21882858.1232111353525"
Connection: close

------=_Part_11_21882858.1232111353525
Content-Type: application/soap+xml; charset=UTF-8
Content-Transfer-Encoding: 8bit
Content-ID: <rootpart@soapui.org>

<soap:Envelope xmlns:soap="http://www.w3.org/2003/05/soap-envelope" xmlns:sved="http://canis.ppm.nu/SvedWebService1">
<soap:Header/>
<soap:Body>
<sved:encryptElement>
<element>
<data>PHRlc3Q+IyMjIzwvdGVzdD4=</data>
</element>
<recipientIdentifier>ppm</recipientIdentifier>
<policyName>testPolicy</policyName>
</sved:encryptElement>
</soap:Body>
</soap:Envelope>
------=_Part_11_21882858.1232111353525
Content-Type: text/xml; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-ID: <455350046602>

<test>####</test>
-----=_Part_11_21882858.1232111353525-

--------------------------------------------------------------------
– Configuration used
--------------------------------------------------------------------
<service name="sved">
<inbound>
<cxf:inbound-endpoint
address="$config{SvedWebService.inbound.url}"
proxy="true" mtomEnabled="true">
</cxf:inbound-endpoint>
</inbound>
<outbound>
<pass-through-router>
<cxf:outbound-endpoint
address="$config{SvedWebService.outbound.url}"
proxy="true" mtomEnabled="true">
</cxf:outbound-endpoint>
</pass-through-router>
</outbound>
</service>

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
  • Transitions
  • Commits
  • Source
  • Builds
Hide
Permalink
Daniel Zapata added a comment - 20/Jan/09 12:15 PM

Missing feature

Show
Daniel Zapata added a comment - 20/Jan/09 12:15 PM Missing feature
Hide
Permalink
Lennart Häggkvist added a comment - 27/Jan/09 04:39 AM

Do you have any time estimate when this bug can be fixed? This is a blocking bug for us - we cant use Mule without this.

Show
Lennart Häggkvist added a comment - 27/Jan/09 04:39 AM Do you have any time estimate when this bug can be fixed? This is a blocking bug for us - we cant use Mule without this.
Hide
Permalink
Daniel Zapata added a comment - 27/Jan/09 11:50 AM

Dan please take a look and scope it out.

Show
Daniel Zapata added a comment - 27/Jan/09 11:50 AM Dan please take a look and scope it out.
Hide
Permalink
Dan Diephouse added a comment - 27/Jan/09 12:44 PM

This is a known issue, currently CXF proxies only copy the SOAP Body. I'm not sure on exact time line to get this fixed yet.

Show
Dan Diephouse added a comment - 27/Jan/09 12:44 PM This is a known issue, currently CXF proxies only copy the SOAP Body. I'm not sure on exact time line to get this fixed yet.
Hide
Permalink
Ross Mason added a comment - 27/Jan/09 02:06 PM

Dan, does this mean we will need a fix in CXF to fix this?

Show
Ross Mason added a comment - 27/Jan/09 02:06 PM Dan, does this mean we will need a fix in CXF to fix this?
Hide
Permalink
Dan Diephouse added a comment - 27/Jan/09 02:12 PM

No, I mean I just never implemented this functionality inside the Mule/CXF proxy.

Show
Dan Diephouse added a comment - 27/Jan/09 02:12 PM No, I mean I just never implemented this functionality inside the Mule/CXF proxy.
Hide
Permalink
Ken Yagen added a comment - 27/Jan/09 03:54 PM

Reclassifying as a CXF transport improvement.

Show
Ken Yagen added a comment - 27/Jan/09 03:54 PM Reclassifying as a CXF transport improvement.
Hide
Permalink
Per Ejeklint added a comment - 28/Jan/09 09:30 AM

I chime in on Lennarts question about an estimate. We have to decide on a solution ASAP and if we can't expect a fix within a pretty short period we have to find another solution than Mule - for this particular need at least. This is a real blocker since MTOM is essential to us.

Show
Per Ejeklint added a comment - 28/Jan/09 09:30 AM I chime in on Lennarts question about an estimate. We have to decide on a solution ASAP and if we can't expect a fix within a pretty short period we have to find another solution than Mule - for this particular need at least. This is a real blocker since MTOM is essential to us.
Hide
Permalink
Dan Diephouse added a comment - 28/Jan/09 04:13 PM - edited

Folks, I understand that you're looking for an estimate, but currently I don't know that we have the bandwidth to fully implement and test a solution to this at this exact second. However, I can give you some pointers on how to implement this on your own.

1. Create an incoming CXF Interceptor for your server proxy which copies the CXF Message into the MuleEvent.

public void handle(Message cxfMessage) {
MuleEvent event = (MuleEvent) cxfMessage.get(MuleProperties.MULE_EVENT_PROPERTY);
event.setProperty("cxfmessage", cxfMessage);
}
(This can be installed in any cxf phase)

2. Create an outgoing CXF interceptor for your cxf client proxy (which invokes the web service that you're proxying) that copies the attachments from the original message to the output message

public void handle(Message outgoingCxfMessage) {
MuleEvent event = (MuleEvent) message.getExchange().get(MULE_EVENT_PROPERTY);
Message incomingCxfMessage = (Message) event.getProperty("cxfmessage");
outgoingCxfMessage.setAttachments(incomingCxfMessage);
}

(this needs to run in one of the first CXF interceptor phases. PRE_SETUP maybe? See the Phase class for options)

3. configure your proxiies to use these interceptors

<cxf:inbound-endpoint ... proxy="true" mtom-enabled="true">
<cxf:inInterceptors>
<bean class="....InterceptorFromNumber1"/>
</cxf:inInterceptors>
</cxf:inbound-endpoint>

<cxf:outbound-endpoint ... proxy="true" mtom-enabled="true">
<cxf:inInterceptors>
<bean class="....InterceptorFromNumber2"/>
</cxf:inInterceptors>
</cxf:outbound-endpoint>

I would also take a peak at AttachmentOutInterceptor. Looks like the WRITE_ATTACHMENTS flag might need to be set as well.

Hope that helps. It is just a rough outline of a solution though. And patches are of course welcome

Show
Dan Diephouse added a comment - 28/Jan/09 04:13 PM - edited Folks, I understand that you're looking for an estimate, but currently I don't know that we have the bandwidth to fully implement and test a solution to this at this exact second. However, I can give you some pointers on how to implement this on your own. 1. Create an incoming CXF Interceptor for your server proxy which copies the CXF Message into the MuleEvent. public void handle(Message cxfMessage) { MuleEvent event = (MuleEvent) cxfMessage.get(MuleProperties.MULE_EVENT_PROPERTY); event.setProperty("cxfmessage", cxfMessage); } (This can be installed in any cxf phase) 2. Create an outgoing CXF interceptor for your cxf client proxy (which invokes the web service that you're proxying) that copies the attachments from the original message to the output message public void handle(Message outgoingCxfMessage) { MuleEvent event = (MuleEvent) message.getExchange().get(MULE_EVENT_PROPERTY); Message incomingCxfMessage = (Message) event.getProperty("cxfmessage"); outgoingCxfMessage.setAttachments(incomingCxfMessage); } (this needs to run in one of the first CXF interceptor phases. PRE_SETUP maybe? See the Phase class for options) 3. configure your proxiies to use these interceptors <cxf:inbound-endpoint ... proxy="true" mtom-enabled="true"> <cxf:inInterceptors> <bean class="....InterceptorFromNumber1"/> </cxf:inInterceptors> </cxf:inbound-endpoint> <cxf:outbound-endpoint ... proxy="true" mtom-enabled="true"> <cxf:inInterceptors> <bean class="....InterceptorFromNumber2"/> </cxf:inInterceptors> </cxf:outbound-endpoint> I would also take a peak at AttachmentOutInterceptor. Looks like the WRITE_ATTACHMENTS flag might need to be set as well. Hope that helps. It is just a rough outline of a solution though. And patches are of course welcome
Hide
Permalink
Dan Diephouse added a comment - 10/Feb/09 04:07 PM

Folks, I fixed this in the 2.2 tree: http://fisheye.codehaus.org/changelog/mule/?cs=13995

Show
Dan Diephouse added a comment - 10/Feb/09 04:07 PM Folks, I fixed this in the 2.2 tree: http://fisheye.codehaus.org/changelog/mule/?cs=13995

People

  • Assignee:
    Dan Diephouse
    Reporter:
    Lennart Häggkvist
Vote (0)
Watch (1)

Dates

  • Created:
    16/Jan/09 07:48 AM
    Updated:
    10/Feb/09 04:07 PM
    Resolved:
    10/Feb/09 04:07 PM

Agile

  • View on Board
  • Atlassian JIRA (v5.0.7#734-sha1:8ad78a6)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for MuleForge. Try JIRA - bug tracking software for your team.