"Not enough message parts for the operation" when optional element is not
passed to wrapped style operation
-----------------------------------------------------------------------------------------------------------
Key: XFIRE-1015
URL: http://jira.codehaus.org/browse/XFIRE-1015
Project: XFire
Issue Type: Bug
Components: JAXB 2.0
Affects Versions: 1.2.6
Reporter: Matthias Germann
Assignee: Dan Diephouse
Priority: Critical
When a optional element for a wrapped style web service operation is not passed
in the request, the execption "Not enough message parts for the operation" is
thrown.
I have the following request element type
<xs:complexType name="GetBund">
<xs:sequence>
<xs:element name="Stichtag" type="xs:date"/>
<xs:element name="ID" type="xs:int" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
Wsgen generates the following wrapped style method:
@WebMethod(operationName = "GetBund", action = "")
@WebResult(name = "DirekteBundesteuerDaten", targetNamespace =
"http://mynamespace.org")
public DirekteBundesSteuerDaten getBund(
@WebParam(name = "Stichtag", targetNamespace = "http://mynamespace.org")
XMLGregorianCalendar Stichtag,
@WebParam(name = "ID", targetNamespace = "http://mynamespace.org")
List<Integer> ID);
When i invoke the web service with the following request, i get an exception
("Not enough message parts for the operation")
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:leit="http://mynamespace.org">
<soapenv:Header/>
<soapenv:Body>
<leit:GetBund>
<leit:Stichtag>2002-10-10</leit:Stichtag>
</leit:GetBund>
</soapenv:Body>
</soapenv:Envelope>
The invocation works if i add the "ID" element to the request:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:leit="http://mynamespace.org">
<soapenv:Header/>
<soapenv:Body>
<leit:GetBund>
<leit:Stichtag>2002-10-10</leit:Stichtag>
<leit:ID>1234</leit:ID>
</leit:GetBund>
</soapenv:Body>
</soapenv:Envelope>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe from this list please visit:
http://xircles.codehaus.org/manage_email