XFire

WSDLServiceBuilder uses the name of the schema type rather than the part name to create MessagePartInfo when using dynamic client

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0, 1.1-RC1
  • Fix Version/s: 1.1
  • Component/s: Core
  • Labels:
    None
  • Number of attachments :
    0

Description

In createMessageParts(MessagePartContainer info, Message msg) in org.codehaus.xfire.wsdl11.parser.WSDLServiceBuild there is the following code snippets:

QName typeName = entry.getTypeName();
if (typeName != null)

{ QName partName = new QName(getTargetNamespace(), entry.getName()); MessagePartInfo part = info.addMessagePart(typeName, null); part.setSchemaElement(false); part.setSchemaType(getBindingProvider().getSchemaType(typeName, service)); }

// We've got a concrete schema type
QName elementName = entry.getElementName();
if (elementName != null)

{ MessagePartInfo part = info.addMessagePart(elementName, null); part.setSchemaType(getBindingProvider().getSchemaType(typeName, service)); }

Inside of both of the if tests, info.addMessage is called with the name of the schema type rather than the name of the part itself. When using the dynamic client calling an operation that lookes like this:

<wsdl:message name="getBatchDetailsRequest">
<wsdl:part name="localId" type="xsd:string" />
<wsdl:part name="trdProperties" type="xsd:boolean" />
<wsdl:part name="propertyLog" type="xsd:boolean" />
<wsdl:part name="stationList" type="xsd:boolean" />
<wsdl:part name="transList" type="xsd:boolean" />
</wsdl:message>

I get an error saying that there is no part named "string".

The code in WSDLServiceBuilder should should probably look like this:

// We're extending an abstract schema type
QName typeName = entry.getTypeName();
if (typeName != null)

{ QName partName = new QName(getTargetNamespace(), entry.getName()); MessagePartInfo part = info.addMessagePart(partName, null); part.setSchemaElement(false); part.setSchemaType(getBindingProvider().getSchemaType(typeName, service)); }

// We've got a concrete schema type
QName elementName = entry.getElementName();
if (elementName != null)

{ QName partName = new QName(getTargetNamespace(), entry.getName()); MessagePartInfo part = info.addMessagePart(partName, null); part.setSchemaType(getBindingProvider().getSchemaType(elementName, service)); }

Activity

Hide
Dan Diephouse added a comment -

Thanks, but I fixed this in SVN two days ago Try the SNAPSHOT on the download page - it should have the fix in it.

Show
Dan Diephouse added a comment - Thanks, but I fixed this in SVN two days ago Try the SNAPSHOT on the download page - it should have the fix in it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: