Re: How can cxf.xml refer to beans defined in the application context? (Xfire to CXF migration)

2007-07-18 Thread Willem Jiang

Hi Dan,

I did some clean up of the simple front-end spring parser,
Can you review my last commit (svn commit: r557161)?

Thanks,
Willem.

Dan Diephouse wrote:

With the simple frontend its called a serviceBean:

simple:server id=Test address=/hello
serviceBean=#helloService serviceClass=com.test.Hello
/simple:server

Cheers,

- Dan

On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote:


Hi Willem,

I believe I am using version CXF incubator 2.0. The simple.xsd does not
support implementor as an attribute. It does support implementor as an
element. But it needs child elements.

Should I be using a different version (snapshot) of  CXF?

Thanks,
Jacob

On 7/17/07, Jiang, Ning (Willem) [EMAIL PROTECTED] wrote:


 I think the spring syntext should be
   simple:server id=Test address=/hello
 implementor=#helloService serviceClass=com.test.Hello
   /simple:server

 Because I checked the trunk code, it only deals with the attribute
 implementor now.

 Willem.

 -Original Message-
 From: Jacob Marcus [mailto:[EMAIL PROTECTED]
 Sent: Tue 7/17/2007 22:55
 To: cxf-user@incubator.apache.org
 Subject: Re: How can cxf.xml refer to beans defined in the application
 context? (Xfire to CXF migration)

 I am using the Simple front end approach without annotations.

 simple:server id=Test address=/hello
 serviceBean=#helloService serviceClass=com.test.Hello
   /simple:server

 I think the problem is in the SpringBus. The CXFServlet does not 
seem to

 have access to the ApplicationContext I have loaded using the
 ContextLoaderLister in the web.xml

 Is there some additional configuration required?

 Thanks,
 Jacob

 On 7/17/07, Jiang, Ning (Willem) [EMAIL PROTECTED] wrote:
 
  I think you could try to use the endpoint's attribute implementor.
  It should be workable with the # convention.
  Here is an example for it
  jaxws:endpoint id=endpoint1
implementor=#HelloService
address=/services/Greeter1/
 
  Willem
 
 
  -Original Message-
  From: Jacob Marcus [mailto:[EMAIL PROTECTED]
  Sent: Tue 7/17/2007 21:59
  To: cxf-user@incubator.apache.org
  Subject: How can cxf.xml refer to beans defined in the application
  context? (Xfire to CXF migration)
 
  Hi all,
 
  I am an xfire user who is used to the xfire services.xml. I am now
 porting
  the services.xml to cxf.xml and have it working for a simple 'Hello
 World'
  case.
 
  I have a requirement to refer to beans defined else where in the
cxf.xml
 .
  XFire used to let me do this using the # convention.
 
  Example : serviceBean#ihelloService/serviceBean.
 
  I tried a similar approach with cxf.  However, it cannot find the
bean.
  Has
  anybody tried this? Is this approach supported in cxf?
 
  Thanks,
  Jacob
 
 
 









Consuming CorbaMessage via Provider

2007-07-18 Thread Lukas Zapletal

Hello,

I need to create a WS Provider that will be bind to some service and
consume all CorbaMessages. It seems this can be done very easily:


@WebServiceProvider(portName = SOAPRelayPort, serviceName =
SOAPRelayService)
@ServiceMode(value = Service.Mode.MESSAGE)
public class CaclcorCORBAMessageProvider implements ProviderCorbaMessage {

  public CaclcorCORBAMessageProvider() {
  }

  public CorbaMessage invoke(CorbaMessage request) {
  CorbaMessage response = null;
  try {
 .
  } catch (Exception ex) {
  ex.printStackTrace();
  }
  return response;
  }
}

Now I would like to convert the CorbaMessage using the CORBA binding
to SOAPMessage and post it to target WS (I am developing a relay
service). How to do this? I might be using CXF framework at very low
level...

--
Lukas Zapletal
http://lukas.zapletalovi.com


RE: java2wsdl rejects class that is acceptable to the aegis universe

2007-07-18 Thread Benson Margulies
I will make a JIRA. The problem is a bean property on a public data
member. That is I have a class that is used as a parameter on the SEI
and it includes,

...
public int scheme;
public int getScheme() { return scheme; }
public void setScheme(int x) { scheme = x; }

Is this really two properties? 

Aegis ignores the public field. Is Aegis right, wrong, or just
different?

It's just as well that this fails, since the WSDL I'd get would be quite
different from what Aegis normally comes up with for me. 

For some reason I expect to be doc/literal with the following SEI
annotations:

@WebService(name=NameIndex,
targetNamespace=urn:com.basistech.rnm.index.ws)
public interface NameIndexService

@WebService(serviceName = NameIndex, endpointInterface =
com.basistech.rnm.index.ws.NameIndexService,
targetNamespace=urn:com.basistech.rnm.index.ws)
public class NameIndexServiceImpl extends NameIndexServiceCommon
implements NameIndexService {

 -Original Message-
 From: Freeman Fang [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 11:35 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: java2wsdl rejects class that is acceptable to the aegis
 universe
 
 Hi Benson,
 Would you please append your java class?
 
  From the exception, it seems your class method are bare mode so that
 java2wsdl load jaxb to process your method parameter type class, but
 unfortunately, this type class has two properties with same name,
which
 is illegal for jaxb.
 As you said, it is acceptable to the aegis, but tool now only work
with
 jaxb.
 To solve this problem, tool should work with specified databinding
 (jaxb, aegis), would you please add this feature request on jira?
 
 Best Regards
 
 Freeman
 
 Benson Margulies wrote:
  Is there something special I have to do to run java2wsdl for an
aegis
  environment? As it is, I get a very mysterious rejection letter
until I
  ask for -verbose, and then I get the following...
 
  org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
   [java] INFO: Could not find the configuration file cxf.xml on
the
  classpath.
   [java] Jul 17, 2007 10:27:45 PM
  org.apache.cxf.service.factory.ReflectionServiceFactoryBean
  buildServiceFromC
  lass
   [java] INFO: Creating Service
  {urn:com.basistech.rnm.index.ws}NameIndex from class
  com.basistech.rnm.index.ws
  .impl.NameIndexServiceImpl
   [java] Error :
  org.apache.cxf.service.factory.ServiceConstructionException
   [java]
   [java] java.lang.RuntimeException:
  org.apache.cxf.service.factory.ServiceConstructionException
   [java] at
 
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  viceFactory.java:31)
   [java] at
 
org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToP
  rocessor.java:87)
   [java] at
 
org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLCon
  tainer.java:59)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  84)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  52)
   [java] at
 
