You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cxf.apache.org by Daniel Kulp <dk...@apache.org> on 2007/10/12 15:31:30 UTC
Re: svn commit: r583877 - in /incubator/cxf/trunk: rt/core/src/main/java/org/apache/cxf/interceptor/ rt/databinding/jaxb/src/main/java/org/apache/cxf/jaxb/ rt/frontend/jaxws/src/main/java/org/apache/cxf/jaxws/interceptors/ rt/frontend/jaxws/src/main/java/o...
Glen,
On Thursday 11 October 2007, Glen Mazza wrote:
> Am Donnerstag, den 11.10.2007, 16:53 +0000 schrieb dkulp@apache.org:
> > protected void createOutputWrappedMessageParts(OperationInfo
> > op, Method method, MessageInfo outMsg) { - MessagePartInfo
> > part = outMsg.addMessagePart("result"); + String partName =
> > null;
> > + for (Iterator itr = serviceConfigurations.iterator();
> > itr.hasNext();) { + AbstractServiceConfiguration c =
> > (AbstractServiceConfiguration)itr.next(); + partName =
> > c.getResponseWrapperPartName(op, method); + if (partName
> > != null) {
> > + break;
> > + }
> > + }
> > + if (partName == null) {
> > + partName = "parameters";
> > + }
>
> I may be misunderstanding the code here, but the WSDL schema[1] seems
> to say that partName is required, and if you don't have it, the WSDL
> is no good--it should be rejected. Are you sure you want to be adding
> "parameters" in under that case?
This code is in the pathway that goes the other way. Java -> WSDL.
Basically, we're looking at the Java class and trying to build up the
servicemodel. There isn't an annotation to specify the part name that
is used for the wrapped doc/lit case. What the code above does is go
through all the ServiceConfigurations and ask if they want to
specifically specify a name. In MOST cases, they won't. (The Default
is to return null) In those cases, we'll then use "parameters" as the
name. We MUST specify a name and "parameters" seems to be the
convention that works best. (at least for .NET)
The JAX-WS frontend does have a couple of cases where we have to
use "result" instead of "parameters". The above allows the JAX-WS
frontend to return that in those cases.
--
J. Daniel Kulp
Principal Engineer
IONA
P: 781-902-8727 C: 508-380-7194
daniel.kulp@iona.com
http://www.dankulp.com/blog