You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Prashant kayak <pr...@kayak.com> on 2008/05/01 16:34:11 UTC

Multiple NamseSpace Issues

Hi, 
I am using a WSDL for a flight search at 

http://202.138.112.213/jettaapi/flightmatrixservice.asmx?wsdl

the wsdl shows that namespace for FlightMatrixRequest object is
xmlns="http://www.vedaleon.com/webservices" 

But, when i create the objects and try to send the request across the wire,
for some reason... the elements under FlightMatrixRequest seem to be using a
different namespace. 
here is the part of the SOAP message which is goin across the wire 

<ns2:FlightMatrixRequest
xmlns:ns1="http://www.ebxml.org/namespaces/messageHeader"
xmlns:ns2="http://www.vedaleon.com/webservices"
xmlns:ns3="http://schemas.xmlsoap.org/ws/2002/12/secext">
      <ns1:FlightMatrixRQ> 
        <ns1:AirItinerary DirectionInd="Return"> 
          <ns1:OriginDestinationOptions> 
            <ns1:OriginDestinationOption> 
              <ns1:FlightSegment RPH="1"
ArrivalDateTime="2008-05-16T20:15:01.000-04:00"
DepartureDateTime="2008-05-09T20:15:01.000-04:00"> 
                <ns1:DepartureAirport LocationCode="BOS"/> 
                <ns1:ArrivalAirport LocationCode="SFO"/> 
                <ns1:MarketingAirline Code="9W"/> 
              </ns1:FlightSegment> 
            </ns1:OriginDestinationOption> 
          </ns1:OriginDestinationOptions> 
        </ns1:AirItinerary> 
        <ns1:TravelerInfoSummary> 
          <ns1:AirTravelerAvail> 
            <ns1:AirTraveler> 
              <ns1:PassengerTypeQuantity Quantity="2" Code="ADT"/> 
            </ns1:AirTraveler> 
          </ns1:AirTravelerAvail> 
        </ns1:TravelerInfoSummary> 
      </ns1:FlightMatrixRQ> 
    </ns2:FlightMatrixRequest> 

there 2 things that look weird to me.. 
1. Y did the ns1 and ns2  come into the picture in the soap message, (these
are namespaces for some different objects) 
2. the elements under FlightMatrixRequest are using ns1 which is the wrong
one. they should be using ns2. (according to the wsdl) 

can anyone please help me. what am i missing or doin wrong? 

any help is appreciated. 

thanks and regrads
-Prashant 
-- 
View this message in context: http://www.nabble.com/Multiple-NamseSpace-Issues-tp16993271p16993271.html
Sent from the cxf-user mailing list archive at Nabble.com.


Re: Multiple NamseSpace Issues

Posted by Daniel Kulp <dk...@apache.org>.
What version of CXF are you using?   Also,

 > 1. Y did the ns1 and ns2  come into the picture in the soap message, 
(these
 > are namespaces for some different objects)


JAXB does this.  JAXB records all the namespaces it hits and pretty much 
just outputs defs for all of them at the start as it doesn't know which 
ones will and won't be used.


 > 2. the elements under FlightMatrixRequest are using ns1 which is the 
wrong
 > one. they should be using ns2. (according to the wsdl)

That IS strange.  Did you pass any flags or anything to wsdl2java when 
you generated the code?

I actually tried generating code with 2.1 and failed with a JAXB error. 
  It doesn't look like jaxb likes the ref="xml:lang" thing.  Not sure 
what  the issue is with that or if a workaround exists.  :-(

Dan



Prashant kayak wrote:
> Hi, 
> I am using a WSDL for a flight search at 
> 
> http://202.138.112.213/jettaapi/flightmatrixservice.asmx?wsdl
> 
> the wsdl shows that namespace for FlightMatrixRequest object is
> xmlns="http://www.vedaleon.com/webservices" 
> 
> But, when i create the objects and try to send the request across the wire,
> for some reason... the elements under FlightMatrixRequest seem to be using a
> different namespace. 
> here is the part of the SOAP message which is goin across the wire 
> 
> <ns2:FlightMatrixRequest
> xmlns:ns1="http://www.ebxml.org/namespaces/messageHeader"
> xmlns:ns2="http://www.vedaleon.com/webservices"
> xmlns:ns3="http://schemas.xmlsoap.org/ws/2002/12/secext">
>       <ns1:FlightMatrixRQ> 
>         <ns1:AirItinerary DirectionInd="Return"> 
>           <ns1:OriginDestinationOptions> 
>             <ns1:OriginDestinationOption> 
>               <ns1:FlightSegment RPH="1"
> ArrivalDateTime="2008-05-16T20:15:01.000-04:00"
> DepartureDateTime="2008-05-09T20:15:01.000-04:00"> 
>                 <ns1:DepartureAirport LocationCode="BOS"/> 
>                 <ns1:ArrivalAirport LocationCode="SFO"/> 
>                 <ns1:MarketingAirline Code="9W"/> 
>               </ns1:FlightSegment> 
>             </ns1:OriginDestinationOption> 
>           </ns1:OriginDestinationOptions> 
>         </ns1:AirItinerary> 
>         <ns1:TravelerInfoSummary> 
>           <ns1:AirTravelerAvail> 
>             <ns1:AirTraveler> 
>               <ns1:PassengerTypeQuantity Quantity="2" Code="ADT"/> 
>             </ns1:AirTraveler> 
>           </ns1:AirTravelerAvail> 
>         </ns1:TravelerInfoSummary> 
>       </ns1:FlightMatrixRQ> 
>     </ns2:FlightMatrixRequest> 
> 
> there 2 things that look weird to me.. 
> 1. Y did the ns1 and ns2  come into the picture in the soap message, (these
> are namespaces for some different objects) 
> 2. the elements under FlightMatrixRequest are using ns1 which is the wrong
> one. they should be using ns2. (according to the wsdl) 
> 
> can anyone please help me. what am i missing or doin wrong? 
> 
> any help is appreciated. 
> 
> thanks and regrads
> -Prashant 

-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog