Re: SOAP flow Compression?

2007-12-19 Thread Tophebboy

I don't know how the interceptor was added to the bus. I didn't do that. I
guess this is the default behaviour of the projects created with Eclipse SOA
Tools...
So I tried to move to CXF 2.0.3
= I downloaded it
= I deleted the libraries of CXF 2.0.2 in my local Tomcat (which I'm using
for development) and replaced them by the 2.0.3 ones
= I did the same thing with my CXF client lib dir
= I changed the classpath of my CXF web service to use the 2.0.3 libs
= I deployed my brand new Web Service and launched my new client

 I have now this error on the client side:
java.io.IOException: Not in GZIP format
at java.util.zip.GZIPInputStream.readHeader(Unknown Source)
at java.util.zip.GZIPInputStream.init(Unknown Source)
at java.util.zip.GZIPInputStream.init(Unknown Source)
at ...
:sleep:

So I tried to remove the interceptor and now I have this on the client side:

org.apache.cxf.binding.soap.SoapFault: null is not a valid SOAP version.
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:90)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:56)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.onMessage(ClientImpl.java:402)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1948)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:254)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:205)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
at $Proxy33.getBlueprintsList(Unknown Source)
at
com.structis.edoc.services.test.client.ServiceConsumer.useLightListService(ServiceConsumer.java:94)
at
com.structis.edoc.services.test.client.EDocDocumentumWebServiceRequest.getBlueprintsList(EDocDocumentumWebServiceRequest.java:57)
at
com.structis.edoc.services.test.action.LookForDocumentumBlueprintsAction.run(LookForDocumentumBlueprintsAction.java:38)
at 
org.eclipse.ui.internal.PluginAction.runWithEvent(PluginAction.java:256)
at
org.eclipse.ui.internal.WWinPluginAction.runWithEvent(WWinPluginAction.java:229)
at
org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(ActionContributionItem.java:546)
at
org.eclipse.jface.action.ActionContributionItem.access$2(ActionContributionItem.java:490)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEvent(ActionContributionItem.java:402)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:938)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3682)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3293)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.java:2389)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:2353)
at org.eclipse.ui.internal.Workbench.access$4(Workbench.java:2219)
at org.eclipse.ui.internal.Workbench$4.run(Workbench.java:466)
at
org.eclipse.core.databinding.observable.Realm.runWithDefault(Realm.java:289)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Workbench.java:461)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.java:149)
at com.structis.edoc.edocclient.Application.start(Application.java:37)
at
org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:169)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:106)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:76)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:363)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:176)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)

Re: org.apache.cxf.binding.soap.SOAPMessage information organization

2007-12-19 Thread Davide Gesino

Thanx a lot dan nd sorry for the silly question, but debugging I was driven
astray and I thought it was far more difficult than it was.

Davide


dkulp wrote:
 
 
 Davide,
 
 It sounds like you missed the msg.getContent(...) call.
 
 The content is different than the properties.   The properties are 
 generally metainformation that is used to pass things along while 
 processing the message.   The content is really the content that is 
 being manipulated.
 
 In your case, you probably want to do:
 
 List lst = msg.getContent(List.class);
 to return the list of objects.   The MessagePartInfo object that you DID 
 find is useful here as it has a getIndex() call on it to tell you where 
 in the above list the object corresponding to that call should be found.
 
 Dan
 
 
 On Tuesday 18 December 2007, Davide Gesino wrote:
 I have some problems with the logical organizations of data in the
 SOAPMessage class.

 I am trying to manage Message informations in the header: at this
 point I have problems figuring out how the header infos are organized
 in this class.

 Considering a message such as:

 # BEFORE SENDING
 in the PRE_PROTOCOL phase debugging I have found the infos with this
 (maybe unorthodox) code:
 ArrayList  obj = (ArrayList)message.get(client.holders);
 HolderHeaderT holder = (HolderHeaderT)obj.get(0);
 HeaderT represents my header bean.

 # AFTER RECEIVING
 I can't understand how the info is organized.
 in the POST_RECEIVE phase i do not get anything with the
 message.get(client.holders) method.

 using:
 MessageInfo fuffa =
 (MessageInfo)message.get(org.apache.cxf.service.model.MessageInfo);
 MessagePartInfo maybeHeader =
 (MessagePartInfo)fuffa.getMessagePart(new
 QName(tmf854.v1.ws,mtosiHeader));
 maybeHeader.getTypeClass() returns the right class HeaderT, but I
 cannot find the HeaderT object inside the header.

 What is the rationale in the scheme? how are the Message and
 SOAPMessage classes organized and how the info is structired inside
 these classes? How can I add and new Headers or change existing
 headers?
 
 
 
 -- 
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
 
 

-- 
View this message in context: 
http://www.nabble.com/org.apache.cxf.binding.soap.SOAPMessage-information-organization-tp14398903p14413072.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: SOAP flow Compression?

2007-12-19 Thread Tophebboy

I tried just displaying my wsdl through Firefox, and even that doesn't work
now. I checked my Tomcat log, and trying to display my wsdl leads to this:

javax.servlet.ServletException: Servlet.init() pour la servlet cxf a
généré une exception

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)

cause mère

org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'EDocRequest_xml_bare': Invocation of init method failed; nested
exception is java.lang.AbstractMethodError:
com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/String;

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1174)

org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:425)

org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:251)

org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:156)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:248)

org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:160)

org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:287)

org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:352)

org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(CXFServlet.java:145)

org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java:113)
org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java:63)

org.apache.cxf.transport.servlet.AbstractCXFServlet.init(AbstractCXFServlet.java:86)

org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)

org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)

org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)

org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)

org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)

org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)

org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)

cause mère

java.lang.AbstractMethodError:
com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/String;
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)

org.apache.ws.commons.schema.utils.DOMUtil.getInputEncoding(DOMUtil.java:594)

org.apache.ws.commons.schema.XmlSchemaCollection.read(XmlSchemaCollection.java:365)
org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:106)
org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:66)

