How to Validate xml using xsd schema and SAX? - xsd-validation

I will describe my problem with xml.
first i defined my xsd schema with namespaces and it looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.example.org/schema"
xmlns:tns="http://www.example.org/schema" elementFormDefault="qualified">
<element name="Clients" type="tns:ClientsType"></element>
<complexType name="ContactType">
<sequence>
<element name="Type" type="string"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="Contact">
<sequence>
<element name="ContactType" type="tns:ContactType"></element>
<element name="Value" type="string"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="ContactsType">
<sequence>
<element name="Contact" type="tns:Contact" maxOccurs="unbounded"></element>
</sequence>
</complexType>
<complexType name="ClientType">
<sequence>
<element name="FirstName" type="string"></element>
<element name="SecondName" type="string"></element>
<element name="Contacts" type="tns:ContactsType"></element>
</sequence>
<attribute name="ID" type="long" />
</complexType>
<complexType name="ClientsType">
<sequence>
<element name="Client" type="tns:ClientType" maxOccurs="unbounded"></element>
</sequence>
</complexType>
so it generated obvious xml looks like this:
<?xml version="1.0" encoding="UTF-8"?>
<tns:Clients xmlns:tns="http://www.example.org/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/schema schema.xsd ">
<tns:Client ID="0">
<tns:FirstName>tns:FirstName</tns:FirstName>
<tns:SecondName>tns:SecondName</tns:SecondName>
<tns:Contacts>
<tns:Contact ID="0">
<tns:ContactType ID="0">
<tns:Type>tns:Type</tns:Type>
</tns:ContactType>
<tns:Value>tns:Value</tns:Value>
</tns:Contact>
</tns:Contacts>
</tns:Client>
and my function creating specific xml with data:
#Override
public void printToFile() throws IOException, XMLStreamException {
FileWriter fd = new FileWriter(outPath);
Random rand = new Random();
int end = rand.nextInt(1000);
try{
XMLOutputFactory xof = XMLOutputFactory.newInstance();
XMLStreamWriter xtw = null;
xtw = xof.createXMLStreamWriter(fd);
xtw.writeStartDocument();
//xtw.setPrefix("tns", "http://www.example.org/schema");
xtw.writeStartElement("Clients");
xtw.writeNamespace("tns", "http://www.example.org/schema");
xtw.writeStartElement("tns","Client", "http://www.example.org/schema");
//xtw.writeStartElement("Client");
xtw.writeAttribute("ID", "1");
xtw.writeStartElement("FirstName");
xtw.writeCharacters("NameFirst");
xtw.writeEndElement();
xtw.writeStartElement("SecondName");
xtw.writeCharacters("NameSecond");
xtw.writeEndElement();
xtw.writeStartElement("Contacts");
for(int i=1;i<2;i++){
xtw.writeStartElement("Contact");
xtw.writeAttribute("ID",Integer.toString(i));
xtw.writeStartElement("ContactType");
xtw.writeAttribute("ID", Integer.toString(i));
xtw.writeStartElement("Type");
xtw.writeCharacters("mojTyp");
xtw.writeEndElement();
xtw.writeEndElement();
xtw.writeStartElement("Value");
xtw.writeCharacters("value");
xtw.writeEndElement();
xtw.writeEndElement();
}
xtw.writeEndElement();
//xtw.writeEndElement();
xtw.writeEndDocument();
}catch(XMLStreamException xmlE)
{
}
finally
{
fd.close();
}
}
and I generate simple Junit test usinx Sax to validate my xml created by my function:
#Test
public void testPrintToFileGoodXml() throws IOException,
XMLStreamException, FactoryConfigurationError, SAXException {
mService.printToFile();
XMLStreamReader reader = XMLInputFactory.newInstance()
.createXMLStreamReader(new FileInputStream(myPath));
SchemaFactory factory = SchemaFactory
.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
Schema schema = factory.newSchema(new File(mySchemaPath));
Validator validator = schema.newValidator();
validator.validate(new StAXSource(reader));
assertTrue(true);
}
But the test is fail so I think there is problem with my printToFile function connected with namespaces and the other properties defined in the xsd schema, and I don't know how to solve it. I read many sites and the documentation of defining xsd and I still don't know how to solve my problem. Please help.

