axis-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eran Chinthaka <chinth...@opensource.lk>
Subject Re: WSA Action = null using non Axis2 client
Date Sat, 09 Jun 2007 02:53:12 GMT
-----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


Mime
View raw message