You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Giao <gq...@yahoo.com> on 2007/07/16 17:49:00 UTC

MTOM & WS Security

Hi,

We use Axis 1.3 and SWA on the server side in
production.  We're starting to develop using Axis2
because of MTOM support and .NET client compatibility.

We have successfully tested both Axis2 and .NET/WSE
3.0 clients against the MTOM Sample app.

Once I enable security with
"ServiceClient.engageModule(new QName("rampart"))  the
outgoing message has the attachment in-line (in XML
envelope) and
 base64 encoded, rather than has the expected
<xop:Include href="cid...">  Also the content length
now is 33% larger because of base64 encoding.  It
still works, although the capacity is now limited to
about 20MB before the server gets an out of memory
error.  Previously I was testing with about 50MB.

I didn't see any mention in the OASIS WSS v1.0 specs
about MTOM.

Is there any way around this limitation?


Thanks in advance,
Giao



       
____________________________________________________________________________________
Got a little couch potato? 
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz 

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: Fwd: MTOM & WS Securi

Posted by Dimuthu Leelaratne <di...@gmail.com>.
Hi Giao,

>From your code I can see that you are using a code generated client.
Therefore "optimizeParts" won't work for you.

We cannot optimize this due to a bug in Rampart-29. It will be fixed
with the Rampart-29 bug.

Regards,
Dimuthu

On 7/18/07, Giao <gq...@yahoo.com> wrote:
> Hi Dimuthu,
>
> I apologize I do not know how to set optimizeParts or
> deal with mtom policy.  If you could show me that
> would help tremendously.
>
> I'm using Axis2 1.1.1 and Rampart 1.1
> The security part of the client code is taken from
> rampart sample11.
>
> The attachment is just a simple text file with "ABC"
>
> ConfigurationContext configctx =
> ConfigurationContextFactory.
>         createConfigurationContextFromFileSystem(
>                         "./src", "./src/conf/axis2.xml");
>
> MTOMSampleStub serviceStub = new
> MTOMSampleStub(configctx,
>
> "http://localhost:8080/MTOMSample/services/MTOMSample");
>
> /**
>  Construct datahandler & request object here
> ...
> */
>
>
> OutflowConfiguration ofc = new OutflowConfiguration();
> ofc.setUser("USER");
> ofc.setActionItems("UsernameToken Timestamp");
> ofc.setPasswordCallbackClass("PWCallbackHandler");
> ofc.setPasswordType("PasswordText");
>
> serviceStub._getServiceClient().getOptions().setProperty(
> WSSHandlerConstants.OUTFLOW_SECURITY,
> ofc.getProperty() );
>
> serviceStub._getServiceClient().engageModule(new
> QName("rampart"));
> serviceStub._getServiceClient().getOptions().setProperty(Constants.ATTR_MUST_UNDERSTAND,
> "0");
>
> serviceStub._getServiceClient().getOptions().setProperty(
> Constants.Configuration.ENABLE_MTOM,
> Constants.VALUE_TRUE);
>
> String response =
> serviceStub.attachment(attachmentRequest).getAttachmentResponse();
>
> TCPMonitor:
> POST /MTOMSample/services/MTOMSample HTTP/1.1
> User-Agent: Axis2
> Host: 127.0.0.1:8080
> Content-Length: 1719
> Content-Type: multipart/related;
> boundary=MIMEBoundaryurn_uuid_132853B9DEA885E7521184772489314;
> type="application/xop+xml"; start="...
>
> <soapenv:Header>
> UsernameToken stuff...
> </soapenv:Header>
>
> <soapenv:Body>
> ...
> <binaryData
> xmlns:axis2ns1="http://www.w3.org/2005/05/xmlmime"
> axis2ns1:contentType="text/plain"><base64Binary
> xmlns="http://www.w3.org/2001/XMLSchema">QUJD</base64Binary></binaryData>
>
> --Attachment is not optimized but left as base64
> encoded - "QUJD"
>
> Thanks a million.
> Giao
>
> --- Dimuthu <mu...@apache.org> wrote:
>
> > Hi,
> >
> > Did you specify the optimize parts element
> > "OptimizeParts" with the
> > xpaths?
> >
> > Did you specify the mtom policy as
> > <wsoma:OptimizedMimeSerialization/> ?
> >
> > What version of rampart are u using?
> >
> > If the problem exist, please file a JIRA.
> >
> > Regards,
> > Dimuthu
> >
> >
> >
> > On Tue, 2007-07-17 at 15:00 +0530, Thilina
> > Gunarathne wrote:
> > > May be rampart guys can  answer this better...
> > >
> > > Thanks,
> > > Thilina
> > >
> > > ---------- Forwarded message ----------
> > > From: Giao <gq...@yahoo.com>
> > > Date: Jul 16, 2007 9:19 PM
> > > Subject: MTOM & WS Securit
> > > To: axis-user@ws.apache.org
> > >
> > >
> > > Hi,
> > >
> > > We use Axis 1.3 and SWA on the server side in
> > > production.  We're starting to develop using Axis2
> > > because of MTOM support and .NET client
> > compatibility.
> > >
> > > We have successfully tested both Axis2 and
> > .NET/WSE
> > > 3.0 clients against the MTOM Sample app.
> > >
> > > Once I enable security with
> > > "ServiceClient.engageModule(new QName("rampart"))
> > the
> > > outgoing message has the attachment in-line (in
> > XML
> > > envelope) and
> > >  base64 encoded, rather than has the expected
> > > <xop:Include href="cid...">  Also the content
> > length
> > > now is 33% larger because of base64 encoding.  It
> > > still works, although the capacity is now limited
> > to
> > > about 20MB before the server gets an out of memory
> > > error.  Previously I was testing with about 50MB.
> > >
> > > I didn't see any mention in the OASIS WSS v1.0
> > specs
> > > about MTOM.
> > >
> > > Is there any way around this limitation?
> > >
> > >
> > > Thanks in advance,
> > > Giao
> > >
> > >
> > >
> > >
> > >
> >
> ____________________________________________________________________________________
> > > Got a little couch potato?
> > > Check out fun summer activities for kids.
> > >
> >
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> > >
> > >
> >
> ---------------------------------------------------------------------
> > > To unsubscribe, e-mail:
> > axis-user-unsubscribe@ws.apache.org
> > > For additional commands, e-mail:
> > axis-user-help@ws.apache.org
> > >
> > >
> > >
> >
> >
>
>
> Giao
>
>
>
> ____________________________________________________________________________________Ready for the edge of your seat?
> Check out tonight's top picks on Yahoo! TV.
> http://tv.yahoo.com/
>

