I don't think this is doable.   With JAX-WS, you can have complete "unwrapped" 
style where all the parts are individual params (holders for out/in-out) or 
bare where there are wrapper parts for both request and response.    There 
isn't a way to have unwrap in/bare out.    If you don't like the holders, I 
think the only option is to flip to bare mode and have TransactionRequest and 
TransactionResponse objects to work with.

Dan


On Friday 09 January 2009 7:15:21 am Josef Bajada wrote:
> Hi,
>
>
>
> I am trying to develop my webservice in contract-first style using
> document/literal encoding. I was interested in making my methods in
> 'wrapped' style since this makes it easy for developers to have
> RPC-style method signatures. However the response of these methods is a
> complex-type element which has various members such as transaction code,
> message etc.
>
>
>
> However, for some reason when I perform wsdl2java using CXF (v2.1.2) the
> members of the response object are also put as parameters in the method
> signature. The method is annotated with:
>
>
>
>   @ResponseWrapper(localName = "transactionResponse", targetNamespace =
> "http://mynamespace.com";, className = "my.package.TransactionResponse")
>
>
>
> And the signature of the method itself gets overcomplicated with all the
> members of the TransactionResponse class being 'boxed' in
> javax.xml.ws.Holder instances:
>
>
>
>         @WebParam(mode = WebParam.Mode.OUT, name = "responseCode",
> targetNamespace = "http://www.go.com.mt/webservices/EPG.xsd";)
>
>         javax.xml.ws.Holder<java.math.BigInteger> responseCode,
>
>         @WebParam(mode = WebParam.Mode.OUT, name = "responseMessage",
> targetNamespace = "http://www.go.com.mt/webservices/EPG.xsd";)
>
>         javax.xml.ws.Holder<java.lang.String> responseMessage,
>
>         @WebParam(mode = WebParam.Mode.OUT, name =
> "transactionTimestamp", targetNamespace =
> "http://www.go.com.mt/webservices/EPG.xsd";)
>
>         javax.xml.ws.Holder<javax.xml.datatype.XMLGregorianCalendar>
> transactionTimestamp,
>
>
>
> While I would like that input request parameters get wrapped into the
> RequestWrapper but the response not, because in my case this is a bit of
> a nuisance. I tried to rename the response elements so that they don't
> match the 'methodnameResponse' convention but it was in vain.
>
>
>
> Any idea how to solve this?
>
>
>
>
>
> Regards,
>
>
>
> Josef



-- 
Daniel Kulp
[email protected]
http://dankulp.com/blog

Reply via email to