3

After i upgraded the axis2 from 1.6.2 to 1.7.0 i get the following exception:

"The ServiceClass object does not implement the required method in the following form: OMElement"

most of the answers I found suggest to set the rpc message receivers in services.xml which i already had from previous version:

<service name="LogService" scope="transportsession">
<description>
    Log
</description>
<messageReceivers>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver"/>
    <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-out" class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
</messageReceivers>
<parameter name="ServiceClass">
    com.viaMEDICI.viaWS.services.LogService
</parameter>

Any other ideas what could have gone wrong? List services and the wsdl looks fine.

LE:

something different is the namespace before was "axis2ns2" now it is "nsoMZdG". No idea where could this come from.. and also i don't get all parameters by calling the ws restful and just only the first one...

Vai B.
  • 31
  • 1
  • 4

3 Answers3

4

As noted in the Apache Axis2 1.7.0 release notes, the http://www.w3.org/2004/08/wsdl/XXX MEP URIs are no longer supported. Use http://www.w3.org/ns/wsdl/XXX instead.

Andreas Veithen
  • 8,868
  • 3
  • 25
  • 28
  • Hi Andreas! Thanks for your response, i've already tried that too, didn't change the result. I've red also the release notes and upgraded to 1.7.1 because of the problems found in 1.7.0, and managed to make it work. – Vai B. Mar 02 '16 at 09:45
1

I had the same issue

I solved it by updating http://www.w3.org/2004/08/wsdl/in-only to http://www.w3.org/ns/wsdl/in-only and http://www.w3.org/2004/08/wsdl/in-out to http://www.w3.org/ns/wsdl/in-out

Example services.xml

Earlier

<service name="Axis2HelloWorld" >
    <Description>
        Please Type your service description here
    </Description>
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/2004/08/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
        <messageReceiver  mep="http://www.w3.org/2004/08/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>
    <parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>

New

<service name="Axis2HelloWorld" >
    <Description>
        Please Type your service description here
    </Description>
    <messageReceivers>
        <messageReceiver mep="http://www.w3.org/ns/wsdl/in-only" class="org.apache.axis2.rpc.receivers.RPCInOnlyMessageReceiver" />
        <messageReceiver  mep="http://www.w3.org/ns/wsdl/in-out"  class="org.apache.axis2.rpc.receivers.RPCMessageReceiver"/>
    </messageReceivers>
    <parameter name="ServiceClass" locked="false">com.ciber.webservices.Axis2HelloWorld</parameter>
</service>
vinsinraw
  • 2,003
  • 1
  • 16
  • 18
0

update to axis2 1.7.1 solved this problem, but there now i discovered other problems... like this one:

[2016-03-02 11:39:47] [ERROR] [org.apache.axis2.rpc.receivers.RPCMessageReceiver] - null 
java.lang.NullPointerException
at org.apache.axis2.databinding.utils.BeanUtil.addInstanceTypeAttribute(BeanUtil.java:1316)
at org.apache.axis2.databinding.utils.BeanUtil.getPropertyQnameList(BeanUtil.java:390)
at org.apache.axis2.databinding.utils.BeanUtil.getPullParser(BeanUtil.java:88)
at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.processProperties(ADBXMLStreamReaderImpl.java:989)
at org.apache.axis2.databinding.utils.reader.ADBXMLStreamReaderImpl.next(ADBXMLStreamReaderImpl.java:829)
at org.apache.axis2.util.StreamWrapper.next(StreamWrapper.java:71)
Vai B.
  • 31
  • 1
  • 4