You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Kunjan Shah <ku...@gmail.com> on 2015/12/08 08:10:32 UTC

Dynamic client requirement for generic soap client

Hi there,

I want to use dynamic client features for apache cxf. My requirement is :

I want to create a generic soap client which receives wsdl url, method name
and then xml body in arguments and then without generating stub i can call
the methods of any webservice? so this cient can work in case of any
webservice where i can pass data from outside.

I had looked into your api, but could not find a way in
jaxwsdynamicClientFactory or DynamicClientFactory to pass xml in params so
it can be used for my purpose.

I dont want towork with DOm so did not looked into DispatchClient feature.

Can u please suggest me a way to fulfill my requirement using apache cxf

Regards,
Dev

RE: Dynamic client requirement for generic soap client

Posted by "Talkov, Roger" <Ro...@automic.com>.
Hi,

A brief summary of how I do it is:
From the dynamic client you can get the request class from BindingOperationInfo.getInput().getMessageParts ()
Create an instance of the request class
Use JAXBContext to marshall the request to xml (you need to fill the fields of the request with non-null template values for it to generate xml for those fields)
After the user edits the xml, unmarshall it back to a request and execute the request
Then marshall the response to xml

Roger

-----Original Message-----
From: Kunjan Shah [mailto:kunjanshah2015@gmail.com]
Sent: Monday, December 07, 2015 11:11 PM
To: users@cxf.apache.org
Subject: Dynamic client requirement for generic soap client

Hi there,

I want to use dynamic client features for apache cxf. My requirement is :

I want to create a generic soap client which receives wsdl url, method name and then xml body in arguments and then without generating stub i can call the methods of any webservice? so this cient can work in case of any webservice where i can pass data from outside.

I had looked into your api, but could not find a way in jaxwsdynamicClientFactory or DynamicClientFactory to pass xml in params so it can be used for my purpose.

I dont want towork with DOm so did not looked into DispatchClient feature.

Can u please suggest me a way to fulfill my requirement using apache cxf

Regards,
Dev
This email (including any attachments) may contain information which is privileged, confidential, or protected. If you are not the intended recipient, note that any disclosure, copying, distribution, or use of the contents of this message and attached files is prohibited. If you have received this email in error, please notify the sender and delete this email and any attached files.