org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(WSDLServiceBuilder.java:263)

org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:238)

org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilder.java:150)

org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:117)

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildServiceFromWSDL(ReflectionServiceFactoryBean.java:257)

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeServiceModel(ReflectionServiceFactoryBean.java:331)

org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(ReflectionServiceFactoryBean.java:151)

org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsServiceFactoryBean.java:93)

org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:74)

org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:108)

org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBean.java:147)

Re: jsr181 annotations?

2007-12-19 Thread Nino Saturnino Martinez Vazquez Wael

thanks for the information. Good to know why.

Daniel Kulp wrote:
It's partially because Sun keeps screwing around with their maven 
repository and replacing jars without changing version numbers, 
modifying pom dependencies, etc...   


For example:
  dependency
  groupIdjavax.xml.ws/groupId
  artifactIdjaxws-api/artifactId
  version2.1/version
  /dependency

The one at the Sun repository is DIFFERENT than the one with the same 
groupid/artifactId at central.   That is because central took the 
original one, but Sun then decided to change it later.   At central we 
took the updated version and set the version to 2.1-1 (which is what CXF 
now uses).   I would suggest using that version.   If you don't, you 
will run into issues depending on which version maven downloads first.   
For reproducible builds, I highly suggest sticking with the jars and 
such that are available at central.   For JSR-181, the geronimo-specs 
versions are probably the best.  


Dan




On Tuesday 18 December 2007, Nino Saturnino Martinez Vazquez Wael wrote:
  

Sorry this was wrong, seems you need the geronimo one after all..

Nino Saturnino Martinez Vazquez Wael wrote:


Hmm

This seems very vendor specific, I though as with JPA these
annotation would be decoupled and loosely attached, so after writing
the service you could select a vendor?

Btw we are using tomcat.. I've had some luck using this:

 dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-frontend-jaxws/artifactId
 version2.0.3-incubator/version
 /dependency

But again it seems to be specific for cxf, it includes a
jax-ws-api.jar .. Oh this is the solution:)

So the dependency should be, for the latest version:
 dependency
 groupIdjavax.xml.ws/groupId
 artifactIdjaxws-api/artifactId
 version2.1/version
 /dependency



regards Nino

Freeman Fang wrote:
  

Hi,
Try add

dependency
groupIdorg.apache.geronimo.specs/groupId
   
artifactIdgeronimo-ws-metadata_2.0_spec/artifactId

version1.1.1/version
/dependency

in your pom
This dependency should have jsr181

Freeman

On Dec 18, 2007 6:23 PM, Nino Saturnino Martinez Vazquez Wael 

[EMAIL PROTECTED] wrote:


Hi

We are using java 1.5, and I've been trying to find the maven
dependency
for jsr181 annotations all day now but cant find them.

Now this is what I've found, although maven denies to download it
gives me an url and I can install manually:

http://repo1.maven.org/maven2/javax/jws/jsr181/1.0/

But seems to be more of a tool kit and feels somewhat wrong, also
eclipse does not pickup the new annotations. Eclipse picked up the
jsr181 from xfire just fine. So I am starting to think that I am
way off
track here?

--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684
  




  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



Re: Restful web services usage [WAS : JAXB Unmarshalling]

2007-12-19 Thread Nino Saturnino Martinez Vazquez Wael

Hi Eric

First of all, I must confess that im pretty new to all this webservice 
stuff. I found a blog about restful web services that describes howto 
interact with them:


http://blog.jonudell.net/2007/05/24/restful-web-services/

But you want a kind of client interface for that aswell?

regards Nino

Eric Le Goff wrote:

Sergey,

I must admit my question was badly asked. Actually I am wondering how
I could use restful web-services if clients only get an XML
representation of the Object they request ?
I am not using SOAP, nor any WSDL description.

I expected to be able to get a kind of stub object on client side
(may be thanks to a sort of unmarshalling of this XML I get from the
server)

The CXF Jaxrs demo piece of code I have shown in my previous mail only
shows how to display an XML representation of Customer with Id 123
which is fine. But in my case, I would like to manipulate an actual
Customer stub instance, so that I can call methods on it and do
interesting things with what the server has sent to me.

I might be confused because so far I was using Hessian
(http://hessian.caucho.com/) where their binary protocol allow a web
service client to get an actual instance of the object they request.

I might be totally wrong about Restful web services, and I realize
that it may totally absurd to have the same behaviour with REST as
what I had  with Hessian.

My question is more general :
How do Clients of Restful webservices get a concrete use of the XML
content they receive from the server ?
(I guess people just don't print out this XML on console :) but I
suppose they have to parse it/ unmarshall it  in some way ?)



PS :I don't know about WADL , so please excuse my ignorance.

Thanks for helping anyway ;)

Eric






On Dec 19, 2007 11:54 AM, Sergey Beryozkin [EMAIL PROTECTED] wrote:
  

Hi

I'm wondering, are you actually asking for a code generation be done on a 
client side with the help of a description language like WSDL 2.0 or WADL ?

Cheers, Sergey



- Original Message -
From: Eric Le Goff [EMAIL PROTECTED]
To: cxf-user@incubator.apache.org
Sent: Tuesday, December 18, 2007 4:34 PM
Subject: JAXB Unmarshalling




I am going on playing with the restful_jaxrs sample demo


In the Client.java there are these lines

