3 Replies Latest reply on Nov 18, 2005 6:22 AM by Thomas Diesler

    OperationDesc for myMethod was not synchronized to a method.

    Frank Sudkamp Newbie

      I am creating a web service to send alert messages by email and after following the documentation I found at http://docs.jboss.org/jbossas/jboss4guide/r3/html/ch12.html I am still getting an error as follows:

      java.lang.Exception: The OperationDesc for sendAlert was not synchronized to a method of com.cc.infrastructure.services.AlertServiceEndpoint.
      at org.jboss.axis.InternalException.<init>(InternalException.java:106)
      at org.jboss.axis.description.ServiceDesc.syncOperationToClass(ServiceDesc.java:870)
      at org.jboss.axis.description.ServiceDesc.getSyncedOperationsForName(ServiceDesc.java:1217)
      at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospectionRecursive(ServiceDesc.java:1063)
      at org.jboss.axis.description.ServiceDesc.loadServiceDescByIntrospection(ServiceDesc.java:984)
      at org.jboss.axis.providers.java.JavaProvider.initServiceDesc(JavaProvider.java:732)
      at org.jboss.webservice.server.InvokerProvider.initServiceDesc(InvokerProvider.java:95)
      at org.jboss.axis.handlers.soap.SOAPService.getInitializedServiceDesc(SOAPService.java:388)
      at org.jboss.axis.deployment.wsdd.WSDDService.makeNewInstance(WSDDService.java:560)
      at org.jboss.axis.deployment.wsdd.WSDDDeployment.getDeployedServices(WSDDDeployment.java:617)
      at org.jboss.axis.configuration.FileProvider.getDeployedServices(FileProvider.java:356)
      at org.jboss.webservice.server.AbstractServlet.reportAvailableServices(AbstractServlet.java:94)
      at org.jboss.webservice.server.ServiceEndpointServlet.doGet(ServiceEndpointServlet.java:69)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:697)
      at org.jboss.axis.transport.http.AxisServletBase.service(AxisServletBase.java:370)
      at javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


      I get this error when I try to view http://localhost:8080/ws4ee/services.

      My AlertServiceEndpoint interface:
      package com.cc.infrastructure.services;
      
      import java.rmi.Remote;
      
      /**
       * @author f.sudkamp
       *
       */
      public interface AlertServiceEndpoint extends Remote {
       public int sendAlert(int msgType,
       int msgAction,
       String to,
       String subject,
       int contactID,
       String firstName,
       String lastName,
       int alertSubscriptionID,
       String urlDocID,
       String docID,
       int alertID,
       String formattedMsg,
       String contentType) throws java.rmi.RemoteException;
      }
      


      My AlertService class file:
      package com.cc.infrastructure.services;
      
      import java.sql.Timestamp;
      import com.cc.infrastructure.FrameworkController;
      import com.cc.infrastructure.Exception.ExceptionType;
      import com.cc.infrastructure.Exception.CCException;
      import com.cc.infrastructure.alert.TRUEAlert;
      import com.cc.infrastructure.datatypes.documents.GMBIAlertJMS;
      
      import javax.xml.rpc.ServiceException;
      import javax.xml.rpc.server.ServletEndpointContext;
      
      /**
       * @author f.sudkamp
       *
       */
      public class AlertService implements AlertServiceEndpoint
      {
       private static final boolean VERBOSE = false;
       private ServletEndpointContext ctx;
      
       public AlertService() {}
      
       public int sendAlert(int msgType,
       int msgAction,
       String to,
       String subject,
       int contactID,
       String firstName,
       String lastName,
       int alertSubscriptionID,
       String urlDocID,
       String docID,
       int alertID,
       String formattedMsg,
       String contentType)
       {
       int result = 0;
       Timestamp createDate = null;
       try
       {
       FrameworkController fc = FrameworkController.getInstance();
       createDate = new Timestamp(System.currentTimeMillis());
       TRUEAlert.write(GMBIAlertJMS.getAlertXML(formattedMsg,
       msgType,
       msgAction,
       to,
       subject,
       contactID,
       firstName,
       lastName,
       alertSubscriptionID,
       urlDocID,
       docID,
       alertID,
       createDate,
       contentType));
       }
       catch(Exception ex)
       {
       StringBuffer sb = new StringBuffer(128);
       sb.append("AlertService.sendAlert() msgType: " + msgType);
       sb.append("\nAlertService.sendAlert() msgAction: " + msgAction);
       sb.append("\nAlertService.sendAlert() to: " + to);
       sb.append("\nAlertService.sendAlert() subject: " + subject);
       sb.append("\nAlertService.sendAlert() contactID: " + contactID);
       sb.append("AlertService.sendAlert() firstName: " + firstName);
       sb.append("\nAlertService.sendAlert() lastName: " + lastName);
       sb.append("\nAlertService.sendAlert() alertSubscriptionID: " + alertSubscriptionID);
       sb.append("\nAlertService.sendAlert() urlDocID: " + urlDocID);
       sb.append("\nAlertService.sendAlert() docID: " + docID);
       sb.append("\nAlertService.sendAlert() alertID: " + alertID);
       sb.append("\nAlertService.sendAlert() createDate: " + createDate);
       CCException tre = new CCException(ExceptionType.GENERIC_MESSAGE,ex,sb.toString());
       result = 1;
       }
       return result;
       }
      
       /** Used for initialization of a service endpoint.
       */
       public void init(Object context) throws ServiceException
       {
       ctx = (ServletEndpointContext)context;
       }
      
       /** JAX-RPC runtime system ends the lifecycle of a service endpoint instance by
       * invoking the destroy method.
       */
       public void destroy()
       {
       }
      }


      My webservices.xml:
      <webservices
       xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
       version="1.1">
      
       <webservice-description>
       <webservice-description-name>AlertService</webservice-description-name>
       <wsdl-file>WEB-INF/wsdl/AlertService.wsdl</wsdl-file>
       <jaxrpc-mapping-file>WEB-INF/jaxrpc-AlertService.xml</jaxrpc-mapping-file>
       <port-component>
       <port-component-name>PortComponent</port-component-name>
       <wsdl-port>AlertServiceEndpointPort</wsdl-port>
       <service-endpoint-interface>com.cc.infrastructure.services.AlertServiceEndpoint</service-endpoint-interface>
       <service-impl-bean>
       <servlet-link>AlertServiceEndpoint</servlet-link>
       </service-impl-bean>
       </port-component>
       </webservice-description>
       </webservices>


      My web.xml:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
       version="2.4">
      
       <servlet>
       <servlet-name>AlertServiceEndpoint</servlet-name>
       <servlet-class>com.cc.infrastructure.services.AlertService</servlet-class>
       </servlet>
      
       <servlet-mapping>
       <servlet-name>AlertServiceEndpoint</servlet-name>
       <url-pattern>/alert</url-pattern>
       </servlet-mapping>
      
      </web-app>
      


      My AlertService.wsdl generated by wscompile:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <definitions name="AlertService" targetNamespace="http://com.cc.infrastructure/services" xmlns:tns="http://com.cc.infrastructure/services" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://com.cc.infrastructure/services/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">
       <types>
       <schema targetNamespace="http://com.cc.infrastructure/services/types" xmlns:tns="http://com.cc.infrastructure/services/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">
       <complexType name="sendAlert">
       <sequence>
       <element name="Integer_1" type="int" nillable="true"/>
       <element name="Integer_2" type="int" nillable="true"/>
       <element name="String_3" type="string" nillable="true"/>
       <element name="String_4" type="string" nillable="true"/>
       <element name="Integer_5" type="int" nillable="true"/>
       <element name="String_6" type="string" nillable="true"/>
       <element name="String_7" type="string" nillable="true"/>
       <element name="Integer_8" type="int" nillable="true"/>
       <element name="String_9" type="string" nillable="true"/>
       <element name="String_10" type="string" nillable="true"/>
       <element name="Integer_11" type="int" nillable="true"/>
       <element name="String_12" type="string" nillable="true"/>
       <element name="String_13" type="string" nillable="true"/></sequence></complexType>
       <complexType name="sendAlertResponse">
       <sequence>
       <element name="result" type="int" nillable="true"/></sequence></complexType>
       <element name="sendAlert" type="tns:sendAlert"/>
       <element name="sendAlertResponse" type="tns:sendAlertResponse"/></schema></types>
       <message name="AlertServiceEndpoint_sendAlert">
       <part name="parameters" element="ns2:sendAlert"/></message>
       <message name="AlertServiceEndpoint_sendAlertResponse">
       <part name="result" element="ns2:sendAlertResponse"/></message>
       <portType name="AlertServiceEndpoint">
       <operation name="sendAlert">
       <input message="tns:AlertServiceEndpoint_sendAlert"/>
       <output message="tns:AlertServiceEndpoint_sendAlertResponse"/></operation></portType>
       <binding name="AlertServiceEndpointBinding" type="tns:AlertServiceEndpoint">
       <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
       <operation name="sendAlert">
       <soap:operation soapAction=""/>
       <input>
       <soap:body use="literal"/></input>
       <output>
       <soap:body use="literal"/></output></operation></binding>
       <service name="AlertService">
       <port name="AlertServiceEndpointPort" binding="tns:AlertServiceEndpointBinding">
       <soap:address location="REPLACE_WITH_ACTUAL_URL"/></port></service></definitions>
      


      My jaxrpc-AlertService.xml mapping file:
      <?xml version="1.0" encoding="UTF-8"?>
      <java-wsdl-mapping version="1.1" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://www.ibm.com/webservices/xsd/j2ee_jaxrpc_mapping_1_1.xsd">
       <package-mapping>
       <package-type>com.cc.infrastructure.services</package-type>
       <namespaceURI>http://com.cc.infrastructure/services/types</namespaceURI>
       </package-mapping>
       <package-mapping>
       <package-type>com.cc.infrastructure.services</package-type>
       <namespaceURI>http://com.cc.infrastructure/services</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>com.cc.infrastructure.services.AlertServiceEndpoint_sendAlert_RequestStruct</java-type>
       <root-type-qname xmlns:typeNS="http://com.cc.infrastructure/services/types">typeNS:sendAlert</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>Integer_1</java-variable-name>
       <xml-element-name>Integer_1</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>Integer_2</java-variable-name>
       <xml-element-name>Integer_2</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_3</java-variable-name>
       <xml-element-name>String_3</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_4</java-variable-name>
       <xml-element-name>String_4</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>Integer_5</java-variable-name>
       <xml-element-name>Integer_5</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_6</java-variable-name>
       <xml-element-name>String_6</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_7</java-variable-name>
       <xml-element-name>String_7</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>Integer_8</java-variable-name>
       <xml-element-name>Integer_8</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_9</java-variable-name>
       <xml-element-name>String_9</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_10</java-variable-name>
       <xml-element-name>String_10</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>Integer_11</java-variable-name>
       <xml-element-name>Integer_11</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_12</java-variable-name>
       <xml-element-name>String_12</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>String_13</java-variable-name>
       <xml-element-name>String_13</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.cc.infrastructure.services.AlertServiceEndpoint_sendAlert_ResponseStruct</java-type>
       <root-type-qname xmlns:typeNS="http://com.cc.infrastructure/services/types">typeNS:sendAlertResponse</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>result</java-variable-name>
       <xml-element-name>result</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <service-interface-mapping>
       <service-interface>com.cc.infrastructure.services.AlertService</service-interface>
       <wsdl-service-name xmlns:serviceNS="http://com.cc.infrastructure/services">serviceNS:AlertService</wsdl-service-name>
       <port-mapping>
       <port-name>AlertServiceEndpointPort</port-name>
       <java-port-name>AlertServiceEndpointPort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>com.cc.infrastructure.services.AlertServiceEndpoint</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS="http://com.cc.infrastructure/services">portTypeNS:AlertServiceEndpoint</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS="http://com.cc.infrastructure/services">bindingNS:AlertServiceEndpointBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>sendAlert</java-method-name>
       <wsdl-operation>sendAlert</wsdl-operation>
       <wrapped-element/>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>java.lang.Integer</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>Integer_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>1</param-position>
       <param-type>java.lang.Integer</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>Integer_2</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>2</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_3</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>3</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_4</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>4</param-position>
       <param-type>java.lang.Integer</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>Integer_5</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>5</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_6</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>6</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_7</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>7</param-position>
       <param-type>java.lang.Integer</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>Integer_8</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>8</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_9</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>9</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_10</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>10</param-position>
       <param-type>java.lang.Integer</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>Integer_11</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>11</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_12</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <method-param-parts-mapping>
       <param-position>12</param-position>
       <param-type>java.lang.String</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlert</wsdl-message>
       <wsdl-message-part-name>String_13</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>java.lang.Integer</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS="http://com.cc.infrastructure/services">wsdlMsgNS:AlertServiceEndpoint_sendAlertResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       </service-endpoint-interface-mapping>
      </java-wsdl-mapping>
      


      I am pretty certain there is something simple that is misnamed or something but I just cannot see it. I used the following ant command to generate the wsdl and mapping files:

      <project name="AlertService" default="generate-server" basedir=".">
       <path id="compile.classpath">
       <pathelement location="${javamail.jar}"/>
       <pathelement location="${jaf.jar}"/>
       <pathelement location="${jaxp-api.jar}"/>
       <pathelement location="${dom.jar}"/>
       <pathelement location="${sax.jar}"/>
       <pathelement location="${xalan.jar}"/>
       <pathelement location="${xercesImpl.jar}"/>
       <pathelement location="${jaxrpc-api.jar}"/>
       <pathelement location="${jaxrpc-spi.jar}"/>
       <pathelement location="${jaxrpc-impl.jar}"/>
       <pathelement location="${saaj-api.jar}"/>
       <pathelement location="${saaj-impl.jar}"/>
       <pathelement location="${relaxngDatatype.jar}"/>
       <pathelement location="${xsdlib.jar}"/>
       <pathelement location="${jax-qname.jar}"/>
       <pathelement location="${ant.jar}"/>
       <pathelement location="${wscompilecp}"/>
       <pathelement location="${log4j}"/>
       </path>
      
       <target name="generate-server" >
       <antcall target="edit-config">
       <param name="config.rpcenc.file" value="C:/eclipse3/workspace/GMBI-JBoss4.0.2/scripts/AlertService/config.xml"/>
       </antcall>
       <wscompile
       keep="true"
       base="C:/eclipse3/workspace/GMBI-JBoss4.0.2/scripts/AlertService/build/classes"
       server="true"
       features="documentliteral"
       mapping="C:/eclipse3/workspace/GMBI-JBoss4.0.2/scripts/AlertService/build/META-INF/jaxrpc-AlertService.xml"
       xPrintStackTrace="true"
       verbose="false"
       classpath="${compile.classpath}"
       config="${config.rpcenc.file}">
       <classpath>
       <path refid="compile.classpath"/>
       </classpath>
       </wscompile>
       <antcall target="unedit-config">
       <param name="config.rpcenc.file" value="C:/eclipse3/workspace/GMBI-JBoss4.0.2/scripts/AlertService/config.xml"/>
       </antcall>
       </target>
      
      <!--
       @param: config.file - file to be edited
      -->
       <target name="edit-config">
       <replace
       file="${config.rpcenc.file}"
       token='location="'
       value='location="${basedir}/'/>
       </target>
      
      <!--
       @param: config.file - file to be edited
      -->
       <target name="unedit-config">
       <replace
       file="${config.rpcenc.file}"
       token='location="${basedir}/'
       value='location="'/>
       </target>
      </project>
      


      If anyone can point out where I am making my mistake, as I assume it is something I am doing, I would be very grateful.

      Thanks