Re: Base class members not serializing / deserializing

2008-04-04 Thread Brad O'Hearne

I thought I'd add some sample code:

My superclass:

@XmlType
public abstract class ServiceRequest {
private String ssid;

@XmlAttribute
public String getSsid() {
return ssid;
}

public void setSsid(String ssid) {
this.ssid = ssid;
}
}

My impl class:

@XmlRootElement //I have tried both @XmlType and nothing here, no luck
public class ListServersRequest extends ServiceRequest {

}

My service method:

@Post
@HttpResource(location = "/listServers")
@WebResult (name = "ListServersResponse")
.ListServersResponse listServers(ListServersRequest request);

It never reaches the method. I get the following error:

INFO: Invoking POST on /listServers
Apr 4, 2008 10:03:55 PM  
org.apache.cxf.binding.http.interceptor.URIParameterInInterceptor  
handleMessage
INFO: URIParameterInterceptor handle message on path [/listServers]  
with content-type [application/xml]
Apr 4, 2008 10:03:55 PM org.apache.cxf.phase.PhaseInterceptorChain  
doIntercept

INFO: Interceptor has thrown exception, unwinding now
java.lang.NullPointerException
	at  
org 
.apache 
.cxf 
.binding 
.http.IriDecoderHelper.interopolateParams(IriDecoderHelper.java:306)
	at  
org 
.apache 
.cxf 
.binding 
.http 
.interceptor 
.URIParameterInInterceptor.mergeParams(URIParameterInInterceptor.java: 
122)
	at  
org 
.apache 
.cxf 
.binding 
.http 
.interceptor 
.URIParameterInInterceptor 
.handleMessage(URIParameterInInterceptor.java:103)
	at  
org 
.apache 
.cxf 
.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
	at  
org 
.apache 
.cxf 
.transport 
.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:77)
	at  
org 
.apache 
.cxf 
.transport 
.servlet.ServletDestination.doMessage(ServletDestination.java:79)
	at  
org 
.apache 
.cxf 
.transport 
.servlet.ServletController.invokeDestination(ServletController.java:264)
	at  
org 
.apache 
.cxf.transport.servlet.ServletController.invoke(ServletController.java: 
123)
	at  
org 
.apache 
.cxf 
.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java: 
170)
	at  
org 
.apache 
.cxf 
.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java: 
148)

at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
	at  
org 
.apache 
.catalina 
.core 
.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java: 
290)
	at  
org 
.apache 
.catalina 
.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
	at  
org 
.apache 
.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java: 
233)
	at  
org 
.apache 
.catalina.core.StandardContextValve.invoke(StandardContextValve.java: 
175)
	at  
org 
.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java: 
128)
	at  
org 
.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java: 
102)
	at  
org 
.apache 
.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
	at  
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java: 
286)
	at  
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java: 
844)
	at org.apache.coyote.http11.Http11Protocol 
$Http11ConnectionHandler.process(Http11Protocol.java:583)
	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java: 
447)

at java.lang.Thread.run(Unknown Source)


If I rip the content from ServiceResponse and put it directly into  
ListServersResponse, everything works. Otherwise, everything fails. If  
anyone has any clue, I'd appreciate the help!


Brad

On Apr 4, 2008, at 6:47 PM, Brad O'Hearne wrote:


Hello,

I am using CXF with RESTful services, configured with Spring. My  
request objects (parameters to my service methods) and response  
objects (return types on my service methods) have a common  
structure, so I created some base classes with common members, which  
the actual request and response objects I use and declare as types  
in my service interface method signatures, and have discovered  
something horrible...which I hope is something only as horrible as  
my lack of knowledge on how to change the default behavior.  
Apparently, all members defined on the base classes are ignored when  
the serialization / deserialization binding occurs, and I receive  
NullPointerExceptions. If I take all the members defined in my base  
classes and stuff them into their subclasses, everything works fine.  
Obviously, this is a bad scene, as it requires me to duplicate code  
across every request and response object, respectively.


How do I alter the CXF behavior (using JAXB) so that I can have my  
request and response types extend from base classes and have those  
base class members serialize and deserialize properly?


Thanks,

Brad




Base class members not serializing / deserializing

2008-04-04 Thread Brad O'Hearne

Hello,

I am using CXF with RESTful services, configured with Spring. My  
request objects (parameters to my service methods) and response  
objects (return types on my service methods) have a common structure,  
so I created some base classes with common members, which the actual  
request and response objects I use and declare as types in my service  
interface method signatures, and have discovered something  
horrible...which I hope is something only as horrible as my lack of  
knowledge on how to change the default behavior. Apparently, all  
members defined on the base classes are ignored when the  
serialization / deserialization binding occurs, and I receive  
NullPointerExceptions. If I take all the members defined in my base  
classes and stuff them into their subclasses, everything works fine.  
Obviously, this is a bad scene, as it requires me to duplicate code  
across every request and response object, respectively.


How do I alter the CXF behavior (using JAXB) so that I can have my  
request and response types extend from base classes and have those  
base class members serialize and deserialize properly?


Thanks,

Brad 


Re: Dynamic Client/Server Side Configuration using API for Java First Spring WS

2008-04-04 Thread Arul Dhesiaseelan

Dan,

I was able to create the service dynamically. I have another related 
question.


Is it possible to create one instance of JaxWsProxyFactoryBean server 
and then add multiple endpoints to this instance dynamically? In 
essence, I would like to run multiple instances of the same web service 
in the same JVM, but with named service end points.


Thanks for your continued support.

Cheers!
Arul

Daniel Kulp wrote:
The jaxws:endpoint element is just configuring the actual CXF 
implementation of the jaxws Endpoint interface:

org.apache.cxf.jaxws.EndpointImpl

Dan



On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  

Thanks Dan. Client worked just fine with your suggestion.

Here is my service bean configuration. How do I dynamically create an
endpoint shown in service-beans.xml? I am embedding jetty to deploy
this endpoint.



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

http://www.springframework.org/schema/context
   
http://www.springframework.org/schema/context/spring-context-2.5.xsd

http://cxf.apache.org/core
http://cxf.apache.org/schemas/core.xsd
http://cxf.apache.org/jaxws
http://cxf.apache.org/schemas/jaxws.xsd";>

  
  
 

  



**Thanks!

Arul

Daniel Kulp wrote:


On Thursday 03 April 2008, Arul Dhesiaseelan wrote:
  

Hello!

I am developing a Java first spring based CXF services. Is there a
way to dynamically create services and clients at runtime rather
using service-beans.xml and client-beans.xml?
I am embedding Jetty as my server which will host my CXF services.

Can someone on this group suggest me the approach?

Thanks!
Arul


Basically, the spring things are just configuring instances of
various factory beans.   Thus, you can easily just configure the
same factory beans via API's calls.   For example, jaxws:server is
just configuring a JaxWsServerFactoryBean.   jaxws:client is
configuring a
JaxWsProxyFactoryBean instance.




cxf-user@incubator.apache.org

2008-04-04 Thread Web Man

When a SOAP request is submitted without the closing , the
Web Service is called and no errors are thrown.

http://schemas.xmlsoap.org/soap/envelope/";
xmlns:v1="http://www.nortel.com/xmlprotocol/wsdl/data/protocol_interfaces/cisco_icm/v1_0";>
   
   
  
 
 35756
 6
  
   

*  There should be a  at the end of this request
*
-- 
View this message in context: 
http://www.nabble.com/%3C-soapenv%3AEnvelope%3E-tp16498308p16498308.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Removing namespaces on serialized responses

2008-04-04 Thread Daniel Kulp


Brad,

Are you using the older http binding or the newer JAX-RS stuff?

If using the older stuff, you probably could get it to work by writing an 
interceptor that would wrap the XmlStreamWriter with one that would 
strip off any namespace stuff.  It would be a little bit of work, but 
not too bad.

I have no idea with the new jax-rs stuff.

Dan


On Thursday 03 April 2008, Brad O'Hearne wrote:
> Hello,
>
> I am using CXF RESTful services configured in Spring, using JAXB. I am
> having some namespace conflicts between my client and server, and I
> was wondering if (for the time being) there was a way to configure
> CXF/ JAXB not to write a namespace into the serialized object that is
> returned from a service method. Does anyone know how to do this and
> maybe can post a snippet?
>
> Thanks,
>
> Brad



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


Re: I have the TRaX, can you help?

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, Daniel Kulp wrote:
> On Thursday 03 April 2008, jm1468 wrote:
> > ...
> > WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception
> > caught writing response: Failed to configure TRaX
> > ...
> >org.apache.cxf.interceptor.Fault: No such operation
>
> Ick.. there are several things wrong that I need to dig into quite a
> bit more:
>
> 1) The WSDLQueryHandler is throwing the above exception.  However, we
> only log the basic "getMessage()" thing and not the full stack trace
> that would indicate any internal "cause" exceptions and stuff that
> would actually help to diagnose it.
>
> 2) If an exception is thrown, wrather than returning an error to the
> client like "error generating wsdl", we try to dispatch the request
> into the interceptor chains like its a service invokation.  Since it
> doesn't look like a normal request, it doesn't find an operaion.
>
> I'm going to fix both of those.  It most likely won't fix your problem
> as it's having problems creating a transformer, but it MAY at least
> provide a better indication of WHY it's not working.

Actually, I'm going to go one furthur and change from using a transformer 
to write the wsdl out to using our Stax based writers.  Since Stax HAS 
to work for pretty much anything in CXF to work, that should be a bit 
more reliable.  :-)   It may be a bit quicker as well.


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


Re: SoapWithAttachments

2008-04-04 Thread Vijay Allam
 

