I was looking for a solution in almost all forums but didn't find any.
I am developing java web service using xfire-1.2.6. Client services are 
java/perl written.
The problem is that I cannot specify the optional argument of a method. Java 
services are sending all method parameters in a SOAP request (nilled if not 
set: </someParamName>), but perl services are not sending some of parameters 
what causes:

"Not enough message parts were received for the operation."

problem which is understandable, because WSDL part concerning this method looks 
like this:

<xsd:element name="getResult">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="rsId" nillable="true" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="fromPosition" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="toPosition" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="requestMode" nillable="true" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="getResult_type" nillable="true" 
type="tns:GetResultType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

All I want is to make the last method parameter optional, so the generated wsdl 
part look like this:
<xsd:element name="getResult">
<xsd:complexType>
<xsd:sequence>
<xsd:element maxOccurs="1" minOccurs="1" name="rsId" nillable="true" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="1" name="fromPosition" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="toPosition" type="xsd:int"/>
<xsd:element maxOccurs="1" minOccurs="1" name="requestMode" nillable="true" 
type="xsd:string"/>
<xsd:element maxOccurs="1" minOccurs="0" name="getResult_type" nillable="true" 
type="tns:GetResultType"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>

How can I achieve that? How can I enforce setting minOccurs to 0 so the SOAP 
requests like this one:
<soap11:Envelope  ...>
  <soap11:Body>
    <tns:getResult>
      <rsId xsi:type="xsd:string">someId</rsId>
      <fromPosition xsi:type="xsd:int">1</fromPosition>
      <toPosition xsi:type="xsd:int">2</toPosition>
      <requestMode xsi:type="xsd:string">someMode</requestMode>
    </tns:getResult>
  </soap11:Body>
</soap11:Envelope>

were parsed succesfully. The best way would be to set this using annotations, 
but as I made some research it looks like it's unavailable.
Thanks in advance for your help,
Az



---------------------------------------------------------------------
To unsubscribe from this list please visit:

    http://xircles.codehaus.org/manage_email

Reply via email to