Announcement Announcement Module
Collapse
No announcement yet.
JAXRPCException - Cannot find operation on webservice call Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • JAXRPCException - Cannot find operation on webservice call

    Hi,

    I'm having issues connecting to the TerraService webservice. I'm getting the following exception. Any hints as to what the issue is? I'm running the testcase from IntelliJ.

    Thank you,
    Stephen


    javax.xml.rpc.JAXRPCException: Cannot find operation: getPlaceFacts - none defined
    at org.apache.axis.client.Call.setOperation(Call.java :1357)
    at org.apache.axis.client.AxisClientProxy.invoke(Axis ClientProxy.java:161)
    at $Proxy0.getPlaceFacts(Unknown Source)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at org.springframework.remoting.rmi.RmiClientIntercep torUtils.doInvoke(RmiClientInterceptorUtils.java:9 8)
    at org.springframework.remoting.rmi.RmiClientIntercep torUtils.invoke(RmiClientInterceptorUtils.java:71)
    at org.springframework.remoting.jaxrpc.JaxRpcPortClie ntInterceptor.invoke(JaxRpcPortClientInterceptor.j ava:442)
    at org.springframework.aop.framework.ReflectiveMethod Invocation.proceed(ReflectiveMethodInvocation.java :144)
    at org.springframework.aop.framework.JdkDynamicAopPro xy.invoke(JdkDynamicAopProxy.java:174)
    at $Proxy1.getPlaceFacts(Unknown Source)
    at net.calit2.bus.SpringWebServiceTestCase.testWebSer vice(SpringWebServiceTestCase.java:29)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at com.intellij.rt.execution.junit2.JUnitStarter.main (JUnitStarter.java:31)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Nativ e Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Native MethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(De legatingMethodAccessorImpl.java:25)
    at com.intellij.rt.execution.application.AppMain.main (AppMain.java:78)


    Process finished with exit code -1


    My Spring config file looks as such:

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN//EN"
    "http://www.springframework.org/dtd/spring-beans.dtd">

    <beans>

    <bean id="terraService" class="org.springframework.remoting.jaxrpc.JaxRpcP ortProxyFactoryBean">

    <property name="serviceInterface"><value>net.calit2.service. terraservice.TerraServiceSoap</value></property>

    <property name="wsdlDocumentUrl"><value>http://terraservice.net/TerraService2.asmx?WSDL</value></property>
    <property name="namespaceUri"><value>http://terraservice-usa.com/</value></property>

    <!-- <property name="portInterface"><value>net.calit2.service.ter raservice.TerraServiceSoap</value></property> -->

    <property name="serviceName"><value>TerraService</value></property>
    <property name="portName"><value>TerraServiceSoap</value></property>

    <!-- same error with or with out this commented out -->
    <!-- <property name="serviceFactoryClass"><value>org.apache.axis. client.ServiceFactory</value></property> -->
    </bean>

    </beans>

    And my testcase is:

    import junit.framework.TestCase;
    import net.calit2.service.terraservice.*;
    import org.springframework.context.ApplicationContext;
    import org.springframework.context.support.FileSystemXmlA pplicationContext;

    public class SpringWebServiceTestCase extends TestCase {

    protected static ApplicationContext ctx;

    protected void setUp() throws Exception {

    String path = "/web/WEB-INF/mule-webservices.xml";
    ctx = new FileSystemXmlApplicationContext(path);
    }

    public void testWebService() throws Exception {

    TerraServiceSoap ts = (TerraServiceSoap)ctx.getBean("terraService");
    assertNotNull(ts);

    Place place = new Place();
    place.setCity("San Diego");
    place.setState("CA");
    place.setCountry("US");

    ts.getPlaceFacts(place);

    }

    }

    package net.calit2.service.terraservice;

    public interface TerraServiceSoap extends java.rmi.Remote {
    public java.lang.String convertLonLatPtToNearestPlace(net.calit2.service.t erraservice.LonLatPt point) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.UtmPt convertLonLatPtToUtmPt(net.calit2.service.terraser vice.LonLatPt point) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.LonLatPt convertUtmPtToLonLatPt(net.calit2.service.terraser vice.UtmPt utm) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.LonLatPt convertPlaceToLonLatPt(net.calit2.service.terraser vice.Place place) throws
    java.rmi.RemoteException;
    public int countPlacesInRect(net.calit2.service.terraservice. LonLatPt upperleft, net.calit2.service.terraservice.LonLatPt lowerright, net.calit2.service.terraservice.PlaceType ptype) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.AreaBoundingBox getAreaFromPt(net.calit2.service.terraservice.LonL atPt center, int theme, net.calit2.service.terraservice.Scale scale, int displayPixWidth, int displayPixHeight) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.AreaBoundingBox getAreaFromRect(net.calit2.service.terraservice.Lo nLatPt upperLeft, net.calit2.service.terraservice.LonLatPt lowerRight, int theme, net.calit2.service.terraservice.Scale scale) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.AreaBoundingBox getAreaFromTileId(net.calit2.service.terraservice. TileId id, int displayPixWidth, int displayPixHeight) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.ArrayOfThemeBoundi ngBox getLatLonMetrics(net.calit2.service.terraservice.L onLatPt point) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.PlaceFacts getPlaceFacts(net.calit2.service.terraservice.Plac e place) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.ArrayOfPlaceFacts getPlaceList(java.lang.String placeName, int maxItems, boolean imagePresence) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.ArrayOfPlaceFacts getPlaceListInRect(net.calit2.service.terraservice .LonLatPt upperleft, net.calit2.service.terraservice.LonLatPt lowerright, net.calit2.service.terraservice.PlaceType ptype, int maxItems) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.ThemeInfo getTheme(int theme) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.TileMeta getTileMetaFromLonLatPt(net.calit2.service.terrase rvice.LonLatPt point, int theme, net.calit2.service.terraservice.Scale scale) throws
    java.rmi.RemoteException;
    public net.calit2.service.terraservice.TileMeta getTileMetaFromTileId(net.calit2.service.terraserv ice.TileId id) throws
    java.rmi.RemoteException;
    public byte[] getTile(net.calit2.service.terraservice.TileId id) throws
    java.rmi.RemoteException;
    }

  • #2
    I don't know if this helps, but looking at the WSDL file I don't see operation getPlaceFacts. I can find operation GetPlaceFacts though. So, it might be some problem with case sensitivity.

    Comment


    • #3
      Originally posted by spasco View Post
      Hi,

      I'm having issues connecting to the TerraService webservice. I'm getting the following exception. Any hints as to what the issue is? I'm running the testcase from IntelliJ.

      Thank you,
      Stephen


      javax.xml.rpc.JAXRPCException: Cannot find operation: getPlaceFacts - none defined...
      I'm having the same problem. Did you find a workaround?

      Comment


      • #4
        Try cleaning the project and building it again. It solved my problem as I was initially developing with jax-rpc client and then switched over to using axis to access my document literal web services. So there was some problems with old codes of jax-rpc and I was getting the same error as u have with the case sensitivity problem. Just clean and build the project.. it could work.. as it worked for me..

        Comment

        Working...
        X