The schema says the root element should be Clients
However your XML Snippet has an opening element tns:Clients, but no coresponsing closing element. Check your writeEndElement calls tally up.
<?xml version="1.0" encoding="UTF-8"?>
<tns:Clients xmlns:tns="http://www.example.org/schema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.example.org/schema Contacts.xsd ">
<tns:Client ID="0">
<tns:FirstName>tns:FirstName</tns:FirstName>
<tns:SecondName>tns:SecondName</tns:SecondName>
<tns:Contacts>
<tns:Contact ID="0">
<tns:ContactType ID="0">
<tns:Type>tns:Type</tns:Type>
</tns:ContactType>
<tns:Value>tns:Value</tns:Value>
</tns:Contact>
</tns:Contacts>
</tns:Client>
</tns:Clients> <--------- Missing

Related

Restcomm gmlc configuration issue no local SSN is present for primary Address

I'm facing an issue while trying to configure restcomm gmlc on windows server 2008 R2. I Get the this message
The picture bellow are the settings for HLR and the Windows server
And bellow are the settings
GmlcManagement_gmlcproperties.xml
<?xml version="1.0" encoding="UTF-8" ?>
<gmlcgt value="237694000089"/>
<gmlcssn value="145"/>
<hlrssn value="6"/>
<mscssn value="6"/>
<maxmapv value="3"/>
Mtp3UserPart_m3ua1.xml
<?xml version="1.0" encoding="UTF-8" ?>
<heartbeattime value="10000"/>
<aspFactoryList>
<aspFactory name="timbr_asp1" assocName="timbr_ass1" started="false" maxseqnumber="256" aspid="2" heartbeat="false"/>
</aspFactoryList>
<asList>
<as name="timbr_as1" minAspActiveForLb="1" functionality="IPSP" exchangeType="SE" ipspType="CLIENT">
<routingContext size="1">
<rc value="102"/>
</routingContext>
<networkAppearance value="8"/>
<trafficMode mode="2"/>
<defTrafficMode mode="2"/>
<asps>
<asp name="timbr_asp1"/>
</asps>
</as>
</asList>
<route>
<key value="89:42:3"/>
<routeAs trafficModeType="2" as="timbr_as1"/>
</route>
SccpStack_sccpresource2.xml
<?xml version="1.0" encoding="UTF-8" ?>
<remoteSsns>
<id value="1"/>
<value remoteSpc="42" remoteSsn="6" remoteSsnFlag="0" markProhibitedWhenSpcResuming="false"/>
</remoteSsns>
<remoteSpcs>
<id value="1"/>
<value remoteSpc="42" remoteSpcFlag="0" mask="0"/>
</remoteSpcs>
<concernedSpcs/>
SccpStack_sccprouter2.xml
<?xml version="1.0" encoding="UTF-8" ?>
<rule>
<id value="1"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="RemoteOriginated" mask="K" paddress="1" saddress="-1" networkId="0">
<patternSccpAddress pc="42" ssn="6">
<ai value="18"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</patternSccpAddress>
</value>
<id value="2"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="LocalOriginated" mask="K" paddress="2" saddress="-1" networkId="0">
<patternSccpAddress pc="89" ssn="145">
<ai value="16"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</patternSccpAddress>
</value>
</rule>
<routingAddress>
<id value="1"/>
<sccpAddress pc="89" ssn="145">
<ai value="19"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</sccpAddress>
<id value="2"/>
<sccpAddress pc="42" ssn="6">
<ai value="17"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</sccpAddress>
</routingAddress>
<longMessageRule/>
<sap>
<id value="1"/>
<value mtp3Id="1" opc="42" ni="2" networkId="1">
<mtp3DestinationMap>
<id value="1"/>
<value firstDpc="1" lastDpc="16384" firstSls="0" lastSls="255" slsMask="255"/>
</mtp3DestinationMap>
</value>
</sap>
SCTPManagement_sctp.xml
<?xml version="1.0" encoding="UTF-8" ?>
<connectdelay value="5000"/>
<servers/>
<associations>
<name value="timbr_ass1"/>
<association name="timbr_ass1" assoctype="CLIENT" hostAddress="172.22.118.131" hostPort="2609" peerAddress="192.168.212.185" peerPort="2609" serverName="" ipChannelType="0" extraHostAddresseSize="0"/>
</associations>
TcapStack_management.xml
<?xml version="1.0" encoding="UTF-8" ?>
<dialogidletimeout value="60000"/>
<invoketimeout value="30000"/>
<maxdialogs value="5000"/>
<dialogidrangestart value="1"/>
<dialogidrangeend value="2147483647"/>
<donotsendprotocolversion value="false"/>
<statisticsenabled value="false"/>
I see quite a few issues in the raised question, albeit I think your problem is in jboss-beans.xml file (will get there later), it's important to clarify them as they could potentially be cause of problems.
1) SSN should be 145 as for specifications, and you got it right in Restcomm GMLC's configuration files, but in the image it appears as 147 (which is not appropriate, as that is the SSN for gsmSCF, not for GMLC). Are you sure the MNO has 145 and it's only a typo in the image?
2) MSC SSN is 8, not 6 as you put it in mscssn value at GmlcManagement_gmlcproperties.xml. Modify that to 8 please.
3) Are you sure about the routingContext and networkAppearance values or did you just copied them from the simulator profile?
Having that in mind, your main problem most likely reside at the following two configuration files:
1) Check $GMLC_HOME/jboss-5.1.0.GA/server/default/deploy/restcomm-gmlc-server/META-INF/jboss-beans.xml TCAP Service section... it should look like this:
<!-- ==================================================================== -->
<!-- TCAP Service -->
<!-- ==================================================================== -->
<bean name="GMLC_TcapStack" class="org.mobicents.protocols.ss7.tcap.TCAPStackImpl">
<constructor>
<parameter>TcapStack</parameter>
<parameter>
<inject bean="GMLC_SccpStack" property="sccpProvider" />
</parameter>
<parameter>145</parameter>
</constructor>
<property name="persistDir">${jboss.server.data.dir}</property>
<!--
<property name="dialogIdleTimeout">60000</property>
<property name="invokeTimeout">30000</property>
<property name="maxDialogs">25000</property >
-->
</bean>
First, are you sure 145 is there? Then and again, as pointed out in 1), are you sure the MNO and your configuration are concordant?
2) Your routing rule configuration at SccpStack_sccprouter2.xml might lead you to problems, set pc and ssn values to 0 in patternSccpAddress, like this:
<rule>
<id value="1"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="RemoteOriginated" mask="K" paddress="1" saddress="-1" networkId="0">
<patternSccpAddress pc="0" ssn="0">
<ai value="18"/>
<gt type="GT0100" tt="0" es="2" np="1" nai="4" digits="237694000089"/>
</patternSccpAddress>
</value>
<id value="2"/>
<value ruleType="Solitary" loadSharingAlgo="Undefined" originatingType="LocalOriginated" mask="K" paddress="2" saddress="-1" networkId="0">
<patternSccpAddress pc="0" ssn="0">
<ai value="16"/>
<gt type="GT0100" tt="0" es="1" np="1" nai="4" digits="*"/>
</patternSccpAddress>
</value>
</rule>
Please keep us posted, good luck and best regards,
Fernando Mendioroz