org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  39)
   [java] at
  org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
   [java] at
  org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
   [java] Caused by:
  org.apache.cxf.service.factory.ServiceConstructionException
   [java] at
 
org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:269)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
  FromClass(ReflectionSer
  viceFactoryBean.java:220)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
  rviceModel(ReflectionSe
  rviceFactoryBean.java:248)
   [java] at
 
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
  ctionServiceFactoryBean
  .java:136)
   [java] at
 
org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
  ndpointFactory.java:83)
   [java] at
 
org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  viceFactory.java:29)
   [java] ... 7 more
   [java] Caused by:
  com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of
  IllegalAnnotationExcep
  tions
   [java] Class has two properties of the same name scheme
   [java] this problem is related to the following location:
   [java] at public int
  com.basistech.rnm.Transliteration.getScheme()
   [java] at com.basistech.rnm.Transliteration
   [java] at public
com.basistech.rnm.Transliteration[]
  com.basistech.rnm.Name.getTransliterations()
   [java] at com.basistech.rnm.Name
   [java] at public com.basistech.rnm.Name[]
  com.basistech.rnm.Entity.getNames()
   

RE: java2wsdl rejects class that is acceptable to the aegis universe

2007-07-18 Thread Benson Margulies
CXF-807 reports the lack of Aegis support.
 
CXF-806 whines about the brevity of the diagnosis of this class of mine
that violates JAXB.



RE: Using Local Transport for JUnit Tests

2007-07-18 Thread Benson Margulies
I recommend stealing code from AbstractAegisTest. Since I use Aegis, I
can just use that class.

 -Original Message-
 From: Liu, Jervis [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 10:40 PM
 To: cxf-user@incubator.apache.org
 Subject: RE: Using Local Transport for JUnit Tests
 
 Hi Chris, to use local transport, you need to manually register
 LocalTransportFactory with all the namespaces that might be used, for
 example, http://schemas.xmlsoap.org/soap/http;. An example of how
this is
 done can be found from

\trunk\rt\frontend\jaxws/src/test/java/org/apache/cxf/jaxws/AbstractJaxW
sT
 est.java. Actually almost all unit tests under jaxws module are
written
 with local transport, so just grab one CXF unit test then copypaste,
 should work.
 
 Cheers,
 Jervis
 
 -Original Message-
 From: Christopher Moesel [mailto:[EMAIL PROTECTED]
 Sent: 2007?7?18? 2:04
 To: cxf-user@incubator.apache.org
 Subject: Using Local Transport for JUnit Tests
 
 
 Hello All,
 
 I'm trying to write some JUnit tests that can test my SOAP web
services
 using the local transport
 (http://cwiki.apache.org/CXF20DOC/local-transport.html).
 
 Normally I run my services using the CXF Servlet, so doing it
 servlet-less is somewhat new to me.  Here is what I'm doing:
 
 Using a Spring ClassPathXmlApplicationContext to load up the following
 CXF spring configs:
 - META-INF/cxf/cxf.xml
 - META-INF/cxf/cxf-extension-soap.xml
 - META-INF/cxf/cxf-extension-policy.xml
 
 and also loading up my own spring configs that contain the endpoint,
 like so:
 
 jaxws:endpoint
   id=mockWebServiceEndpoint
   implementor=#mockWebService
   wsdlLocation=mockWebService.wsdl
   address=local://MockWebService
   jaxws:features
 wsp:Policy
   mtom:OptimizedMimeSerialization wsp:Optional=true/
 /wsp:Policy
   /jaxws:features
 /jaxws:endpoint
 
 But... when I load them up, I get an exception with the following
 message:
 No DestinationFactory was found for the namespace
 http://schemas.xmlsoap.org/soap/http.
 
 I suspect I'm missing a CXF config file that defines the
 DestinationFactory, I'm not setting up something right on the
endpoint,
 or I'm just completely wrong and can't even use the local transport in
 this way.
 
 Could someone with a clue please help me out? ;)  The full stack trace
 is at the bottom of this message.
 
 -Chris
 
 org.apache.cxf.service.factory.ServiceConstructionException
   at

org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
 105)
   at

org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
 n.java:142)
   at
 org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:277)
   at
 org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:223)
   at
 org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:175)
   at

org.apache.cxf.jaxws.spi.ProviderImpl.createAndPublishEndpoint(ProviderI
 mpl.java:74)
   at javax.xml.ws.Endpoint.publish(Endpoint.java:156)
   at

com.myco.ws.client.BaseWebServiceTest.runsOnceBeforeAllTests(BaseWebServ
 iceTest.java:59)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
 a:39)
   at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
 Impl.java:25)
   at

org.junit.internal.runners.BeforeAndAfterRunner.invokeMethod(BeforeAndAf
 terRunner.java:74)
   at

org.junit.internal.runners.BeforeAndAfterRunner.runBefores(BeforeAndAfte
 rRunner.java:50)
   at

org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAf
 terRunner.java:33)
   at

org.junit.internal.runners.TestClassRunner.run(TestClassRunner.java:52)
   at

com.intellij.rt.junit4.Junit4TestMethodAdapter.run(Junit4TestMethodAdapt
 er.java:54)
   at

com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at

sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.jav
 a:39)
   at

sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessor
 Impl.java:25)
   at
 com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
 Caused by: org.apache.cxf.BusException: No DestinationFactory was
found
 for the namespace http://schemas.xmlsoap.org/soap/http.
   at

org.apache.cxf.transport.DestinationFactoryManagerImpl.getDestinationFac
 tory(DestinationFactoryManagerImpl.java:101)
   at
 org.apache.cxf.endpoint.ServerImpl.initDestination(ServerImpl.java:85)
   at org.apache.cxf.endpoint.ServerImpl.init(ServerImpl.java:69)
   at

org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
 90)
   ... 27 more
 
 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4,
Ireland


Re: java2wsdl rejects class that is acceptable to the aegis universe

