RE: How to enable mtom on the embedded server?

2007-07-18 Thread Clough, Samuel \(USPC.PRG.Atlanta\)
Thanks, that helps.  Just so I understand this, does this mean CXF no
longer supports using MTOM via Aegis binding when using the embedded
Jetty instance like Xfire did? 

-Original Message-
From: Freeman Fang [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 10:28 PM
To: cxf-user@incubator.apache.org
Subject: Re: How to enable mtom on the embedded server?

Hi Samuel,

javax.xml.ws.soap.SOAPBinding is class from jax-ws api, so you need make
your service jaxws compatible
add jaxws BindingType annotation into your TestServiceImpl
@BindingType (value = SoapBinding.SOAP11HTTP_MTOM_BINDING)
And use JaxWsServerFactoryBean instead of ServerFactoryBean to create
your server.
You can get more details from JaxWsServerFactoryBean.

Best Regards
Freeman




Clough, Samuel (USPC.PRG.Atlanta) wrote:
 Ok, I'm trying to add this to a service hosted by the
ServerFactoryBean
 (the way specified in the Xfire migration guide) .

 If I do the following to get to the binding to turn on MTOM:

 ServerFactoryBean sf = new ServerFactoryBean();
 
 sf.getServiceFactory().setDataBinding(new AegisDatabinding());
 sf.setServiceBean(new TestServiceImpl());
 sf.setServiceClass(TestService.class);
 sf.setAddress(http://localhost:8192/test/TestService;);
 sf.create();

 SoapBinding binding = (SoapBinding)
 sf.getServer().getEndpoint().getBinding();

 I'm getting back a type of org.apache.cxf.binding.soap.SoapBinding
which
 has no option to turn on MTOM that I can see.  According to the
 documentation, I need to get back a type of
 javax.xml.ws.soap.SOAPBinding.  How do I start the service so that I'm
 getting SOAPBinding and can turn on the MTOM?

 -Original Message-
 From: Christopher Moesel [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 17, 2007 12:05 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: How to enable mtom on the embedded server?

 Hi Samuel,

 Have you looked at the MTOM documentation in the user guide?
 http://cwiki.apache.org/CXF20DOC/mtom.html

 If so, then what information is missing (or incorrect) that you need?

 -Chris

 -Original Message-
 From: Clough, Samuel (USPC.PRG.Atlanta)
 [mailto:[EMAIL PROTECTED] 
 Sent: Tuesday, July 17, 2007 10:39 AM
 To: cxf-user@incubator.apache.org
 Subject: RE: How to enable mtom on the embedded server?

 We're trying to convert some services off of XFire and onto CXF.  On
 XFire, the following would automatically enable MTOM for any types in
a
 service that returned a byte array:
  
 Service service = serviceFactory.create(FeedbackFilesService.class);
 service.setInvoker(new BeanInvoker(new FeedbackFilesServiceImpl()));

 //enable MTOM to send the file contents more efficiently.
 service.setProperty(mtom-enabled, true);
  
 I cannot find how to do that easily using the new ServerFactoryBean
 approach.  How do I enable MTOM on a service using the embedded HTTP
 server? 
 

 Princeton Retirement Group, Inc - Important Terms 
 This E-mail is not intended for distribution to, or use by, any person
 or entity in any location where such distribution or use would be
 contrary to law or regulation, or which would subject Princeton
 Retirement Group, Inc. or any affiliate to any registration
requirement
 within such location. 
 This E-mail may contain privileged or confidential information or may
 otherwise be protected by work product immunity or other legal rules.
No
 confidentiality or privilege is waived or lost by any mistransmission.
 Access, copying or re-use of information by non-intended or
 non-authorized recipients is prohibited. If you are not an intended
 recipient of this E-mail, please notify the sender, delete it and do
not
 read, act upon, print, disclose, copy, retain or redistribute any
 portion of this E-mail. 
 The transmission and content of this E-mail cannot be guaranteed to be
 secure or error-free. Therefore, we cannot represent that the
 information in this E-mail is complete, accurate, uncorrupted, timely
or
 free of viruses, and Princeton Retirement Group, Inc. cannot accept
any
 liability for E-mails that have been altered in the course of
delivery.
 Princeton Retirement Group, Inc. reserves the right to monitor, review
 and retain all electronic communications, including E-mail, traveling
 through its networks and systems (subject to and in accordance with
 local laws). If any of your details are incorrect or if you no longer
 wish to receive mailings such as this by E-mail please contact the
 sender by reply E-mail. 

 

 


Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person or 
entity in any location where such distribution or use would be contrary to law 
or regulation, or which would subject Princeton Retirement Group, Inc. or any 
affiliate to any registration requirement

RE: How to enable mtom on the embedded server?

2007-07-18 Thread Clough, Samuel \(USPC.PRG.Atlanta\)
Thanks, that's exactly what I was looking for. 

-Original Message-
From: Dan Diephouse [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, July 18, 2007 12:23 PM
To: cxf-user@incubator.apache.org
Subject: Re: How to enable mtom on the embedded server?

Hi Samuel,

You CAN use MTOM with Aegis still. I updated our documentation to
reflect
this:

http://cwiki.apache.org/confluence/display/CXF20DOC/MTOM+Attachments

An excerpt:

If you're using the simple frontend you can set the mtom-enabled
property on
your ServerFactoryBean or ClientProxyFactoryBean:

MapString,Object props = new HashMapString, Object();
props.put(mtom-enabled, Boolean.TRUE); // Boolean.TRUE or true
will work as the property value here

ClientProxyFactoryBean pf = new ClientProxyFactoryBean();
pf.setPropertyies(props);

YourClient client = (YourClient) pf.create();

ServerFactoryBean sf = new ServerFactoryBean();
sf.setPropertyies(props);
...
sf.create();

 Similarly, you can use the XML configuration:

beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:simple=http://cxf.apache.org/simple;
xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
http://cxf.apache.org/simple http://cxf.apache.org/schema/simple.xsd;

  simple:server
id=helloWorld
serviceClass=demo.spring.HelloWorldImpl
address=http://localhost/HelloWorld;
simple:properties
  entry key=mtom-enabled value=true/
/simple:properties
  /simple:server

  simple:client
id=helloWorldClient
serviceClass=demo.spring.HelloWorldImpl
address=http://localhost/HelloWorld;
simple:properties
  entry key=mtom-enabled value=true/
/simple:properties
  /simple:client

/beans

Cheers,
- Dan


On 7/18/07, Clough, Samuel (USPC.PRG.Atlanta)
[EMAIL PROTECTED]
wrote:

 Thanks, that helps.  Just so I understand this, does this mean CXF no
 longer supports using MTOM via Aegis binding when using the embedded
 Jetty instance like Xfire did?

 -Original Message-
 From: Freeman Fang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 10:28 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: How to enable mtom on the embedded server?

 Hi Samuel,

 javax.xml.ws.soap.SOAPBinding is class from jax-ws api, so you need
make
 your service jaxws compatible
 add jaxws BindingType annotation into your TestServiceImpl
 @BindingType (value = SoapBinding.SOAP11HTTP_MTOM_BINDING)
 And use JaxWsServerFactoryBean instead of ServerFactoryBean to create
 your server.
 You can get more details from JaxWsServerFactoryBean.

 Best Regards
 Freeman




 Clough, Samuel (USPC.PRG.Atlanta) wrote:
  Ok, I'm trying to add this to a service hosted by the
 ServerFactoryBean
  (the way specified in the Xfire migration guide) .
 
  If I do the following to get to the binding to turn on MTOM:
 
  ServerFactoryBean sf = new ServerFactoryBean();
 
  sf.getServiceFactory().setDataBinding(new AegisDatabinding());
  sf.setServiceBean(new TestServiceImpl());
  sf.setServiceClass(TestService.class);
  sf.setAddress(http://localhost:8192/test/TestService;);
  sf.create();
 
  SoapBinding binding = (SoapBinding)
  sf.getServer().getEndpoint().getBinding();
 
  I'm getting back a type of org.apache.cxf.binding.soap.SoapBinding
 which
  has no option to turn on MTOM that I can see.  According to the
  documentation, I need to get back a type of
  javax.xml.ws.soap.SOAPBinding.  How do I start the service so that
I'm
  getting SOAPBinding and can turn on the MTOM?
 
  -Original Message-
  From: Christopher Moesel [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 17, 2007 12:05 PM
  To: cxf-user@incubator.apache.org
  Subject: RE: How to enable mtom on the embedded server?
 
  Hi Samuel,
 
  Have you looked at the MTOM documentation in the user guide?
  http://cwiki.apache.org/CXF20DOC/mtom.html
 
  If so, then what information is missing (or incorrect) that you
need?
 
  -Chris
 
  -Original Message-
  From: Clough, Samuel (USPC.PRG.Atlanta)
  [mailto:[EMAIL PROTECTED]
  Sent: Tuesday, July 17, 2007 10:39 AM
  To: cxf-user@incubator.apache.org
  Subject: RE: How to enable mtom on the embedded server?
 
  We're trying to convert some services off of XFire and onto CXF.  On
  XFire, the following would automatically enable MTOM for any types
in
 a
  service that returned a byte array:
 
  Service service = serviceFactory.create(FeedbackFilesService.class);
  service.setInvoker(new BeanInvoker(new FeedbackFilesServiceImpl()));
 
  //enable MTOM to send the file contents more efficiently.
  service.setProperty(mtom-enabled, true);
 
  I cannot find how to do that easily using the new ServerFactoryBean
  approach.  How do I enable MTOM on a service using the embedded HTTP
  server?
  
 
  Princeton Retirement Group, Inc - Important Terms
  This E-mail

RE: How to enable mtom on the embedded server?

2007-07-17 Thread Christopher Moesel
Hi Samuel,

Have you looked at the MTOM documentation in the user guide?
http://cwiki.apache.org/CXF20DOC/mtom.html

If so, then what information is missing (or incorrect) that you need?

-Chris

-Original Message-
From: Clough, Samuel (USPC.PRG.Atlanta)
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 10:39 AM
To: cxf-user@incubator.apache.org
Subject: RE: How to enable mtom on the embedded server?

We're trying to convert some services off of XFire and onto CXF.  On
XFire, the following would automatically enable MTOM for any types in a
service that returned a byte array:
 
Service service = serviceFactory.create(FeedbackFilesService.class);
service.setInvoker(new BeanInvoker(new FeedbackFilesServiceImpl()));
   
//enable MTOM to send the file contents more efficiently.
service.setProperty(mtom-enabled, true);
 
I cannot find how to do that easily using the new ServerFactoryBean
approach.  How do I enable MTOM on a service using the embedded HTTP
server? 


Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person
or entity in any location where such distribution or use would be
contrary to law or regulation, or which would subject Princeton
Retirement Group, Inc. or any affiliate to any registration requirement
within such location. 
This E-mail may contain privileged or confidential information or may
otherwise be protected by work product immunity or other legal rules. No
confidentiality or privilege is waived or lost by any mistransmission.
Access, copying or re-use of information by non-intended or
non-authorized recipients is prohibited. If you are not an intended
recipient of this E-mail, please notify the sender, delete it and do not
read, act upon, print, disclose, copy, retain or redistribute any
portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be
secure or error-free. Therefore, we cannot represent that the
information in this E-mail is complete, accurate, uncorrupted, timely or
free of viruses, and Princeton Retirement Group, Inc. cannot accept any
liability for E-mails that have been altered in the course of delivery.
Princeton Retirement Group, Inc. reserves the right to monitor, review
and retain all electronic communications, including E-mail, traveling
through its networks and systems (subject to and in accordance with
local laws). If any of your details are incorrect or if you no longer
wish to receive mailings such as this by E-mail please contact the
sender by reply E-mail. 




RE: How to enable mtom on the embedded server?

2007-07-17 Thread Clough, Samuel \(USPC.PRG.Atlanta\)
I have looked at that doc.  I was trying to see if there was a simple
setting like what Xfire had that would activate it on byte[] property.
We're doing Java first dev since all the services here are in house and
nothing uses Annotations right now for the services, so I was trying to
do it without adding any xml or a new annotation.  

It does look like I can get to the server through the serverfactorybean
and grab the endpoint and enable mtom support on the server from there.

-Original Message-
From: Christopher Moesel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 12:05 PM
To: cxf-user@incubator.apache.org
Subject: RE: How to enable mtom on the embedded server?

Hi Samuel,

Have you looked at the MTOM documentation in the user guide?
http://cwiki.apache.org/CXF20DOC/mtom.html

If so, then what information is missing (or incorrect) that you need?

-Chris

-Original Message-
From: Clough, Samuel (USPC.PRG.Atlanta)
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 10:39 AM
To: cxf-user@incubator.apache.org
Subject: RE: How to enable mtom on the embedded server?

We're trying to convert some services off of XFire and onto CXF.  On
XFire, the following would automatically enable MTOM for any types in a
service that returned a byte array:
 
Service service = serviceFactory.create(FeedbackFilesService.class);
service.setInvoker(new BeanInvoker(new FeedbackFilesServiceImpl()));
   
//enable MTOM to send the file contents more efficiently.
service.setProperty(mtom-enabled, true);
 
I cannot find how to do that easily using the new ServerFactoryBean
approach.  How do I enable MTOM on a service using the embedded HTTP
server? 


Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person
or entity in any location where such distribution or use would be
contrary to law or regulation, or which would subject Princeton
Retirement Group, Inc. or any affiliate to any registration requirement
within such location. 
This E-mail may contain privileged or confidential information or may
otherwise be protected by work product immunity or other legal rules. No
confidentiality or privilege is waived or lost by any mistransmission.
Access, copying or re-use of information by non-intended or
non-authorized recipients is prohibited. If you are not an intended
recipient of this E-mail, please notify the sender, delete it and do not
read, act upon, print, disclose, copy, retain or redistribute any
portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be
secure or error-free. Therefore, we cannot represent that the
information in this E-mail is complete, accurate, uncorrupted, timely or
free of viruses, and Princeton Retirement Group, Inc. cannot accept any
liability for E-mails that have been altered in the course of delivery.
Princeton Retirement Group, Inc. reserves the right to monitor, review
and retain all electronic communications, including E-mail, traveling
through its networks and systems (subject to and in accordance with
local laws). If any of your details are incorrect or if you no longer
wish to receive mailings such as this by E-mail please contact the
sender by reply E-mail. 





Re: How to enable mtom on the embedded server?

2007-07-17 Thread Freeman Fang

Hi Samuel,

javax.xml.ws.soap.SOAPBinding is class from jax-ws api, so you need make your 
service jaxws compatible
add jaxws BindingType annotation into your TestServiceImpl
@BindingType (value = SoapBinding.SOAP11HTTP_MTOM_BINDING)
And use JaxWsServerFactoryBean instead of ServerFactoryBean to create your 
server.
You can get more details from JaxWsServerFactoryBean.

Best Regards
Freeman




Clough, Samuel (USPC.PRG.Atlanta) wrote:

Ok, I'm trying to add this to a service hosted by the ServerFactoryBean
(the way specified in the Xfire migration guide) .

If I do the following to get to the binding to turn on MTOM:

ServerFactoryBean sf = new ServerFactoryBean();

sf.getServiceFactory().setDataBinding(new AegisDatabinding());

sf.setServiceBean(new TestServiceImpl());
sf.setServiceClass(TestService.class);
sf.setAddress(http://localhost:8192/test/TestService;);
sf.create();

SoapBinding binding = (SoapBinding)
sf.getServer().getEndpoint().getBinding();

I'm getting back a type of org.apache.cxf.binding.soap.SoapBinding which
has no option to turn on MTOM that I can see.  According to the
documentation, I need to get back a type of
javax.xml.ws.soap.SOAPBinding.  How do I start the service so that I'm
getting SOAPBinding and can turn on the MTOM?

-Original Message-
From: Christopher Moesel [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 12:05 PM

To: cxf-user@incubator.apache.org
Subject: RE: How to enable mtom on the embedded server?

Hi Samuel,

Have you looked at the MTOM documentation in the user guide?
http://cwiki.apache.org/CXF20DOC/mtom.html

If so, then what information is missing (or incorrect) that you need?

-Chris

-Original Message-
From: Clough, Samuel (USPC.PRG.Atlanta)
[mailto:[EMAIL PROTECTED] 
Sent: Tuesday, July 17, 2007 10:39 AM

To: cxf-user@incubator.apache.org
Subject: RE: How to enable mtom on the embedded server?

We're trying to convert some services off of XFire and onto CXF.  On
XFire, the following would automatically enable MTOM for any types in a
service that returned a byte array:
 
Service service = serviceFactory.create(FeedbackFilesService.class);

service.setInvoker(new BeanInvoker(new FeedbackFilesServiceImpl()));
   
//enable MTOM to send the file contents more efficiently.

service.setProperty(mtom-enabled, true);
 
I cannot find how to do that easily using the new ServerFactoryBean

approach.  How do I enable MTOM on a service using the embedded HTTP
server? 



Princeton Retirement Group, Inc - Important Terms 
This E-mail is not intended for distribution to, or use by, any person

or entity in any location where such distribution or use would be
contrary to law or regulation, or which would subject Princeton
Retirement Group, Inc. or any affiliate to any registration requirement
within such location. 
This E-mail may contain privileged or confidential information or may

otherwise be protected by work product immunity or other legal rules. No
confidentiality or privilege is waived or lost by any mistransmission.
Access, copying or re-use of information by non-intended or
non-authorized recipients is prohibited. If you are not an intended
recipient of this E-mail, please notify the sender, delete it and do not
read, act upon, print, disclose, copy, retain or redistribute any
portion of this E-mail. 
The transmission and content of this E-mail cannot be guaranteed to be

secure or error-free. Therefore, we cannot represent that the
information in this E-mail is complete, accurate, uncorrupted, timely or
free of viruses, and Princeton Retirement Group, Inc. cannot accept any
liability for E-mails that have been altered in the course of delivery.
Princeton Retirement Group, Inc. reserves the right to monitor, review
and retain all electronic communications, including E-mail, traveling
through its networks and systems (subject to and in accordance with
local laws). If any of your details are incorrect or if you no longer
wish to receive mailings such as this by E-mail please contact the
sender by reply E-mail.