SoapAction is *usually* prefaced with urn: as seen here
operation.setSoapAction("urn:" + opName);


so
servicePath is incorrect is there a specific reason why you have'nt specified 
services as the servicePath in /conf/axis2.xml?
<parameter name="servicePath">services</parameter>-->

M--
  ----- Original Message ----- 
  From: Iyengar, Kumar 
  To: [email protected] 
  Sent: Thursday, November 15, 2007 8:19 PM
  Subject: RE: Dynamic web services


  Hi all,

   

  The issue is getting a bit critical here and I would appreciate any help:

   

  I keep getting the error "The service cannot be found for the endpoint 
reference (EPR) http://vedanta:8080/arsys/services/ARService"; in my Soap Client 
(I am using SoapUI). But in Tomcat's log I see the error "- Unable to parse 
request URL [urn:testWS][/arsys/services] ". I am pretty sure this might be 
some dumb error on my part.

   

  I have set my axis2.xml as follows:

      <parameter name="servicePath">services</parameter>

     /* NOTE: contextRoot is not set */

   

  I have set my service.xml as follows:

  <service>

   <messageReceivers>

     <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out";

      class="org.apache.axis2.receivers.RawXMLINOUTMessageReceiver"/>

   </messageReceivers>

   <parameter name="ServiceClass" 
locked="false">com.remedy.arsys.ws.services.ARService</parameter>

  </service>

   

  I have set my web.xml as follows:

      <servlet>

          <servlet-name>AxisServlet</servlet-name>

          <display-name>Apache-Axis Servlet</display-name>

          
<servlet-class>org.apache.axis2.transport.http.AxisServlet</servlet-class>

      </servlet>

   

      <servlet-mapping>

          <servlet-name>AxisServlet</servlet-name>

          <url-pattern>/servlet/AxisServlet</url-pattern>

      </servlet-mapping>

   

      <servlet-mapping>

          <servlet-name>AxisServlet</servlet-name>

          <url-pattern>/services/*</url-pattern>

      </servlet-mapping> 

   

  I have looked at Axis2 source code and it looks like the error is coming from 
Utils.java "parseRequestURLForServiceAndOperation()" routine. This routine is 
called by all the dispatchers. I am not sure why the 'path' parameter in 
'parseRequestURLForServiceAndOperation()' is set to 'urn:testWS'. 'path' should 
point to EPR. The error message does mention the correct EPR.

   

  Also, when I set my 'servicePath' to 'arsys/services' then the error that is 
see in Tomcat's log is :

  - Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/arsys/services]

  - Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/arsys/services]

  - Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/arsys/services]

  - Unable to parse request URL [urn:testWS][/arsys/arsys/services]

   

  The 'path' parameter in 'parseRequestURLForServiceAndOperation()' routine now 
seems to contain the correct EPR but the 'servicePath' has '/arsys' prepended 
to it.

   

  Is 'contextRoot' supposed to be set? What is the definition of 'contextRoot'?

  Why does '/arsys' get prepended to 'servicePath'? Or in other words what is 
'servicePath' supposed to be?

  How do I get axis2 log to be enabled? I did put log4j.properties and 
common-logging.properties in the classpath.

   

  I hope I can get some answers soon,

   

  Thanks,

   

  --kumar


------------------------------------------------------------------------------

  From: Iyengar, Kumar [mailto:[EMAIL PROTECTED] 
  Sent: Thursday, November 15, 2007 1:22 AM
  To: [email protected]
  Subject: RE: Dynamic web services

   

  Hi,

   

  I am afraid I am not making much headway here. 

   

  I have my web.xml that specifies the <servlet> and <servlet-mapping>.

   

  However, I am not sure what values the axis2.xml parameters should have 
especially for the ones suggested below: servicePath and contextRoot. The EPR 
is http://zzz:8080/arsys/services/ARService?server =xxx&WebService=yyy 

   

  I tried different combinations of values for configRoot and servicePath and 
got one of the 2 errors.

   

  Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/ARService]

  - Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/ARService]

  - Unable to parse request URL 
[http://vedanta:8080/arsys/services/ARService][/arsys/ARService]

  - Unable to parse request URL [urn:testWS][/arsys/ARService]

   

  Or

   

  Unable to parse request URL [urn:testWS][/arsys/ARService]

   

  The class that is supposed to handle this has 3 public methods: 

  1)       Void setOperationContext (OperationContext x)

  2)       OMElement handleRequest(OMElement)

  3)       Document processRequest(Doc input)  à This one is a carry forward 
from Axis.

   

  I think in the first set of errors, the 3 error messages are corresponding to 
the above 3 methods. However, none of the methods are executed. 

   

  Should'nt the specification in web.xml and service.xml be sufficient? My 
service.xml contains a 'parameter' with ServiceClass name and a 
messageReceiverfor RAWXML in-out) only. I did not specify any operation.

   

  Any detailed explanation would really help.

   

  Thanks,

   

  --kumar


------------------------------------------------------------------------------

  From: Martin Gainty [mailto:[EMAIL PROTECTED] 
  Sent: Monday, November 13, 2000 6:46 PM
  To: [email protected]
  Subject: Re: Dynamic web services

   

  SoapAction is *usually* prefaced with urn: as seen here

  operation.setSoapAction("urn:" + opName);

  so

  servicePath is incorrect

   

  check

  ServicesDirectory attribute in axis2.xml
  servicePath attribute in axis2.xml

  also
  Make sure your EPR is valid

  M--

  ----- Original Message ----- 

    From: Iyengar, Kumar 

    To: [email protected] 

    Sent: Tuesday, November 13, 2007 8:54 PM

    Subject: RE: Dynamic web services

     

    Also, I get an error "Unable to parse request URL 
[urn:testWS2][/arsys/services]". I get this error whether I have a service.xml 
file or not. The URL that I pass in to my application is 
http://zzz:8080/arsys/services/ARService?server =xxx&WebService=yyy 

     

    Has anyone seen this error? 

     

    --kumar

     


----------------------------------------------------------------------------

    From: Iyengar, Kumar [mailto:[EMAIL PROTECTED] 
    Sent: Tuesday, November 13, 2007 4:31 PM
    To: [email protected]
    Subject: Dynamic web services

     

    Hi all,

     

    We use Axis in a non standard way. The typical use of Axis is where one 
generates the java stubs and then populates the stubs and deploys the 
application. In our application we do it a bit dynamically - we have a generic 
service and when the request comes in, it takes the request and then extracts 
the document, determines the operation and makes internal api calls. This way 
we never generate stubs.

     

    I am currently upgrading our setup from Axis to Axis2 and having problems 
with it:

    1) I tried creating a service.xml file specifying the 'ServiceClass' name. 
However, it is not clear whether I need to specify the method name. With Axis I 
could specify the method name in the wsdd file.

    2) Is there a complete documentation that explains all the options that can 
be specified in a service.xml? I have only found links (especially in IBM 
developer network) that explain bits and pieces.

    3) Also, is it OK not to specify any operation in the service.xml file? 
What I really want is my code to take control of the Message Context and then 
extract the document and operation and then make internal calls. 

    4) if none of that work then do I have to do this by writing my own 
handler? I hope that is not the case since I could do this very easily with 
Axis.

     

    Any help is greatly appreciated.

     

    --kumar

Reply via email to