Yes, there could be, actually .. :-(.

Werner

Read, David wrote:
> Werner,
> 
> If I understand what you are saying, you believe I can just pass a 
> structure like...
> 
> <operation>
>   <Request>
>     <foo>
>       <bar1>data1</bar1>
>       <bar2>data2</bar2>
>     </foo>
>   </Request>
> <operation> 
> 
> ...even though <Request> is defined to be of type string?
> 
> I'll give that a try.  I assumed that there would be issues with 
> unescaped characters.
> 
> Regards,
> 
> -Dave
> 
> 
> -----Original Message-----
> From: Werner Guttmann [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, June 11, 2008 6:25 AM
> To: [email protected]
> Subject: Re: [castor-user] XML: Mapping Elements Into a CDATA Section
> 
> Okay, but that still does not explain why you want to be using CDATAs to 
> push XML (?) to the rules engine.
> 
> Werner
> 
> Read, David wrote:
>> Werner,
>>
>> Not my choice.  The service is provided by a rules engine and it wants 
> 
>> the XML it is to parse sent as a single value.  The intent, I believe, 
> 
>> is to allow any arbitrary message to be sent as a "Create" or "Update"
>> request to the engine.  In our case we want to pass XML as the message 
> 
>> content.
>>
>> FYI, here is its WSDL (product/client information removed):
>>
>> <?xml version="1.0" ?>
>>
>> <definitions targetNamespace="urn:RulesEngine:Data-Interface-WS-"
>>      xmlns:tns="urn:RulesEngine:Data-Interface-WS-"
>>      xmlns:xsd="http://www.w3.org/2001/XMLSchema";
>>      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/";
>>      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/";
>>      xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/";
>>      xmlns="http://schemas.xmlsoap.org/wsdl/";>
>>
>>      <message name="Create">
>>              <part name="Request" type="xsd:string"/>
>>      </message>
>>
>>      <message name="CreateResponse">
>>              <part name="Response" type="xsd:string"/>
>>      </message>
>>
>>      <message name="Update">
>>              <part name="Request" type="xsd:string"/>
>>      </message>
>>
>>      <message name="UpdateResponse">
>>              <part name="Response" type="xsd:string"/>
>>      </message>
>>
>>      <portType name="Interface-WS-Type">
>>              <operation name="Create">
>>                      <input message="tns:Create"/>
>>                      <output message="tns:CreateResponse"/>
>>              </operation>
>>              <operation name="Update">
>>                      <input message="tns:Update"/>
>>                      <output message="tns:UpdateResponse"/>
>>              </operation>
>>      </portType>
>>
>>      <binding name="Interface-WS-Binding" 
> type="tns:Interface-WS-Type">
>>              <soap:binding
>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>              <operation name="Create">
>>                      <soap:operation style="rpc" 
>> soapAction="urn:RulesEngine:Data-Interface-WS-#Create"/>
>>                      <input>
>>                              <soap:body use="encoded" 
>> namespace="urn:RulesEngine:Data-Interface-WS-"
>>                                      
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>                      </input>
>>                      <output>
>>                              <soap:body use="encoded" 
>> namespace="urn:Rulesengine:Data-Interface-WS-"
>>                                      
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>                      </output>
>>              </operation>
>>              <operation name="Update">
>>                      <soap:operation style="rpc" 
>> soapAction="urn:RulesEngine:Data-Interface-WS-#Update"/>
>>                      <input>
>>                              <soap:body use="encoded" 
>> namespace="urn:RulesEngine:Data-Interface-WS-"
>>                                      
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>                      </input>
>>                      <output>
>>                              <soap:body use="encoded" 
>> namespace="urn:RulesEngine:Data-Interface-WS-"
>>                                      
>> encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"/>
>>                      </output>
>>              </operation>
>>      </binding>
>>
>>      <service name="Data-Interface-WS-Service">
>>              <port name="Data-Interface-WS-Port" 
>> binding="tns:Data-Interface-WS-Binding">
>>                      <soap:address
>> location="http://servername:9080/ruleengine/SOAPProvider"/>
>>              </port>
>>      </service>
>> </definitions>
>>
>> Thank you,
>>
>> -Dave
>>
>>
>> -----Original Message-----
>> From: Werner Guttmann [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, June 10, 2008 4:48 AM
>> To: [email protected]
>> Subject: Re: [castor-user] XML: Mapping Elements Into a CDATA Section
>>
>> David,
>>
>> just out of curiosity, why *on earth* would you want to use CDATA 
>> sections in the payload of a web service (when the payload of a web 
>> service 'message' is XML by definition anyhow) ?
>>
>> Werner
>>
>> Read, David wrote:
>>> 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.
>>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
>>
>>
>>
>>
>>
>> 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.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe from this list, please visit:
>>
>>     http://xircles.codehaus.org/manage_email
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 
> 
> 
> 
> 
> 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.
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply via email to