2007-07-18 Thread Freeman Fang

Hi Benson,
Yes, for jaxb spec 2.0,
public int scheme is property scheme, and getScheme/setScheme is also 
property scheme which collide with the field name scheme.

You can get details from 8.9 in specs

I think the way aegis goes is just different with jaxb, it's not right 
or wrong.


Best Regards

Freeman

Benson Margulies wrote:

I will make a JIRA. The problem is a bean property on a public data
member. That is I have a class that is used as a parameter on the SEI
and it includes,

...
public int scheme;
public int getScheme() { return scheme; }
public void setScheme(int x) { scheme = x; }

Is this really two properties? 


Aegis ignores the public field. Is Aegis right, wrong, or just
different?

It's just as well that this fails, since the WSDL I'd get would be quite
different from what Aegis normally comes up with for me. 


For some reason I expect to be doc/literal with the following SEI
annotations:

@WebService(name=NameIndex,
targetNamespace=urn:com.basistech.rnm.index.ws)
public interface NameIndexService

@WebService(serviceName = NameIndex, endpointInterface =
com.basistech.rnm.index.ws.NameIndexService,
targetNamespace=urn:com.basistech.rnm.index.ws)
public class NameIndexServiceImpl extends NameIndexServiceCommon
implements NameIndexService {

  

-Original Message-
From: Freeman Fang [mailto:[EMAIL PROTECTED]
Sent: Tuesday, July 17, 2007 11:35 PM
To: cxf-user@incubator.apache.org
Subject: Re: java2wsdl rejects class that is acceptable to the aegis
universe

Hi Benson,
Would you please append your java class?

 From the exception, it seems your class method are bare mode so that
java2wsdl load jaxb to process your method parameter type class, but
unfortunately, this type class has two properties with same name,


which
  

is illegal for jaxb.
As you said, it is acceptable to the aegis, but tool now only work


with
  

jaxb.
To solve this problem, tool should work with specified databinding
(jaxb, aegis), would you please add this feature request on jira?

Best Regards

Freeman

Benson Margulies wrote:


Is there something special I have to do to run java2wsdl for an
  

aegis
  

environment? As it is, I get a very mysterious rejection letter
  

until I
  

ask for -verbose, and then I get the following...

org.apache.cxf.bus.spring.BusApplicationContext getConfigResources
 [java] INFO: Could not find the configuration file cxf.xml on
  

the
  

classpath.
 [java] Jul 17, 2007 10:27:45 PM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromC
lass
 [java] INFO: Creating Service
{urn:com.basistech.rnm.index.ws}NameIndex from class
com.basistech.rnm.index.ws
.impl.NameIndexServiceImpl
 [java] Error :
org.apache.cxf.service.factory.ServiceConstructionException
 [java]
 [java] java.lang.RuntimeException:
org.apache.cxf.service.factory.ServiceConstructionException
 [java] at

  

org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  

viceFactory.java:31)
 [java] at

  

org.apache.cxf.tools.java2wsdl.processor.JavaToProcessor.process(JavaToP
  

rocessor.java:87)
 [java] at

  

org.apache.cxf.tools.java2wsdl.JavaToWSDLContainer.execute(JavaToWSDLCon
  

tainer.java:59)
 [java] at

  

org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  

84)
 [java] at

  

org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  

52)
 [java] at

  

org.apache.cxf.tools.common.toolspec.ToolRunner.runTool(ToolRunner.java:
  

39)
 [java] at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.run(JavaToWSDL.java:74)
 [java] at
org.apache.cxf.tools.java2wsdl.JavaToWSDL.main(JavaToWSDL.java:42)
 [java] Caused by:
org.apache.cxf.service.factory.ServiceConstructionException
 [java] at

  

org.apache.cxf.jaxb.JAXBDataBinding.initialize(JAXBDataBinding.java:269)
  

 [java] at

  

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
  

FromClass(ReflectionSer
viceFactoryBean.java:220)
 [java] at

  

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
  

rviceModel(ReflectionSe
rviceFactoryBean.java:248)
 [java] at

  

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
  

ctionServiceFactoryBean
.java:136)
 [java] at

  

org.apache.cxf.frontend.AbstractEndpointFactory.createEndpoint(AbstractE
  

ndpointFactory.java:83)
 [java] at

  

org.apache.cxf.frontend.AbstractServiceFactory.createService(AbstractSer
  

viceFactory.java:29)
 [java] ... 7 more
 [java] Caused by:
com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 7 counts of
IllegalAnnotationExcep
tions
 [java] Class has two properties of the same name scheme
 [java] this problem is related to the following location:
 [java] at 

JAX-WS/annotated SOAP services -- exporting implementation methods rather than interface ones?

2007-07-18 Thread Stuart Bingë
Hello all,

We've been using XFire (specifically its SOAP transport) together with JSR-181 
annotations for some time now in our internal Spring-based web services 
(hosted in Tomcat), and are now in the process of looking to upgrade to CXF 
as part of a general systems upgrade. The web services are java-first, 
where we code to a SEI and then rely on XFire to generate the WSDL as 
appropriate. In addition, the SOAP binding used is RPC/Literal for 
interoperability with PHP clients.

After following the Writing a service with Spring article on the CXF site 
(http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html), as 
well as attempting the basic HelloWorld applet that the article describes 
(i.e. separate from our existing environment/services), I've discovered some 
strange behaviour that wasn't present with XFire.

When exposing an endpoint via jaxws:endpoint ... /, the generated WSDL 
appears to be coming from the implementation class rather than the service 
interface -- i.e. getters and setters for implementation-specific properties 
are included in the WSDL.

Is this the expected behaviour with jaxws:endpoint /? If so, what other 
methods are available/recommended for exposing an endpoint via an interface 
rather than an implementation object?

This can be solved with @WebMethod(ignore = true) annotations on the 
implementation class, but obviously this isn't ideal and shouldn't be needed 
in the first place. We'd like to continue just exposing the interface as the 
service contract and then be able to implement the service in whatever way we 
deem fit.

Any pointers would be greatly appreciated!

Cheers,
-- 
Stuart Bingë

__

“Complinet Ltd is registered in England. Registered office at Vintners Place, 
68 Upper Thames Street, London EC4V 3BJ. Company number 3170722. VAT No. 749 
324 021.
Complinet Inc is a corporation registered in Delaware, USA.”

