Folks, I would like to write a SOAP client in java to my server that uses Lite::Soap in perl. The response that I get form server is like this:
<?xml version="1.0" encoding="UTF-8"?><SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/1999/XMLSchema-instance" xmlns:xsd="http://www.w3.org/1999/XMLSchema"><SOAP-ENV:Body><namesp1:LocateR esponse xmlns:namesp1="DC_IVR"> <ResponseCode>ok</ResponseCode> <Location> <name>I ST NW</name> <area>DISTRICT OF COLUMBIA</area> <Latitude>38.901305</Latitude> <Longitude>-77.038349</Longitude> </Location> </namesp1:LocateResponse></SOAP-ENV:Body></SOAP-ENV:Envelope> As you see tags like ResponseCode, Location and etc don't have type, but I know that they should be string or float or etc. My question is that types in SOAP response are mandatory or not? if not, how can I deserialize these kind of soap responses to java objects in my program. My java classes would be like these: public class Location{ String name; String area; .... } public class LocateResponse{ String ResponseCode; Location location; .... } Some sample code would be very helpful. Thanks, Majid