WSO2 ESB iterate mediator joining

i'm facing some problems with this process.. let me explain:
i want to call two services and join the responses in this order:
i have the first service's response:
<locations xmlns="http://ssocial.com/traceit/services/location">
<location>
<latitude>-33.45209980</latitude>
<longitude>-70.66241990</longitude>
<altitude>0.0</altitude>
<creation>2016-09-04T14:59:48.000-03:00</creation>
<updated>2016-09-04T14:59:48.000-03:00</updated>
<deviceId>25</deviceId>
</location>
<location>
<latitude>-33.45149521</latitude>
<longitude>-70.66146224</longitude>
<altitude>817.0</altitude>
<creation>2016-09-04T13:18:43.000-03:00</creation>
<updated>2016-09-04T13:18:43.000-03:00</updated>
<deviceId>25</deviceId>
</location>
</locations>
then i have the secon service's response :
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
And then, the final response that i would like to have is :
<locations xmlns="http://ssocial.com/traceit/services/location">
<location>
<latitude>-33.45209980</latitude>
<longitude>-70.66241990</longitude>
<altitude>0.0</altitude>
<creation>2016-09-04T14:59:48.000-03:00</creation>
<updated>2016-09-04T14:59:48.000-03:00</updated>
<deviceId>25</deviceId>
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
</device>
</location>
<location>
<latitude>-33.45149521</latitude>
<longitude>-70.66146224</longitude>
<altitude>817.0</altitude>
<creation>2016-09-04T13:18:43.000-03:00</creation>
<updated>2016-09-04T13:18:43.000-03:00</updated>
<deviceId>25</deviceId>
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
</device>
</location>
</locations>
i'm really having lot of troubles trying to join both responses like that, and this is my sequence in wso2:
<sequence name="getDeviceInfoByLocationProcess" trace="disable" xmlns="http://ws.apache.org/ns/synapse">
<property expression="count(//ns1:locations/ns1:location)" name="LOCATIONS_COUNT" scope="default" type="STRING" xmlns:ns1="http://ssocial.com/traceit/services/location"/>
<iterate description="" expression="//ns1:locations/ns1:location/ns1:deviceId" id="LOCATIONS_ITERATOR" xmlns:ns1="http://ssocial.com/traceit/services/location">
<target>
<sequence>
<property description="device_id" expression="//ns1:deviceId" name="device_id" scope="default" type="STRING"/>
<sequence key="getDeviceInfoProcess"/>
</sequence>
</target>
</iterate>
<log level="custom">
<property expression="//ns1:locations" name="LOCATIONS" xmlns:ns1="http://ssocial.com/traceit/services/location"/>
<property expression="//ns2:device" name="DEVICE_INFO" xmlns:ns2="http://ssocial.com/traceit/services/device"/>
</log>
<property name="ECNCLOSING_ELEMENT" scope="default">
<wrapper xmlns=""/>
</property>
<aggregate id="AGG_01">
<completeCondition>
<messageCount max="-1" min="{get-property('LOCATIONS_COUNT')}"/>
</completeCondition>
<onComplete expression="//ns2:device" xmlns:ns2="http://ssocial.com/traceit/services/device">
<log level="full">
<property expression="$ctx:LOCATIONS_COUNT" name="COUNTER"/>
<property expression="$ctx:ECNCLOSING_ELEMENT" name="ENCLOSING"/>
</log>
<call/>
</onComplete>
</aggregate>
and actually with this sequence, i'm just getting this:
<device xmlns="http://ssocial.com/traceit/services/device">
<id>25</id>
<code>mobile_02</code>
<type>
<id>1</id>
<name>MOBILE</name>
</type>
In advance , thank you very much for the help
I can't see the content of "getDeviceInfoProcess" sequence, but I guess your are using call mediator. So, as a result of those requests (multiple requests because of iterate mediator), you receive some responses and that what you have to deal with in the rest of the initial mediation : aggregate offers you a way to wait for all the responses, but the initial message is lost : you should save it in a property (type OM) and use something like payloadMediator inside aggregate/onComplete to compose the final message.