Re: Fwd: MTOM & WS Securit

Posted by Giao <gq...@yahoo.com>.
Hi Dimuthu,

I apologize I do not know how to set optimizeParts or
deal with mtom policy.  If you could show me that
would help tremendously.

I'm using Axis2 1.1.1 and Rampart 1.1
The security part of the client code is taken from
rampart sample11.

The attachment is just a simple text file with "ABC"

ConfigurationContext configctx =
ConfigurationContextFactory.
        createConfigurationContextFromFileSystem(
        		"./src", "./src/conf/axis2.xml");

MTOMSampleStub serviceStub = new
MTOMSampleStub(configctx,
     
"http://localhost:8080/MTOMSample/services/MTOMSample");

/**
 Construct datahandler & request object here
...
*/


OutflowConfiguration ofc = new OutflowConfiguration();
ofc.setUser("USER");
ofc.setActionItems("UsernameToken Timestamp");
ofc.setPasswordCallbackClass("PWCallbackHandler");
ofc.setPasswordType("PasswordText");

serviceStub._getServiceClient().getOptions().setProperty(
WSSHandlerConstants.OUTFLOW_SECURITY,
ofc.getProperty() );

serviceStub._getServiceClient().engageModule(new
QName("rampart"));
serviceStub._getServiceClient().getOptions().setProperty(Constants.ATTR_MUST_UNDERSTAND,
"0");

serviceStub._getServiceClient().getOptions().setProperty(
Constants.Configuration.ENABLE_MTOM,
Constants.VALUE_TRUE);

String response =
serviceStub.attachment(attachmentRequest).getAttachmentResponse();

TCPMonitor:
POST /MTOMSample/services/MTOMSample HTTP/1.1
User-Agent: Axis2
Host: 127.0.0.1:8080
Content-Length: 1719
Content-Type: multipart/related;
boundary=MIMEBoundaryurn_uuid_132853B9DEA885E7521184772489314;
type="application/xop+xml"; start="...

<soapenv:Header>
UsernameToken stuff...
</soapenv:Header>

<soapenv:Body>
...
<binaryData
xmlns:axis2ns1="http://www.w3.org/2005/05/xmlmime"
axis2ns1:contentType="text/plain"><base64Binary
xmlns="http://www.w3.org/2001/XMLSchema">QUJD</base64Binary></binaryData>