This email has been scanned by the MessageLabs Email Security System.


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 can cxf.xml refer to beans defined in the application context? (Xfire to CXF migration)

2007-07-18 Thread Jacob Marcus

Hi Willem/Dan,

Is this last change around the serviceBean? Because, I had tried it earlier
and it was not working.

There is one more issue in using the cxf.xml in this fashion. If I do not
refer to a bean using the # and instead give the class directly, it still
does not work.

For example, the following still does not work. The exception says Could
not find destination factory for transport
http://schemas.xmlsoap.org/soap/http;. This error happens only if you do not
have the dependency cxf-rt-transports-http-jetty. The behavior is different
if you have this dependency.

The only way I have been able to get the service fully functional without
cxf-rt-transports-http-jetty  is by embedding cxf in my spring config after
importing the necessary configs. Hope the information helps.

I would love to see the cxf.xml approach supported. The services.xml in
XFire was a convenient way of keeping the stuff away from my other spring
configs.

Thanks,
Jacob


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.xsd
http://cxf.apache.org/simple
http://cxf.apache.org/schemas/simple.xsd;

   simple:server id=Test address=/hello
   serviceClass=com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello

   simple:serviceBean
   bean
   class=
com.ironmountain.digital.erm.irmrap.cl.soap.util.HelloImpl /
   /simple:serviceBean

   /simple:server
/beans



On 7/18/07, Willem Jiang [EMAIL PROTECTED] wrote:


Hi Dan,

I did some clean up of the simple front-end spring parser,
Can you review my last commit (svn commit: r557161)?

Thanks,
Willem.

Dan Diephouse wrote:
 With the simple frontend its called a serviceBean:

 simple:server id=Test address=/hello
 serviceBean=#helloService serviceClass=com.test.Hello
 /simple:server

 Cheers,

 - Dan

 On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote:

 Hi Willem,

 I believe I am using version CXF incubator 2.0. The simple.xsd does not
 support implementor as an attribute. It does support implementor as an
 element. But it needs child elements.

 Should I be using a different version (snapshot) of  CXF?

 Thanks,
 Jacob

 On 7/17/07, Jiang, Ning (Willem) [EMAIL PROTECTED] wrote:
 
 
  I think the spring syntext should be
simple:server id=Test address=/hello
  implementor=#helloService serviceClass=com.test.Hello
