You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by Rob Jellinghaus <ro...@unrealities.com> on 2001/05/20 22:39:37 UTC

Re: Apache SOAP and Axis

Currently the Axis server, with the HTTP transport, requires the use of the
actionURI.  Try using the actionURI and see if it improves matters.  If it
does, then this is due to a bug in Axis (namely that an empty SOAPAction
header results in a non-invokable message), which I will be patching today
or tomorrow.

Cheers,
Rob


At 08:57 PM 5/20/2001 +0000, Thomas Pang wrote:
>
>Hi all,
>     I have managed to install the Axis Servlet under Tomcat and I have
even written a service, which
>can be invoked using an Axis Client.  However, when I try an Apache SOAP
client I get the following error:
>
>Ouch, the call failed:
>  Fault Code   = http://xml.apache.org/axis/:Server.error
>  Fault String = Can't find '' handler
>
>I was under the assumption that any SOAP client should be able to talk to
the Axis Server.... is this a fair
>assumption?   What could be wrong with what I am doing?
>
>Thanks in advance
>
>Thomas
>
>p.s. here's the SOAP client I have wrriten:
>
>import java.io.*;
>import java.net.*;
>import java.util.*;
>import org.apache.soap.util.xml.*;
>import org.apache.soap.*;
>import org.apache.soap.rpc.*;
>
>public class soapCreateSecurity {
>  static XMLParserLiaison xpl = new XercesParserLiaison ();
>
>  public static void main (String[] args) throws Exception {
>
>    int offset = 3 - args.length;
>    String encodingStyleURI = Constants.NS_URI_SOAP_ENC;
>    URL url = new URL ("http://10.128.139.18:8080/servlet/AxisServlet");
>
>    File file = new File ( "/home/pangto/vanilla.xml" );
>    int length = ( int ) file.length();
>    byte[] data = new byte [ length ];
>    FileInputStream file_input_stream = new FileInputStream ( file );
>    file_input_stream.read(data);
>    file_input_stream.close();
>    String xml_request = new String ( data );
>    xml_request = xml_request.replace ('\n',' ').trim();
>
>    // Build the call.
>    Call call = new Call ();
>    call.setTargetObjectURI ("urn:instrumentServer");
>    call.setMethodName ("createSecurity");
>    call.setEncodingStyleURI(encodingStyleURI);
>    Vector params = new Vector ();
>    params.addElement (new Parameter("arg0", String.class, xml_request,
null));
>    call.setParams (params);
>
>    // make the call: note that the action URI is empty because the
>    // XML-SOAP rpc router does not need this. This may change in the
>    // future.
>    Response resp = call.invoke (/* router URL */ url, /* actionURI */ "" );
>
>    // Check the response.
>    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 (result.getValue ());
>    }
>  }
>}
>
>
>--
>
>This e-mail may contain confidential and/or privileged information. If you
are not the intended recipient (or have received this e-mail in error)
please notify the sender immediately and destroy this e-mail. Any
unauthorised copying, disclosure or distribution of the material in this
e-mail is strictly forbidden.
>
>
>