--Attachment is not optimized but left as base64
encoded - "QUJD"

Thanks a million.
Giao

--- Dimuthu <mu...@apache.org> wrote:

> Hi,
> 
> Did you specify the optimize parts element
> "OptimizeParts" with the
> xpaths?
> 
> Did you specify the mtom policy as
> <wsoma:OptimizedMimeSerialization/> ?
> 
> What version of rampart are u using?
> 
> If the problem exist, please file a JIRA. 
> 
> Regards,
> Dimuthu
> 
> 
> 
> On Tue, 2007-07-17 at 15:00 +0530, Thilina
> Gunarathne wrote:
> > May be rampart guys can  answer this better...
> > 
> > Thanks,
> > Thilina
> > 
> > ---------- Forwarded message ----------
> > From: Giao <gq...@yahoo.com>
> > Date: Jul 16, 2007 9:19 PM
> > Subject: MTOM & WS Securit
> > To: axis-user@ws.apache.org
> > 
> > 
> > Hi,
> > 
> > We use Axis 1.3 and SWA on the server side in
> > production.  We're starting to develop using Axis2
> > because of MTOM support and .NET client
> compatibility.
> > 
> > We have successfully tested both Axis2 and
> .NET/WSE
> > 3.0 clients against the MTOM Sample app.
> > 
> > Once I enable security with
> > "ServiceClient.engageModule(new QName("rampart")) 
> the
> > outgoing message has the attachment in-line (in
> XML
> > envelope) and
> >  base64 encoded, rather than has the expected
> > <xop:Include href="cid...">  Also the content
> length
> > now is 33% larger because of base64 encoding.  It
> > still works, although the capacity is now limited
> to
> > about 20MB before the server gets an out of memory
> > error.  Previously I was testing with about 50MB.
> > 
> > I didn't see any mention in the OASIS WSS v1.0
> specs
> > about MTOM.
> > 
> > Is there any way around this limitation?
> > 
> > 
> > Thanks in advance,
> > Giao
> > 
> > 
> > 
> > 
> >
>
____________________________________________________________________________________
> > Got a little couch potato?
> > Check out fun summer activities for kids.
> >
>
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> > 
> >
>
---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> axis-user-unsubscribe@ws.apache.org
> > For additional commands, e-mail:
> axis-user-help@ws.apache.org
> > 
> > 
> > 
> 
> 


Giao


       
____________________________________________________________________________________Ready for the edge of your seat? 
Check out tonight's top picks on Yahoo! TV. 
http://tv.yahoo.com/

Re: Fwd: MTOM & WS Securit

Posted by Dimuthu <mu...@apache.org>.
Hi,

Did you specify the optimize parts element "OptimizeParts" with the
xpaths?

Did you specify the mtom policy as <wsoma:OptimizedMimeSerialization/> ?

What version of rampart are u using?

If the problem exist, please file a JIRA. 

Regards,
Dimuthu



On Tue, 2007-07-17 at 15:00 +0530, Thilina Gunarathne wrote:
> May be rampart guys can  answer this better...
> 
> Thanks,
> Thilina
> 
> ---------- Forwarded message ----------
> From: Giao <gq...@yahoo.com>
> Date: Jul 16, 2007 9:19 PM
> Subject: MTOM & WS Securit
> To: axis-user@ws.apache.org
> 
> 
> Hi,
> 
> We use Axis 1.3 and SWA on the server side in
> production.  We're starting to develop using Axis2
> because of MTOM support and .NET client compatibility.
> 
> We have successfully tested both Axis2 and .NET/WSE
> 3.0 clients against the MTOM Sample app.
> 
> Once I enable security with
> "ServiceClient.engageModule(new QName("rampart"))  the
> outgoing message has the attachment in-line (in XML
> envelope) and
>  base64 encoded, rather than has the expected
> <xop:Include href="cid...">  Also the content length
> now is 33% larger because of base64 encoding.  It
> still works, although the capacity is now limited to
> about 20MB before the server gets an out of memory
> error.  Previously I was testing with about 50MB.
> 
> I didn't see any mention in the OASIS WSS v1.0 specs
> about MTOM.
> 
> Is there any way around this limitation?
> 
> 
> Thanks in advance,
> Giao
> 
> 
> 
> 
> ____________________________________________________________________________________
> Got a little couch potato?
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 


Re: Fwd: MTOM & WS Securit