Error at server side while executing dss query

I'm using wso2dss 3.1.0 and wso2esb 4.7.0.I wish to fire select from esb.I have write select query in dss and dbs for this is like :
<query id="Capp_select_emercontactid" useConfig="default">
<sql>select userid,mailid,phonenumber from muser where phonenumber = ? or mailid = ?</sql>
<result element="Entries" rowName="Entry">
<element column="userid" name="userid" xsdType="string"/>
<element column="mailid" name="mailid" xsdType="string"/>
<element column="phonenumber" name="phonenumber" xsdType="string"/>
</result>
<param name="phonenumber" ordinal="1" sqlType="STRING"/>
<param name="mailid" ordinal="2" sqlType="STRING"/>
</query>
<operation disableStreaming="true" name="Capp_select_emercontactid_op">
<call-query href="Capp_select_emercontactid">
<with-param name="phonenumber" query-param="phonenumber"/>
<with-param name="mailid" query-param="mailid"/>
</call-query>
</operation>
It's working fine in dss.
Now i have write a payload in esb like :
<payloadFactory>
<format>
<p:Capp_select_emercontactid_op xmlns:p="http://ws.wso2.org/dataservice">
<p:phonenumber>$1</p:phonenumber>
<p:mailid>$2</p:mailid>
</p:Capp_select_emercontactid_op>
</format>
<args>
<arg expression="get-property('phoneno1')" evaluator="xml"/>
<arg expression="get-property('mailid1')" evaluator="xml"/>
</args>
</payloadFactory>
<log level="full"/>
<send>
<endpoint>
<address uri="http://localhost:9764/services/Capp_MuserDataservice/" format="soap11"/>
</endpoint>
</send>
When i'm hiting this proxy it didn't give responce..Why so?Is it correct configuration?Please let me know
I never had any luck using the send mediator with the DSS. Could you consider using the CalloutMediator instead (it's a synchronous send/response call so you may need to use a respond mediator after if you're wanting an immediate response to your client).
It'd look something like:
<callout xmlns="http://ws.apache.org/ns/synapse" action="Capp_select_emercontactid_op">
<source xmlns:p="http://ws.wso2.org/dataservice" xpath="//p:Capp_select_emercontactid_op"/>
<target xmlns:p="http://ws.wso2.org/dataservice" xpath="//p:Capp_select_emercontactid_op"/>
</callout>

