on 08-14-2011 5:17 AM
hi,
I am working on consuming webservice which has a WSDL to get the RouteDetails with a structure like:
<Source>
<HouseNumber>1</HouseNumber>
<Street>XYZ</Street>
<City>Hyderabad</City>
<Country>India</Country>
<PostalCode>500018</PostalCode>
</Source>
<Destination>
<HouseNumber>2</HouseNumber>
<Street>X1Y1Z1</Street>
<City>Bangalore</City>
<Country>India</Country>
<PostalCode>500067</PostalCode>
</Destination>
When I am calling the method RouteDetails of the proxy I created, I am getting the error 'There are multiple root elements in line 1 column 178 and the column is indicating <HouseNumber> in <Destination> node.
Please let me know how to overcome this.
Thanks for the help
Githa
This is now resolved.
Thanks,
Githa
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi,
While calling the webservice method, I included the root node as well which resolved the issue.
My Webservice had the structure like
<GetRoute xmlns="<webservice url with extension .asmx>">
<Source>
<HouseNumber>1</HouseNumber>
<Street>XYZ</Street>
<City>Hyderabad</City>
<Country>India</Country>
<PostalCode>500018</PostalCode>
</Source>
<Destination>
<HouseNumber>2</HouseNumber>
<Street>X1Y1Z1</Street>
<City>Bangalore</City>
<Country>India</Country>
<PostalCode>500067</PostalCode>
</Destination>
</GetRoute>
While calling the method initially I was passing only
<Source>
<HouseNumber>1</HouseNumber>
<Street>XYZ</Street>
<City>Hyderabad</City>
<Country>India</Country>
<PostalCode>500018</PostalCode>
</Source>
<Destination>
<HouseNumber>2</HouseNumber>
<Street>X1Y1Z1</Street>
<City>Bangalore</City>
<Country>India</Country>
<PostalCode>500067</PostalCode>
</Destination>
and it was giving the error 'There are multiple root elements in line 1 column 178
Now I am passing :
<GetRoute xmlns="<webservice url with extension .asmx>">
<Source>
<HouseNumber>1</HouseNumber>
<Street>XYZ</Street>
<City>Hyderabad</City>
<Country>India</Country>
<PostalCode>500018</PostalCode>
</Source>
<Destination>
<HouseNumber>2</HouseNumber>
<Street>X1Y1Z1</Street>
<City>Bangalore</City>
<Country>India</Country>
<PostalCode>500067</PostalCode>
</Destination>
</GetRoute>
and it resolved the issue
Thanks,
Githa
User | Count |
---|---|
84 | |
9 | |
9 | |
8 | |
7 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.