...
URL url = new URL(http://localhost:9000/customerservice/customers/123;);
   InputStream in = url.openStream();
   System.out.println(getStringFromInputStream(in));



What if I did not want to display the XML content (ie the XML
representation of customer whose Id is 123)
But rather I would like to get the actual instance of Customer with id is 123

Is there some Unmarshalling method to do that , something like

...
URL url = new URL(http://localhost:9000/customerservice/customers/123;);
   InputStream in = url.openStream();

// Hypothetic code
Customer customer = (Customer) getObjectFromInputStream(in);
...

How would I implement this

Object getObjectFromInputStream(InputStream in)

method ?

I guess I would have to get a JaxbContext before I can get an Unmarshaller ?


Thanks for your help

Eric




--
Eric Le Goff
  


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland






  


--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



Re: Restful web services usage [WAS : JAXB Unmarshalling]

2007-12-19 Thread Sergey Beryozkin
Hi Eric

You asked a very good question.
It's always a choice. 

If you take XML out of the wire and handle it directly, perhaps
by providing some STAX/SAX handler which will populate a Customer class you 
created yourself (thus non necessarily even matching the actual data on the 
wire), then your client code in general is likely to be more robust when 
dealing with some changes on the server side.

I appreciate you're not using SOAP :-) but RESTful services may have their own 
machine-processible documents (WSDL 2.0/WADL). If you prefer to deal with more 
statically-typed artifacts, like Customer which is automatically populated for 
you by an underlying JAXB runtime, then one way or another you need to tell to 
the client runtime how to do it for you. I'm not aware of Hessian, but 
generally, providing some sort of description should do the trick. I personally 
don't see using description languages as a total evil :-). IMHO, it's much more 
important to make the actual schema for the data extensible and try to make the 
runtime ignore unknown elements when possible/realistic. AFAIK JAXB can be 
configured to ignore unrecognized elements.

Cheers, Sergey



- Original Message - 
From: Eric Le Goff [EMAIL PROTECTED]
To: cxf-user@incubator.apache.org
Sent: Wednesday, December 19, 2007 11:32 AM
Subject: Restful web services usage [WAS : JAXB Unmarshalling]


 Sergey,
 
 I must admit my question was badly asked. Actually I am wondering how
 I could use restful web-services if clients only get an XML
 representation of the Object they request ?
 I am not using SOAP, nor any WSDL description.
 
 I expected to be able to get a kind of stub object on client side
 (may be thanks to a sort of unmarshalling of this XML I get from the
 server)
 
 The CXF Jaxrs demo piece of code I have shown in my previous mail only
 shows how to display an XML representation of Customer with Id 123
 which is fine. But in my case, I would like to manipulate an actual
 Customer stub instance, so that I can call methods on it and do
 interesting things with what the server has sent to me.
 
 I might be confused because so far I was using Hessian
 (http://hessian.caucho.com/) where their binary protocol allow a web
 service client to get an actual instance of the object they request.
 
 I might be totally wrong about Restful web services, and I realize
 that it may totally absurd to have the same behaviour with REST as
 what I had  with Hessian.
 
 My question is more general :
 How do Clients of Restful webservices get a concrete use of the XML
 content they receive from the server ?
 (I guess people just don't print out this XML on console :) but I
 suppose they have to parse it/ unmarshall it  in some way ?)
 
 
 
 PS :I don't know about WADL , so please excuse my ignorance.
 
 Thanks for helping anyway ;)
 
 Eric
 
 
 
 
 
 
 On Dec 19, 2007 11:54 AM, Sergey Beryozkin [EMAIL PROTECTED] wrote:
 Hi

 I'm wondering, are you actually asking for a code generation be done on a 
 client side with the help of a description language like WSDL 2.0 or WADL ?

 Cheers, Sergey



 - Original Message -
 From: Eric Le Goff [EMAIL PROTECTED]
 To: cxf-user@incubator.apache.org
 Sent: Tuesday, December 18, 2007 4:34 PM
 Subject: JAXB Unmarshalling


 I am going on playing with the restful_jaxrs sample demo
 
 
  In the Client.java there are these lines
 
  ...
  URL url = new URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 System.out.println(getStringFromInputStream(in));
  
 
 
  What if I did not want to display the XML content (ie the XML
  representation of customer whose Id is 123)
  But rather I would like to get the actual instance of Customer with id is 
  123
 
  Is there some Unmarshalling method to do that , something like
 
  ...
  URL url = new URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 
  // Hypothetic code
  Customer customer = (Customer) getObjectFromInputStream(in);
  ...
 
  How would I implement this
 
  Object getObjectFromInputStream(InputStream in)
 
  method ?
 
  I guess I would have to get a JaxbContext before I can get an Unmarshaller 
  ?
 
 
  Thanks for your help
 
  Eric
 
 
 
 
  --
  Eric Le Goff

 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland

 
 
 
 -- 
 Eric Le Goff


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Restful web services usage [WAS : JAXB Unmarshalling]

2007-12-19 Thread Eric Le Goff
Sergey,

I must admit my question was badly asked. Actually I am wondering how
I could use restful web-services if clients only get an XML
representation of the Object they request ?
I am not using SOAP, nor any WSDL description.

I expected to be able to get a kind of stub object on client side
(may be thanks to a sort of unmarshalling of this XML I get from the
server)

The CXF Jaxrs demo piece of code I have shown in my previous mail only
shows how to display an XML representation of Customer with Id 123
which is fine. But in my case, I would like to manipulate an actual
Customer stub instance, so that I can call methods on it and do
interesting things with what the server has sent to me.

I might be confused because so far I was using Hessian
(http://hessian.caucho.com/) where their binary protocol allow a web
service client to get an actual instance of the object they request.

I might be totally wrong about Restful web services, and I realize
that it may totally absurd to have the same behaviour with REST as
what I had  with Hessian.

My question is more general :
How do Clients of Restful webservices get a concrete use of the XML
content they receive from the server ?
(I guess people just don't print out this XML on console :) but I
suppose they have to parse it/ unmarshall it  in some way ?)



PS :I don't know about WADL , so please excuse my ignorance.

Thanks for helping anyway ;)

Eric






On Dec 19, 2007 11:54 AM, Sergey Beryozkin [EMAIL PROTECTED] wrote:
 Hi

 I'm wondering, are you actually asking for a code generation be done on a 
 client side with the help of a description language like WSDL 2.0 or WADL ?

 Cheers, Sergey



 - Original Message -
 From: Eric Le Goff [EMAIL PROTECTED]
 To: cxf-user@incubator.apache.org
 Sent: Tuesday, December 18, 2007 4:34 PM
 Subject: JAXB Unmarshalling


 I am going on playing with the restful_jaxrs sample demo
 
 
  In the Client.java there are these lines
 
  ...
  URL url = new URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 System.out.println(getStringFromInputStream(in));
  
 
 
  What if I did not want to display the XML content (ie the XML
  representation of customer whose Id is 123)
  But rather I would like to get the actual instance of Customer with id is 
  123
 
  Is there some Unmarshalling method to do that , something like
 
  ...
  URL url = new URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 
  // Hypothetic code
  Customer customer = (Customer) getObjectFromInputStream(in);
  ...
 
  How would I implement this
 
  Object getObjectFromInputStream(InputStream in)
 
  method ?
 
  I guess I would have to get a JaxbContext before I can get an Unmarshaller ?
 
 
  Thanks for your help
 
  Eric
 
 
 
 
  --
  Eric Le Goff

 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland




-- 
Eric Le Goff


Re: any irc channel for equivalent to this mailing list?

2007-12-19 Thread Nino Saturnino Martinez Vazquez Wael
And subject should have been any irc channel equivalent to this mailing 
list? Sorry for my poor spelling today.


Nino Saturnino Martinez Vazquez Wael wrote:

are there?



--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



any irc channel for equivalent to this mailing list?

2007-12-19 Thread Nino Saturnino Martinez Vazquez Wael

are there?

--
Nino Martinez Wael
Java Specialist @ Jayway DK
http://www.jayway.dk
+45 2936 7684



Re: any irc channel for equivalent to this mailing list?

2007-12-19 Thread Willem Jiang

It is [EMAIL PROTECTED]

Willem.

Nino Saturnino Martinez Vazquez Wael wrote:
And subject should have been any irc channel equivalent to this 
mailing list? Sorry for my poor spelling today.


Nino Saturnino Martinez Vazquez Wael wrote:

are there?







Re: SOAP flow Compression?

2007-12-19 Thread Tophebboy

I just tried this! I downloaded xercesImpl 2.8.1.jar and put it in my Tomcat
Eclipse execution config classpath, before DFC.jar, and, now, I can call my
services.
But, even with CXF 2.0.3, I still have the same java.io.IOException: Cached
file was deleted error...:sleep:
Any idea?



willem.jiang wrote:
 
 Can you use xercesImpl 2.8.1.jar instead of the documentum's  ?
 
 com.documentum.xerces_2_3_0
 .xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/String;
 
 Willem.
 
 
 On Dec 19, 2007 6:16 PM, Tophebboy [EMAIL PROTECTED] wrote:
 

 I tried just displaying my wsdl through Firefox, and even that doesn't
 work
 now. I checked my Tomcat log, and trying to display my wsdl leads to
 this:
 
 javax.servlet.ServletException: Servlet.init() pour la servlet cxf a
 généré une exception

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
 :117)
org.apache.catalina.connector.CoyoteAdapter.service(
 CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(
 Http11Processor.java:874)


 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:665)

 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
 PoolTcpEndpoint.java:528)

 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
 LeaderFollowerWorkerThread.java:81)

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
 ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)

 cause mère

 org.springframework.beans.factory.BeanCreationException: Error creating
 bean
 with name 'EDocRequest_xml_bare': Invocation of init method failed;
 nested
 exception is java.lang.AbstractMethodError:

 com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding
 ()Ljava/lang/String;


 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
 (AbstractAutowireCapableBeanFactory.java:1174)


 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
 (AbstractAutowireCapableBeanFactory.java:425)

 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
 AbstractBeanFactory.java:251)


 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
 (DefaultSingletonBeanRegistry.java:156)

 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:248)

 org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
 AbstractBeanFactory.java:160)


 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
 (DefaultListableBeanFactory.java:287)

 org.springframework.context.support.AbstractApplicationContext.refresh(
 AbstractApplicationContext.java:352)

 org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(
 CXFServlet.java:145)

 org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(CXFServlet.java
 :113)
   
 org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java
 :63)

 org.apache.cxf.transport.servlet.AbstractCXFServlet.init(
 AbstractCXFServlet.java:86)

 org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java
 :117)
