Hello,

In the following xml that I am sending using axis2, the lowest child
elements eg, TAID should have the prefix ns2, as if it doesn't then i am
unable to connect and use a web service provided by a third party company, I
am using the below to create the serializer for the bean that i am using,

       QName envelopeQN = new QName("http://api.content.tripadvisor.com
","HotelOptions","");
       QName hotelOptionsQN = new QName("http://api.content.tripadvisor.com
","HotelOptions");


call.registerTypeMapping(HotelOptions.class,
                                   hotelOptionsQN,
                                   new
org.apache.axis.encoding.ser.BeanSerializerFactory(HotelOptions.class,
envelopeQN),
                                   new
org.apache.axis.encoding.ser.BeanDeserializerFactory(HotelOptions.class,
envelopeQN));



<?xml version="1.0" encoding="UTF-8"?>
  <soapenv:Envelope xmlns:soapenv="
http://schemas.xmlsoap.org/soap/envelope/"; xmlns:xsd="
http://www.w3.org/2001/XMLSchema"; xmlns:xsi="
http://www.w3.org/2001/XMLSchema-instance";>
     <soapenv:Body>
        <ns1:getHotel soapenv:encodingStyle="
http://schemas.xmlsoap.org/soap/encoding/"; xmlns:ns1="con:getHotel">
           <ns2:HotelOptions xmlns:ns2="http://api.content.tripadvisor.com
">
              <TAID>85380</TAID>
              <clientID xsi:nil="true"/>

<clientLoginID>832924179B0DACCAA58338B6D9A03F78</clientLoginID>
              <domain>com</domain>
              <maxUserReviewSummaries>5</maxUserReviewSummaries>
              <maxUserReviews>5</maxUserReviews>
              <startUserReviewID>0</startUserReviewID>
              <userReviewOffset>0</userReviewOffset>
              <userReviewSortOrder>0</userReviewSortOrder>
              <userReviewSummaryOffset>0</userReviewSummaryOffset>
           </ns2:HotelOptions>
        </ns1:getHotel>
     </soapenv:Body>
  </soapenv:Envelope>

Does anyone have any ideas as to why i am not getting the prefix's on the
child elements?

Regards

Alex.

Reply via email to