Posted by Dimuthu <mu...@apache.org>.
Hi,

Did you specify the optimize parts element "OptimizeParts" with the
xpaths?

Did you specify the mtom policy as <wsoma:OptimizedMimeSerialization/> ?

What version of rampart are u using?

If the problem exist, please file a JIRA. 

Regards,
Dimuthu



On Tue, 2007-07-17 at 15:00 +0530, Thilina Gunarathne wrote:
> May be rampart guys can  answer this better...
> 
> Thanks,
> Thilina
> 
> ---------- Forwarded message ----------
> From: Giao <gq...@yahoo.com>
> Date: Jul 16, 2007 9:19 PM
> Subject: MTOM & WS Securit
> To: axis-user@ws.apache.org
> 
> 
> Hi,
> 
> We use Axis 1.3 and SWA on the server side in
> production.  We're starting to develop using Axis2
> because of MTOM support and .NET client compatibility.
> 
> We have successfully tested both Axis2 and .NET/WSE
> 3.0 clients against the MTOM Sample app.
> 
> Once I enable security with
> "ServiceClient.engageModule(new QName("rampart"))  the
> outgoing message has the attachment in-line (in XML
> envelope) and
>  base64 encoded, rather than has the expected
> <xop:Include href="cid...">  Also the content length
> now is 33% larger because of base64 encoding.  It
> still works, although the capacity is now limited to
> about 20MB before the server gets an out of memory
> error.  Previously I was testing with about 50MB.
> 
> I didn't see any mention in the OASIS WSS v1.0 specs
> about MTOM.
> 
> Is there any way around this limitation?
> 
> 
> Thanks in advance,
> Giao
> 
> 
> 
> 
> ____________________________________________________________________________________
> Got a little couch potato?
> Check out fun summer activities for kids.
> http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
> 
> 
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


Fwd: MTOM & WS Securit

Posted by Thilina Gunarathne <cs...@gmail.com>.
May be rampart guys can  answer this better...

Thanks,
Thilina

---------- Forwarded message ----------
From: Giao <gq...@yahoo.com>
Date: Jul 16, 2007 9:19 PM
Subject: MTOM & WS Securit
To: axis-user@ws.apache.org


Hi,

We use Axis 1.3 and SWA on the server side in
production.  We're starting to develop using Axis2
because of MTOM support and .NET client compatibility.

We have successfully tested both Axis2 and .NET/WSE
3.0 clients against the MTOM Sample app.

Once I enable security with
"ServiceClient.engageModule(new QName("rampart"))  the
outgoing message has the attachment in-line (in XML
envelope) and
 base64 encoded, rather than has the expected
<xop:Include href="cid...">  Also the content length
now is 33% larger because of base64 encoding.  It
still works, although the capacity is now limited to
about 20MB before the server gets an out of memory
error.  Previously I was testing with about 50MB.

I didn't see any mention in the OASIS WSS v1.0 specs
about MTOM.

Is there any way around this limitation?


Thanks in advance,
Giao




____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

Fwd: MTOM & WS Securit

Posted by Thilina Gunarathne <cs...@gmail.com>.
May be rampart guys can  answer this better...

Thanks,
Thilina

---------- Forwarded message ----------
From: Giao <gq...@yahoo.com>
Date: Jul 16, 2007 9:19 PM
Subject: MTOM & WS Securit
To: axis-user@ws.apache.org


Hi,

We use Axis 1.3 and SWA on the server side in
production.  We're starting to develop using Axis2
because of MTOM support and .NET client compatibility.

We have successfully tested both Axis2 and .NET/WSE
3.0 clients against the MTOM Sample app.

Once I enable security with
"ServiceClient.engageModule(new QName("rampart"))  the
outgoing message has the attachment in-line (in XML
envelope) and
 base64 encoded, rather than has the expected
<xop:Include href="cid...">  Also the content length
now is 33% larger because of base64 encoding.  It
still works, although the capacity is now limited to
about 20MB before the server gets an out of memory
error.  Previously I was testing with about 50MB.

I didn't see any mention in the OASIS WSS v1.0 specs
about MTOM.

Is there any way around this limitation?


Thanks in advance,
Giao




____________________________________________________________________________________
Got a little couch potato?
Check out fun summer activities for kids.
http://search.yahoo.com/search?fr=oni_on_mail&p=summer+activities+for+kids&cs=bz

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org



-- 
Thilina Gunarathne  -  http://www.wso2.com - http://thilinag.blogspot.com

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org