Find another defect of XFire.
        The XFire cann't handle some xsd:boolean type element in the MTOSI WSDL
files, the result is in the SOAP message, all the boolean element is
missing.
        For example,this is the java class generated from MTOSI WSDL files:
public class HeaderT {
        protected Boolean batchSequenceEndOfReply;
        public Boolean isBatchSequenceEndOfReply() {
        return batchSequenceEndOfReply;
        }
        public void setBatchSequenceEndOfReply(Boolean value) {
        this.batchSequenceEndOfReply = value;
        }
}
In the SOAP message which contain the HeaderT, this boolean part will
missing:

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Header><header
xmlns="tmf854.v1"><activityName xsi:nil="true" /><activityStatus
xsi:nil="true" /><batchSequenceNumber xsi:nil="true" /><communicationPattern
xsi:nil="true" /><communicationStyle xsi:nil="true"
/><compressionType>CompressionType</compressionType><correlationId
xsi:nil="true" /><destinationURI xsi:nil="true" /><extAuthor xsi:nil="true"
/><extVersion xsi:nil="true" /><failureReplytoURI xsi:nil="true"
/><fileLocationURI xsi:nil="true" /><iteratorReferenceURI xsi:nil="true"
/><msgName xsi:nil="true" /><msgSpecificProperties xsi:nil="true" /><msgType
xsi:nil="true" /><originatorURI xsi:nil="true" /><packingType xsi:nil="true"
/><priority xsi:nil="true" /><replyToURI xsi:nil="true"
/><requestedBatchSize xsi:nil="true" /><security xsi:nil="true"
/><securityType xsi:nil="true" /><senderURI xsi:nil="true" /><timestamp
xsi:nil="true" /><tmf854Version xsi:nil="true" /><vendorExtensions
xsi:nil="true" /></header></soap:Header><soap:Body
xmlns:ns1="tmf854.v1"><ns1:getActiveAlarmsCount
/></soap:Body></soap:Envelope> 

The reason is when the XFire try to generate the Header part, it will first
get the Header elements list, the list is getting from the JavaBean class
which generated by XFire from WSDL file, but this Boolean field dont have a
getter method, so it will can't fill this field into the Header elements
list, that's why the in the SOAP message, this field missing!This is a XFire
bug when get the header element list.
To resolve this defect is easy, just add one getter method in the javaBean
files manually, I think all the java files which generated from MTOSI WSDL
files need to check the Boolean type varible whether have a getter
method.(if the type is boolean, the java basic type, there is no this
defect)
Modify the javabean file like this(add the getter):
public class HeaderT {
        protected Boolean batchSequenceEndOfReply;
        public Boolean isBatchSequenceEndOfReply() {
        return batchSequenceEndOfReply;
        }
        public void setBatchSequenceEndOfReply(Boolean value) {
        this.batchSequenceEndOfReply = value;
        }
        public Boolean getBatchSequenceEndOfReply() {
        return batchSequenceEndOfReply;
        }
}
Use this,the SOAP message will be:
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/";
xmlns:xsd="http://www.w3.org/2001/XMLSchema";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";><soap:Header><header
xmlns="tmf854.v1"><activityName xsi:nil="true" /><activityStatus
xsi:nil="true"
/><batchSequenceEndOfReply>false</batchSequenceEndOfReply><batchSequenceNumber
xsi:nil="true" /><communicationPattern xsi:nil="true" /><communicationStyle
xsi:nil="true"
/><compressionType>CompressionType</compressionType><correlationId
xsi:nil="true" /><destinationURI xsi:nil="true" /><extAuthor xsi:nil="true"
/><extVersion xsi:nil="true" /><failureReplytoURI xsi:nil="true"
/><fileLocationURI xsi:nil="true" /><iteratorReferenceURI xsi:nil="true"
/><msgName xsi:nil="true" /><msgSpecificProperties xsi:nil="true" /><msgType
xsi:nil="true" /><originatorURI xsi:nil="true" /><packingType xsi:nil="true"
/><priority xsi:nil="true" /><replyToURI xsi:nil="true"
/><requestedBatchSize xsi:nil="true" /><security xsi:nil="true"
/><securityType xsi:nil="true" /><senderURI xsi:nil="true" /><timestamp
xsi:nil="true" /><tmf854Version xsi:nil="true" /><vendorExtensions
xsi:nil="true" /></header></soap:Header><soap:Body
xmlns:ns1="tmf854.v1"><ns1:getActiveAlarmsCount
/></soap:Body></soap:Envelope>
-- 
View this message in context: 
http://www.nabble.com/XFire-cann%27t-handle-some-xsd%3Aboolean-type-element-in-the-MTOSI-WSDL-files-tf4204158.html#a11958535
Sent from the XFire - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email

Reply via email to