/simple:server
 
  Because I checked the trunk code, it only deals with the attribute
  implementor now.
 
  Willem.
 
  -Original Message-
  From: Jacob Marcus [mailto:[EMAIL PROTECTED]
  Sent: Tue 7/17/2007 22:55
  To: cxf-user@incubator.apache.org
  Subject: Re: How can cxf.xml refer to beans defined in the
application
  context? (Xfire to CXF migration)
 
  I am using the Simple front end approach without annotations.
 
  simple:server id=Test address=/hello
  serviceBean=#helloService serviceClass=com.test.Hello
/simple:server
 
  I think the problem is in the SpringBus. The CXFServlet does not
 seem to
  have access to the ApplicationContext I have loaded using the
  ContextLoaderLister in the web.xml
 
  Is there some additional configuration required?
 
  Thanks,
  Jacob
 
  On 7/17/07, Jiang, Ning (Willem) [EMAIL PROTECTED] wrote:
  
   I think you could try to use the endpoint's attribute implementor.
   It should be workable with the # convention.
   Here is an example for it
   jaxws:endpoint id=endpoint1
 implementor=#HelloService
 address=/services/Greeter1/
  
   Willem
  
  
   -Original Message-
   From: Jacob Marcus [mailto:[EMAIL PROTECTED]
   Sent: Tue 7/17/2007 21:59
   To: cxf-user@incubator.apache.org
   Subject: How can cxf.xml refer to beans defined in the application
   context? (Xfire to CXF migration)
  
   Hi all,
  
   I am an xfire user who is used to the xfire services.xml. I am now
  porting
   the services.xml to cxf.xml and have it working for a simple 'Hello
  World'
   case.
  
   I have a requirement to refer to beans defined else where in the
 cxf.xml
  .
   XFire used to let me do this using the # convention.
  
   Example : serviceBean#ihelloService/serviceBean.
  
   I tried a similar approach with cxf.  However, it cannot find the
 bean.
   Has
   anybody tried this? Is this approach supported in cxf?
  
   Thanks,
   Jacob
  
  
  
 
 







Re: Using CXF

2007-07-18 Thread Dan Diephouse

Hi Jacob,
You need to import the CXF bean definitions:

import resource=classpath:META-INF/cxf/cxf.xml /
import resource=classpath:META-INF/cxf/cxf-extension-soap.xml /
import resource=classpath:META-INF/cxf/cxf-servlet.xml /

You can find for more details here:
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

Cheers,
- Dan

On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote:


I am not importing the cxf bean definitions in my spring configuration.

Here is my cxf.xml file.


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.xsd
http://cxf.apache.org/simple
http://cxf.apache.org/schemas/simple.xsd;

simple:server id=Test address=/hello
serviceBean=#helloService serviceClass=
com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello
  /simple:server

/beans

The relevant portions of my web.xml is below.


context-param
param-namecontextConfigLocation/param-name
param-value
classpath:configuration-sprcfg.xml,
classpath:version-configuration-sprcfg.xml,
classpath:jmx-sprcfg.xml,
classpath:storage-common-sprcfg.xml,
classpath:services-authorization-sprcfg.xml,
classpath:services-sprcfg.xml,
classpath:cl-http-security-sprcfg.xml,
classpath:soap-sprcfg.xml
/param-value
/context-param

servlet
servlet-nameCXFServlet/servlet-name
display-nameCXF Servlet/display-name
servlet-class
org.apache.cxf.transport.servlet.CXFServlet
/servlet-class
load-on-startup3/load-on-startup
  /servlet

  servlet-mapping
servlet-nameCXFServlet/servlet-name
url-pattern/cxfservices/*/url-pattern
  /servlet-mapping

listener
listener-class
org.springframework.web.context.ContextLoaderListener
/listener-class
/listener


On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote:

 Can you show me what your web.xml and whole cxf.xml look like? How are
you
 importing the CXF bean definitions?

 Thanks,
 - Dan

 On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote:
 
  Thanks Dan. That worked.
 
  from the cxf.xml I would like to refer to a bean defined else where
 like,
 
  simple:server id=Test address=
  http://localhost:8081/tes/cxfservices/HelloWorld;
  serviceClass=com.test.HelloWorld
  simple:serviceBean#helloService/simple:serviceBean
/simple:server
 
  This is giving me an error saying the bean with id helloService cannot
 be
  found. It appears that the SpringBusFactory does not have the bean
  definition. Is there a way I can instruct the server to use a specific
  bus?
 
  My spring application context is defined in the web.xml and I use the
  ContextLoaderListener.
  My problem is that the cxf.xml does not seem to be able to refer to
 beans
  in
  my application context.
 
  Thanks in advance for your help,
  Jacob
 
  On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote:
  
   Hi Jacob,
  
   I would go with something like:
  
   dependency
   groupIdorg.apache.cxf/groupId
   artifactIdcxf-rt-frontend-jaxws/artifactId
   version2.0-incubator/version
   /dependency
   dependency
   groupIdorg.apache.cxf/groupId
   artifactIdcxf-rt-transports-http/artifactId
   version2.0-incubator/version
   /dependency
   !-- Jetty is needed if you're are not using the CXFServlet
 --
   dependency
   groupIdorg.apache.cxf/groupId
  
artifactIdcxf-rt-transports-http-jetty/artifactId
   version2.0-incubator/version
   /dependency
  
  
   That will set you up to use the JAX-WS style annotated web services
 with
   JAXB. Spring is included by default.
  
   Let us know if you have more questions. I'll try to add this to the
  xfire
   user's guide.
  
   - Dan
  
   On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote:
   
I am an XFire user planning to evaluate CXF for my project. What
is
  the
maven dependency for CXF to be used? While using XFire, I had the
following
dependencies.
   
dependency
groupIdorg.codehaus.xfire/groupId
artifactIdxfire-jaxb2/artifactId
version1.2.5/version
/dependency
dependency
groupIdorg.codehaus.xfire/groupId
artifactIdxfire-spring/artifactId
version1.2.5/version
exclusions
exclusion
groupIdorg.springframework/groupId
artifactIdspring/artifactId
/exclusion
/exclusions
/dependency
dependency
 

Re: Aegis tests and exceptions ...

2007-07-18 Thread Dan Diephouse

Hi Benson,

I'm looking into this. I'll report back as soon as I figure out if a) its
possible or b) when I have a fix for it :-)

- Dan

On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:


Dan,

Reading the code of 2.0, I see no evidence of any client-side code
capable of taking a soap fault and turning it into a custom exception
class. The two interceptors I see (the 1.1 and 1.2 versions) both end up
throwing the CXF-specific SoapFault class.

What am I missing?

--benson


 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Tuesday, July 17, 2007 4:10 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Aegis tests and exceptions ...

 Hi Benson,

 More tests are always welcome! Just send along a patch. Cheers,
 - Dan

 On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  I note that the source tree contains some careful set up of
exceptions
  to allow for some testing of exceptions, but no exceptions are
tested.
  Does this reflect some state of the implementation, or just that no
one
  has had time to fill in more test cases? I'd volunteer to make tests
  that try the exceptions.
 
 


 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog





--
Dan Diephouse
Envoi Solutions
http://envoisolutions.com | http://netzooid.com/blog


Endpoint config problems

2007-07-18 Thread Julio Arias

Hi all -

Just to let you now about this problem I have. I got the following  
spring endpoint config:


jaxws:endpoint id=documentService address=/DocumentService
jaxws:implementor   
bean class=com.rbx.lor.ws.DocumentServiceImpl
property name=documentManager ref=documentManager/
/bean
/jaxws:implementor
jaxws:inInterceptors
bean class=org.apache.cxf.binding.soap.saaj.SAAJInInterceptor/
bean class=org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
constructor-arg
map
entry key=action value=UsernameToken/
entry key=passwordType value=PasswordText/
entry key=passwordCallbackClass  
value=com.rbx.lor.ws.security.AuthenticationCallback/

/map
/constructor-arg
/bean
/jaxws:inInterceptors
/jaxws:endpoint


I like this config but I get a spring xml context exception

2007-07-18 10:33:28,686 ERROR [org.apache.catalina.core.ContainerBase. 
[Catalina].[localhost].[/lor]] - Exception sending context  
initialized event to listener instance of class  
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.parsing.BeanDefinitionParsingException 
: Configuration problem: constructor-arg element must not contain  
more than one sub-element


I fix it by changing the implementor as an attribute of the endpoint  
using # to point to by implementing bean and now it works fine, but  
like my initial config is simpler and I have everything in one place,  
is there another workaround for this??


The working config is this:

bean id=documentServiceImpl  
class=com.rbx.lor.ws.DocumentServiceImpl

property name=documentManager ref=documentManager/
/bean

jaxws:endpoint id=documentService address=/DocumentService  
implementor=#documentServiceImpl

jaxws:inInterceptors
bean 
class=org.apache.cxf.binding.soap.saaj.SAAJInInterceptor/
bean 
class=org.apache.cxf.ws.security.wss4j.WSS4JInInterceptor
constructor-arg
map
entry key=action 
value=UsernameToken/
entry key=passwordType 
value=PasswordText/
	entry key=passwordCallbackClass  
value=com.rbx.lor.ws.security.AuthenticationCallback/

/map
/constructor-arg
/bean
/jaxws:inInterceptors
/jaxws:endpoint


Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
-
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 11.506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
-



Re: Using CXF

2007-07-18 Thread Jacob Marcus

If my services are defined in the cxf.xml, do I still need to import the cxf
bean definitions.? I followed the instructions on this wiki page.

http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-services.xml

Or are you saying that if I want to use a bean defined else where in my
cxf.xml, then I should import these ?

Thanks,
Jacob



On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote:


Hi Jacob,
You need to import the CXF bean definitions:

import resource=classpath:META-INF/cxf/cxf.xml /
import resource=classpath:META-INF/cxf/cxf-extension-soap.xml
/
import resource=classpath:META-INF/cxf/cxf-servlet.xml /

You can find for more details here:
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

Cheers,
- Dan

On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote:

 I am not importing the cxf bean definitions in my spring configuration.

 Here is my cxf.xml file.


 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.xsd
 http://cxf.apache.org/simple
 http://cxf.apache.org/schemas/simple.xsd;

 simple:server id=Test address=/hello
 serviceBean=#helloService serviceClass=
 com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello
   /simple:server

 /beans

 The relevant portions of my web.xml is below.


 context-param
 param-namecontextConfigLocation/param-name
 param-value
 classpath:configuration-sprcfg.xml,
 classpath:version-configuration-sprcfg.xml,
 classpath:jmx-sprcfg.xml,
 classpath:storage-common-sprcfg.xml,
 classpath:services-authorization-sprcfg.xml,
 classpath:services-sprcfg.xml,
 classpath:cl-http-security-sprcfg.xml,
 classpath:soap-sprcfg.xml
 /param-value
 /context-param

 servlet
 servlet-nameCXFServlet/servlet-name
 display-nameCXF Servlet/display-name
 servlet-class
 org.apache.cxf.transport.servlet.CXFServlet
 /servlet-class
 load-on-startup3/load-on-startup
   /servlet

   servlet-mapping
 servlet-nameCXFServlet/servlet-name
 url-pattern/cxfservices/*/url-pattern
   /servlet-mapping

 listener
 listener-class
 org.springframework.web.context.ContextLoaderListener
 /listener-class
 /listener


 On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote:
 
  Can you show me what your web.xml and whole cxf.xml look like? How are
 you
  importing the CXF bean definitions?
 
  Thanks,
  - Dan
 
  On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote:
  
   Thanks Dan. That worked.
  
   from the cxf.xml I would like to refer to a bean defined else where
  like,
  
   simple:server id=Test address=
   http://localhost:8081/tes/cxfservices/HelloWorld;
   serviceClass=com.test.HelloWorld
   simple:serviceBean#helloService/simple:serviceBean
 /simple:server
  
   This is giving me an error saying the bean with id helloService
cannot
  be
   found. It appears that the SpringBusFactory does not have the bean
   definition. Is there a way I can instruct the server to use a
specific
   bus?
  
   My spring application context is defined in the web.xml and I use
the
   ContextLoaderListener.
   My problem is that the cxf.xml does not seem to be able to refer to
  beans
   in
   my application context.
  
   Thanks in advance for your help,
   Jacob
  
   On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote:
   
Hi Jacob,
   
I would go with something like:
   
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-frontend-jaxws/artifactId
version2.0-incubator/version
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http/artifactId
version2.0-incubator/version
/dependency
!-- Jetty is needed if you're are not using the
CXFServlet
  --
dependency
groupIdorg.apache.cxf/groupId
   
 artifactIdcxf-rt-transports-http-jetty/artifactId
version2.0-incubator/version
/dependency
   
   
That will set you up to use the JAX-WS style annotated web
services
  with
JAXB. Spring is included by default.
   
Let us know if you have more questions. I'll try to add this to
the
   xfire
user's guide.
   
- Dan
   
On 7/13/07, Jacob Marcus [EMAIL PROTECTED] wrote:

 I am an XFire user planning to evaluate CXF for my project. What
 is
   the
 maven dependency for CXF to be used? While using XFire, I had
the
 following
 dependencies.

 dependency
 

RE: Aegis tests and exceptions ...

2007-07-18 Thread Benson Margulies
I gave you a test case on JIRA ... perhaps this is a piece of xfire that
hasn't migrated yet.

 -Original Message-
 From: Dan Diephouse [mailto:[EMAIL PROTECTED]
 Sent: Wednesday, July 18, 2007 12:17 PM
 To: cxf-user@incubator.apache.org
 Subject: Re: Aegis tests and exceptions ...
 
 Hi Benson,
 
 I'm looking into this. I'll report back as soon as I figure out if a)
its
 possible or b) when I have a fix for it :-)
 
 - Dan
 
 On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
 
  Dan,
 
  Reading the code of 2.0, I see no evidence of any client-side code
  capable of taking a soap fault and turning it into a custom
