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!

how to pass xml to a Object parameter in web service?

843834Apr 23 2010 — edited Apr 24 2010
I am trying to pass an xml to a web service where the method parameter type is Object.

when i pass an xml from the client, I see the null object at the service.

here is the soap envelop:
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:sch="http://test">
   <soapenv:Header/>
   <soapenv:Body>
      <sch:validateXML> 
         <xmlString> // Object xmlString
         <xml>
          test XML
         </xml>
      </xmlString>  
      </sch:validateXML>
   </soapenv:Body>
</soapenv:Envelope>

XSD:

<xs:complexType name="validateXML">
    <xs:sequence>
      <xs:element name="xmlString" type="xs:anyType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
Is this the correct way of passing xml to a Object parameter?

Appreciate your time.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 22 2010
Added on Apr 23 2010
2 comments
266 views