I am trying to submit a username and the device ID of the phone to my Server but I keep getting following error:
W/System.err﹕ SoapFault - faultcode: 'soap:Client' faultstring: 'Unmarshalling Error: unexpected element (uri:"http://eventmanagement.management.de/", local:"username"). Expected elements are <{}deviceID>,<{}username> ' faultactor: 'null' detail: null
This is my code:
       PropertyInfo pi = new PropertyInfo();
       pi.setNamespace(NAMESPACE);
       pi.setName("username");
       pi.setValue(userName.getText().toString());
       pi.setType(PropertyInfo.STRING_CLASS);
       request.addProperty(pi); 
       pi.setNamespace(NAMESPACE);
       pi.setName("deviceID");
       pi.setValue(android.provider.Settings.Secure.getString(
       getContentResolver(), 
       android.provider.Settings.Secure.ANDROID_ID));
       pi.setType(PropertyInfo.STRING_CLASS);
       request.addProperty(pi);
        SoapSerializationEnvelope envelope = 
         new SoapSerializationEnvelope(SoapEnvelope.VER11);
        envelope.dotNet = true;
        envelope.setOutputSoapObject(request);
        HttpTransportSE androidHttpTransport = new HttpTransportSE(URL);
This is the wsdl file:
 <xs:complexType name="addUser">
   <xs:sequence>
    <xs:element minOccurs="0" name="username" type="xs:string"/>
    <xs:element minOccurs="0" name="deviceID" type="xs:string"/>
   </xs:sequence>
  </xs:complexType>
Can somebody help me pls? I have searched for 2 hours and found nothing.
Edit2: Top-left corner the http-Request dump Right corner the SoapUI generated request which works http://www.directupload.net/file/d/4013/5iwbvowk_png.htm
 
                        
Have you tried simply adding property using below flavor of
addPropertyAlso, you can make sure that you have a valid value and you are not hitting any
NPEwhile accessinguserName.getText().toString()