exception
  class. The two interceptors I see (the 1.1 and 1.2 versions) both
end up
  throwing the CXF-specific SoapFault class.
 
  What am I missing?
 
  --benson
 
 
   -Original Message-
   From: Dan Diephouse [mailto:[EMAIL PROTECTED]
   Sent: Tuesday, July 17, 2007 4:10 PM
   To: cxf-user@incubator.apache.org
   Subject: Re: Aegis tests and exceptions ...
  
   Hi Benson,
  
   More tests are always welcome! Just send along a patch. Cheers,
   - Dan
  
   On 7/17/07, Benson Margulies [EMAIL PROTECTED] wrote:
   
I note that the source tree contains some careful set up of
  exceptions
to allow for some testing of exceptions, but no exceptions are
  tested.
Does this reflect some state of the implementation, or just that
no
  one
has had time to fill in more test cases? I'd volunteer to make
tests
that try the exceptions.
   
   
  
  
   --
   Dan Diephouse
   Envoi Solutions
   http://envoisolutions.com | http://netzooid.com/blog
 
 
 
 
 --
 Dan Diephouse
 Envoi Solutions
 http://envoisolutions.com | http://netzooid.com/blog


wsdl over local transport

2007-07-18 Thread Benson Margulies
Since java2wsdl isn't prepared to cooperate with Aegis yet, I wonder if
I have any chance of pulling a WSDL through the local transport?



WSDL Generation problem using Aegis binding

2007-07-18 Thread Clough, Samuel \(USPC.PRG.Atlanta\)
Below is a snippet of the WSDL that's getting generated using Aegis
binding with the embedded server and causing errors.  We're doing Java
first development, no annotations or anything as these are all internal
appsl.  When the .NET client tried to connect we were getting a bizarre
error which I believe I have been able to track down using soapui.  At
the bottom of this message is a fragment of the wsdl generated.  I am
very green at wsdl, but the problem seems to be that for every complex
type being defined in the schema, before the complexType node there is
an element node by the same name.  SoapUI is what led me to this
conclusion because it rasies an error trying to pull in the wsdl that
the type is not defined at http://www.w3.org/2001/XMLSchema.  So, I
believe the element node that is preceding each complexType node is an
error.  The bizarre thing is that we have other classes generating wsdl
just fine and on those services there is not element node preceding each
complexType node of the same name.  Any clue what could be causing this
error? 
 
?xml version=1.0 encoding=utf-8?wsdl:definitions
xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:ns1=http://service.afp.prg.com/;
xmlns:ns2=http://schemas.xmlsoap.org/soap/http;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=AFPManagerService
targetNamespace=http://service.afp.prg.com/;
  wsdl:types
schema xmlns=http://www.w3.org/2001/XMLSchema;
attributeFormDefault=qualified elementFormDefault=qualified
targetNamespace=http://service.afp.prg.com/;
complexType name=ArrayOfString
sequence
element maxOccurs=unbounded minOccurs=0 name=string
nillable=true type=string/
/sequence
/complexType
element name=getDataWarnings type=getDataWarnings/
complexType name=getDataWarnings
sequence
element minOccurs=0 name=arg00 type=string/
element name=arg11 type=long/
element name=arg22 type=boolean/
/sequence
/complexType

element name=getDataWarningsResponse type=getDataWarningsResponse/
complexType name=getDataWarningsResponse
sequence
element maxOccurs=unbounded minOccurs=0 name=return
type=ArrayOfString/
/sequence
/complexType
element name=finishImport type=finishImport/
complexType name=finishImport
sequence
element name=arg00 type=long/
element name=arg11 type=boolean/
/sequence
/complexType
element name=finishImportResponse type=finishImportResponse/
complexType name=finishImportResponse
sequence
element name=return type=long/

/sequence
/complexType
/schema 


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-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 is not 

Re: WSDL Generation problem using Aegis binding

2007-07-18 Thread omatzura

Hi Samuel,

Just to clarify the error: an element definition like this is fine, the
problem in this particular case is that the type for the element is not
namespace qualified, so it basically means that for the

element name=getDataWarnings type=getDataWarnings/

element, the type getDataWarnings is expected to be in the default namespace
(which is the xmlschema namespace, as the error message implies.. )

What's missing is a namespace-prefix declaration for the target namespace
and then that prefix on your elements' type.. ie 

schema xmlns=http://www.w3.org/2001/XMLSchema;
attributeFormDefault=qualified elementFormDefault=qualified
targetNamespace=http://service.afp.prg.com/;

should be something like

schema xmlns=http://www.w3.org/2001/XMLSchema;
attributeFormDefault=qualified elementFormDefault=qualified
targetNamespace=http://service.afp.prg.com/;
xmlns:tns=http://service.afp.prg.com/;

and the element should then be 

element name=getDataWarnings type=tns:getDataWarnings/

Don't know if this helps you resolve the error, but maybe at least
understand it in more detail..

kind regards, and thanks for using soapUI !

/Ole
eviware.com


Clough, Samuel (USPC.PRG.Atlanta) wrote:
 
 Below is a snippet of the WSDL that's getting generated using Aegis
 binding with the embedded server and causing errors.  We're doing Java
 first development, no annotations or anything as these are all internal
 appsl.  When the .NET client tried to connect we were getting a bizarre
 error which I believe I have been able to track down using soapui.  At
 the bottom of this message is a fragment of the wsdl generated.  I am
 very green at wsdl, but the problem seems to be that for every complex
 type being defined in the schema, before the complexType node there is
 an element node by the same name.  SoapUI is what led me to this
 conclusion because it rasies an error trying to pull in the wsdl that
 the type is not defined at http://www.w3.org/2001/XMLSchema.  So, I
 believe the element node that is preceding each complexType node is an
 error.  The bizarre thing is that we have other classes generating wsdl
 just fine and on those services there is not element node preceding each
 complexType node of the same name.  Any clue what could be causing this
 error? 
  
 ?xml version=1.0 encoding=utf-8?wsdl:definitions
 xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
 xmlns:ns1=http://service.afp.prg.com/;
 xmlns:ns2=http://schemas.xmlsoap.org/soap/http;
 xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
 xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=AFPManagerService
 targetNamespace=http://service.afp.prg.com/;
   wsdl:types
 schema xmlns=http://www.w3.org/2001/XMLSchema;
 attributeFormDefault=qualified elementFormDefault=qualified
 targetNamespace=http://service.afp.prg.com/;
 complexType name=ArrayOfString
 sequence
 element maxOccurs=unbounded minOccurs=0 name=string
 nillable=true type=string/
 /sequence
 /complexType
 element name=getDataWarnings type=getDataWarnings/
 complexType name=getDataWarnings
 sequence
 element minOccurs=0 name=arg00 type=string/
 element name=arg11 type=long/
 element name=arg22 type=boolean/
 /sequence
 /complexType
 
 element name=getDataWarningsResponse type=getDataWarningsResponse/
 complexType name=getDataWarningsResponse
 sequence
 element maxOccurs=unbounded minOccurs=0 name=return
 type=ArrayOfString/
 /sequence
 /complexType
 element name=finishImport type=finishImport/
 complexType name=finishImport
 sequence
 element name=arg00 type=long/
 element name=arg11 type=boolean/
 /sequence
 /complexType
 element name=finishImportResponse type=finishImportResponse/
 complexType name=finishImportResponse
 sequence
 element name=return type=long/
 
 /sequence
 /complexType
 /schema 
 
 
 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 

Re: Using CXF

2007-07-18 Thread Dan Diephouse

I think that section of the migration guide assumes that you've already
imported the cxf bean definitions into your application. The cxf-* resources
include some basic CXF bean definitions which are necessary to use CXF
inside your spring application - like a definition for the Servlet transport
or the Binding manager.

So yes, you need to import these if you're going to use jaxws:endpoint,
jaxws:client, etc.

Regards,
- Dan

On 7/18/07, Jacob Marcus [EMAIL PROTECTED] wrote:


If my services are defined in the cxf.xml, do I still need to import the
cxf
bean definitions.? I followed the instructions on this wiki page.


http://cwiki.apache.org/CXF20DOC/xfire-migration-guide.html#XFireMigrationGuide-services.xml

Or are you saying that if I want to use a bean defined else where in my
cxf.xml, then I should import these ?

Thanks,
Jacob



On 7/18/07, Dan Diephouse [EMAIL PROTECTED] wrote:

 Hi Jacob,
 You need to import the CXF bean definitions:

 import resource=classpath:META-INF/cxf/cxf.xml /
 import resource=classpath:META-INF/cxf/cxf-extension-soap.xml
 /
 import resource=classpath:META-INF/cxf/cxf-servlet.xml /

 You can find for more details here:
 http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html

 Cheers,
 - Dan

 On 7/17/07, Jacob Marcus [EMAIL PROTECTED] wrote:
 
  I am not importing the cxf bean definitions in my spring
configuration.
 
  Here is my cxf.xml file.
 
 
  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.xsd
  http://cxf.apache.org/simple
  http://cxf.apache.org/schemas/simple.xsd;
 
  simple:server id=Test address=/hello
  serviceBean=#helloService serviceClass=
  com.ironmountain.digital.erm.irmrap.cl.soap.util.Hello
/simple:server
 
  /beans
 
  The relevant portions of my web.xml is below.
 
 
  context-param
  param-namecontextConfigLocation/param-name
  param-value
  classpath:configuration-sprcfg.xml,
  classpath:version-configuration-sprcfg.xml,
  classpath:jmx-sprcfg.xml,
  classpath:storage-common-sprcfg.xml,
  classpath:services-authorization-sprcfg.xml,
  classpath:services-sprcfg.xml,
  classpath:cl-http-security-sprcfg.xml,
  classpath:soap-sprcfg.xml
  /param-value
  /context-param
 
  servlet
  servlet-nameCXFServlet/servlet-name
  display-nameCXF Servlet/display-name
  servlet-class
  org.apache.cxf.transport.servlet.CXFServlet
  /servlet-class
  load-on-startup3/load-on-startup
/servlet
 
servlet-mapping
  servlet-nameCXFServlet/servlet-name
  url-pattern/cxfservices/*/url-pattern
/servlet-mapping
 
  listener
  listener-class
  org.springframework.web.context.ContextLoaderListener
  /listener-class
  /listener
 
 
  On 7/17/07, Dan Diephouse [EMAIL PROTECTED] wrote:
  
   Can you show me what your web.xml and whole cxf.xml look like? How
are
  you
   importing the CXF bean definitions?
  
   Thanks,
   - Dan
  
   On 7/16/07, Jacob Marcus [EMAIL PROTECTED] wrote:
   
Thanks Dan. That worked.
   
from the cxf.xml I would like to refer to a bean defined else
where
   like,
   
simple:server id=Test address=
http://localhost:8081/tes/cxfservices/HelloWorld;
serviceClass=com.test.HelloWorld
simple:serviceBean#helloService/simple:serviceBean
  /simple:server
   
This is giving me an error saying the bean with id helloService
 cannot
   be
found. It appears that the SpringBusFactory does not have the bean
definition. Is there a way I can instruct the server to use a
 specific
bus?
   
My spring application context is defined in the web.xml and I use
 the
ContextLoaderListener.
My problem is that the cxf.xml does not seem to be able to refer
to
   beans
in
my application context.
   
Thanks in advance for your help,
Jacob
   
On 7/14/07, Dan Diephouse [EMAIL PROTECTED] wrote:

 Hi Jacob,

 I would go with something like:

 dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-frontend-jaxws/artifactId
 version2.0-incubator/version
 /dependency
 dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-transports-http/artifactId
 version2.0-incubator/version
 /dependency
 !-- Jetty is needed if you're are not using the
 CXFServlet
   --
 dependency
 groupIdorg.apache.cxf/groupId

  artifactIdcxf-rt-transports-http-jetty/artifactId
  

Re: JAX-WS/annotated SOAP services -- exporting implementation methods rather than interface ones?

2007-07-18 Thread Daniel Kulp


Actually, I think there is a bug with using the methods on the impl 
instead of the interface.I ran into something very similar today 
while writing a testcase for CXF-655.   I just didn't have time to 
investigate as CXF-655 was troublesome enough. I'll dig into it more 
tomorrow.


Dan




On Wednesday 18 July 2007 18:10, Dan Diephouse wrote:
 Hi Stuart,
 Did you specify a @WebService(endpointInterface=...YourInterface) on
 the implementation class? You're using the JAX-WS frontend and per the
 JAX-WS spec, thats how its supposed to work :-)

 Cheers,
 - Dan

 On 7/18/07, Stuart Bingë [EMAIL PROTECTED] wrote:
  Hello all,
 
  We've been using XFire (specifically its SOAP transport) together
  with JSR-181
  annotations for some time now in our internal Spring-based web
  services (hosted in Tomcat), and are now in the process of looking
  to upgrade to CXF
  as part of a general systems upgrade. The web services are
  java-first, where we code to a SEI and then rely on XFire to
  generate the WSDL as appropriate. In addition, the SOAP binding used
  is RPC/Literal for interoperability with PHP clients.
 
  After following the Writing a service with Spring article on the
  CXF site
  (http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html
 ), as well as attempting the basic HelloWorld applet that the
  article describes
  (i.e. separate from our existing environment/services), I've
  discovered some
  strange behaviour that wasn't present with XFire.
 
  When exposing an endpoint via jaxws:endpoint ... /, the generated
  WSDL appears to be coming from the implementation class rather than
  the service interface -- i.e. getters and setters for
  implementation-specific properties
  are included in the WSDL.

 Is this the expected behaviour with jaxws:endpoint /? If so, what
 other

  methods are available/recommended for exposing an endpoint via an
  interface
  rather than an implementation object?

 This can be solved with @WebMethod(ignore = true) annotations on the

  implementation class, but obviously this isn't ideal and shouldn't
  be needed
  in the first place. We'd like to continue just exposing the
  interface as the
  service contract and then be able to implement the service in
  whatever way we
  deem fit.
 
  Any pointers would be greatly appreciated!
 
  Cheers,
  --
  Stuart Bingë
 
  
 __
 
  Complinet Ltd is registered in England. Registered office at
  Vintners Place, 68 Upper Thames Street, London EC4V 3BJ. Company
  number 3170722. VAT No. 749 324 021.
  Complinet Inc is a corporation registered in Delaware, USA.
 
  This email has been scanned by the MessageLabs Email Security
  System.

-- 
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727C: 508-380-7194
[EMAIL PROTECTED]
http://www.dankulp.com/blog