Hi guys,
First of all my apologies if this is the incorrect forum for this topic - I'm quite new to web services!
I was wondering if I could ask about a "Operation Not found" problem I'm encountering. When attempting to deploy the sync version and the async version of the same operation on the same instance of axis2 (ie: two operations, both with the same input parameters, but only one with a return parameter) I receive this error:
<?xml version="1.0" encoding="UTF-8"?>
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/">
<soapenv:Header/>
<soapenv:Body>
<soapenv:Fault>
<faultcode>soapenv:Client</faultcode>
<faultstring>Operation Not found EPR is https://10.238.212.125:9443/soap/ManageWidgetSync and WSA Action = null</faultstring>
<detail>
<Exception>org.apache.axis2.AxisFault: Operation Not found EPR is https://10.238.212.125:9443/soap/ManageWidgetSync and WSA Action = null
at org.apache.axis2.engine.DispatchPhase.checkPostConditions(DispatchPhase.java:51)
at org.apache.axis2.engine.Phase.invoke(Phase.java:398)
at org.apache.axis2.engine.AxisEngine.invoke(AxisEngine.java:522)
at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:487)
at org.apache.axis2.transport.http.HTTPTransportUtils.processHTTPPostRequest(HTTPTransportUtils.java:326)
at org.apache.axis2.transport.http.util.SOAPUtil.processPostRequest(SOAPUtil.java:62)
at org.wso2.wsas.transport.jetty.Axis2SOAPHandler.processPostRequest(Axis2SOAPHandler.java:43)
at org.wso2.wsas.transport.jetty.Axis2Handler.handle(Axis2Handler.java:159)
at org.mortbay.jetty.handler.ContextHandler.handle(ContextHandler.java:627)
at org.mortbay.jetty.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:149)
at org.mortbay.jetty.handler.HandlerCollection.handle(HandlerCollection.java:123)
at org.mortbay.jetty.handler.HandlerWrapper.handle(HandlerWrapper.java:141)
at org.mortbay.jetty.Server.handle(Server.java:269)
at org.mortbay.jetty.HttpConnection.handleRequest(HttpConnection.java:430)
at org.mortbay.jetty.HttpConnection$RequestHandler.content(HttpConnection.java:701)
at org.mortbay.jetty.HttpParser.parseNext(HttpParser.java:617)
at org.mortbay.jetty.HttpParser.parseAvailable(HttpParser.java:193)
at org.mortbay.jetty.HttpConnection.handle(HttpConnection.java:339)
at org.mortbay.jetty.bio.SocketConnector$Connection.run(SocketConnector.java:208)
at org.mortbay.thread.BoundedThreadPool$PoolThread.run(BoundedThreadPool.java:475)
</Exception>
</detail>
</soapenv:Fault>
</soapenv:Body>
</soapenv:Envelope>
Each web service operation was generated by the WSDL2JAVA tool from a different port in a WSDL file. I ensured that the output from the tool for each service was separated into a separate directory (to ensure no files were overwritten). I also ensured that I specified a different Java package name for the output of each run/operation, to ensure that when it came to merging the Java output the package names would prevent the generated skeletons from being overwritten.
As each port uses the same underlying data structures, I merged the contents of the two directories together (overwriting files), except the services.xml file, which I manually edited to ensure each service from the individual service.xml files was present in the resultant services.xml file.
When fleshing out the generated skeleton files to return a response, then building both operations into an aar file and deploying it on to a simple server, I can throw messages at the aysnc version of the operation with no problems. However, I cannot access the sync services as an error (attached) is returned, suggesting that it cannot find the operation. This may be occurring because the sync service operations contain the same input parameters as operations within the provider and consumer services.
The sync service works correctly if deployed separately, so I'm a little baffled. The services.xml file seems sane (attached too!).
I do have a feeling it's to do with the dispatchers. However, ensuring the RequestURIBasedDispatcher is the first dispatcher to be used, and then accessing the service via the following uri, does not seem to stop the error:
http://serviceuri/axis2/services/serviceName/operationName
I apologise if this is quite a silly question - I am still embracing the learning curve that is Axis 2 ;) Any suggestions or guidance would be very much appreciated!
Kind regards,
Simon
My services.xml file:
<!-- This file was auto-generated from WSDL --><!-- by the Apache Axis2 version: #axisVersion# #today# --><serviceGroup>
<service name="ManageEventNotification">
<parameter name="ServiceClass" locked="false">com.bt.sdk.manageeventnotification.consumer.service.ManageEventNotification</parameter>
<transports>
<transport>jms</transport>
<transport>http</transport>
</transports>
<parameter name="transport.jms.Destination" locked="true">MEN.JMS.Q</parameter>
<operation name="notify" mep="http://www.w3.org/2004/08/wsdl/in-only">
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="com.bt.sdk.manageeventnotification.consumer.service.ManageEventNotificationMessageReceiverInOnly"/>
<actionMapping>http://capabilities.nat.bt.com/wsdl/MEN/2006/12/30#notify</actionMapping>
<module ref="validator"/>
</operation>
<operation name="subscribe" mep="http://www.w3.org/2004/08/wsdl/in-out">
<actionMapping>http://capabilities.nat.bt.com/wsdl/MEN/2006/12/30#subscribe</actionMapping>
</operation>
<operation name="createWidgetRequest" mep="http://www.w3.org/2004/08/wsdl/in-only">
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only"
class="com.bt.sdk.manageeventnotification.consumer.service.ManageEventNotificationMessageReceiverInOnly"/>
<actionMapping>http://capabilities.nat.bt.com/wsdl/MEN/2006/12/30#createWidgetRequest</actionMapping>
</operation>
</service>
<service name="ManageEventNotificationSync">
<parameter name="ServiceClass" locked="false">com.bt.sdk.manageeventnotification.consumer.service.ManageEventNotificationSync</parameter>
<transports>
<transport>jms</transport>
<transport>http</transport>
</transports>
<parameter name="transport.jms.Destination" locked="true">MEN.JMS.Q</parameter>
<operation name="createWidget" mep="http://www.w3.org/2004/08/wsdl/in-out">
<messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out"
class="com.bt.sdk.manageeventnotification.consumer.service.ManageEventNotificationMessageReceiverInOut"/>
<actionMapping>http://capabilities.nat.bt.com/wsdl/MEN/2006/12/30#createWidget</actionMapping>
</operation>
</service>
</serviceGroup>