----- Original Message -----
Sent: Friday, March 22, 2002 4:31
AM
Subject: RE: Is it possible?
But
tell me Craig,
the
XML would have to be a file?
My
question is, if my client code is like that:
import java.io.*;
import java.net.*;
import
java.util.*;
import org.apache.soap.util.xml.*;
import
org.apache.soap.*;
import org.apache.soap.rpc.*;
import
org.apache.soap.encoding.*;
import
org.apache.soap.encoding.soapenc.*;
import
org.w3c.dom.*;
public class Example2_client
{
public static void main
(String[] args) throws Exception
{
System.out.println("\n\nCalling the SOAP server to say
hello.\n\n");
URL url = new
URL(args[0]);
Response resp = call.invoke(url,
"");
if (resp.generatedFault())
{
Fault fault =
resp.getFault();
System.out.println("Fault
Code = " +
fault.getFaultCode());
System.out.println("Fault String = " +
fault.getFaultString());
}
else
{
Parameter
result = resp.getReturnValue();
System.out.println(result.getValue());
System.out.println();
}
}
}
What
should sXML be? A file? a String? What?
Thanx!
Tiago Fernandes Thomaz
-----Original Message-----
From:
Wilkins, Craig [mailto:[EMAIL PROTECTED]]
Sent: quinta-feira, 21
de Mar�o de 2002 22:18
To:
'[EMAIL PROTECTED]'
Subject: RE: Is it
possible?
Use Literal Encoding and Send the XML as a DOM Element. Much
easier.
Call call = new Call();
call.setTargetObjectURI( URI
);
call.setMethodName( Mtds );
call.setEncodingStyleURI(
Constants.NS_URI_LITERAL_XML );
Vector
params = new Vector();
params.addElement( new Parameter( "Param01",
Element.class, myElementOjectToPass, Constants.NS_URI_LITERAL_XML )
);
call.setParams( params );
I'm finding some trouble on sending a request via XML.
Can I encode my xml request as a String which will be in turn encoded
in a SOAP envelope and then parse it on the server side? If so what API's
are there to parse my xml string-like request?
Look forward to hear from you.
The xml string would look like this:
String sXML = "<MethodName><Param01
type1=string>value1</Param01><Param02
type2=int>value2</Param02><Param03
type3=arrayString>value3</Param03></MethodName>";
Thanx!
Tiago Fernandes Thomaz