Problems with WCF deserialising SOAP array containing polymorphic objects

I have a problem with a WCF web services that is deserialising an array of polymorphic objects. The server side is not WCF, but I created the stubs from WSDL. The important parts in WSDL are
<complexType name="NodeList">
<sequence>
<element name="data" type="cmtypes:Node" minOccurs="0" maxOccurs="unbounded" nillable="true"/>
</sequence>
</complexType>
and
<complexType name="Device">
<sequence>
<element name="uniqueKey" type="xsd:unsignedLong" minOccurs="1" maxOccurs="1"/>
<element name="revision" type="xsd:string" minOccurs="1" maxOccurs="1"/>
[...}
</sequence>
</complexType>
<complexType name="Node">
<complexContent>
<extension base="cmtypes:Device">
<sequence>
<element name="cmdaemonUrl" type="xsd:string" minOccurs="1" maxOccurs="1"/>
<element name="networks" type="cmtypes:NetworkInterfaceList" minOccurs="0" maxOccurs="1" nillable="true"/>
[...]
</sequence>
</extension>
</complexContent>
</complexType>
<complexType name="MasterNode">
<complexContent>
<extension base="cmtypes:Node">
<sequence>
</sequence>
</extension>
</complexContent>
</complexType>
VS created the following type for the list:
[System.Xml.Serialization.SoapIncludeAttribute(typeof(MasterNode))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(SlaveNode))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(VirtualSMPNode))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(VirtualNode))]
[System.Xml.Serialization.SoapIncludeAttribute(typeof(PhysicalNode))]
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.brightcomputing.com/cmtypes.xsd")]
public partial class Node : Device {
private string cmdaemonUrlField;
[...]
}
However, if I receive a message containing a master node like
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://www.w3.org/2003/05/soap-envelope" xmlns:SOAP-ENC="http://www.w3.org/2003/05/soap-encoding" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:cmtypes="http://www.brightcomputing.com/cmtypes.xsd" xmlns:cmdevice="http://www.brightcomputing.com/cmdevice.wsdl">
<s:Header xmlns:s="http://www.w3.org/2003/05/soap-envelope"></s:Header>
<SOAP-ENV:Body>
<cmdevice:getNodesResponse SOAP-ENV:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<nodes xsi:type="cmtypes:NodeList" xmlns="">
<data xsi:type="cmtypes:MasterNode">
<uniqueKey xsi:type="xsd:unsignedLong">38654705666</uniqueKey>
<revision xsi:type="xsd:string"></revision>
<modified xsi:type="xsd:boolean">false</modified>
<toBeRemoved xsi:type="xsd:boolean">false</toBeRemoved>
[...]
the whole stuff explodes with a System.ServiceModel.CommunicationException saying "Error in deserializing body of reply message for operation 'getNodes'." and "Object cannot be stored in an array of this type." in the inner exception. Why? What can I do to fix this (the stub generation)?
I have absolutely no clue due to very limited WCF/SOAP knowledge, so any help is appreciated.
Best regards,
Christoph
Edit: It might be relevant that the response actually contains "data" elements of different, polymorphic types, i.e. cmtypes:MasterNode and cmtypes:PhysicalNode.
Edit: Could it be that the Stub and the Message do not go together? As I understand, the stub expects a data property, which is an array:
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.233")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.SoapTypeAttribute(Namespace="http://www.brightcomputing.com/cmtypes.xsd")]
public partial class NodeList : object, System.ComponentModel.INotifyPropertyChanged {
private Node[] dataField;
/// <remarks/>
[System.Xml.Serialization.SoapElementAttribute(IsNullable=true)]
public Node[] data {
get {
return this.dataField;
}
set {
this.dataField = value;
this.RaisePropertyChanged("data");
}
}
public event System.ComponentModel.PropertyChangedEventHandler PropertyChanged;
protected void RaisePropertyChanged(string propertyName) {
System.ComponentModel.PropertyChangedEventHandler propertyChanged = this.PropertyChanged;
if ((propertyChanged != null)) {
propertyChanged(this, new System.ComponentModel.PropertyChangedEventArgs(propertyName));
}
}
}
However, in my answer I get a NodeList directly containing a sequence of data elements, which are actually nodes or derived from nodes:
<cmdevice:getNodesResponse SOAP-ENV:encodingStyle="http://www.w3.org/2003/05/soap-encoding">
<nodes xsi:type="cmtypes:NodeList" xmlns="">
<data xsi:type="cmtypes:MasterNode">
<uniqueKey xsi:type="xsd:unsignedLong">38654705666</uniqueKey>
[...]
</data>
<data xsi:type="cmtypes:PhysicalNode">
<uniqueKey xsi:type="xsd:unsignedLong">38654705669</uniqueKey>
[...]
</data>
[...]
Do you think I can fix that somehow by injecting a behavior in WCF? My big problem is that I have absolutely no possibility of chaning the server side...
Troubleshooting this is going to be hard. One thing I would try is using XmlSerializer to see if it can deserialize then start reducing the message until you get the offending type.