org.apache.catalina.connector.CoyoteAdapter.service(
 CoyoteAdapter.java:151)
org.apache.coyote.http11.Http11Processor.process(
 Http11Processor.java:874)


 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
 (Http11BaseProtocol.java:665)

 org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
 PoolTcpEndpoint.java:528)

 org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
 LeaderFollowerWorkerThread.java:81)

 org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
 ThreadPool.java:689)
java.lang.Thread.run(Unknown Source)

 cause mère

 java.lang.AbstractMethodError:

 com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding
 ()Ljava/lang/String;
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
java.lang.reflect.Method.invoke(Unknown Source)

 org.apache.ws.commons.schema.utils.DOMUtil.getInputEncoding(DOMUtil.java
 :594)

 org.apache.ws.commons.schema.XmlSchemaCollection.read(
 XmlSchemaCollection.java:365)
   
 org.apache.cxf.wsdl11.SchemaUtil.extractSchema(SchemaUtil.java:106)
org.apache.cxf.wsdl11.SchemaUtil.getSchemas(SchemaUtil.java:66)

 org.apache.cxf.wsdl11.WSDLServiceBuilder.getSchemas(
 WSDLServiceBuilder.java:263)

 org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(
 WSDLServiceBuilder.java:238)

 org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(
 WSDLServiceBuilder.java:150)

 org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java
 :117)


 

Re: SOAP flow Compression?

2007-12-19 Thread Tophebboy

I really checked everything, and it still doesn't work...Is there any way to
check programmatically whih CXF version you're using when responding to a
web service request (in my web service implementation class, for example)???


