Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

SOAP web service: null parameter if namespace not declared in envelope

843833Aug 5 2009 — edited Aug 10 2009
Hi guys,

We are exposing a SOAP web service on WebLogic Portal 10.0. The service has one method which takes a single parameter. The service works correctly if the namespace is declared in the envelope element, but it is unable to map the request correctly if the namespace is declared on each request element and so the single parameter is null.

This works:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:inv="http://company.com/inventory">
   <soapenv:Header/>
   <soapenv:Body>
      <inv:CheckProductReservation>
         <username>6144</username>
         <udac>GP1</udac>
         <directoryYpgCode>00903</directoryYpgCode>
         <headingCode>0000001005</headingCode>
         <validityStartDate>2009-09-01</validityStartDate>
         <validityEndDate>2010-08-31</validityEndDate>
         <reservationCode>1234</reservationCode>
      </inv:CheckProductReservation>
   </soapenv:Body>
</soapenv:Envelope>
This fails:
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
   <SOAP-ENV:Body>
      <CheckProductReservation xmlns="http://company.com/inventory">
         <username xmlns="http://company.com/inventory">6144</username>
         <udac xmlns="http://company.com/inventory">GP1</udac>
         <directorycompanyCode xmlns="http://company.com/inventory">00903</directorycompanyCode>
         <headingCode xmlns="http://company.com/inventory">0000001005</headingCode>
         <validityStartDate xmlns="http://company.com/inventory">2009-09-01</validityStartDate>
         <validityEndDate xmlns="http://company.com/inventory">2010-08-31</validityEndDate>
         <reservationCode xmlns="http://company.com/inventory">1234</reservationCode>
      </CheckProductReservation>
   </SOAP-ENV:Body>
</SOAP-ENV:Envelope>
These two requests seem equivalent and syntactically correct. Interestingly enough, soapUI seems to think that the 2nd request is not valid.

Any ideas why the 2nd request is not working?

Thanks!
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 7 2009
Added on Aug 5 2009
8 comments
1,048 views