You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Pasadi Munasinghe <pa...@wso2.com> on 2015/02/13 12:49:20 UTC

Sending Messages to WS Endpoints.

Hi,
I need to implement a Client in cxf to send messages to a WS endpoint
without initializing a service class without using a WSDL. Can anyone
suggest me how to do this..?
Thanx..!

-- 
Pasadi Munasinghe
Software Engineer Intern
WSO2, Inc
Mobile: +9471 377 5515

Re: Sending Messages to WS Endpoints.

Posted by Jose María Zaragoza <de...@gmail.com>.
2015-02-13 12:49 GMT+01:00 Pasadi Munasinghe <pa...@wso2.com>:
> Hi,
> I need to implement a Client in cxf to send messages to a WS endpoint
> without initializing a service class without using a WSDL. Can anyone
> suggest me how to do this..?
> Thanx..!


Maybe WSDL2Java generated Client

http://cxf.apache.org/docs/how-do-i-develop-a-client.html

>
> --
> Pasadi Munasinghe
> Software Engineer Intern
> WSO2, Inc
> Mobile: +9471 377 5515

Re: Sending Messages to WS Endpoints.

Posted by Daniel Kulp <dk...@apache.org>.
> On Feb 13, 2015, at 10:41 PM, Pasadi Munasinghe <pa...@wso2.com> wrote:
> 
> Hi Daniel,
> Thanx a lot for you reply. The thing is I don't have a lot of experience in
> CXF. Soi'd really appreciate if you can elaborate this a bit more. Some
> references on how to do this would be very valuable.
> Thanx..!!!
> 

Take a look at:

https://git-wip-us.apache.org/repos/asf?p=cxf.git;a=blob;f=systests/jaxws/src/test/java/org/apache/cxf/systest/dispatch/DispatchClientServerTest.java

testDOMSourceMESSAGE and testDOMSourcePAYLOAD are likely close to what you want to do.

Dan


> On Sat, Feb 14, 2015 at 1:04 AM, Daniel Kulp <dk...@apache.org> wrote:
> 
>> 
>>> On Feb 13, 2015, at 6:49 AM, Pasadi Munasinghe <pa...@wso2.com> wrote:
>>> 
>>> I need to implement a Client in cxf to send messages to a WS endpoint
>>> without initializing a service class without using a WSDL. Can anyone
>>> suggest me how to do this..?
>>> Thanx..!
>> 
>> JAX-WS has some ways to do this, but it’s not “easy”.  You would need to
>> do a Service.create(name) to create the Service, call addPort on it to
>> define the port (soap1.1/1.2, url, etc…), then create the Dispatch object
>> from it.
>> 
>> --
>> Daniel Kulp
>> dkulp@apache.org - http://dankulp.com/blog
>> Talend Community Coder - http://coders.talend.com
>> 
>> 
> 
> 
> -- 
> Pasadi Munasinghe
> Software Engineer Intern
> WSO2, Inc
> Mobile: +9471 377 5515

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com


Re: Sending Messages to WS Endpoints.

Posted by Pasadi Munasinghe <pa...@wso2.com>.
Hi Daniel,
Thanx a lot for you reply. The thing is I don't have a lot of experience in
CXF. Soi'd really appreciate if you can elaborate this a bit more. Some
references on how to do this would be very valuable.
Thanx..!!!

On Sat, Feb 14, 2015 at 1:04 AM, Daniel Kulp <dk...@apache.org> wrote:

>
> > On Feb 13, 2015, at 6:49 AM, Pasadi Munasinghe <pa...@wso2.com> wrote:
> >
> > I need to implement a Client in cxf to send messages to a WS endpoint
> > without initializing a service class without using a WSDL. Can anyone
> > suggest me how to do this..?
> > Thanx..!
>
> JAX-WS has some ways to do this, but it’s not “easy”.  You would need to
> do a Service.create(name) to create the Service, call addPort on it to
> define the port (soap1.1/1.2, url, etc…), then create the Dispatch object
> from it.
>
> --
> Daniel Kulp
> dkulp@apache.org - http://dankulp.com/blog
> Talend Community Coder - http://coders.talend.com
>
>


-- 
Pasadi Munasinghe
Software Engineer Intern
WSO2, Inc
Mobile: +9471 377 5515

Re: Sending Messages to WS Endpoints.

Posted by Daniel Kulp <dk...@apache.org>.
> On Feb 13, 2015, at 6:49 AM, Pasadi Munasinghe <pa...@wso2.com> wrote:
> 
> I need to implement a Client in cxf to send messages to a WS endpoint
> without initializing a service class without using a WSDL. Can anyone
> suggest me how to do this..?
> Thanx..!

JAX-WS has some ways to do this, but it’s not “easy”.  You would need to do a Service.create(name) to create the Service, call addPort on it to define the port (soap1.1/1.2, url, etc…), then create the Dispatch object from it. 

-- 
Daniel Kulp
dkulp@apache.org - http://dankulp.com/blog
Talend Community Coder - http://coders.talend.com