cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shaw, Richard A" <richard.s...@atkinsglobal.com>
Subject RE: DynamicClientFactory & skipping some layers
Date Wed, 06 Jun 2007 09:07:36 GMT
A new day and a clear mind and this turned out to be easy.

For those who are intersted this is what I've ended up with -

        QName serviceName = new QName("http://www.atkinsglobal.com/inform/configmanager/",
"ConfigManagerService");
        QName portName = new QName("http://www.atkinsglobal.com/inform/configmanager/", "ConfigManagerPort");
        
        Service service;
        try
        {
            service = Service.create(new URL("http://localhost:9091/ConfigManager?wsdl"),
serviceName);

            Dispatch<DOMSource> dispDOMSrcPayload = service.createDispatch(portName,

                    DOMSource.class, Mode.PAYLOAD);
            
            DOMSource request = loadRequest("etc/request.xml");
            
            DOMSource response = dispDOMSrcPayload.invoke(request);        
    
            System.out.println("Response from server: " 
                    + response.getNode().getFirstChild().getTextContent()); 
        }
        catch (MalformedURLException e)
        {
            e.printStackTrace();
        }

loadRequest simply loads the file into a DOMSource object. 


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: richard.shaw@atkinsglobal.com

www.atkinsglobal.com/its

-----Original Message-----
From: Shaw, Richard A [mailto:richard.shaw@atkinsglobal.com] 
Sent: 06 June 2007 08:55
To: cxf-user@incubator.apache.org
Subject: RE: DynamicClientFactory

My use case is shown in my other email sibject "Skipping some layers in the interceptor chain"

I want to create a generic component to fetch data from a data provision service (using lots
of transport formats, etc). The suggest has been to use jax-ws dispatch provider interface.
I want to do this without having to create a service class at design time from the wsdl file.


I want to be able to deploy my data fetch component, give it a wsdl file, some config about
the request (possibly an XML message in a file), and an XSL transform to convert the reply
into a message to my data storage component.

So my real question is how do I create a Service object from a wsdl file so that I can call
dispath on it. 

I'm still not user if the dispatch provider goes through the binding layer so this might still
not be my solution. I created a CSV binding for the old Celtix (which I haven't converted
yet) and an FTP transport. I was using these to fetch data from CSV files on an FTP server,
with the same generic data fetch component that was able to fetch data from a web service.
As part of the migration of this component to CXF I wanted to look at making more efficient
- it worked by calling wsdl2java at runtime to create a service class from the wsdl, it then
loaded an XML file for the request, unmarshalled it into a java object before calling the
service which would start my marshalling it mach to XML.  


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: richard.shaw@atkinsglobal.com

www.atkinsglobal.com/its

-----Original Message-----
From: Dan Diephouse [mailto:dan@envoisolutions.com]
Sent: 05 June 2007 22:38
To: cxf-user@incubator.apache.org
Subject: Re: DynamicClientFactory

Why do you need a JAX-WS Service object from the DCF? The DCF is primarily for dynamic languages
which want to create some proxy around a client and compile the client on the fly.
Thanks,
- Dan

On 6/5/07, Shaw, Richard A <richard.shaw@atkinsglobal.com> wrote:
>
> Can I get a javax.xml.ws.Service object from the Client object 
> returned from by the DynamicClientFactory ?
>
> All I can find is a org.apache.cxf.service.Service object which I 
> don't think is the same.
>
> 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: richard.shaw@atkinsglobal.com
>
> 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.
>
> Consider the environment. Please don't print this e-mail unless you 
> really need to.
>



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


This message has been scanned for viruses by MailControl - (see http://bluepages.wsatkins.co.uk/?6875772)

Mime
View raw message