----- Original Message -----
Sent: Monday, July 09, 2001 11:46
AM
Subject: RE: How to map Element
Object?
If
you are just wanting to send XML Element type then why not use literal xml in
the soap envelope body
ie:
Parameter inputArg =
new
Parameter(
"inputXML",
Element.class,
element,
Constants.NS_URI_LITERAL_XML);
Call
call = null;
call =
this.buildCall(targetURI, "createXML",
this.setParams(inputArg));
call.setEncodingStyleURI(Constants.NS_URI_LITERAL_XML);
this.outputResult(call.invoke(url,
""),"createXML");
Hope
this helps,
Adam
Thanks Kanq,
I tried to use BeanSerializer as you
said. But now I have different message as following:
SOAPException :
SOAP-ENV:Client Unable to instantiate 'org.w3c.dom.Element':
org/w3c/dom/Element
At the client side I try to map as
following:
SOAPMappingRegistry smr = new
SOAPMappingRegistry();
BeanSerializer beanSer = new
BeanSerializer();
// Map the
types.
smr.mapTypes(Constants.NS_URI_SOAP_ENC,
new QName("urn:xml-soap-address-demo",
"address"),
Element.class, beanSer, beanSer);
Call call = new
Call();
call.setSOAPMappingRegistry(smr);
call.setTargetObjectURI(urn);
call.setEncodingStyleURI(Constants.NS_URI_SOAP_ENC);
call.setMethodName("createXML");
Vector
parameters = new Vector();
Vector data =
new Vector();
...
...
At the server end point to pass back to the
client an Element document.
Anyone has any ideas, please help me.
Thank you for your help.
Danh Hoai
>I think you are supposed to use the Message
object from the client. If
>you really want to serialize a
Message object I would use the BeanSerializer
>class (if Message is a
java bean) or write your own.
>You might want to look at the
GetAddress.java example in samples.addressbook
>package for how to use
the BeanSerializer class.