You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Mark Kurley <MK...@p21.com> on 2002/04/15 15:51:51 UTC

XML as a Parameter

Is it possible to pass an xml document as a parameter for an RPC call in
axis.  With Apache-SOAP you can pass xml as a parameter using the
Constants.NS_URI_LITERAL_XML.  I am looking for the equivalent in axis.  


Thanks for the help in advance.
-mark


Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from any
computer. 



RE: XML as a Parameter

Posted by Chris Haddad <ch...@cobia.net>.
Mark - 

Yes, an xml document can be passed as a parameter to an RPC style call.
You can simple make the parameter a java.lang.String in your service
handler method.  

Deploy the service, and pull the wsdl using ?wsdl or running Java2WSDL.

A client stub generated using WSDL2Java then defines this code for the
client:

javax.xml.rpc.namespace.QName p0QName = new
javax.xml.rpc.namespace.QName("", "credentials");

call.addParameter(p0QName, new
javax.xml.rpc.namespace.QName("http://schemas.xmlsoap.org/soap/encoding/
", "string"), javax.xml.rpc.ParameterMode.PARAM_MODE_IN);
  
....

Object resp = call.invoke(new Object[] {credentials});


/Chris

-----Original Message-----
From: Mark Kurley [mailto:MKurley@p21.com] 
Sent: Monday, April 15, 2002 9:52 AM
To: 'axis-user@xml.apache.org'
Subject: XML as a Parameter

Is it possible to pass an xml document as a parameter for an RPC call in
axis.  With Apache-SOAP you can pass xml as a parameter using the
Constants.NS_URI_LITERAL_XML.  I am looking for the equivalent in axis.



Thanks for the help in advance.
-mark


Visit our website at http://www.p21.com/visit 
The information in this e-mail is confidential and may contain legally
privileged information.  It is intended solely for the person or entity
to
which it is addressed.  Access to this e-mail by anyone else is
unauthorized. If you are not the intended recipient, any disclosure,
copying, distribution, action taken, or action omitted to be taken in
reliance on it, is prohibited and may be unlawful.  If you received this
e-mail in error, please contact the sender and delete the material from
any
computer.