私のWebサービスがこのような場合、soapを使用してWebサービスを呼び出すにはどうすればよいですか.. cusの詳細を記入する必要があります.
<registerCustomer xmlns="http://webservices.foodtruck.zsl.com/">
<cusDetails>
<FirstName>string</FirstName>
<LastName>string</LastName>
<EmailID>string</EmailID>
<AddLine1>string</AddLine1>
<AddLine2>string</AddLine2>
<ZipCode>string</ZipCode>
<City>string</City>
<StateCode>string</StateCode>
<PhoneNumber>string</PhoneNumber>
<Username>string</Username>
<Password>string</Password>
<BrandID>int</BrandID>
<DiscAgree>int</DiscAgree>
<Latitude>string</Latitude>
<Longitude>string</Longitude>
</cusDetails>
</registerCustomer>
</soap:Body>
</soap:Envelope>
サービスを呼び出すために使用するコード: final String METHOD_NAME = ServiceStrings.registerMethod; 最終文字列 SOAP_ACTION = ServiceStrings.registerSoapAction; 試す {
SoapObject request = new SoapObject(NAMESPACE, METHOD_NAME);
PropertyInfo pi = new PropertyInfo();
pi.setName("cusDetails");
pi.setValue(new SoapObject(NAMESPACE, "cusDetails")
.addProperty("FirstName", fname)
.addProperty("LastName", lname)
.addProperty("EmailID", email)
.addProperty("AddLine1", add1)
.addProperty("AddLine2", add2)
.addProperty("ZipCode", zip)
.addProperty("City", city)
.addProperty("StateCode", state)
.addProperty("PhoneNumber", phoneno)
.addProperty("Username", email)
.addProperty("Password", pwd)
.addProperty("BrandID", 1)
.addProperty("DiscAgree", 1)
.addProperty("Latitude", "11.2")
.addProperty("Longitude", "11.2"));
request.addProperty(pi);
しかし、私はエラーが発生します
Server was unable to read request. ---> There is an error in XML document (1, 316). ---> The specified type was not recognized: name='cusDetails', namespace='http://webservices.foodtruck.zsl.com/', at <cusDetails xmlns='http://webservices.foodtruck.zsl.com/'>