willem.jiang wrote:
 
 I think you need to do some clean up work in your class path to make sure
 you are using the CXF 2.0.3.
 You can find more information about the issue here[1]
 
 [1]http://issues.apache.org/jira/browse/CXF-986
 
 Willem.
 
 On Dec 19, 2007 9:41 PM, Tophebboy [EMAIL PROTECTED] wrote:
 

 I just tried this! I downloaded xercesImpl 2.8.1.jar and put it in my
 Tomcat
 Eclipse execution config classpath, before DFC.jar, and, now, I can call
 my
 services.
 But, even with CXF 2.0.3, I still have the same java.io.IOException:
 Cached
 file was deleted error...:sleep:
 Any idea?



 willem.jiang wrote:
 
  Can you use xercesImpl 2.8.1.jar instead of the documentum's  ?
 
  com.documentum.xerces_2_3_0
  .xerces.dom.DeferredDocumentImpl.getInputEncoding()Ljava/lang/String;
 
  Willem.
 
 
  On Dec 19, 2007 6:16 PM, Tophebboy [EMAIL PROTECTED] wrote:
 
 
  I tried just displaying my wsdl through Firefox, and even that doesn't
  work
  now. I checked my Tomcat log, and trying to display my wsdl leads to
  this:
  
  javax.servlet.ServletException: Servlet.init() pour la servlet cxf a
  généré une exception
 
  org.apache.catalina.valves.ErrorReportValve.invoke(
 ErrorReportValve.java
  :117)
 org.apache.catalina.connector.CoyoteAdapter.service(
  CoyoteAdapter.java:151)
 org.apache.coyote.http11.Http11Processor.process(
  Http11Processor.java:874)
 
 
 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
  (Http11BaseProtocol.java:665)
 
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
  PoolTcpEndpoint.java:528)
 
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
  LeaderFollowerWorkerThread.java:81)
 
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
  ThreadPool.java:689)
 java.lang.Thread.run(Unknown Source)
 
  cause mère
 
  org.springframework.beans.factory.BeanCreationException: Error
 creating
  bean
  with name 'EDocRequest_xml_bare': Invocation of init method failed;
  nested
  exception is java.lang.AbstractMethodError:
 
 
 com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding
  ()Ljava/lang/String;
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean
  (AbstractAutowireCapableBeanFactory.java:1174)
 
 
 
 org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean
  (AbstractAutowireCapableBeanFactory.java:425)
 
 
 org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(
  AbstractBeanFactory.java:251)
 
 
 
 org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton
  (DefaultSingletonBeanRegistry.java:156)
 
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
  AbstractBeanFactory.java:248)
 
  org.springframework.beans.factory.support.AbstractBeanFactory.getBean(
  AbstractBeanFactory.java:160)
 
 
 
 org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons
  (DefaultListableBeanFactory.java:287)
 
 
 org.springframework.context.support.AbstractApplicationContext.refresh(
  AbstractApplicationContext.java:352)
 
  org.apache.cxf.transport.servlet.CXFServlet.loadAdditionalConfig(
  CXFServlet.java:145)
 
  org.apache.cxf.transport.servlet.CXFServlet.loadSpringBus(
 CXFServlet.java
  :113)
 
  org.apache.cxf.transport.servlet.CXFServlet.loadBus(CXFServlet.java
  :63)
 
  org.apache.cxf.transport.servlet.AbstractCXFServlet.init(
  AbstractCXFServlet.java:86)
 
  org.apache.catalina.valves.ErrorReportValve.invoke(
 ErrorReportValve.java
  :117)
 org.apache.catalina.connector.CoyoteAdapter.service(
  CoyoteAdapter.java:151)
 org.apache.coyote.http11.Http11Processor.process(
  Http11Processor.java:874)
 
 
 
 org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection
  (Http11BaseProtocol.java:665)
 
  org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(
  PoolTcpEndpoint.java:528)
 
  org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(
  LeaderFollowerWorkerThread.java:81)
 
  org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(
  ThreadPool.java:689)
 java.lang.Thread.run(Unknown Source)
 
  cause mère
 
  java.lang.AbstractMethodError:
 
 
 com.documentum.xerces_2_3_0.xerces.dom.DeferredDocumentImpl.getInputEncoding
  ()Ljava/lang/String;
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
 java.lang.reflect.Method.invoke(Unknown Source)
 
  

RE: Issue with Java first functions and Arguement Sequence

2007-12-19 Thread Vespa, Anthony J
It's called 

JavaScript Soap Client and is located at:

http://www.codeplex.com/JavaScriptSoapClient/Release/ProjectReleases.asp
x?ReleaseId=1775


-Original Message-
From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 9:43 AM
To: cxf-user@incubator.apache.org
Cc: Vespa, Anthony J
Subject: Re: Issue with Java first functions and Arguement Sequence


If the other frontend is doing that, it is doing it wrong and is a bug
in 
that frontend.   Is there any way that frontend can be fixed to generate

proper messages that match the wsdl/schema?  What toolkit is it?

I kind of hate putting major hacks in place to workaround very serious 
flaws in other toolkits, but if there isn't any other way

Dan


On Wednesday 19 December 2007, Vespa, Anthony J wrote:
 I'm having an issue and can't quite find an answer to my query in the
 mailing list archives.  I am doing Java first development and using
 AEGIS Binding am having an issue.  I had written to the list before
 about it but am looking for further suggestions.

 The front end client is forming the soap message using a hashmap and
 my concern is that there is the chance that parameters will come in a
 different sequence than that specified in my WSDL.   IF this occurs,
 at best I get wrong results, at worst I get a SoapFault and tons of
 exceptions.  I am flumoxed by this and would like to find a workaround
 as I can't always depend on the various front ends to be constructing
 things in the same order.

 Is there any way to force 'by name' parameter resolution?

 I have several functions; some taking primitives, some taking objects.
 This is a sample of my WSDL.

 The segment of my WSDL looks like

 xsd:element name=getMessages type=tns:getMessages /
 xsd:complexType name=getMessages
 xsd:sequence
 xsd:element minOccurs=0 name=messageBoardId type=xsd:long /
 xsd:element minOccurs=0 name=qualifier type=xsd:string /
 xsd:element minOccurs=0 name=omitMessageText type=xsd:boolean
 / /xsd:sequence
 /xsd:complexType

 And SEI is...

 @WebResult(name = getMessagesResult)
 @WebMethod
 public wsResponsewsMessage getMessages {
 @WebParam(name = messageBoardId)Long messageBoardId,
 @WebParam(name = qualifier)String qualifier,
 @WebParam(name = omitMessageText)Boolean
 omitMessageText);

 Thanks very much!

 Tony



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: Changing default min occurs in WSDL.

