You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by test321 <on...@getonemail.com> on 2010/05/05 16:29:17 UTC

CXF: is it possible to generate a webservice response for specified method with specified data to string?

  0  vote down  star
	

Hi, we are using cxf webservices with java server and .NET client. We
generate WSDL file based on our java code, and MS Visual Studio automaticaly
generate deserializers, based on WSDL.

Now we need to add jms support to our app. Because we use both Java and
.NET, we can only put serealized xml objects to jms mesage as a text (we
can't put java objects there).

We have an idea to implement such trick: if we need to return array of
String as a result in jms message we create an blank method Strign[]
getStrings() in webservice, and in jms message we put result like if it was
a result of calling this method from webservice and automatically generated
by cxf:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:getStringsResponse xmlns:ns2="http://app.company.com/">
         <return>
           ....

This allows us to generate parser for jms messages by MS Visual Studio
automatically (like for webservices). Client will extract string from jms
message, send it to autogenerated parser and receive result.

The only problem is: how can I ask CXF to generate XML (string) like it is a
reply for some method and pass some data as a body for this reply.

For example, I have an array of Strings. I call a function like this:

someFunc(data, "getStrings") and the result is


<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:getStringsResponse xmlns:ns2="http://app.company.com/">
         <return>
           -My Strings Here-
           ...

Is such functionality available in CXF, or it is CXF internals and they are
not available for CXF users?

Thanks!

-- 
View this message in context: http://old.nabble.com/CXF%3A-is-it-possible-to-generate-a-webservice-response-for-specified-method-with-specified-data-to-string--tp28461735p28461735.html
Sent from the cxf-user mailing list archive at Nabble.com.