Is it possible to invoke a antscript in postdst and presrc call in MQFTE?

Is it possible to invoke a antscript in postdst and presrc call in MQFTE??
Here's an example:
<request version="4.00" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FileTransfer.xsd">
<managedTransfer>
<originator>
<hostName>$hostName</hostName>
<userID>$userID</userID>
</originator>
<sourceAgent QMgr="$sourceQM" agent="$sourceAgent"/>
<destinationAgent QMgr="$destQM" agent="$destAgent"/>
<transferSet priority="5">
<metaDataSet>
<metaData key="some_key">Some value</metaData>
</metaDataSet>
<postSourceCall>
<command name="example.xml" retryCount="0" retryWait="0" successRC="0" type="antscript">
<property name="ant.FILEPATH" value="$filepath"/>
<property name="antSrcAgent" value="$sourceAgent"/>
</command>
</postSourceCall>
<item checksumMethod="MD5" mode="binary">
<source disposition="delete" recursive="false">
<file>$filepath</file>
</source>
<destination exist="error" type="directory">
<file>$destFile</file>
</destination>
</item>
</transferSet>
<job>
<name>Example FTE job</name>
</job>
</managedTransfer>
</request>
The properties passed to the ant script are arbitrary names. You could pass any properties in that way. I used postSourceCall but you can change that to postDest, preSource, etc.