Thanks a lot.  This is what I'm looking for to get the attachment from the
client. ((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");

It was a third party web service. I have already have the interceptor but I
did not know how to get the attachment back to the client.

This will solve my problem.

--Thanks
Vijay 


On 4/4/08 12:15 PM, "Daniel Kulp" <[EMAIL PROTECTED]> wrote:

> 
> Ick...  If their wsdl properly declared the attachments like a good
> contract would, it would be easy as the generated code would just handle
> it.
> 
> I just spent some time trying to figure out something and I'm not
> succeeding unless you write an interceptor.  The Message object sent
> into an interceptor has the attachements collection on it.   Thus, if
> you did something like:
> 
> 
> public static class MyInterceptor
> extends AbstractPhaseInterceptor {
> 
> public MyInterceptor() {
> super(Phase.USER_LOGICAL);
> }
> 
> public void handleMessage(Message message) throws Fault {
> message.put("ATTACHMENTS", message.getAttachments());
> }
> }
> 
> That will copy the attachment list to the message properties and you can
> then retrieve it in the client code like:
> 
> ((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");
> 
> 
> Dan
> 
> 
> 
> On Friday 04 April 2008, Vijay Allam wrote:
>> In this case I do not have element that represents the attachment in
>> WSDL. It comes as part of the Soap message as multi part attachment.
>> So not sure how do I get the attachment. I could only find code that
>> can easily get attachment using axis1.1 for the request.
>> 
>> --Vijay
>> 
>> On 4/3/08 7:58 PM, "Freeman Fang" <[EMAIL PROTECTED]> wrote:
>>> Hi Vijay,
>>> 
>>> We have mtom demo in the kit, which shows how SOAP message
>>> with an attachment and XML-binary Optimized Packaging(mtom)  work.
>>> 
>>> Regards
>>> 
>>> Freeman
>>> 
>>> Vijay Allam wrote:
 I have a third part webservice that returns an attachment. How do I
 get the attachment with CXF client. Any example code is apreciated.
 
 --Vijay
> 
> 



Re: I have the TRaX, can you help?

2008-04-04 Thread Daniel Kulp
On Thursday 03 April 2008, jm1468 wrote:
> ...
> WARNING: org.apache.cxf.transport.http.WSDLQueryHandler Exception
> caught writing response: Failed to configure TRaX
> ...
>org.apache.cxf.interceptor.Fault: No such operation 

Ick.. there are several things wrong that I need to dig into quite a bit 
more:

1) The WSDLQueryHandler is throwing the above exception.  However, we 
only log the basic "getMessage()" thing and not the full stack trace 
that would indicate any internal "cause" exceptions and stuff that would 
actually help to diagnose it. 

2) If an exception is thrown, wrather than returning an error to the 
client like "error generating wsdl", we try to dispatch the request into 
the interceptor chains like its a service invokation.  Since it doesn't 
look like a normal request, it doesn't find an operaion.

I'm going to fix both of those.  It most likely won't fix your problem as 
it's having problems creating a transformer, but it MAY at least provide 
a better indication of WHY it's not working.

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


Re: JAXB substitutionGroups

2008-04-04 Thread Daniel Kulp

This is covered in the jaxb spec. (section 6.7.5, see example 6-14)   In 
sort, there isn't a way.   The main reason is that the subclasses of 
AbstractFeatureType may not (actually, per spec, they WON'T) have 
XmlRootElement declarations on them so the runtime would have idea what 
the qname of the elements to write out will be.  

According to spec, you should use the ObjectFactory methods to create the 
JAXBElement objects with the correct qnames+values.

From the jaxb spec example, the factory should have methods like:
// Element Instance Factories
JAXBElement createAuto(AutoType value);
JAXBElement createPlane(PlaneType value);
JAXBElement createTrain(TransportType value);



Dan


On Thursday 03 April 2008, Shaw, Richard A wrote:
> Does anybody know why XSD substitutionGroups cause JAXB to create code
> like the following -
>
> List > features;
>
> Why isn't it simply -
>
> List features;
>
> Is there any way to change it ? I searched the web and couldn't find
> anything.
>
> Richard Shaw
>
> ¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤º°`°º¤ø¤º°`°º¤ø,¸¸,ø¤
>
> Richard Shaw
> Technical Design Authority - Information Solutions Consultancy
> Intelligent Transport Systems
>
> Atkins Highways and Transportation
> Woodcote Grove, Ashley Road, Epsom, Surrey, KT18 5BW
>
> Tel: +44 (0) 1372 756407
> Fax: +44 (0) 1372 740055
> Mob: 07740 817586
> E-mail: [EMAIL PROTECTED]
>
> www.atkinsglobal.com/its
>
>
>
> This email and any attached files are confidential and copyright
> protected. If you are not the addressee, any dissemination of this
> communication is strictly prohibited. Unless otherwise expressly
> agreed in writing, nothing stated in this communication shall be
> legally binding.
>
> The ultimate parent company of the Atkins Group is WS Atkins plc. 
> Registered in England No. 1885586.  Registered Office Woodcote Grove,
> Ashley Road, Epsom, Surrey KT18 5BW. A list of wholly owned Atkins
> Group companies registered in the United Kingdom can be found at
> http://www.atkinsglobal.com/terms_and_conditions/index.aspx
>
> Consider the environment. Please don't print this e-mail unless you
> really need to.



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


Re: SoapWithAttachments

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, Benson Margulies wrote:
> SwA is different from MTOM. I don't know of CXF does SwA.

It does for the jaxws frontend as the jaxws spec requires it.  It's 
pretty much tied to how the jaxws spec requires the code to be generated 
which is why the code lives in the jaxws frontend.   Also, the 
processing is a bit more complex than mtom so we only add the swa 
interceptors if the JAX-WS interface/wsdl indicates that there will be 
swa attachments.

Dan


>
> On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam <
>
> [EMAIL PROTECTED]> wrote:
> > In this case I do not have element that represents the attachment in
> > WSDL. It comes as part of the Soap message as multi part attachment.
> > So not sure how do I get the attachment. I could only find code that
> > can easily get attachment using axis1.1 for the request.
> >
> > --Vijay
> >
> > On 4/3/08 7:58 PM, "Freeman Fang" <[EMAIL PROTECTED]> wrote:
> > > Hi Vijay,
> > >
> > > We have mtom demo in the kit, which shows how SOAP message
> > > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> > >
> > > Regards
> > >
> > > Freeman
> > >
> > > Vijay Allam wrote:
> > >> I have a third part webservice that returns an attachment. How do
> > >> I get
> >
> > the
> >
> > >> attachment with CXF client. Any example code is apreciated.
> > >>
> > >> --Vijay
> > >>
> > >> On 4/3/08 9:57 AM, "Cencio" <[EMAIL PROTECTED]> wrote:
> > >>> Hi,
> > >>>
> > >>> i'm still unable to retrieve the wsdl from my service... i post
> > >>> all my
> >
> > info:
> > >>> web.xml:
> > >>>
> > >>> 
> > >>> 
> > >>> contextConfigLocation
> > >>> WEB-INF/beans.xml
> > >>> 
> > >>>
> > >>> 
> > >>> 
> > >>>
> > >>> org.springframework.web.context.ContextLoaderListener
> > >>> 
> > >>> 
> > >>>
> > >>> 
> > >>> CXFServlet
> > >>> CXF Servlet
> > >>> 
> > >>>
> > >>> org.apache.cxf.transport.servlet.CXFServlet 
> > >>> 1
> > >>> 
> > >>>
> > >>> 
> > >>> CXFServlet
> > >>> /*
> > >>> 
> > >>> 
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> beans.xml:
> > >>>
> > >>> 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.xsd
> > >>> http://cxf.apache.org/jaxws
> > >>> http://cxf.apache.org/schemas/jaxws.xsd";>
> > >>>
> > >>> 
> > >>>  >
> > resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >
> > >>>  > >>> resource="classpath:META-INF/cxf/cxf-servlet.xml" />  > >>> id="logInbound"
> > >>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> > >>>  > >>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> > >>>
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>> 
> > >>>  > >>>   id="ese5"
> > >>>   address="ordine"
> > >>>  
> > >>> implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> > >>>
> > >>> 
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>
> > >>> ordine.wsdl
> > >>>
> > >>>
> > >>>
> > >>>  > >>>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> > >>>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > >>>xmlns:ele="http://www.rivenditore.org/ordiniElements";
> > >>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> > >>>xmlns:ord="http://www.rivenditore.org/Ordine";
> > >>>targetNamespace="http://www.rivenditore.org/Ordine";>
> > >>>
> > >>> http://www.rivenditore.org/submitOrdineTypes";
> >
> > >>> location="submitOrdine.xsd" />
> > >>>
> > >>> 
> > >>>  > >>> targetNamespace="http://www.rivenditore.org/ordiniElements";
> > >>>   
> > >>> xmlns:soType="http://www.rivenditore.org/submitOrdineTypes
> >
> > ">
> >
> > >>>
> > >>>
> > >>>
> > >>> 
> > >>> 
> > >>>
> > >>>
> > >>>   
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>   
> > >>>
> > >>>
> > >>>
> > >>>   
> > >>>
> > >>>
> > >>>
> > >>>
> > >>>   
> > >>>  
> > >>>   > >>> message="ord:SubmitOrdineResponseMessage"/> 
> > >>>
> > >>>   
> > >>> 
> > >>>   
> > >>>
> > >>> 
> > >>>
> > >>> >
> > type="ord:OrdineInterface">
> >
> > >>>> >>> transport="http://schemas.xmlsoap.org/soap/http"/>
> > >>>
> > >>>   
> > >>>   > >>> soapActi

Re: Problem with JAX-RS services in the last CXF snapshot.

2008-04-04 Thread Vincenzo Vitale
It worked! :-)

So now I'm just returning:

return Response.ok(simpleResponse).build();

where the SimpleResponse class has the @XmlRootElement annotation on top.


Thank you very much for your help,
V.


On Fri, Apr 4, 2008 at 5:51 PM, Beryozkin, Sergey <[EMAIL PROTECTED]>
wrote:

> Hi
>
> MessageBodyWriter.isWriteable() checks if a given type can be
> serialized, so if say you custom type has no JAXB annotations then no
> matching writer will be found. You may want just to add @XmlRootElement
> to the root of your class, alternatively you can register your custom
> writer. Please check the JAXRS system tests on how this can be
> done...(I'm sorry, at the moment that's our documentation :-)).
>
> Typically You don't need to extend a Response, Response is a convenience
> holder for a status, the entity and response headers
>
> Cheers, Sergey
>
> -Original Message-
> From: Vincenzo Vitale [mailto:[EMAIL PROTECTED]
> Sent: 04 April 2008 16:28
> To: cxf-user@incubator.apache.org
> Subject: Re: Problem with JAX-RS services in the last CXF snapshot.
>
> Looking at the CXF code it seems the problem is here:
>
> private  MessageBodyWriter chooseMessageWriter(
>List writers, Class type, MediaType
> mediaType)
> {
>for (MessageBodyWriter ep : writers) {
>if (!ep.isWriteable(type)) {
>continue;
>}
>
> where [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED],
> [EMAIL PROTECTED]
>
> these are the writers and my class seems not be "registered with this
> writers. Maybe there is a way to make it possible for a writer to have
> my
> class in output... but I'm just guessing... :-)
>
> I will try your solution..
>
>
> Thnaks,
> V.
>
> On Fri, Apr 4, 2008 at 4:51 PM, Sergey Beryozkin
> <[EMAIL PROTECTED]>
> wrote:
>
> > Hi
> >
> > I think you need to return a Response and then in your code do :
> >
> > return Response.setEntity(yourObject).build()
> >
> > I think that just by the virtue of extending a Response you can not
> have
> > it serialized.
> >
> >
> > > - Before the JAXRS implementation I always used to put the
> annotations
> > at
> > > the interface level but now in this way it doesn't seem to work
> anymore.
> > I'm
> > > missing something to make it possible? Maybe is this a JAXRS
> > specification?
> >
> > I've seen on a Jersey list recently that it's a feature of the 0.7 API
> > (spec), we're at a 0.6 level currently...
> > and that annotations will only be supported at a method level, don't
> know
> > more about it at this stage
> >
> > Hope it helps, Sergey
> >
> >
> >
> > > Hi,
> > >
> > > I'm trying to integrate the JAX-RS implementation now included in
> CXF
> > 2.1
> > > (snapshot).
> > >
> > > The service is correctly called and the parameters arrive fine but
> then
> > I
> > > get a page with the message:
> > >
> > > No message body writer found for response class : SimpleResponse.
> > >
> > > Where SimpleResponse is my custom response bean extending the
> > > javax.ws.rs.core.Response.
> > >
> > > Here the code:
> > >
> > > @Path("/ButtonService")
> > > public class ButtonWebServiceImpl implements ButtonWebService {
> > >
> > >
> > >
> >
> @Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
> > >+
> > >
> >
> "{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{descriptio
> n}/{source}/{buttonServer}/{buttonArtUrl}")
> > >@GET
> > >public SimpleResponse createForAddress(@PathParam(value =
> "action")
> > >String action, @PathParam(value = "apiKey")
> > >String apiKey, @PathParam(value = "countryCode")
> > >String countryCode, @PathParam(value = "state")
> > >String state, @PathParam(value = "city")
> > >String city, @PathParam(value = "street")
> > >String street, @PathParam(value = "number")
> > >String number, @PathParam(value = "postCode")
> > >String postCode, @PathParam(value = "attribution")
> > >String attribution, @PathParam(value = "logoUrl")
> > >String logoUrl, @PathParam(value = "name")
> > >String name, @PathParam(value = "description")
> > >String description, @PathParam(value = "source")
> > >String source, @PathParam(value = "buttonServer")
> > >String buttonServer, @PathParam(value = "buttonArtUrl")
> > >String buttonArtUrl) {
> > > ...
> > >}
> > > }
> > >
> > > and in Spring:
> > >
> > > > >address="/rest/">
> > >
> > >
> > >
> > >
> > >
> > >
> > > Have any glue on that?
> > >
> > >
> > > Further questions:
> > >
> > > - My SimpleResponse extend the javax Response as I red in the JAXRS
> new
> > > documentation that this is a requirement for the HTTPMerthod
> annotation.
> > Is
> > > this valid also for the @GET annotation? How I have to implement it?
> > >
> > > - Before the JAXRS implementation I always used to put the
> annotations
> > at
> > > the interface level but now in this way it does

Re: SoapWithAttachments

2008-04-04 Thread Daniel Kulp

Ick...  If their wsdl properly declared the attachments like a good 
contract would, it would be easy as the generated code would just handle 
it.

I just spent some time trying to figure out something and I'm not 
succeeding unless you write an interceptor.  The Message object sent 
into an interceptor has the attachements collection on it.   Thus, if 
you did something like:


public static class MyInterceptor 
extends AbstractPhaseInterceptor {

public MyInterceptor() {
super(Phase.USER_LOGICAL);
}

public void handleMessage(Message message) throws Fault {
message.put("ATTACHMENTS", message.getAttachments());
}
}

That will copy the attachment list to the message properties and you can 
then retrieve it in the client code like:

((BindingProvider)proxy).getRequestContext().get("ATTACHMENTS");


Dan



On Friday 04 April 2008, Vijay Allam wrote:
> In this case I do not have element that represents the attachment in
> WSDL. It comes as part of the Soap message as multi part attachment.
> So not sure how do I get the attachment. I could only find code that
> can easily get attachment using axis1.1 for the request.
>
> --Vijay
>
> On 4/3/08 7:58 PM, "Freeman Fang" <[EMAIL PROTECTED]> wrote:
> > Hi Vijay,
> >
> > We have mtom demo in the kit, which shows how SOAP message
> > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> >
> > Regards
> >
> > Freeman
> >
> > Vijay Allam wrote:
> >> I have a third part webservice that returns an attachment. How do I
> >> get the attachment with CXF client. Any example code is apreciated.
> >>
> >> --Vijay



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


Re: SoapWithAttachments

2008-04-04 Thread Benson Margulies
SwA is different from MTOM. I don't know of CXF does SwA.

On Fri, Apr 4, 2008 at 11:07 AM, Vijay Allam <
[EMAIL PROTECTED]> wrote:

> In this case I do not have element that represents the attachment in WSDL.
> It comes as part of the Soap message as multi part attachment. So not sure
> how do I get the attachment. I could only find code that can easily get
> attachment using axis1.1 for the request.
>
> --Vijay
>
>
> On 4/3/08 7:58 PM, "Freeman Fang" <[EMAIL PROTECTED]> wrote:
>
> > Hi Vijay,
> >
> > We have mtom demo in the kit, which shows how SOAP message
> > with an attachment and XML-binary Optimized Packaging(mtom)  work.
> >
> > Regards
> >
> > Freeman
> >
> > Vijay Allam wrote:
> >> I have a third part webservice that returns an attachment. How do I get
> the
> >> attachment with CXF client. Any example code is apreciated.
> >>
> >> --Vijay
> >>
> >> On 4/3/08 9:57 AM, "Cencio" <[EMAIL PROTECTED]> wrote:
> >>
> >>
> >>> Hi,
> >>>
> >>> i'm still unable to retrieve the wsdl from my service... i post all my
> info:
> >>>
> >>> web.xml:
> >>>
> >>> 
> >>> 
> >>> contextConfigLocation
> >>> WEB-INF/beans.xml
> >>> 
> >>>
> >>> 
> >>> 
> >>>
> >>> org.springframework.web.context.ContextLoaderListener
> >>> 
> >>> 
> >>>
> >>> 
> >>> CXFServlet
> >>> CXF Servlet
> >>> 
> >>> org.apache.cxf.transport.servlet.CXFServlet
> >>> 
> >>> 1
> >>> 
> >>>
> >>> 
> >>> CXFServlet
> >>> /*
> >>> 
> >>> 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> beans.xml:
> >>>
> >>> 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.xsd
> >>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
> >>>
> >>> 
> >>>  resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
> >>> 
> >>>  >>> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
> >>>  >>> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
> >>>
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>>  >>>   id="ese5"
> >>>   address="ordine"
> >>>   implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
> >>>
> >>> 
> >>>
> >>>
> >>>
> >>>
> >>>
> >>> ordine.wsdl
> >>>
> >>>
> >>>
> >>>  >>>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
> >>>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> >>>xmlns:ele="http://www.rivenditore.org/ordiniElements";
> >>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
> >>>xmlns:ord="http://www.rivenditore.org/Ordine";
> >>>targetNamespace="http://www.rivenditore.org/Ordine";>
> >>>
> >>> http://www.rivenditore.org/submitOrdineTypes";
> >>> location="submitOrdine.xsd" />
> >>>
> >>> 
> >>>  >>> targetNamespace="http://www.rivenditore.org/ordiniElements";
> >>>xmlns:soType="http://www.rivenditore.org/submitOrdineTypes
> ">
> >>>
> >>>
> >>>
> >>> 
> >>> 
> >>>
> >>>
> >>>   
> >>>
> >>>
> >>>
> >>>
> >>>   
> >>>
> >>>
> >>>
> >>>   
> >>>
> >>>
> >>>
> >>>
> >>>   
> >>>  
> >>>  
> >>>   
> >>>
> >>>   
> >>> 
> >>>   
> >>>
> >>> 
> >>>
> >>> type="ord:OrdineInterface">
> >>>>>> transport="http://schemas.xmlsoap.org/soap/http"/>
> >>>
> >>>   
> >>>   >>> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
> >>>  
> >>> 
> >>>  
> >>>  
> >>> 
> >>>  
> >>>   
> >>>
> >>>   
> >>>  
> >>>  
> >>> 
> >>>  
> >>>   
> >>>
> >>>
> >>>
> >>>>>> binding="ord:OrdineInterfaceBinding">
> >>>  http://localhost:8080/ese5/ordine"/>
> >>>
> >>>
> >>>
> >>>
> >>> 
> >>>
> >>>
> >>>
> >>>
> >>> submitOrdine.xsd:
> >>>
> >>>
> >>>
> >>> 
> >>> http://www.w3.org/2001/XMLSchema";
> >>> targetNamespace="http://www.rivenditore.org/submitOrdineTypes";
> >>> xmlns:so="http://www.rivenditore.org/submitOrdineTypes";>
> >>>
> >>>  
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>> 
> >>>
> >>> 
> >>> 
>

RE: Problem with JAX-RS services in the last CXF snapshot.

2008-04-04 Thread Beryozkin, Sergey
Hi

MessageBodyWriter.isWriteable() checks if a given type can be
serialized, so if say you custom type has no JAXB annotations then no
matching writer will be found. You may want just to add @XmlRootElement
to the root of your class, alternatively you can register your custom
writer. Please check the JAXRS system tests on how this can be
done...(I'm sorry, at the moment that's our documentation :-)).

Typically You don't need to extend a Response, Response is a convenience
holder for a status, the entity and response headers

Cheers, Sergey

-Original Message-
From: Vincenzo Vitale [mailto:[EMAIL PROTECTED] 
Sent: 04 April 2008 16:28
To: cxf-user@incubator.apache.org
Subject: Re: Problem with JAX-RS services in the last CXF snapshot.

Looking at the CXF code it seems the problem is here:

private  MessageBodyWriter chooseMessageWriter(
List writers, Class type, MediaType
mediaType)
{
for (MessageBodyWriter ep : writers) {
if (!ep.isWriteable(type)) {
continue;
}

where [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]

these are the writers and my class seems not be "registered with this
writers. Maybe there is a way to make it possible for a writer to have
my
class in output... but I'm just guessing... :-)

I will try your solution..


Thnaks,
V.

On Fri, Apr 4, 2008 at 4:51 PM, Sergey Beryozkin
<[EMAIL PROTECTED]>
wrote:

> Hi
>
> I think you need to return a Response and then in your code do :
>
> return Response.setEntity(yourObject).build()
>
> I think that just by the virtue of extending a Response you can not
have
> it serialized.
>
>
> > - Before the JAXRS implementation I always used to put the
annotations
> at
> > the interface level but now in this way it doesn't seem to work
anymore.
> I'm
> > missing something to make it possible? Maybe is this a JAXRS
> specification?
>
> I've seen on a Jersey list recently that it's a feature of the 0.7 API
> (spec), we're at a 0.6 level currently...
> and that annotations will only be supported at a method level, don't
know
> more about it at this stage
>
> Hope it helps, Sergey
>
>
>
> > Hi,
> >
> > I'm trying to integrate the JAX-RS implementation now included in
CXF
> 2.1
> > (snapshot).
> >
> > The service is correctly called and the parameters arrive fine but
then
> I
> > get a page with the message:
> >
> > No message body writer found for response class : SimpleResponse.
> >
> > Where SimpleResponse is my custom response bean extending the
> > javax.ws.rs.core.Response.
> >
> > Here the code:
> >
> > @Path("/ButtonService")
> > public class ButtonWebServiceImpl implements ButtonWebService {
> >
> >
> >
>
@Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
> >+
> >
>
"{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{descriptio
n}/{source}/{buttonServer}/{buttonArtUrl}")
> >@GET
> >public SimpleResponse createForAddress(@PathParam(value =
"action")
> >String action, @PathParam(value = "apiKey")
> >String apiKey, @PathParam(value = "countryCode")
> >String countryCode, @PathParam(value = "state")
> >String state, @PathParam(value = "city")
> >String city, @PathParam(value = "street")
> >String street, @PathParam(value = "number")
> >String number, @PathParam(value = "postCode")
> >String postCode, @PathParam(value = "attribution")
> >String attribution, @PathParam(value = "logoUrl")
> >String logoUrl, @PathParam(value = "name")
> >String name, @PathParam(value = "description")
> >String description, @PathParam(value = "source")
> >String source, @PathParam(value = "buttonServer")
> >String buttonServer, @PathParam(value = "buttonArtUrl")
> >String buttonArtUrl) {
> > ...
> >}
> > }
> >
> > and in Spring:
> >
> > >address="/rest/">
> >
> >
> >
> >
> >
> >
> > Have any glue on that?
> >
> >
> > Further questions:
> >
> > - My SimpleResponse extend the javax Response as I red in the JAXRS
new
> > documentation that this is a requirement for the HTTPMerthod
annotation.
> Is
> > this valid also for the @GET annotation? How I have to implement it?
> >
> > - Before the JAXRS implementation I always used to put the
annotations
> at
> > the interface level but now in this way it doesn't seem to work
anymore.
> I'm
> > missing something to make it possible? Maybe is this a JAXRS
> specification?
> >
> >
> >
> >
> > Thanks in advance,
> > Vicio.
> >
>
> 
> 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


Re: Problem with JAX-RS services in the last CXF snapshot.

2008-04-04 Thread Vincenzo Vitale
Looking at the CXF code it seems the problem is here:

private  MessageBodyWriter chooseMessageWriter(
List writers, Class type, MediaType mediaType)
{
for (MessageBodyWriter ep : writers) {
if (!ep.isWriteable(type)) {
continue;
}

where [EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED],
[EMAIL PROTECTED]

these are the writers and my class seems not be "registered with this
writers. Maybe there is a way to make it possible for a writer to have my
class in output... but I'm just guessing... :-)

I will try your solution..


Thnaks,
V.

On Fri, Apr 4, 2008 at 4:51 PM, Sergey Beryozkin <[EMAIL PROTECTED]>
wrote:

> Hi
>
> I think you need to return a Response and then in your code do :
>
> return Response.setEntity(yourObject).build()
>
> I think that just by the virtue of extending a Response you can not have
> it serialized.
>
>
> > - Before the JAXRS implementation I always used to put the annotations
> at
> > the interface level but now in this way it doesn't seem to work anymore.
> I'm
> > missing something to make it possible? Maybe is this a JAXRS
> specification?
>
> I've seen on a Jersey list recently that it's a feature of the 0.7 API
> (spec), we're at a 0.6 level currently...
> and that annotations will only be supported at a method level, don't know
> more about it at this stage
>
> Hope it helps, Sergey
>
>
>
> > Hi,
> >
> > I'm trying to integrate the JAX-RS implementation now included in CXF
> 2.1
> > (snapshot).
> >
> > The service is correctly called and the parameters arrive fine but then
> I
> > get a page with the message:
> >
> > No message body writer found for response class : SimpleResponse.
> >
> > Where SimpleResponse is my custom response bean extending the
> > javax.ws.rs.core.Response.
> >
> > Here the code:
> >
> > @Path("/ButtonService")
> > public class ButtonWebServiceImpl implements ButtonWebService {
> >
> >
> >
>  @Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
> >+
> >
> "{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{description}/{source}/{buttonServer}/{buttonArtUrl}")
> >@GET
> >public SimpleResponse createForAddress(@PathParam(value = "action")
> >String action, @PathParam(value = "apiKey")
> >String apiKey, @PathParam(value = "countryCode")
> >String countryCode, @PathParam(value = "state")
> >String state, @PathParam(value = "city")
> >String city, @PathParam(value = "street")
> >String street, @PathParam(value = "number")
> >String number, @PathParam(value = "postCode")
> >String postCode, @PathParam(value = "attribution")
> >String attribution, @PathParam(value = "logoUrl")
> >String logoUrl, @PathParam(value = "name")
> >String name, @PathParam(value = "description")
> >String description, @PathParam(value = "source")
> >String source, @PathParam(value = "buttonServer")
> >String buttonServer, @PathParam(value = "buttonArtUrl")
> >String buttonArtUrl) {
> > ...
> >}
> > }
> >
> > and in Spring:
> >
> > >address="/rest/">
> >
> >
> >
> >
> >
> >
> > Have any glue on that?
> >
> >
> > Further questions:
> >
> > - My SimpleResponse extend the javax Response as I red in the JAXRS new
> > documentation that this is a requirement for the HTTPMerthod annotation.
> Is
> > this valid also for the @GET annotation? How I have to implement it?
> >
> > - Before the JAXRS implementation I always used to put the annotations
> at
> > the interface level but now in this way it doesn't seem to work anymore.
> I'm
> > missing something to make it possible? Maybe is this a JAXRS
> specification?
> >
> >
> >
> >
> > Thanks in advance,
> > Vicio.
> >
>
> 
> IONA Technologies PLC (registered in Ireland)
> Registered Number: 171387
> Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland
>


Re: SoapWithAttachments

2008-04-04 Thread Vijay Allam
In this case I do not have element that represents the attachment in WSDL.
It comes as part of the Soap message as multi part attachment. So not sure
how do I get the attachment. I could only find code that can easily get
attachment using axis1.1 for the request.

--Vijay


On 4/3/08 7:58 PM, "Freeman Fang" <[EMAIL PROTECTED]> wrote:

> Hi Vijay,
> 
> We have mtom demo in the kit, which shows how SOAP message
> with an attachment and XML-binary Optimized Packaging(mtom)  work.
> 
> Regards
> 
> Freeman
> 
> Vijay Allam wrote:
>> I have a third part webservice that returns an attachment. How do I get the
>> attachment with CXF client. Any example code is apreciated.
>> 
>> --Vijay 
>> 
>> On 4/3/08 9:57 AM, "Cencio" <[EMAIL PROTECTED]> wrote:
>> 
>>   
>>> Hi,
>>> 
>>> i'm still unable to retrieve the wsdl from my service... i post all my info:
>>> 
>>> web.xml:
>>> 
>>> 
>>> 
>>> contextConfigLocation
>>> WEB-INF/beans.xml
>>> 
>>> 
>>> 
>>> 
>>>
>>> org.springframework.web.context.ContextLoaderListener
>>> 
>>> 
>>> 
>>> 
>>> CXFServlet
>>> CXF Servlet
>>> 
>>> org.apache.cxf.transport.servlet.CXFServlet
>>> 
>>> 1
>>> 
>>> 
>>> 
>>> CXFServlet
>>> /*
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> beans.xml:
>>> 
>>> 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.xsd
>>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
>>> 
>>> 
>>> 
>>> 
>>> >> class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>>> >> class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >>   id="ese5"
>>>   address="ordine"
>>>   implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> ordine.wsdl
>>> 
>>> 
>>> 
>>> >>xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>>>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>>xmlns:ele="http://www.rivenditore.org/ordiniElements";
>>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>>>xmlns:ord="http://www.rivenditore.org/Ordine";
>>>targetNamespace="http://www.rivenditore.org/Ordine";>
>>> 
>>> http://www.rivenditore.org/submitOrdineTypes";
>>> location="submitOrdine.xsd" />
>>> 
>>> 
>>> >> targetNamespace="http://www.rivenditore.org/ordiniElements";
>>>xmlns:soType="http://www.rivenditore.org/submitOrdineTypes";>
>>>
>>>
>>>
>>> 
>>> 
>>> 
>>>
>>>   
>>>
>>> 
>>> 
>>>
>>>   
>>>
>>> 
>>>
>>>   
>>>
>>> 
>>>
>>> 
>>>   
>>>  
>>>  
>>>   
>>> 
>>>   
>>> 
>>>   
>>> 
>>> 
>>> 
>>>
>>>   >> transport="http://schemas.xmlsoap.org/soap/http"/>
>>> 
>>>   
>>>  >> soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
>>>  
>>> 
>>>  
>>>  
>>> 
>>>  
>>>   
>>> 
>>>   
>>>  
>>>  
>>> 
>>>  
>>>   
>>>
>>> 
>>>
>>>   >> binding="ord:OrdineInterfaceBinding">
>>>  http://localhost:8080/ese5/ordine"/>
>>>
>>>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> submitOrdine.xsd:
>>> 
>>> 
>>> 
>>> 
>>> http://www.w3.org/2001/XMLSchema";
>>> targetNamespace="http://www.rivenditore.org/submitOrdineTypes";
>>> xmlns:so="http://www.rivenditore.org/submitOrdineTypes";>
>>> 
>>>  
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> >> use="optional"/>
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> I develope both client and server using wsdl2java.
>>> 
>>> Thx for any help.
>>> 
>> 
>> 
>>   
> 



Re: Parameters not being resolved - broken going from 2.0.3 -> 2.0.4 and still broken in 2.0.5

2008-04-04 Thread Daniel Kulp

One more note: the default for the simple frontend is to use QUALIFIED 
schemas.  Thus, if you are doing java first stuff and use JAX-WS on the 
server and simple on the client, if you don't reconfigure one or the 
other, you will have problems as the client will send qualified, but the 
server will expect unqualified.

Dan


On Friday 04 April 2008, Daniel Kulp wrote:
> Most likely, it's an element qualification issue.   In 2.0.4, we had
> to fix a bunch of issues with improper soap messages being
> produced/consumed due to elements that should have been qualified not
> being qualified and vice/versa.   There were cases with <2.0.3 where a
> VALID soap message (according to the schema) would not be accepted,
> but the invalid message would be.  Killed some interop scenarios
> pretty badly.   2.0.4 fixed a bunch of that to make sure the valid
> messages are produced/consumed.
>
> The thing to look at would be the raw soap message (use wireshark or
> the logging interceptors) to see the raw elements and compare that to
> the schema in the wsdl (from ?wsdl) to make sure they are consistent. 
> Most likely, the ?wsdl will say elementFormDefault=unqualified, but
> the message is coming in qualified (or vice versa).   (by default,
> schema generated for JAX-WS wrappers are unqualified)
>
> That said, in 2.0.4/5, if you are doing a "java first" case like you
> are, there are ways to control the generated schema to make it
> qualified. There are configuration options on the JaxWsServiceFactory
> (in spring) for that or you can just add a package-info.java to the
> package containing the interface with an appropriate filled in
> @XmlSchema thing. (Note: doing these would not be portable to other
> jaxws implementations)
>
>
> Dan
>
> On Thursday 03 April 2008, Zarar Siddiqi wrote:
> > I had a very simple webservice running very nicely until I upgraded
> > to 2.0.4.
> >
> > I was using a Java-first service using an Aegis binding:
> >
> > @WebService(targetNamespace="http://domain.com/PersonService";)
> > public interface PersonService {
> >. . .
> > }
> >
> > @Component
> > @WebService(serviceName="PersonService",
> > targetNamespace="http://domain.com/PersonService";,
> > endpointInterface="PersonService")
> >
> > public class PersonSoapService implements PersonService {
> > public Email getEmail(Credentials credentials) throws
> > WebServiceException {
> >  // get email stuff
> > }
> > }
> >
> > This was being called and working fine in 2.0.3 but since I upgraded
> > to 2.0.4, the "credentials" parameter on the getEmail(..) method
> > never gets populated, it's always null. Always!
> >
> > Any idea what the problem might be before I dive into CXF code?? Or
> > maybe you can tell me what interceptor it is that converts a soap
> > message to the actual parameters and I can dig deeper on my own.
> >
> > Any help is appreciated.
> >
> > Thanks,
> > Zarar



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


Re: Parameters not being resolved - broken going from 2.0.3 -> 2.0.4 and still broken in 2.0.5

2008-04-04 Thread Daniel Kulp

Most likely, it's an element qualification issue.   In 2.0.4, we had to 
fix a bunch of issues with improper soap messages being 
produced/consumed due to elements that should have been qualified not 
being qualified and vice/versa.   There were cases with <2.0.3 where a 
VALID soap message (according to the schema) would not be accepted, but 
the invalid message would be.  Killed some interop scenarios pretty 
badly.   2.0.4 fixed a bunch of that to make sure the valid messages are 
produced/consumed.

The thing to look at would be the raw soap message (use wireshark or the 
logging interceptors) to see the raw elements and compare that to the 
schema in the wsdl (from ?wsdl) to make sure they are consistent.  Most 
likely, the ?wsdl will say elementFormDefault=unqualified, but the 
message is coming in qualified (or vice versa).   (by default, schema 
generated for JAX-WS wrappers are unqualified)

That said, in 2.0.4/5, if you are doing a "java first" case like you are, 
there are ways to control the generated schema to make it qualified.  
There are configuration options on the JaxWsServiceFactory (in spring) 
for that or you can just add a package-info.java to the package 
containing the interface with an appropriate filled in @XmlSchema thing.  
(Note: doing these would not be portable to other jaxws implementations)


Dan


On Thursday 03 April 2008, Zarar Siddiqi wrote:
> I had a very simple webservice running very nicely until I upgraded to
> 2.0.4.
>
> I was using a Java-first service using an Aegis binding:
>
> @WebService(targetNamespace="http://domain.com/PersonService";)
> public interface PersonService {
>. . .
> }
>
> @Component
> @WebService(serviceName="PersonService",
> targetNamespace="http://domain.com/PersonService";,
> endpointInterface="PersonService")
>
> public class PersonSoapService implements PersonService {
> public Email getEmail(Credentials credentials) throws
> WebServiceException {
>  // get email stuff
> }
> }
>
> This was being called and working fine in 2.0.3 but since I upgraded
> to 2.0.4, the "credentials" parameter on the getEmail(..) method never
> gets populated, it's always null. Always!
>
> Any idea what the problem might be before I dive into CXF code?? Or
> maybe you can tell me what interceptor it is that converts a soap
> message to the actual parameters and I can dig deeper on my own.
>
> Any help is appreciated.
>
> Thanks,
> Zarar



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


Re: Problem with JAX-RS services in the last CXF snapshot.

2008-04-04 Thread Sergey Beryozkin
Hi

I think you need to return a Response and then in your code do :

return Response.setEntity(yourObject).build()

I think that just by the virtue of extending a Response you can not have it 
serialized.


> - Before the JAXRS implementation I always used to put the annotations at
> the interface level but now in this way it doesn't seem to work anymore. I'm
> missing something to make it possible? Maybe is this a JAXRS specification?

I've seen on a Jersey list recently that it's a feature of the 0.7 API (spec), 
we're at a 0.6 level currently...
and that annotations will only be supported at a method level, don't know more 
about it at this stage 

Hope it helps, Sergey



> Hi,
> 
> I'm trying to integrate the JAX-RS implementation now included in CXF 2.1
> (snapshot).
> 
> The service is correctly called and the parameters arrive fine but then I
> get a page with the message:
> 
> No message body writer found for response class : SimpleResponse.
> 
> Where SimpleResponse is my custom response bean extending the
> javax.ws.rs.core.Response.
> 
> Here the code:
> 
> @Path("/ButtonService")
> public class ButtonWebServiceImpl implements ButtonWebService {
> 
> 
>@Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
>+
> "{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{description}/{source}/{buttonServer}/{buttonArtUrl}")
>@GET
>public SimpleResponse createForAddress(@PathParam(value = "action")
>String action, @PathParam(value = "apiKey")
>String apiKey, @PathParam(value = "countryCode")
>String countryCode, @PathParam(value = "state")
>String state, @PathParam(value = "city")
>String city, @PathParam(value = "street")
>String street, @PathParam(value = "number")
>String number, @PathParam(value = "postCode")
>String postCode, @PathParam(value = "attribution")
>String attribution, @PathParam(value = "logoUrl")
>String logoUrl, @PathParam(value = "name")
>String name, @PathParam(value = "description")
>String description, @PathParam(value = "source")
>String source, @PathParam(value = "buttonServer")
>String buttonServer, @PathParam(value = "buttonArtUrl")
>String buttonArtUrl) {
> ...
>}
> }
> 
> and in Spring:
> 
>address="/rest/">
>
>
>
>
> 
> 
> Have any glue on that?
> 
> 
> Further questions:
> 
> - My SimpleResponse extend the javax Response as I red in the JAXRS new
> documentation that this is a requirement for the HTTPMerthod annotation. Is
> this valid also for the @GET annotation? How I have to implement it?
> 
> - Before the JAXRS implementation I always used to put the annotations at
> the interface level but now in this way it doesn't seem to work anymore. I'm
> missing something to make it possible? Maybe is this a JAXRS specification?
> 
> 
> 
> 
> Thanks in advance,
> Vicio.
> 


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


Problem with JAX-RS services in the last CXF snapshot.

2008-04-04 Thread Vincenzo Vitale
Hi,

I'm trying to integrate the JAX-RS implementation now included in CXF 2.1
(snapshot).

The service is correctly called and the parameters arrive fine but then I
get a page with the message:

No message body writer found for response class : SimpleResponse.

Where SimpleResponse is my custom response bean extending the
javax.ws.rs.core.Response.

Here the code:

@Path("/ButtonService")
public class ButtonWebServiceImpl implements ButtonWebService {


@Path("/addressButton/{action}/{apiKey}/{countryCode}/{state}/{city}/"
+
"{street}/{number}/{postCode}/{attribution}/{logoUrl}/{name}/{description}/{source}/{buttonServer}/{buttonArtUrl}")
@GET
public SimpleResponse createForAddress(@PathParam(value = "action")
String action, @PathParam(value = "apiKey")
String apiKey, @PathParam(value = "countryCode")
String countryCode, @PathParam(value = "state")
String state, @PathParam(value = "city")
String city, @PathParam(value = "street")
String street, @PathParam(value = "number")
String number, @PathParam(value = "postCode")
String postCode, @PathParam(value = "attribution")
String attribution, @PathParam(value = "logoUrl")
String logoUrl, @PathParam(value = "name")
String name, @PathParam(value = "description")
String description, @PathParam(value = "source")
String source, @PathParam(value = "buttonServer")
String buttonServer, @PathParam(value = "buttonArtUrl")
String buttonArtUrl) {
...
}
}

and in Spring:








Have any glue on that?


Further questions:

- My SimpleResponse extend the javax Response as I red in the JAXRS new
documentation that this is a requirement for the HTTPMerthod annotation. Is
this valid also for the @GET annotation? How I have to implement it?

- Before the JAXRS implementation I always used to put the annotations at
the interface level but now in this way it doesn't seem to work anymore. I'm
missing something to make it possible? Maybe is this a JAXRS specification?




Thanks in advance,
Vicio.


Re: Interceptors

2008-04-04 Thread Web Man


I have two WS (WS1 and WS2) running on a Jboss server.  They have nothing to
do with each other except that they use CXF.  WS2 has a CXF client built in
(WSDL2Java) that makes periodic calls to the third WS3.  When WS3 is not
there, the following errors appear in the log.  I have removed all inbound
and outbound logging interceptors in the SrpingBeans.xml for WS1 ad WS2. 
When WS1 is not running there are no errors generated.

10:12:52,635 ERROR [STDERR] Apr 4, 2008 10:12:52 AM
org.apache.cxf.phase.PhaseInterceptorChain doIntercept
INFO: Interceptor has thrown exception, unwinding now
org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSende
rInterceptor.java:64)



Glen Mazza-2 wrote:
> 
> I'm confused--"intercept faults from outbound requests to a third web
> service when the third service is not available"  If the third web
> service was not available, how could it be returning faults to your
> other two web services' requests?
> 
> Glen
> 
> Am Donnerstag, den 03.04.2008, 16:10 -0700 schrieb Web Man:
>> I have created an interceptor (AbstractPhaseInterceptor) that is used by
>> two
>> Web services.  One of the functions of the interceptor is to intercept
>> faults from outbound requests to a third web service when the third
>> service
>> is not available.  When one service runs it all functions correctly but
>> when
>> two are running the exceptions are dumped to the log as if the
>> interceptor
>> was not there.  Since this is a polling application the exception can be
>> annoying.
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Interceptors-tp16476100p16491556.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Re-4: Using CXF in OSGi

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, Guillaume Nodet wrote:
> Do the mailing lists have any problems ? I'm only receiving half of
> the messages :-( Or sometimes a few hours later ...

I've had to moderate a couple of them through so I'm the bottleneck.   A 
couple people aren't using the EXACT email address they are subscribed 
with (or are using nabble or something) so they get stuck in the 
moderation queue until I see it.

Dan


>
> On Fri, Apr 4, 2008 at 4:01 PM, Daniel Kulp <[EMAIL PROTECTED]> wrote:
> > On Friday 04 April 2008, [EMAIL PROTECTED] wrote:
> > > Hmm I'm not familiar with Apache ServiceMix so it's a bit
> > > difficult for me to understand how this can help me with an OSGi
> > > platform like Equinox.
>
> Because ServiceMix Kernel *is* an OSGi platform based on Felix
> with some value added.  So everything that applies to Servicemix
> Kernel can be applied to any other OSGi platform, Equinox included.
> Bundles are bundles, eh ;-)
>
> > > I understand that CXF is provided as a module for ServiceMix,
> > > right? Can you provide some help on getting CXF to work on a
> > > "normal" OSGi platform? I had a look at the MANIFEST files of the
> > > CXF libraries but I couldn't find entries for OSGi. I'm a bit
> > > confused. :-)
> >
> > Basically, starting with 2.0.5, the big cxf bundle jar
> > (cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the
> > maven artifactId) does include an OSGI manifest. (although I noticed
> > Guillaume did a fix for it last  night so I'm not sure if the 2.0.5
> > version complete works, I'll get a 2.0.6 snapshot going now.)   That
> > said, since CXF doesn't really do any OSGI things ourselves, we
> > don't worry about all the thirdparty jars.  ServiceMix does.  So
> > basically, we have a bundle, but to really use it, you'll need to
> > find/create a few other bundles for the third party deps (like
> > jaxws-api, neethi, spring, wsdl4j, woodstox/stax, etc...). 
> > ServiceMix does provide bundles for all of those, but you probably
> > could easily do much of that yourself as well.
>
> Yeah, there is a small problem with 2.0.5 OSGi manifest.
> Another way is to create one big bundle that includes all the
> dependencies if you prefer.
>
> > The other thing SMX is providing is the cxf-osgi spring import thing
> > that provides an OSGi http transport for the CXF component.   That
> > might be a good thing to pull directly into CXF as that should
> > definitely be usable in other OSGi environments.
>
> Yes, it should.  It can certainly be moved to CXF, was I just hacked
> it this week.  But this is more a discussion for cxf-dev btw.
>
> > Dan
> >
> > >  Original Message 
> > > Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51)
> > > From:Guillaume Nodet <[EMAIL PROTECTED]>
> > > To:  cxf-user@incubator.apache.org
> > >
> > > > The example I gave leverages Spring-DM.  Spring-DM is a small
> > > > layer above Spring that gives you a really simple way to build
> > > > OSGi applications based on Spring.  Of course, if you don't like
> > > > spring, don't use Spring-DM. However, CXF is nicely integrated
> > > > with Spring, so it makes sense.
> > > >
> > > > If you prefer, we also support OpenEJB / CXF in OSGi, though
> > > > this is not finalized yet (but feedback and/or help is always
> > > > welcome).  In this model, the EJB3 annotated beans are
> > > > automatically discovered and exposed.  So no spring at all, and
> > > > EJB3 annotations: it could make you happy ;-)
> > > >
> > > > On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski
> > > > <[EMAIL PROTECTED]>
> > > >
> > > > wrote:
> > > > > On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> > > > > > Will Spring-DM also be a part of this example?
> > > > >
> > > > > It really doesn't change much if it can be done with OSGi
> > > > > itself. Spring-DM is just an additional layer that lets use
> > > > > biuld bundles yet it could in turn complicate understanding of
> > > > > the real value of CXF on OSGi. I'm looking forward to seeing
> > > > > the example. Go Guillaume, go! ;-)
> > > > >
> > > > > Jacek
> > > > >
> > > > > --
> > > > > Jacek Laskowski
> > > > > http://www.JacekLaskowski.pl
> > > >
> > > > --
> > > > Cheers,
> > > > Guillaume Nodet
> > > > 
> > > > Blog: http://gnodet.blogspot.com/
> >
> > --
> > J. Daniel Kulp
> > Principal Engineer, IONA
> > [EMAIL PROTECTED]
> > http://www.dankulp.com/blog



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


Re: Re-4: Using CXF in OSGi

2008-04-04 Thread Guillaume Nodet
Do the mailing lists have any problems ? I'm only receiving half of
the messages :-( Or sometimes a few hours later ...

On Fri, Apr 4, 2008 at 4:01 PM, Daniel Kulp <[EMAIL PROTECTED]> wrote:

> On Friday 04 April 2008, [EMAIL PROTECTED] wrote:
> > Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult
> > for me to understand how this can help me with an OSGi platform
> > like Equinox.


Because ServiceMix Kernel *is* an OSGi platform based on Felix
with some value added.  So everything that applies to Servicemix
Kernel can be applied to any other OSGi platform, Equinox included.
Bundles are bundles, eh ;-)


>
> > I understand that CXF is provided as a module for ServiceMix, right?
> > Can you provide some help on getting CXF to work on a "normal" OSGi
> > platform? I had a look at the MANIFEST files of the CXF libraries
> > but I couldn't find entries for OSGi. I'm a bit confused. :-)
>
> Basically, starting with 2.0.5, the big cxf bundle jar
> (cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the maven
> artifactId) does include an OSGI manifest. (although I noticed Guillaume
> did a fix for it last  night so I'm not sure if the 2.0.5 version
> complete works, I'll get a 2.0.6 snapshot going now.)   That said, since
> CXF doesn't really do any OSGI things ourselves, we don't worry about
> all the thirdparty jars.  ServiceMix does.  So basically, we have a
> bundle, but to really use it, you'll need to find/create a few other
> bundles for the third party deps (like jaxws-api, neethi, spring,
> wsdl4j, woodstox/stax, etc...).  ServiceMix does provide bundles for all
> of those, but you probably could easily do much of that yourself as
> well.


Yeah, there is a small problem with 2.0.5 OSGi manifest.
Another way is to create one big bundle that includes all the
dependencies if you prefer.


>
>
> The other thing SMX is providing is the cxf-osgi spring import thing that
> provides an OSGi http transport for the CXF component.   That might be a
> good thing to pull directly into CXF as that should definitely be usable
> in other OSGi environments.


Yes, it should.  It can certainly be moved to CXF, was I just hacked it this
week.  But this is more a discussion for cxf-dev btw.


>
>
> Dan
>
>
> >
> >
> >  Original Message 
> > Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51)
> > From:Guillaume Nodet <[EMAIL PROTECTED]>
> > To:  cxf-user@incubator.apache.org
> >
> > > The example I gave leverages Spring-DM.  Spring-DM is a small layer
> > > above Spring that gives you a really simple way to build OSGi
> > > applications based on Spring.  Of course, if you don't like spring,
> > > don't use Spring-DM. However, CXF is nicely integrated with Spring,
> > > so it makes sense.
> > >
> > > If you prefer, we also support OpenEJB / CXF in OSGi, though this is
> > > not finalized yet (but feedback and/or help is always welcome).  In
> > > this model, the EJB3 annotated beans are automatically discovered
> > > and exposed.  So no spring at all, and EJB3 annotations: it could
> > > make you happy ;-)
> > >
> > > On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski
> > > <[EMAIL PROTECTED]>
> > >
> > > wrote:
> > > > On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> > > > > Will Spring-DM also be a part of this example?
> > > >
> > > > It really doesn't change much if it can be done with OSGi itself.
> > > > Spring-DM is just an additional layer that lets use biuld bundles
> > > > yet it could in turn complicate understanding of the real value of
> > > > CXF on OSGi. I'm looking forward to seeing the example. Go
> > > > Guillaume, go! ;-)
> > > >
> > > > Jacek
> > > >
> > > > --
> > > > Jacek Laskowski
> > > > http://www.JacekLaskowski.pl
> > >
> > > --
> > > Cheers,
> > > Guillaume Nodet
> > > 
> > > Blog: http://gnodet.blogspot.com/
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
>



-- 
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/


Re: Re-4: Using CXF in OSGi

2008-04-04 Thread Daniel Kulp
On Friday 04 April 2008, [EMAIL PROTECTED] wrote:
> Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult
> for me to understand how this can help me with an OSGi platform
> like Equinox.
> I understand that CXF is provided as a module for ServiceMix, right?
> Can you provide some help on getting CXF to work on a "normal" OSGi
> platform? I had a look at the MANIFEST files of the CXF libraries
> but I couldn't find entries for OSGi. I'm a bit confused. :-)

Basically, starting with 2.0.5, the big cxf bundle jar 
(cxf-2.0.5-incubator.jar, cxf-bundle if you are looking for the maven 
artifactId) does include an OSGI manifest. (although I noticed Guillaume 
did a fix for it last  night so I'm not sure if the 2.0.5 version 
complete works, I'll get a 2.0.6 snapshot going now.)   That said, since 
CXF doesn't really do any OSGI things ourselves, we don't worry about 
all the thirdparty jars.  ServiceMix does.  So basically, we have a 
bundle, but to really use it, you'll need to find/create a few other 
bundles for the third party deps (like jaxws-api, neethi, spring, 
wsdl4j, woodstox/stax, etc...).  ServiceMix does provide bundles for all 
of those, but you probably could easily do much of that yourself as 
well.  

The other thing SMX is providing is the cxf-osgi spring import thing that 
provides an OSGi http transport for the CXF component.   That might be a 
good thing to pull directly into CXF as that should definitely be usable 
in other OSGi environments.   

Dan


>
>
>  Original Message 
> Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51)
> From:Guillaume Nodet <[EMAIL PROTECTED]>
> To:  cxf-user@incubator.apache.org
>
> > The example I gave leverages Spring-DM.  Spring-DM is a small layer
> > above Spring that gives you a really simple way to build OSGi
> > applications based on Spring.  Of course, if you don't like spring,
> > don't use Spring-DM. However, CXF is nicely integrated with Spring,
> > so it makes sense.
> >
> > If you prefer, we also support OpenEJB / CXF in OSGi, though this is
> > not finalized yet (but feedback and/or help is always welcome).  In
> > this model, the EJB3 annotated beans are automatically discovered
> > and exposed.  So no spring at all, and EJB3 annotations: it could
> > make you happy ;-)
> >
> > On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski
> > <[EMAIL PROTECTED]>
> >
> > wrote:
> > > On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> > > > Will Spring-DM also be a part of this example?
> > >
> > > It really doesn't change much if it can be done with OSGi itself.
> > > Spring-DM is just an additional layer that lets use biuld bundles
> > > yet it could in turn complicate understanding of the real value of
> > > CXF on OSGi. I'm looking forward to seeing the example. Go
> > > Guillaume, go! ;-)
> > >
> > > Jacek
> > >
> > > --
> > > Jacek Laskowski
> > > http://www.JacekLaskowski.pl
> >
> > --
> > Cheers,
> > Guillaume Nodet
> > 
> > Blog: http://gnodet.blogspot.com/



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


Re-2: Using CXF in OSGi

2008-04-04 Thread dankof
How do you export a CXF service on Equinox? Can you give a
short example what configuration is needed to expose it?

 Original Message 
Subject: Re: Using CXF in OSGi (03-Apr-2008 20:00)
From:Mayank Thakore <[EMAIL PROTECTED]>
To:  cxf-user@incubator.apache.org

> Hi Fabian,
> 
> We use CXF in a bundle with equinox. We just put the CXF jars in a 
> bundle and exported the packages from there. It works like a charm. Just 
> be sure to export/import javax.xml.ws and similar packages or CXF won't 
> detect the annotations (e.g. the ones for jax-ws)
> 
> Regards
> Mayank
> 
> [EMAIL PROTECTED] wrote:
> > Hello!
> >  
> > Are there already some working bundles of CXF for OSGi? I found a solved 
> > bug (CXF-490) on JIRA which says this is done. Does anyone have some advice 
> > on how to use it? Maybe examples?
> >  
> > Best regards,
> >  
> > Fabian
> >
> >   




Re-4: Using CXF in OSGi

2008-04-04 Thread dankof
Hmm I'm not familiar with Apache ServiceMix so it's a bit difficult
for me to understand how this can help me with an OSGi platform
like Equinox.
I understand that CXF is provided as a module for ServiceMix, right?
Can you provide some help on getting CXF to work on a "normal" OSGi
platform? I had a look at the MANIFEST files of the CXF libraries
but I couldn't find entries for OSGi. I'm a bit confused. :-)


 Original Message 
Subject: Re: Re-2: Using CXF in OSGi (04-Apr-2008 11:51)
From:Guillaume Nodet <[EMAIL PROTECTED]>
To:  cxf-user@incubator.apache.org

> The example I gave leverages Spring-DM.  Spring-DM is a small layer above
> Spring that gives you a really simple way to build OSGi applications based
> on Spring.  Of course, if you don't like spring, don't use Spring-DM.
> However, CXF is nicely integrated with Spring, so it makes sense.
> 
> If you prefer, we also support OpenEJB / CXF in OSGi, though this is not
> finalized yet (but feedback and/or help is always welcome).  In this model,
> the EJB3 annotated beans are automatically discovered and exposed.  So no
> spring at all, and EJB3 annotations: it could make you happy ;-)
> 
> On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski <[EMAIL PROTECTED]>
> wrote:
> 
> > On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> > > Will Spring-DM also be a part of this example?
> >
> > It really doesn't change much if it can be done with OSGi itself.
> > Spring-DM is just an additional layer that lets use biuld bundles yet
> > it could in turn complicate understanding of the real value of CXF on
> > OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-)
> >
> > Jacek
> >
> > --
> > Jacek Laskowski
> > http://www.JacekLaskowski.pl
> >
> 
> 
> 
> -- 
> Cheers,
> Guillaume Nodet
> 
> Blog: http://gnodet.blogspot.com/
> 




Re: I have the TRaX, can you help?

2008-04-04 Thread Benson Margulies
I think this has to do with the XML jars in your path. What container are
you in?


Re: Re-2: Using CXF in OSGi

2008-04-04 Thread Guillaume Nodet
The example I gave leverages Spring-DM.  Spring-DM is a small layer above
Spring that gives you a really simple way to build OSGi applications based
on Spring.  Of course, if you don't like spring, don't use Spring-DM.
However, CXF is nicely integrated with Spring, so it makes sense.

If you prefer, we also support OpenEJB / CXF in OSGi, though this is not
finalized yet (but feedback and/or help is always welcome).  In this model,
the EJB3 annotated beans are automatically discovered and exposed.  So no
spring at all, and EJB3 annotations: it could make you happy ;-)

On Fri, Apr 4, 2008 at 8:34 AM, Jacek Laskowski <[EMAIL PROTECTED]>
wrote:

> On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> > Will Spring-DM also be a part of this example?
>
> It really doesn't change much if it can be done with OSGi itself.
> Spring-DM is just an additional layer that lets use biuld bundles yet
> it could in turn complicate understanding of the real value of CXF on
> OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-)
>
> Jacek
>
> --
> Jacek Laskowski
> http://www.JacekLaskowski.pl
>



-- 
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/


Re: Possible to use CXF without Spring ?

2008-04-04 Thread Valerio Schiavoni
You were right.

I excluded a bunch of dependencies, and everything still works just fine.

Thanks for the prompt support !

As a side node, you might be interested to know that CXF is currently being
used as support to build the web-service based bindings in the
www.scorware.org project, which aims at building a SCA runtime the same way
Tuscany does.

Cheers,
Valerio


On Fri, Apr 4, 2008 at 3:57 AM, Daniel Kulp <[EMAIL PROTECTED]> wrote:

> On Thursday 03 April 2008, Valerio Schiavoni wrote:
> > Interesting.
> > My needs are indeed quite simple: i export java interfaces (without
> > annotations), using hte ServerFactoryBean (configured manually with
> > AegisDatabinding), and the same operations on the client side. Do you
> > think such operations are enough "simple" to be done without Spring?
>
> They should be.   Nothing special there.  :-)
>
>
> > Where can I see some example of such configuration ?
>
> Seriously, just remove the spring jars.  In theory, it should detect that
> spring isn't there and flip over to the other way of setting things up.
>
> Dan
>
>
>
> >
> > Thanks,
> > Valerio
> >
> > On Thu, Apr 3, 2008 at 11:42 PM, Daniel Kulp <[EMAIL PROTECTED]> wrote:
> > > CXF can be used without spring for some very basic use cases.
> > > Basically, simple JAXWS+JAXB client/server with no configuration (or
> > > use API's for configuration) and none of the complex things like
> > > ws-security/ws-rm that requires said configuration.
> > >
> > > Once you need to start configuring things, though, you may need the
> > > spring configs or you would need to write your own things to call on
> > > the API's to configure stuff.
> > >
> > > That said, I haven't tests the non-spring support lately.  :-(
> > >
> > > Dan
> > >
> > > On Thursday 03 April 2008, Valerio Schiavoni wrote:
> > > > this might sound weird but: how could I use cxf without its Spring
> > > > support ?
> > > >
> > > >
> > > > Within our framework we already use another component-model
> > > > (Fractal, see http://fractal.objectweb.org), and having both at
> > > > the same time is a bit too much. Everything works fine, let me be
> > > > clear, but I'd like to explore a solution without having cxf
> > > > import (transitively) all its Spring depedencies.
> > > >
> > > > Thanks,
> > > > Valerio
> > >
> > > --
> > > J. Daniel Kulp
> > > Principal Engineer, IONA
> > > [EMAIL PROTECTED]
> > > http://www.dankulp.com/blog
>
>
>
> --
> J. Daniel Kulp
> Principal Engineer, IONA
> [EMAIL PROTECTED]
> http://www.dankulp.com/blog
>



-- 
http://www.linkedin.com/in/vschiavoni
http://jroller.com/vschiavoni


Re: Re-2: Using CXF in OSGi

2008-04-04 Thread Jacek Laskowski
On Thu, Apr 3, 2008 at 2:04 PM,  <[EMAIL PROTECTED]> wrote:
> Will Spring-DM also be a part of this example?

It really doesn't change much if it can be done with OSGi itself.
Spring-DM is just an additional layer that lets use biuld bundles yet
it could in turn complicate understanding of the real value of CXF on
OSGi. I'm looking forward to seeing the example. Go Guillaume, go! ;-)

Jacek

-- 
Jacek Laskowski
http://www.JacekLaskowski.pl


Re: GET request URL parameters

2008-04-04 Thread Sergey Beryozkin
Hi

CXF HttpBinding can be considered deprecated as it has not been supported for a 
while.
I'd recommend you to try a JAX-RS approach, multiple query parameters are 
supported there...

Cheers, Sergey


> 
> I have tried the rest style web service with http binding with CXF2.0.3
> version.  My service looks as follows. 
> 
> @Get
> @HttpResource(location = "/searchCustomer/{firstName}/{lastName}")
> Customer searchCustomer(@WebParam(name =
> "searchInputType")SearchCriteriaType searchInput);
> 
> When I tried with the URL,
> 
> http://localhost:8080/myapp/services/searchCustomer/foo_first/bar_last
> 
> I got the correct output.  
> 
> But I would like to use request parameters query string as follows.
> 
>   
> http://localhost:8080/myapp/services/searchCustomer?firstName=foo_first&lastName=bar_last
> 
> But the service is failed with the following Exception:
> 
> org.apache.cxf.interceptor.Fault: Invalid URL/Verb combination. Verb: GET
> Path: /searchCustomer
> at
> org.apache.cxf.binding.http.interceptor.DispatchInterceptor.handleMessage(DispatchInterceptor.java:74)
> at
> org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
> at
> org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
> at
> org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
> at
> org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:256)
> at
> org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:123)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
> at
> org.apache.cxf.transport.servlet.AbstractCXFServlet.doGet(AbstractCXFServlet.java:152)
> at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
> 
> I would like to know is there any way can I configure CXF web service to
> use query strings?  Because I suspect there could be special characters or
> white spaces in the parameters which might break the URL if I follow the
> first approach.  If I use request parameters as query string I can use
> proper encoding for parameters provided by JSTL taglibs.
> 
> Thanks,
> Durga
> 
> 
> 
> -- 
> View this message in context: 
> http://www.nabble.com/GET-request-URL-parameters-tp16476108p16476108.html
> Sent from the cxf-user mailing list archive at Nabble.com.


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


Re: [CXF] Deployment errors

2008-04-04 Thread Cencio

Yes.. i was looking for the wsdl from that URl, but it gives me that error





Freeman Fang wrote:
> 
> Hi,
> 
> Looks like the url is incorrect.
> According to your configuration, the correct one should be
> http://localhost:8080/your-war-name/ordine?wsdl
> 
> Regards
> 
> Freeman
> 
> 
> Cencio wrote:
>> Hi,
>>
>> i'm still unable to retrieve the wsdl from my service... i post all my
>> info:
>>
>> web.xml:
>>
>> 
>> 
>> contextConfigLocation
>> WEB-INF/beans.xml
>> 
>>
>> 
>> 
>>
>> org.springframework.web.context.ContextLoaderListener
>> 
>> 
>>
>> 
>> CXFServlet
>> CXF Servlet
>> 
>> org.apache.cxf.transport.servlet.CXFServlet
>> 
>> 1
>> 
>>
>> 
>> CXFServlet
>> /*
>> 
>> 
>>
>>
>>
>>
>>
>>
>> beans.xml:
>>
>> 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.xsd
>> http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd";>
>>
>> 
>> > />
>> 
>> > class="org.apache.cxf.interceptor.LoggingInInterceptor"/>
>> > class="org.apache.cxf.interceptor.LoggingOutInterceptor"/>
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> >   id="ese5"
>>   address="ordine" 
>>   implementor="org.rivenditore.ordine.OrdineInterfaceImpl" />
>>
>> 
>>
>>
>>
>>
>>
>> ordine.wsdl
>>
>>
>>
>> >xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>>xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>xmlns:ele="http://www.rivenditore.org/ordiniElements";
>>xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>>xmlns:ord="http://www.rivenditore.org/Ordine";
>>targetNamespace="http://www.rivenditore.org/Ordine";>
>>
>> http://www.rivenditore.org/submitOrdineTypes";
>> location="submitOrdine.xsd" />
>>
>> 
>> > targetNamespace="http://www.rivenditore.org/ordiniElements";
>>xmlns:soType="http://www.rivenditore.org/submitOrdineTypes";>
>>
>>
>>
>> 
>> 
>>
>>
>>   
>>
>>
>>
>>
>>   
>>
>>
>>
>>   
>>
>>
>>
>>
>>   
>>  
>>  
>>   
>>
>>   
>> 
>>   
>>
>> 
>>
>>> type="ord:OrdineInterface">
>>   > transport="http://schemas.xmlsoap.org/soap/http"/>
>>
>>   
>>  > soapAction="http://www.rivenditore.org/service/ordini/#SubmitOrdine"/>
>>  
>> 
>>  
>>  
>> 
>>  
>>   
>>
>>   
>>  
>>  
>> 
>>  
>>   
>>
>>
>>
>>   > binding="ord:OrdineInterfaceBinding">
>>  http://localhost:8080/ese5/ordine"/>
>>
>>
>>
>>
>> 
>>
>>
>>
>>
>> submitOrdine.xsd:
>>
>>
>>
>> 
>> http://www.w3.org/2001/XMLSchema";
>> targetNamespace="http://www.rivenditore.org/submitOrdineTypes";
>> xmlns:so="http://www.rivenditore.org/submitOrdineTypes";>
>>
>>  
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> 
>> 
>> 
>>
>> 
>> 
>> 
>> > default="EUR"
>> use="optional"/>
>> 
>> 
>> 
>>
>> 
>>
>>
>>
>>
>> I develope both client and server using wsdl2java.
>>
>> Thx for any help.
>>
>>   
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/-CXF--Deployment-errors-tp16352989p16488176.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Using CXF in OSGi

2008-04-04 Thread Guillaume Nodet
The documentation is a bit rough, and if haven't had much time to test it on
a very clean platform aso, so if you have any problems, please report so we
can fix it asap.  See http://cwiki.apache.org/SMX4/cxf-examples.html

On Thu, Apr 3, 2008 at 1:48 PM, Guillaume Nodet <[EMAIL PROTECTED]> wrote:

> I'm just working on an example right now.  I'll post more details asap.
>
>
> On Thu, Apr 3, 2008 at 1:29 PM, <[EMAIL PROTECTED]> wrote:
>
> > Hello!
> >
> > Are there already some working bundles of CXF for OSGi? I found a solved
> > bug (CXF-490) on JIRA which says this is done. Does anyone have some advice
> > on how to use it? Maybe examples?
> >
> > Best regards,
> >
> > Fabian
> >
>
>
>
> --
> Cheers,
> Guillaume Nodet
> 
> Blog: http://gnodet.blogspot.com/




-- 
Cheers,
Guillaume Nodet

Blog: http://gnodet.blogspot.com/