Hi Eric,

The samples.addressbook.PutListings sample shows how to pass an Element as a
parameter.

Thanks,
-Matt

> -----Original Message-----
> From: Eric Grace [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, June 13, 2001 11:42 AM
> To: [EMAIL PROTECTED]
> Subject: Re: Parameter Encoding Problem
>
>
> I'm still missing something here...
>
>       Element bookEl = (Element)ret.getValue();
>
> This casts an existing Parameter to an element....the Parameter
> comes from a
> preexisting Response.  I am trying to create a response and add
> parameters to
> it....so in my case, the ret Parameter is null....getValue() yields null
> pointer.  kind of a dead end there.
>
>
> How do I do something like the following....
>
>     Parameter parameter = new
> Parameter("xmldata",org.w3c.dom.Element.class,
> contentHandler.getXMLResponse() , Constants.NS_URI_LITERAL_XML);
>
> I was figuring that the Parameter needs a java.lang.Class type
> the implements
> org.w3c.dom.Element.....and then things should just work?  when i
> create a new
> object that implements org.w3c.dom.Element and use that in the above
> example...IU'm back to square 1....
>
> <faultstring>I only know how to serialize an
> 'org.w3c.dom.Element'.</faultstring>
>
>
> I must be just totally missing something here.  Could someone
> enlighten me with
> a code fragment ( other than GetAllListings from addres book..it
> does not seem
> to be an example of how to attack this problem. )  I don't see
> how to pass an
> element as a parameter.
>
>
> THANKS so far!  This group is really turning up some good ideas.
>
>
> -eric
>
> "The box said to install NT 4.0 or better, so I installed Solaris"
>
>
>
> "Das, Kuntal" wrote:
>
> > Nope. Just create an Element object the way, the
> > AddressBook.getAllListings() method has created, and then pass it as a
> > parameter....
> >
> > Thanks,
> > Kuntal Das
> > Charles Schwab & Co., Inc.
> > Wireless Technology
> > 45 Fremont, SF
> > Email : [EMAIL PROTECTED]
> > Phone : (415)667-4322
> > Live life to the brim.................
> >
> > -----Original Message-----
> > From: Eric Grace [mailto:[EMAIL PROTECTED]]
> > Sent: Tuesday, June 12, 2001 4:30 PM
> > To: [EMAIL PROTECTED]
> > Subject: Re: Parameter Encoding Problem
> >
> > Let me see if I get this.......I create a class that implements
> > org.w3c.dom.Element........
> >
> > public class XMLData
> >  extends org.apache.xerces.dom.ElementImpl
> >  implements org.w3c.dom.Element
> > {
> >    public XMLData() {}
> > }
> >
> > Then create a parameter using the new Element
> >     Parameter parameter = new
> > Parameter("xmldata",XMLData.class,contentHandler.getXMLResponse() ,
> > Constants.NS_URI_LITERAL_XML);
> >
> > ???
> >
> > I'm getting the following error...
> >
> >   <faultstring>I only know how to serialize an
> > 'org.w3c.dom.Element'.</faultstring>
> >
> > What am I missing here?
> >
> > -eric
> >
> > "Das, Kuntal" wrote:
> >
> > > U can, create an Element object with that string, like a
> normal xml file,
> > > and then pass the Element object as a parameter, with
> "NS_URI_LITERAL_XML"
> > > encoding.
> > >
> > > Thanks,
> > > Kuntal Das
> > > Charles Schwab & Co., Inc.
> > > Wireless Technology
> > > 45 Fremont, SF
> > > Email : [EMAIL PROTECTED]
> > > Phone : (415)667-4322
> > > Live life to the brim.................
> > >
> > > -----Original Message-----
> > > From: Eric Grace [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, June 12, 2001 2:50 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: Parameter Encoding Problem
> > >
> > > How do I embed and xml string of the following nature into a Parameter
> > > without the '<' and '>' characters being encoded into &lt; and &gt;
> > > characters???
> > >
> > > I am attempting with the following without luck....
> > >
> > > String xmldata = "<obj> <description><![CDATA[ Obj Description]]>
> > > </description></obj> ";
> > > String respEncStyle =  Constants.NS_URI_SOAP_ENC;
> > > Parameter parameter = new Parameter("xmldata",String.class, xmldata,
> > > respEncStyle);
> > >
> > > The result is....
> > >
> > > &lt;obj&gt;&lt;description&gt;<![CDATA[Obj
> > > Description]]>&lt;/description&gt;&lt;/obj&gt;
> > >
> > > -eric
> > >
> > > "The box said to install NT 4.0 or better, so I installed Solaris"
> > >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, email: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]

Reply via email to