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 wesleyalanking <we...@yahoo.com> on 2007/06/08 20:06:55 UTC

WSA Action = null using non Axis2 client

I'm running Axis2 version 1.2.  I'm getting the following error when attempting to send a request to the Axis2 server.  
    org.apache.axis2.AxisFault: The endpoint reference (EPR) for the Operation not found is /axis2/services/MyService and the WSA Action = null

This service is just a simple test service that came packaged with Axis2.  Using the RESTClient also in the samples it works fine.  The problem though is incoming requests might not always be coming from an Axis2 API.  To test I created a simple HttpClient, but now get the error above.  Attached below is the code used for sending the request.

Any help is very much appreciated.  Thanks in advance.

~ Wes


public class HttpClient {

    private static String toEpr = "http://localhost/axis2/services/MyService";
    
    /**
     * @param args
     */
    public static void main(String[] args) {

        // content to test
        String content = "http://example1.org/example1\">Axis2 Echo String ";
        byte[] output = content.getBytes();
        
        HttpURLConnection httpConn = null;

        try {
            // crate http url connection
            URL url = new URL(toEpr);
            URLConnection connection = url.openConnection();
            httpConn = (HttpURLConnection) connection;
            
            httpConn.setRequestProperty("Content-Length", String.valueOf(output.length));
            httpConn.setRequestMethod("POST");
            httpConn.setDoOutput(true);
            httpConn.setDoInput(true);
            
            // write to output stream
            OutputStream out = httpConn.getOutputStream();
            out.write(output);
            out.close();
            
            // read response
            StringBuffer res = new StringBuffer();
            InputStreamReader isr = new InputStreamReader(httpConn.getInputStream());
            BufferedReader in = new BufferedReader(isr);
            String inputLine;
            while ((inputLine = in.readLine()) != null) {
                res.append(inputLine);
            }
            in.close();
            System.out.println("Response: " + res.toString());
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }
}




Re: WSA Action = null using non Axis2 client

Posted by Eran Chinthaka <ch...@opensource.lk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi,

How can we find the operation that your message is destined to, using
the information provided in your request? Axis2 can find the service
name, i.e. MyService, but what will the operation name??

Please read http://wso2.org/library/176

Thanks,
Chinthaka

wesleyalanking wrote:
> I'm running Axis2 version 1.2.  I'm getting the following error when
> attempting to send a request to the Axis2 server. 
>     org.apache.axis2.AxisFault: The endpoint reference (EPR) for the
> Operation not found is /axis2/services/MyService and the WSA Action = null
> 
> This service is just a simple test service that came packaged with
> Axis2.  Using the RESTClient also in the samples it works fine.  The
> problem though is incoming requests might not always be coming from an
> Axis2 API.  To test I created a simple HttpClient, but now get the error
> above.  Attached below is the code used for sending the request.
> 
> Any help is very much appreciated.  Thanks in advance.
> 
> ~ Wes
> 
> 
> public class HttpClient {
> 
>     private static String toEpr =
> "http://localhost/axis2/services/MyService";
>    
>     /**
>      * @param args
>      */
>     public static void main(String[] args) {
> 
>         // content to test
>         String content = "http://example1.org/example1\">Axis2 Echo
> String ";
>         byte[] output = content.getBytes();
>        
>         HttpURLConnection httpConn = null;
> 
>         try {
>             // crate http url connection
>             URL url = new URL(toEpr);
>             URLConnection connection = url.openConnection();
>             httpConn = (HttpURLConnection) connection;
>            
>             httpConn.setRequestProperty("Content-Length",
> String.valueOf(output.length));
>             httpConn.setRequestMethod("POST");
>             httpConn.setDoOutput(true);
>             httpConn.setDoInput(true);
>            
>             // write to output stream
>             OutputStream out = httpConn.getOutputStream();
>             out.write(output);
>             out.close();
>            
>             // read response
>             StringBuffer res = new StringBuffer();
>             InputStreamReader isr = new
> InputStreamReader(httpConn.getInputStream());
>             BufferedReader in = new BufferedReader(isr);
>             String inputLine;
>             while ((inputLine = in.readLine()) != null) {
>                 res.append(inputLine);
>             }
>             in.close();
>             System.out.println("Response: " + res.toString());
>         }
>         catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGahYXjON2uBzUhh8RAnuJAJ0SA6tQy49EoW/d5kOkF/hpXOMvFQCgmBOc
6qaD0imIrYb4q13xsrsV0w0=
=uaag
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org


Re: WSA Action = null using non Axis2 client

Posted by Lin Sun <li...@gmail.com>.
Hi,

We have seen this error during axis2 integration into geronimo and we 
were able to correct this error by setting the soapAction to an empty 
string if it is null.

HTH, Lin


wesleyalanking wrote:
> I'm running Axis2 version 1.2.  I'm getting the following error when 
> attempting to send a request to the Axis2 server. 
>     org.apache.axis2.AxisFault: The endpoint reference (EPR) for the 
> Operation not found is /axis2/services/MyService and the WSA Action = null
> 
> This service is just a simple test service that came packaged with 
> Axis2.  Using the RESTClient also in the samples it works fine.  The 
> problem though is incoming requests might not always be coming from an 
> Axis2 API.  To test I created a simple HttpClient, but now get the error 
> above.  Attached below is the code used for sending the request.
> 
> Any help is very much appreciated.  Thanks in advance.
> 
> ~ Wes
> 
> 
> public class HttpClient {
> 
>     private static String toEpr = 
> "http://localhost/axis2/services/MyService";
>    
>     /**
>      * @param args
>      */
>     public static void main(String[] args) {
> 
>         // content to test
>         String content = "http://example1.org/example1\">Axis2 Echo 
> String ";
>         byte[] output = content.getBytes();
>        
>         HttpURLConnection httpConn = null;
> 
>         try {
>             // crate http url connection
>             URL url = new URL(toEpr);
>             URLConnection connection = url.openConnection();
>             httpConn = (HttpURLConnection) connection;
>            
>             httpConn.setRequestProperty("Content-Length", 
> String.valueOf(output.length));
>             httpConn.setRequestMethod("POST");
>             httpConn.setDoOutput(true);
>             httpConn.setDoInput(true);
>            
>             // write to output stream
>             OutputStream out = httpConn.getOutputStream();
>             out.write(output);
>             out.close();
>            
>             // read response
>             StringBuffer res = new StringBuffer();
>             InputStreamReader isr = new 
> InputStreamReader(httpConn.getInputStream());
>             BufferedReader in = new BufferedReader(isr);
>             String inputLine;
>             while ((inputLine = in.readLine()) != null) {
>                 res.append(inputLine);
>             }
>             in.close();
>             System.out.println("Response: " + res.toString());
>         }
>         catch (Exception e) {
>             e.printStackTrace();
>         }
>     }
> }
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-user-help@ws.apache.org