Thank you for your answer. I have found what i think is the problem. It might be useful if someone else is in the same situation as me.
In fact, the Proxy generated by the client seems to be strictly sensitive to the elementFormDefault attribute of the WSDL file. About this attribute, the W3C says that when it is "unqualified", the XML elements of SOAP request and responses don't have to be qualified. BUT, The C# Proxy behaviour seems to be more restrictive by forbidding qualified elements once the elementFormDefaut is set to "unqualified". That's why, whenever you qualify your SOAP messages while telling in the WSDL that you are using unqualified elements, the deserialization process fails, To solve the problem, i forced Apache CXF to set the elementFormDefaut to "qualified" by adding a "package-info.java" file into my webservices package. In that filed i putted that annotation : @javax.xml.bind.annotation.XmlSchema( attributeFormDefault=javax.xml.bind.annotation.XmlNsForm.UNQUALIFIED, elementFormDefault=javax.xml.bind.annotation.XmlNsForm.QUALIFIED) package mypackagename; Deploy again your project and it would run. Anthony On Mon, Aug 16, 2010 at 9:50 PM, Daniel Kulp <dk...@apache.org> wrote: > > That soap response looks 100% correct according to that WSDL. If the C# > client isn't liking it, it's a bug on their side. > > Dan > > > On Thursday 12 August 2010 6:12:57 am Anthony Coutant wrote: > > Hello everyone ! > > > > I am currently trying to develop an iPhone app for my internship. > > > > I am using Apache CXF 2.0 (was already in the server development > > environment) in the server part. > > > > I am developping in C# my app thanks to Monotouch framework. > > > > When i am trying to consume a webservice with my C# client and the > > generated Proxy classes, The SOAP resquest is sent by the client, the > > server receives it and makes its response to the client that receives it. > > > > Here are the wsdl generated by CXF, the SOAP request received and the > SOAP > > responsed returned by the server : > > > > WSDL file : > > ------------ > > <?xml version="1.0" encoding="us-ascii"?> > > <definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" > > xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/" > > xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:s="http://www.w3.org/2001/XMLSchema" > > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" > > xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" > > xmlns:tm="http://microsoft.com/wsdl/mime/textMatching/" > > xmlns:s0="http://webservice.intranet.proxiad.com/" > > xmlns:ns1="http://cxf.apache.org/bindings/xformat" > > xmlns:tns="http://webservice.intranet.proxiad.com/" > > xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="HelloWSService" > > targetNamespace="http://webservice.intranet.proxiad.com/" > > xmlns="http://schemas.xmlsoap.org/wsdl/"> > > <types> > > <xsd:schema attributeFormDefault="unqualified" > > elementFormDefault="unqualified" > > targetNamespace="http://webservice.intranet.proxiad.com/"> > > <xsd:element name="plop" type="tns:plop" /> > > <xsd:complexType name="plop"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="plopResponse" type="tns:plopResponse" /> > > <xsd:complexType name="plopResponse"> > > <xsd:sequence> > > <xsd:element minOccurs="0" name="return" type="xsd:string" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:element name="getVehicule" type="tns:getVehicule" /> > > <xsd:complexType name="getVehicule"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="getVehiculeResponse" > > type="tns:getVehiculeResponse" /> > > <xsd:complexType name="getVehiculeResponse"> > > <xsd:sequence> > > <xsd:element minOccurs="0" name="return" type="xsd:string" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:element name="verifMDP" type="tns:verifMDP" /> > > <xsd:complexType name="verifMDP"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifMDPResponse" type="tns:verifMDPResponse" /> > > <xsd:complexType name="verifMDPResponse"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifLDAP" type="tns:verifLDAP" /> > > <xsd:complexType name="verifLDAP"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifLDAPResponse" type="tns:verifLDAPResponse" > /> > > <xsd:complexType name="verifLDAPResponse"> > > <xsd:sequence> > > <xsd:element minOccurs="0" name="return" type="xsd:string" /> > > </xsd:sequence> > > </xsd:complexType> > > <xsd:element name="verifHibernate" type="tns:verifHibernate" /> > > <xsd:complexType name="verifHibernate"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifHibernateResponse" > > type="tns:verifHibernateResponse" /> > > <xsd:complexType name="verifHibernateResponse"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifAccesBase" type="tns:verifAccesBase" /> > > <xsd:complexType name="verifAccesBase"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="verifAccesBaseResponse" > > type="tns:verifAccesBaseResponse" /> > > <xsd:complexType name="verifAccesBaseResponse"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="simpleNoReturn" type="tns:simpleNoReturn" /> > > <xsd:complexType name="simpleNoReturn"> > > <xsd:sequence /> > > </xsd:complexType> > > <xsd:element name="simpleNoReturnResponse" > > type="tns:simpleNoReturnResponse" /> > > <xsd:complexType name="simpleNoReturnResponse"> > > <xsd:sequence /> > > </xsd:complexType> > > </xsd:schema> > > </types> > > <message name="verifAccesBaseResponse"> > > <part name="parameters" element="tns:verifAccesBaseResponse" /> > > </message> > > <message name="getVehicule"> > > <part name="parameters" element="tns:getVehicule" /> > > </message> > > <message name="simpleNoReturn"> > > <part name="parameters" element="tns:simpleNoReturn" /> > > </message> > > <message name="verifMDPResponse"> > > <part name="parameters" element="tns:verifMDPResponse" /> > > </message> > > <message name="verifLDAPResponse"> > > <part name="parameters" element="tns:verifLDAPResponse" /> > > </message> > > <message name="verifHibernateResponse"> > > <part name="parameters" element="tns:verifHibernateResponse" /> > > </message> > > <message name="plop"> > > <part name="parameters" element="tns:plop" /> > > </message> > > <message name="verifAccesBase"> > > <part name="parameters" element="tns:verifAccesBase" /> > > </message> > > <message name="plopResponse"> > > <part name="parameters" element="tns:plopResponse" /> > > </message> > > <message name="simpleNoReturnResponse"> > > <part name="parameters" element="tns:simpleNoReturnResponse" /> > > </message> > > <message name="verifMDP"> > > <part name="parameters" element="tns:verifMDP" /> > > </message> > > <message name="getVehiculeResponse"> > > <part name="parameters" element="tns:getVehiculeResponse" /> > > </message> > > <message name="verifLDAP"> > > <part name="parameters" element="tns:verifLDAP" /> > > </message> > > <message name="verifHibernate"> > > <part name="parameters" element="tns:verifHibernate" /> > > </message> > > <portType name="HelloWS"> > > <operation name="plop"> > > <input name="plop" message="tns:plop" /> > > <output name="plopResponse" message="tns:plopResponse" /> > > </operation> > > <operation name="getVehicule"> > > <input name="getVehicule" message="tns:getVehicule" /> > > <output name="getVehiculeResponse" > message="tns:getVehiculeResponse" > > /> > > </operation> > > <operation name="verifMDP"> > > <input name="verifMDP" message="tns:verifMDP" /> > > <output name="verifMDPResponse" message="tns:verifMDPResponse" /> > > </operation> > > <operation name="verifLDAP"> > > <input name="verifLDAP" message="tns:verifLDAP" /> > > <output name="verifLDAPResponse" message="tns:verifLDAPResponse" /> > > </operation> > > <operation name="verifHibernate"> > > <input name="verifHibernate" message="tns:verifHibernate" /> > > <output name="verifHibernateResponse" > > message="tns:verifHibernateResponse" /> > > </operation> > > <operation name="verifAccesBase"> > > <input name="verifAccesBase" message="tns:verifAccesBase" /> > > <output name="verifAccesBaseResponse" > > message="tns:verifAccesBaseResponse" /> > > </operation> > > <operation name="simpleNoReturn"> > > <input name="simpleNoReturn" message="tns:simpleNoReturn" /> > > <output name="simpleNoReturnResponse" > > message="tns:simpleNoReturnResponse" /> > > </operation> > > </portType> > > <binding name="HelloWSServiceSoapBinding" type="tns:HelloWS"> > > <soap:binding transport="http://schemas.xmlsoap.org/soap/http" /> > > <operation name="plop"> > > <soap:operation soapAction="" style="document" /> > > <input name="plop"> > > <soap:body use="literal" /> > > </input> > > <output name="plopResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="getVehicule"> > > <soap:operation soapAction="" style="document" /> > > <input name="getVehicule"> > > <soap:body use="literal" /> > > </input> > > <output name="getVehiculeResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="verifMDP"> > > <soap:operation soapAction="" style="document" /> > > <input name="verifMDP"> > > <soap:body use="literal" /> > > </input> > > <output name="verifMDPResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="verifLDAP"> > > <soap:operation soapAction="" style="document" /> > > <input name="verifLDAP"> > > <soap:body use="literal" /> > > </input> > > <output name="verifLDAPResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="verifHibernate"> > > <soap:operation soapAction="" style="document" /> > > <input name="verifHibernate"> > > <soap:body use="literal" /> > > </input> > > <output name="verifHibernateResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="verifAccesBase"> > > <soap:operation soapAction="" style="document" /> > > <input name="verifAccesBase"> > > <soap:body use="literal" /> > > </input> > > <output name="verifAccesBaseResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > <operation name="simpleNoReturn"> > > <soap:operation soapAction="" style="document" /> > > <input name="simpleNoReturn"> > > <soap:body use="literal" /> > > </input> > > <output name="simpleNoReturnResponse"> > > <soap:body use="literal" /> > > </output> > > </operation> > > </binding> > > <service name="HelloWSService"> > > <port name="HelloWSPort" binding="tns:HelloWSServiceSoapBinding"> > > <soap:address > > location="https://192.168.2.16:8443/extranet/services/Hello" /> > > </port> > > </service> > > </definitions> > > > > ------------ > > > > SOAP Request by C# Client (All of the trace logged by > LoggingInInterceptor > > ------------------------------ > > > > Encoding: UTF-8 > > Headers: {expect=[100-continue], content-type=[text/xml; charset=utf-8], > > connection=[keep-alive], host=[192.168.2.16:8443], content-length=[302], > > SOAPAction=[""], user-agent=[Mono Web Services Client Protocol > > 3.0.40818.0]} Messages: > > Message: > > > > Payload: <?xml version="1.0" encoding="utf-8"?><soap:Envelope > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" > > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"><soap:Body><plop > > xmlns="http://webservice.intranet.proxiad.com/" > > /></soap:Body></soap:Envelope> > > ---------- > > > > SOAP Response (all trace by LogginOutInterceptor) > > ------------------------ > > > > Encoding: UTF-8 > > Headers: {} > > Messages: > > Payload: <soap:Envelope > > xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/ > "><soap:Body><ns1:plop > > Response > > xmlns:ns1="http://webservice.intranet.proxiad.com/ > "><return>Hello</return> > > </ns1:plopResponse></soap:Body></soap:Envelope> -------------- > > > > The problem is that the invoke method, used by proxy client in every > > webmethods returns a null object. In my web services that returns almost > > all strings, the result is a void string in the function using these > Proxy > > Methods. > > > > I heard that it could be a problem with unqualified and qualified > > namespaces but i have not a lot of knowledge about SOAP based web > services > > and wsdl details. > > > > Please help ! I have been searching over the internet, and trying a lot > of > > things for 4 days now and my internship is almost finished. I don't wan't > > to let my work as is. > > > > Thanks in advance, > > > > Anthony. > > -- > Daniel Kulp > dk...@apache.org > http://dankulp.com/blog >