2007-12-19 Thread Benson Margulies
Aegis is the only binding I'm aware of that has this option. Dan might
be able to shed light on the xmlbeans option, if any.


On Wed, 2007-12-19 at 06:57 -0800, MyScreenName wrote:
 Ok.  What if I changed to another binding?  It doesn't have to be an
 annotation.  A mapping in the xml file would do.
 
 Thanks.
 
 
 
 Benson Margulies-4 wrote:
  
  JAXB doesn't define an annotation for this, and we incorporate the JAXB
  RI in such a way that I doubt that we could add this feature easily.
  
  On Tue, 2007-12-18 at 15:04 -0800, MyScreenName wrote:
  Is there any way in CXF to change the default minOccurs from a 0 to a 1
  for a
  generated WSDL?  I noticed that in Xfire/Aegis you can using mapping
  properties but I am not using Aegis.  
  
  One would think that this would be an @WebParam setting...
  
  
  
 



RE: Issue with Java first functions and Arguement Sequence

2007-12-19 Thread Benson Margulies
Anthony,

Stand by for an alternative ...

--benson


On Wed, 2007-12-19 at 10:17 -0500, Vespa, Anthony J wrote:
 It's called 
 
 JavaScript Soap Client and is located at:
 
 http://www.codeplex.com/JavaScriptSoapClient/Release/ProjectReleases.asp
 x?ReleaseId=1775
 
 
 -Original Message-
 From: Daniel Kulp [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 19, 2007 9:43 AM
 To: cxf-user@incubator.apache.org
 Cc: Vespa, Anthony J
 Subject: Re: Issue with Java first functions and Arguement Sequence
 
 
 If the other frontend is doing that, it is doing it wrong and is a bug
 in 
 that frontend.   Is there any way that frontend can be fixed to generate
 
 proper messages that match the wsdl/schema?  What toolkit is it?
 
 I kind of hate putting major hacks in place to workaround very serious 
 flaws in other toolkits, but if there isn't any other way
 
 Dan
 
 
 On Wednesday 19 December 2007, Vespa, Anthony J wrote:
  I'm having an issue and can't quite find an answer to my query in the
  mailing list archives.  I am doing Java first development and using
  AEGIS Binding am having an issue.  I had written to the list before
  about it but am looking for further suggestions.
 
  The front end client is forming the soap message using a hashmap and
  my concern is that there is the chance that parameters will come in a
  different sequence than that specified in my WSDL.   IF this occurs,
  at best I get wrong results, at worst I get a SoapFault and tons of
  exceptions.  I am flumoxed by this and would like to find a workaround
  as I can't always depend on the various front ends to be constructing
  things in the same order.
 
  Is there any way to force 'by name' parameter resolution?
 
  I have several functions; some taking primitives, some taking objects.
  This is a sample of my WSDL.
 
  The segment of my WSDL looks like
 
  xsd:element name=getMessages type=tns:getMessages /
  xsd:complexType name=getMessages
  xsd:sequence
  xsd:element minOccurs=0 name=messageBoardId type=xsd:long /
  xsd:element minOccurs=0 name=qualifier type=xsd:string /
  xsd:element minOccurs=0 name=omitMessageText type=xsd:boolean
  / /xsd:sequence
  /xsd:complexType
 
  And SEI is...
 
  @WebResult(name = getMessagesResult)
  @WebMethod
  public wsResponsewsMessage getMessages {
  @WebParam(name = messageBoardId)Long messageBoardId,
  @WebParam(name = qualifier)String qualifier,
  @WebParam(name = omitMessageText)Boolean
  omitMessageText);
 
  Thanks very much!
 
  Tony
 
 
 



Re: XML elements does not belong to the namespace

2007-12-19 Thread tcs

Any thoughts on why the Java object fields are not set?


tcs wrote:
 
 The fix works!   The server now returns a SOAP response for the request.  
 
 But I do have another issue.  On the client side, based on the SOAP
 response body, the return type Java object is constructed for the invoked
 operation,  but its fields are not set. All fields of this object are null
 even though the sub-elements are present in the SOAP response body.  
 
 thanks
 
 

-- 
View this message in context: 
http://www.nabble.com/XML-elements-does-not-belong-to-the-namespace-tp14247019p14419414.html
Sent from the cxf-user mailing list archive at Nabble.com.



removing xsd:choice

2007-12-19 Thread Adrian C

I am trying to my my wsdl a bit more interoperable by removing xsd:choice 
using polymorphism instead as per the sugestions here:

http://www.ibm.com/developerworks/xml/library/ws-tip-xsdchoice.html

However I am running into issues with jaxb similar to those detailed here:
http://forums.java.net/jive/thread.jspa?messageID=31077tstart=0

i.e. only the supertype appears to be marshalled  the xsi:type is missing.

It seems that the only resolution is to give the jaxb
marshaller/unmarshaller the classes to be used for
marhsalling/unmarshalling!

Anyone come across this issue, found a resolution?
-- 
View this message in context: 
http://www.nabble.com/removing-xsd%3Achoice-tp14419440p14419440.html
Sent from the cxf-user mailing list archive at Nabble.com.



Hostname in SOAP Address Location

2007-12-19 Thread Michael Matczynski
Is there a way to modify the hostname that appears in the WSDL's
soap:address location?

I've been using a version of CXF built off of svn revision 551746 and it
appears that CXF determines what hostname to show based the HTTP headers (if
I request http://localhost:1/MyService?wsdl, the WSDL shows the
soap:address location as localhost, but if I request
http://my.hostname.com:1/MyService?wsdl
then I get my.hostname.com).

After upgrading to version 2.0.2, we're seeing the soap:address location
always set to localhost.  In my CXF setup code I'm setting the address of
the JaxWsServerFactoryBean to http://localhost:1/MyService;.  Maybe
there's another way to set the address to a specific port and location
without specifying an explicit hostname so it can default to the machine's
fully-qualified domain name?

Any idea what could have changed or how to configure this?

Thanks,
Mike

-- 
Michael Matczynski
e: [EMAIL PROTECTED]
c: 617-388-4606
w: www.zingtech.com
w: www.catchwine.com


RE: CXF adds JavaScript client-side processing

2007-12-19 Thread Vespa, Anthony J
This looks very interesting and we're going to try it out.


-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, December 19, 2007 10:42 AM
To: cxf-user
Subject: CXF adds JavaScript client-side processing

Hello CXF users,

For the past several months, we've been working to give CXF support for
Javascript clients ... in browsers.

To be more specific: the goal is to generate JavaScript that
communicates with an ordinary SOAP web service, described by a WSDL
file, using a plain old SOAP binding. No REST, no special HTTP
bindings. 

There are several kits for this purpose out there. They tend, based on
email traffic seen here, to have problems dealing the XML contents of
WS-I-compliant messages, particularly in the areas of namespace and
their prefixes.

CXF 2.1 will produce JavaScript clients from either wsdl or java. In the
simplest form, you can put the following in your HTML:

script type='text/javascript' src='/path/to/your/Endpoint?js'/script

and pull in the JavaScript client. You can also run wsdl2js or java2js
to generate files that you can serve up.

This functionality is now available in the most recent 2.1 snapshot. It
is described, warts and all, at the following URL.

http://cwiki.apache.org/CXF20DOC/javascript-clients.html

We (well, I) believe that this is working well enough to that people
should be able to get some useful work out of it while giving us
feedback on issues of taste and correctness.

So, please download the latest snapshot and give this a try.







Re: AegisDataBinding and Spring - Web Service fails to deploy

2007-12-19 Thread tcs

After following the instructions posted in the thread at:
http://forum.springframework.org/showthread.php?t=27967

I was able to debug the application startup in tomcat. I found out the issue
was the 'schemaLocation' attribute value in my spring 'beans.xml' file was
incorrect.

The correct xml is:

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


/beans

thanks


-- 
View this message in context: 
http://www.nabble.com/AegisDataBinding-and-Spring---Web-Service-fails-to-deploy-tp14339694p14420938.html
Sent from the cxf-user mailing list archive at Nabble.com.



Snapshot release 2.1

2007-12-19 Thread MyScreenName


Any idea when 2.1 will be declared stable (not snapshot)?
-- 
View this message in context: 
http://www.nabble.com/Snapshot-release-2.1-tp14421198p14421198.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Snapshot release 2.1

2007-12-19 Thread Christian Vest Hansen
Targeted Feb. 28: http://incubator.apache.org/cxf/roadmap.html


On 12/19/07, MyScreenName [EMAIL PROTECTED] wrote:


 Any idea when 2.1 will be declared stable (not snapshot)?
 --
 View this message in context: 
 http://www.nabble.com/Snapshot-release-2.1-tp14421198p14421198.html
 Sent from the cxf-user mailing list archive at Nabble.com.




-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.


RE: CXF adds JavaScript client-side processing

2007-12-19 Thread Benson Margulies
I'll enhance the sample in the next couple of days.

I think you are confirming a suspicion of mine, that I need to make the
generator generate a lot more comments.

In general, for each complex type, there will be an object with get/set
methods for the fields.

Can you share a WSDL? In the interests of getting a user, I could give
you some instructions for it.

--benson 


On Wed, 2007-12-19 at 12:31 -0500, Vespa, Anthony J wrote:
 Actually, could we get a more complex example than HelloWorld  - what
 is the correct approach to set values for a method that queries data?  
 
 In our function scheme, we pass a mix of types, including custom objects
 that have nested strings / ints in them as well.
 
 Any guidance is appreciated.
 
 Thx!
 
 Tony
 -Original Message-
 From: Benson Margulies [mailto:[EMAIL PROTECTED] 
 Sent: Wednesday, December 19, 2007 10:42 AM
 To: cxf-user
 Subject: CXF adds JavaScript client-side processing
 
 Hello CXF users,
 
 For the past several months, we've been working to give CXF support for
 Javascript clients ... in browsers.
 
 To be more specific: the goal is to generate JavaScript that
 communicates with an ordinary SOAP web service, described by a WSDL
 file, using a plain old SOAP binding. No REST, no special HTTP
 bindings. 
 
 There are several kits for this purpose out there. They tend, based on
 email traffic seen here, to have problems dealing the XML contents of
 WS-I-compliant messages, particularly in the areas of namespace and
 their prefixes.
 
 CXF 2.1 will produce JavaScript clients from either wsdl or java. In the
 simplest form, you can put the following in your HTML:
 
 script type='text/javascript' src='/path/to/your/Endpoint?js'/script
 
 and pull in the JavaScript client. You can also run wsdl2js or java2js
 to generate files that you can serve up.
 
 This functionality is now available in the most recent 2.1 snapshot. It
 is described, warts and all, at the following URL.
 
 http://cwiki.apache.org/CXF20DOC/javascript-clients.html
 
 We (well, I) believe that this is working well enough to that people
 should be able to get some useful work out of it while giving us
 feedback on issues of taste and correctness.
 
 So, please download the latest snapshot and give this a try.
 
 
 
 
 



CXF @WebServiceProvider deployment issue

2007-12-19 Thread Barlotta, Michael [USA]
Hello, I am using CXF 2.0.3 and am deploying an appliation to JBoss
using Spring and packaged as a WAR.
 
On JBoss startup I get the following error:BeanCreationException: Error
creating bean with name 'MessageRouter': Invocation of init method
failed; nested exception is java.lang.NullPointerException
 
Any idea what is causing this?
 
Thanks!
Mike
 
//- Java Code Annotations
 
@WebServiceProvider(
serviceName=MessageRouterService,
portName=RoutePortType,
targetNamespace=http://x/;,
wsdlLocation=WEB-INF/wsdl/MessageRouter.wsdl
)
@ServiceMode(Service.Mode.PAYLOAD)
public class MessageRouterEndpoint implements ProviderSource{
 
 
public Source invoke(Source payload) {
...
}
}
 
//- Spring config
beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:jaxws=http://cxf.apache.org/jaxws;
xmlns:soap=http://cxf.apache.org/bindings/soap;
xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd 
http://cxf.apache.org/bindings/soap
http://cxf.apache.org/schemas/configuration/soap.xsd;
 
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 /
 
jaxws:endpoint 
id=MessageRouter 
implementor=#MessageRouterService 
address=/fxml/route /
...
 
//- Stack Trace 
 
2007-12-19 17:08:16,591 55859 ERROR [STDERR] (main:) Dec 19, 2007
5:08:16 PM org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromWSDL
INFO: Creating Service {http://x/}MessageRouterService from WSDL:
WEB-INF/wsdl/MessageRouter.wsdl
2007-12-19 17:08:16,778 56046 ERROR
[org.springframework.web.context.ContextLoader] (main:) Context
initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating
bean with name 'MessageRouter': Invocation of init method failed; nested
exception is java.lang.NullPointerException
Caused by: 
java.lang.NullPointerException
 at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
r.java:226)
 at
org.apache.cxf.wsdl11.WSDLServiceBuilder.buildServices(WSDLServiceBuilde
r.java:150)
 at
org.apache.cxf.wsdl11.WSDLServiceFactory.create(WSDLServiceFactory.java:
117)
 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.buildService
FromWSDL(ReflectionServiceFactoryBean.java:257)
 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.initializeSe
rviceModel(ReflectionServiceFactoryBean.java:331)
 at
org.apache.cxf.service.factory.ReflectionServiceFactoryBean.create(Refle
ctionServiceFactoryBean.java:151)
 at
org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean.create(JaxWsService
FactoryBean.java:93)
 at
org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(
AbstractWSDLBasedEndpointFactory.java:74)
 at
org.apache.cxf.frontend.ServerFactoryBean.create(ServerFactoryBean.java:
108)
 at
org.apache.cxf.jaxws.JaxWsServerFactoryBean.create(JaxWsServerFactoryBea
n.java:147)
 at org.apache.cxf.jaxws.EndpointImpl.getServer(EndpointImpl.java:288)
 at org.apache.cxf.jaxws.EndpointImpl.doPublish(EndpointImpl.java:228)
 at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:179)
 at org.apache.cxf.jaxws.EndpointImpl.publish(EndpointImpl.java:341)
 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 java.lang.reflect.Method.invoke(Method.java:585)
 at ...
 


RE: JAXB Unmarshalling

2007-12-19 Thread Liu, Jervis

 -Original Message-
 From: Sergey Beryozkin [mailto:[EMAIL PROTECTED]
 Sent: 2007年12月19日 22:40
 To: cxf-user@incubator.apache.org
 Subject: Re: JAXB Unmarshalling
 
 By the way, can this approach (which uses JAXBContexts) work for you in
 CXF? :
 
 http://weblogs.java.net/blog/mhadley/archive/2006/03/restful_web_ser_1.
 html
 
[Liu, Jervis] You don’t have to use JAX-WS Dispatch API in this case. Once you 
grab the InputStream from HTTPClient (or other lightweight http client stack), 
you can call JAXB to marshal the response to your Customer object. There is no 
point to use a heavy stack like a JAX-WS runtime to do such a simple task. 
Following code snippet should do the job: 

public Object getObjectFromInputStream (ClassObject type,  InputStream 
is) {
try {
JAXBContext context = getJAXBContext(type);
Unmarshaller unmarshaller = context.createUnmarshaller();
return unmarshaller.unmarshal(is);
} catch (JAXBException e) {
e.printStackTrace(); 
}

return null;
}

private JAXBContext getJAXBContext(Class type) throws JAXBException {
synchronized (jaxbContexts) {
JAXBContext context = jaxbContexts.get(type);
if (context == null) {
context = JAXBContext.newInstance(type);
jaxbContexts.put(type, context);
}
return context;
}
}

static MapClass, JAXBContext jaxbContexts = new WeakHashMapClass, 
JAXBContext();

 You'd still need a schema describing the data like Customer, etc...
 Cheers. Sergey
 
 
 
 - Original Message -
 From: Eric Le Goff [EMAIL PROTECTED]
 To: cxf-user@incubator.apache.org
 Sent: Tuesday, December 18, 2007 4:34 PM
 Subject: JAXB Unmarshalling
 
 
 I am going on playing with the restful_jaxrs sample demo
 
 
  In the Client.java there are these lines
 
  ...
  URL url = new
 URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 System.out.println(getStringFromInputStream(in));
  
 
 
  What if I did not want to display the XML content (ie the XML
  representation of customer whose Id is 123)
  But rather I would like to get the actual instance of Customer with id is 
  123
 
  Is there some Unmarshalling method to do that , something like
 
  ...
  URL url = new
 URL(http://localhost:9000/customerservice/customers/123;);
 InputStream in = url.openStream();
 
  // Hypothetic code
  Customer customer = (Customer) getObjectFromInputStream(in);
  ...
 
  How would I implement this
 
  Object getObjectFromInputStream(InputStream in)
 
  method ?
 
  I guess I would have to get a JaxbContext before I can get an
 Unmarshaller ?
 
 
  Thanks for your help
 
  Eric
 
 
 
 
  --
  Eric Le Goff
 
 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland