Hi
We have encountered another problem, this time not with a soap/tomcat
server but with a server connection to another soap server written in
C++.
While using Apache SOAP (both 2.1 and 2.2), I've encountered a problem
with having long method names - the SOAP message that gets sent across
the network contains nothing following the "SOAPAction" line, i.e. it
only contains the HTTP header lines (the way I found out was to get the
server to print out every SOAP message that it receives).
Below is a simple program that demostrates this problem I'm
encountering. Very much appreciated if anyone can point out what I'm
doing wrong.
import java.net.*;
import org.apache.soap.*;
import org.apache.soap.rpc.*;
class SomeApp
{
public static void main( String args[] ) throws Exception
{
Call call = new Call();
call.setTargetObjectURI( "urn:targetObjectURI" );
call.setMethodName( "someReallyReallyLongMethodName" ); /* empty
SOAPAction body */
// call.setMethodName( "someMethodName" ); /* this works fine */
Response resp;
try
{
resp = call.invoke( new URL("http://host:8080/SomeService"),
"someActionURI" );
}
catch( SOAPException e )
{
System.err.println( "Caught SOAPException ("+e.getFaultCode()+"):
"+e.getMessage() );
return;
}
if( resp.generatedFault() )
{
Fault fault = resp.getFault();
System.out.println( "Ouch, the call failed: " );
System.out.println( " Fault Code = "+fault.getFaultCode() );
System.out.println( " Fault String = "+fault.getFaultString() );
}
else
{
Parameter result = resp.getReturnValue();
System.out.println( "Response Value: "+result.getValue() );
System.out.println( "Response Name : "+result.getName() );
System.out.println( "Response Type : "+result.getType() );
}
}
}
--
Dr Hugo Bouckaert
R&D Support Engineer, Fractal Graphics
39 Fairway, Nedlands Western Australia 6009
Tel: +618 9386 7917
Email:[EMAIL PROTECTED]
Web: http://www.fractalgraphics.com.au