Hello all,
 
I am trying to send data into a web service whose operations simply take
a <Request> string.  Inside of this element is supposed to be the XML
payload to be processed.  For example it expects something like:
 
<operation>
  <Request>
    <![CDATA[
      <foo>
        <bar1>data1</bar1>
        <bar2>data2</bar2>
      </foo>
    ]]>
  </Request>
</operation>
 
The class instance to be marshalled contains fields for each <bar#>.
For example:
 
public class Foo {
   private String bar1, bar2, bar3;
   public String getBar1() { return bar1; } 
   public String getBar2() { return bar2; } 
   public String getBar3() { return bar3; }
}
 
I started with the mapping like:
 
<class name="Foo">
    <map-to xml="operation"  
        ns-uri="urn:RuleEngine:Data-Interface-WS-" 
        ns-prefix="tns"/>
    <field name="bar1" type="string" required="false">
      <bind-xml name="tns:bar1" node="element" location="Request/foo"/>
    </field>
    <field name="bar2" type="string" required="false">
      <bind-xml name="tns:bar2" node="element" location="Request/foo"/>
    </field>
    <field name="bar3" type="string" required="false">
      <bind-xml name="tns:bar3" node="element" location="Request/foo"/>
    </field>
  </class>

Obviously this doesn't know to place <foo> within a CDATA section in
<Request>.  However, I don't see how to do it.
 
Is there a way to setup the mapping so that the <foo> and <bar> elements
are really just part of the data for <Request>?
 
I appreciate any pointers you can provide for this.
 
Thank you,
 
-Dave
 




This e-mail and any files transmitted with it are for the sole use of
Blue Slate Solutions and the intended recipient(s) and may contain
confidential and privileged information. If you are not the intended
recipient, please contact the sender by reply e-mail and destroy all
copies of the original message. Any unauthorized review, use,
disclosure, dissemination, forwarding, printing or copying of this email
or any action taken in reliance on this e-mail is strictly prohibited
and may be unlawful.

Reply via email to