3 Replies Latest reply on Feb 22, 2007 4:43 PM by joshlam

    NoSuchMethodError on TypeBinding.setBeforeMarshallingCallbac

    joshlam Newbie

      Hi,

      I have created a web service using jbossws and hosted on jboss-4.0.5.GA on WinXP and with the wstool generated the client artifacts. No problem invoking the web service using SOAPUI tool. But when I tried to execute the client code, upon call

      Service service = serviceFactory.createService(wsdlURL, SERVICE_NAME, jaxrpcURL); (pls see the client code below)

      The following exception was thrown:

      java.lang.NoSuchMethodError: org.jboss.xb.binding.sunday.unmarshalling.TypeBinding.setBeforeMarshallingCallback(Lorg/jboss/xb/binding/sunday/marshalling/TermBeforeMarshallingCallback;)V
       at org.jboss.ws.xop.JBossXBContentAdapter.register(JBossXBContentAdapter.java:210)
       at org.jboss.ws.jbossxb.SchemaBindingBuilder.buildSchemaBinding(SchemaBindingBuilder.java:85)
       at org.jboss.ws.metadata.ServiceMetaData.getSchemaBinding(ServiceMetaData.java:343)
       at org.jboss.ws.metadata.ServiceMetaData.eagerInitialize(ServiceMetaData.java:442)
       at org.jboss.ws.metadata.UnifiedMetaData.eagerInitialize(UnifiedMetaData.java:183)
       at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:132)
       at org.jboss.ws.deployment.JSR109ClientMetaDataBuilder.buildMetaData(JSR109ClientMetaDataBuilder.java:85)
       at org.jboss.ws.jaxrpc.ServiceImpl.<init>(ServiceImpl.java:96)
       at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:158)
       at org.jboss.ws.jaxrpc.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:143)
       at com.intuit.sds.prs.webservices.std.client.StdClientTest.testWebservice(StdClientTest.java:40)
       at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
       at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
       at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
       at java.lang.reflect.Method.invoke(Unknown Source)
       at junit.framework.TestCase.runTest(TestCase.java:154)
       at junit.framework.TestCase.runBare(TestCase.java:127)
       at junit.framework.TestResult$1.protect(TestResult.java:106)
       at junit.framework.TestResult.runProtected(TestResult.java:124)
       at junit.framework.TestResult.run(TestResult.java:109)
       at junit.framework.TestCase.run(TestCase.java:118)
       at junit.framework.TestSuite.runTest(TestSuite.java:208)
       at junit.framework.TestSuite.run(TestSuite.java:203)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
       at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
      


      Here is my client code (in the form of a junit test)
      package com.intuit.sds.prs.webservices.std.client;
      
      import java.io.File;
      import java.net.MalformedURLException;
      import java.net.URL;
      import java.rmi.RemoteException;
      
      import javax.xml.namespace.QName;
      import javax.xml.rpc.Call;
      import javax.xml.rpc.Service;
      import javax.xml.rpc.ServiceException;
      
      import org.apache.log4j.xml.DOMConfigurator;
      import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
      
      import com.intuit.sds.prs.webservices.AddressContactMethod;
      import com.intuit.sds.prs.webservices.StandardizeAddressResponse;
      
      import junit.framework.TestCase;
      
      public class StdClientTest extends TestCase
      {
       private static final String WSDL_LOCATION = "http://localhost:8080/StdWebserviceImpl-2/StandardizeAddressSLSBEndPoint?wsdl";
       private static String NAMESPACE = "http://com.intuit.sds.prs/webservices";
       private static final QName SERVICE_NAME = new QName(NAMESPACE, "StandardizeAddressWebService");
      
       public void testWebservice()
       {
       System.setProperty("javax.xml.rpc.ServiceFactory", "org.jboss.webservice.client.ServiceFactoryImpl");
       DOMConfigurator.configure("./src/log4j.xml");
      
       AddressContactMethod addr = new AddressContactMethod();
       try
       {
       URL wsdlURL = new URL(WSDL_LOCATION);
       URL jaxrpcURL = null;
       jaxrpcURL = new File("src/jaxrpc-mapping.xml").toURL();
      
       ServiceFactoryImpl serviceFactory = new ServiceFactoryImpl();
       Service service = serviceFactory.createService(wsdlURL, SERVICE_NAME, jaxrpcURL);
       Call call = service.createCall();
      
       QName operationName = new QName(NAMESPACE, "standardizeAddress");
       call.setOperationName(operationName);
      
       //Test the call
       StandardizeAddressResponse ctr = (StandardizeAddressResponse) call.invoke(new Object[]{addr});
       AddressContactMethod rAddr = ctr.getResult();
       System.out.println("Addr1: " + rAddr.getAddr1());
       }
       catch (Exception e)
       {
       // TODO Auto-generated catch block
       e.printStackTrace();
       }
       }
      }
      


      Here the following is the wsdl and the jaxrpc-mapping.xml respectively
      <definitions name="StandardizeAddressWebService" targetNamespace="http://com.intuit.sds.prs/webservices" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns1="http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://com.intuit.sds.prs/webservices" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
       <types>
       <schema elementFormDefault="qualified" targetNamespace="http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns1="http://com.intuit.sds.prs/webservices" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <import namespace="http://com.intuit.sds.prs/webservices" />
       <complexType name="AddressContactMethod">
       <sequence>
       <element name="addr1" nillable="true" type="string" />
       <element name="addr2" nillable="true" type="string" />
       <element name="city" nillable="true" type="string" />
       <element name="countryCode" nillable="true" type="string" />
       <element name="postalCode" nillable="true" type="string" />
       <element name="postalCodeExt" nillable="true" type="string" />
       <element name="stateProvince" nillable="true" type="string" />
       </sequence>
       </complexType>
       <complexType name="IndividualName">
       <sequence>
       <element name="firstName" nillable="true" type="string" />
       <element name="lastName" nillable="true" type="string" />
       </sequence>
       </complexType>
       </schema>
       <schema elementFormDefault="qualified" targetNamespace="http://com.intuit.sds.prs/webservices" xmlns="http://www.w3.org/2001/XMLSchema" xmlns:ns2="http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:tns="http://com.intuit.sds.prs/webservices" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
       <import namespace="http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws" />
       <complexType name="standardizeAddress">
       <sequence>
       <element name="AddressContactMethod_1" nillable="true" type="ns2:AddressContactMethod" />
       </sequence>
       </complexType>
       <complexType name="standardizeAddressResponse">
       <sequence>
       <element name="result" nillable="true" type="ns2:AddressContactMethod" />
       </sequence>
       </complexType>
       <complexType name="standardizeName">
       <sequence>
       <element name="IndividualName_1" nillable="true" type="ns2:IndividualName" />
       </sequence>
       </complexType>
       <complexType name="standardizeNameResponse">
       <sequence>
       <element name="result" nillable="true" type="ns2:IndividualName" />
       </sequence>
       </complexType>
       <element name="standardizeAddress" type="tns:standardizeAddress" />
       <element name="standardizeAddressResponse" type="tns:standardizeAddressResponse" />
       <element name="standardizeName" type="tns:standardizeName" />
       <element name="standardizeNameResponse" type="tns:standardizeNameResponse" />
       </schema>
       </types>
       <message name="EndpointInterface_standardizeName">
       <part element="tns:standardizeName" name="parameters" />
       </message>
       <message name="EndpointInterface_standardizeNameResponse">
       <part element="tns:standardizeNameResponse" name="result" />
       </message>
       <message name="EndpointInterface_standardizeAddressResponse">
       <part element="tns:standardizeAddressResponse" name="result" />
       </message>
       <message name="EndpointInterface_standardizeAddress">
       <part element="tns:standardizeAddress" name="parameters" />
       </message>
       <portType name="EndpointInterface">
       <operation name="standardizeAddress">
       <input message="tns:EndpointInterface_standardizeAddress" />
       <output message="tns:EndpointInterface_standardizeAddressResponse" />
       </operation>
       <operation name="standardizeName">
       <input message="tns:EndpointInterface_standardizeName" />
       <output message="tns:EndpointInterface_standardizeNameResponse" />
       </operation>
       </portType>
       <binding name="EndpointInterfaceBinding" type="tns:EndpointInterface">
       <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
       <operation name="standardizeAddress">
       <soap:operation soapAction="" />
       <input>
       <soap:body use="literal" />
       </input>
       <output>
       <soap:body use="literal" />
       </output>
       </operation>
       <operation name="standardizeName">
       <soap:operation soapAction="" />
       <input>
       <soap:body use="literal" />
       </input>
       <output>
       <soap:body use="literal" />
       </output>
       </operation>
       </binding>
       <service name="StandardizeAddressWebService">
       <port binding="tns:EndpointInterfaceBinding" name="EndpointInterfacePort">
       <soap:address location="http://SDGL04301034:8080/StdWebserviceImpl-2/StandardizeAddressSLSBEndPoint" />
       </port>
       </service>
      </definitions>
      


      <?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.intuit.sds.prs.webservices</package-type>
       <namespaceURI>http://com.intuit.sds.prs/webservices</namespaceURI>
       </package-mapping>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.StandardizeAddress</java-type>
       <root-type-qname xmlns:typeNS='http://com.intuit.sds.prs/webservices'>typeNS:standardizeAddress</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>addressContactMethod_1</java-variable-name>
       <xml-element-name>AddressContactMethod_1</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.AddressContactMethod</java-type>
       <root-type-qname xmlns:typeNS='http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws'>typeNS:AddressContactMethod</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>addr1</java-variable-name>
       <xml-element-name>addr1</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>addr2</java-variable-name>
       <xml-element-name>addr2</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>city</java-variable-name>
       <xml-element-name>city</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>countryCode</java-variable-name>
       <xml-element-name>countryCode</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>postalCode</java-variable-name>
       <xml-element-name>postalCode</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>postalCodeExt</java-variable-name>
       <xml-element-name>postalCodeExt</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>stateProvince</java-variable-name>
       <xml-element-name>stateProvince</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.StandardizeAddressResponse</java-type>
       <root-type-qname xmlns:typeNS='http://com.intuit.sds.prs/webservices'>typeNS:standardizeAddressResponse</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>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.StandardizeName</java-type>
       <root-type-qname xmlns:typeNS='http://com.intuit.sds.prs/webservices'>typeNS:standardizeName</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>individualName_1</java-variable-name>
       <xml-element-name>IndividualName_1</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.IndividualName</java-type>
       <root-type-qname xmlns:typeNS='http://objects.interfaces.ws.standardization.prs.sds.intuit.com/jaws'>typeNS:IndividualName</root-type-qname>
       <qname-scope>complexType</qname-scope>
       <variable-mapping>
       <java-variable-name>firstName</java-variable-name>
       <xml-element-name>firstName</xml-element-name>
       </variable-mapping>
       <variable-mapping>
       <java-variable-name>lastName</java-variable-name>
       <xml-element-name>lastName</xml-element-name>
       </variable-mapping>
       </java-xml-type-mapping>
       <java-xml-type-mapping>
       <java-type>com.intuit.sds.prs.webservices.StandardizeNameResponse</java-type>
       <root-type-qname xmlns:typeNS='http://com.intuit.sds.prs/webservices'>typeNS:standardizeNameResponse</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.intuit.sds.prs.webservices.StandardizeAddressWebService</service-interface>
       <wsdl-service-name xmlns:serviceNS='http://com.intuit.sds.prs/webservices'>serviceNS:StandardizeAddressWebService</wsdl-service-name>
       <port-mapping>
       <port-name>EndpointInterfacePort</port-name>
       <java-port-name>EndpointInterfacePort</java-port-name>
       </port-mapping>
       </service-interface-mapping>
       <service-endpoint-interface-mapping>
       <service-endpoint-interface>com.intuit.sds.prs.webservices.EndpointInterface</service-endpoint-interface>
       <wsdl-port-type xmlns:portTypeNS='http://com.intuit.sds.prs/webservices'>portTypeNS:EndpointInterface</wsdl-port-type>
       <wsdl-binding xmlns:bindingNS='http://com.intuit.sds.prs/webservices'>bindingNS:EndpointInterfaceBinding</wsdl-binding>
       <service-endpoint-method-mapping>
       <java-method-name>standardizeAddress</java-method-name>
       <wsdl-operation>standardizeAddress</wsdl-operation>
       <wrapped-element/>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>com.intuit.sds.prs.webservices.AddressContactMethod</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://com.intuit.sds.prs/webservices'>wsdlMsgNS:EndpointInterface_standardizeAddress</wsdl-message>
       <wsdl-message-part-name>AddressContactMethod_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>com.intuit.sds.prs.webservices.AddressContactMethod</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='http://com.intuit.sds.prs/webservices'>wsdlMsgNS:EndpointInterface_standardizeAddressResponse</wsdl-message>
       <wsdl-message-part-name>result</wsdl-message-part-name>
       </wsdl-return-value-mapping>
       </service-endpoint-method-mapping>
       <service-endpoint-method-mapping>
       <java-method-name>standardizeName</java-method-name>
       <wsdl-operation>standardizeName</wsdl-operation>
       <wrapped-element/>
       <method-param-parts-mapping>
       <param-position>0</param-position>
       <param-type>com.intuit.sds.prs.webservices.IndividualName</param-type>
       <wsdl-message-mapping>
       <wsdl-message xmlns:wsdlMsgNS='http://com.intuit.sds.prs/webservices'>wsdlMsgNS:EndpointInterface_standardizeName</wsdl-message>
       <wsdl-message-part-name>IndividualName_1</wsdl-message-part-name>
       <parameter-mode>IN</parameter-mode>
       </wsdl-message-mapping>
       </method-param-parts-mapping>
       <wsdl-return-value-mapping>
       <method-return-value>com.intuit.sds.prs.webservices.IndividualName</method-return-value>
       <wsdl-message xmlns:wsdlMsgNS='http://com.intuit.sds.prs/webservices'>wsdlMsgNS:EndpointInterface_standardizeNameResponse</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>


      The why I got this is to use wstool in an ant script:
      <wstool config="./config.xml" dest="${gensrc.dir}">
       <classpath>
       <path refid="compile.classpath" />
       </classpath>
      </wstool>


      The config.xml used is:
      <?xml version="1.0" encoding="UTF-8"?>
      
      <!--
       wstools -config wstools-config.xml
      -->
      
      <configuration xmlns="http://www.jboss.org/jbossws-tools"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.jboss.org/jbossws-tools http://www.jboss.org/jbossws-tools/schema/jbossws-tool_1_0.xsd">
      
      
       <wsdl-java location="src/main/resources/TestService.wsdl">
       <mapping file="../resources/META-INF/jaxrpc-mapping.xml" />
       </wsdl-java>
      
      </configuration>


      Would greatly appreciate any help on this.

      Thanks.

      --
      Josh

        • 1. Re: NoSuchMethodError on TypeBinding.setBeforeMarshallingCal
          Heiko Braun Master

          It looks like you have a wrong jboss-xml-binding.jar in the client classpath. Check the jbossws instructions and make sure you use the right one. It might as well be, that you mix two version of that jar. It's aswell bundled with jboss-all-client.jar

          • 2. Re: NoSuchMethodError on TypeBinding.setBeforeMarshallingCal
            joshlam Newbie

            Thanks Heiko! You are right, somehow there was an 'extra' jboss-xml-binding.jar.

            Now I ran into another problem while executing the code when I call call.invoke(new Object[]{stdAddr});.

            java.rmi.RemoteException: Call invocation failed; nested exception is:
             java.lang.IllegalArgumentException: argument type mismatch
             at org.jboss.ws.common.CommonClient.invoke(CommonClient.java:335)
             at org.jboss.ws.jaxrpc.CallImpl.invokeInternal(CallImpl.java:560)
             at org.jboss.ws.jaxrpc.CallImpl.invoke(CallImpl.java:345)
             at com.intuit.sds.prs.webservices.std.client.StdClientTest.testWebservice(StdClientTest.java:51)
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
             at java.lang.reflect.Method.invoke(Unknown Source)
             at junit.framework.TestCase.runTest(TestCase.java:154)
             at junit.framework.TestCase.runBare(TestCase.java:127)
             at junit.framework.TestResult$1.protect(TestResult.java:106)
             at junit.framework.TestResult.runProtected(TestResult.java:124)
             at junit.framework.TestResult.run(TestResult.java:109)
             at junit.framework.TestCase.run(TestCase.java:118)
             at junit.framework.TestSuite.runTest(TestSuite.java:208)
             at junit.framework.TestSuite.run(TestSuite.java:203)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344)
             at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
            Caused by: java.lang.IllegalArgumentException: argument type mismatch
             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
             at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
             at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
             at java.lang.reflect.Method.invoke(Unknown Source)
             at org.jboss.ws.jaxrpc.ParameterWrapping.wrapRequestParameters(ParameterWrapping.java:240)
             at org.jboss.ws.binding.EndpointInvocation.initInputParams(EndpointInvocation.java:249)
             at org.jboss.ws.common.CommonClient.invoke(CommonClient.java:243)
             ... 18 more


            Here is my client test program again (with a little change from before)
            package com.intuit.sds.prs.webservices.std.client;
            
            import java.io.File;
            import java.net.MalformedURLException;
            import java.net.URL;
            import java.rmi.RemoteException;
            
            import javax.xml.namespace.QName;
            import javax.xml.rpc.Call;
            import javax.xml.rpc.Service;
            import javax.xml.rpc.ServiceException;
            
            
            import org.jboss.ws.jaxrpc.ServiceFactoryImpl;
            
            import com.intuit.sds.prs.webservices.AddressContactMethod;
            import com.intuit.sds.prs.webservices.StandardizeAddress;
            import com.intuit.sds.prs.webservices.StandardizeAddressResponse;
            
            import junit.framework.TestCase;
            
            public class StdClientTest extends TestCase
            {
             private static final String WSDL_LOCATION = "http://localhost:8080/StdWebserviceImpl-2/StandardizeAddressSLSBEndPoint?wsdl";
             private static String NAMESPACE = "http://com.intuit.sds.prs/webservices";
             private static final QName SERVICE_NAME = new QName(NAMESPACE, "StandardizeAddressWebService");
            
             public void testWebservice()
             {
             System.setProperty("javax.xml.rpc.ServiceFactory", "org.jboss.webservice.client.ServiceFactoryImpl");
             AddressContactMethod addr = new AddressContactMethod();
             StandardizeAddress stdAddr = new StandardizeAddress();
             stdAddr.setAddressContactMethod_1(addr);
            
             try
             {
             URL wsdlURL = new URL(WSDL_LOCATION);
             URL jaxrpcURL = null;
             jaxrpcURL = new File("src/jaxrpc-mapping.xml").toURL();
            
             ServiceFactoryImpl serviceFactory = new ServiceFactoryImpl();
             Service service = serviceFactory.createService(wsdlURL, SERVICE_NAME, jaxrpcURL);
             Call call = service.createCall();
            
             QName operationName = new QName(NAMESPACE, "standardizeAddress");
             call.setOperationName(operationName);
            
             //Test the call
             StandardizeAddressResponse ctr = (StandardizeAddressResponse) call.invoke(new Object[]{stdAddr});
             AddressContactMethod rAddr = ctr.getResult();
             System.out.println("Addr1: " + rAddr.getAddr1());
             }
             catch (Exception e){e.printStackTrace();}
             }
            }


            My original SEI is:
            package com.intuit.sds.prs.standardization.ws.interfaces.slsb;
            
            import javax.ejb.Remote;
            import javax.ejb.Stateless;
            import javax.jws.WebMethod;
            import javax.jws.WebResult;
            import javax.jws.WebService;
            import javax.jws.soap.SOAPBinding;
            
            import org.jboss.annotation.ejb.LocalBinding;
            import org.jboss.annotation.ejb.Management;
            import org.jboss.annotation.ejb.RemoteBinding;
            import org.jboss.annotation.ejb.Service;
            
            
            import com.intuit.sds.prs.standardization.ws.interfaces.IStandardizeAddressEndPoint;
            import com.intuit.sds.prs.standardization.ws.interfaces.objects.AddressContactMethod;
            import com.intuit.sds.prs.standardization.ws.interfaces.objects.IndividualName;
            
            @WebService(name = "EndpointInterface",
             serviceName="StandardizeAddressWebService",
             targetNamespace="http://com.intuit.sds.prs/webservices")
            
            @SOAPBinding(style=SOAPBinding.Style.DOCUMENT)
            
            @Stateless
            @Remote(IStandardizeAddressEndPoint.class)
            @RemoteBinding(jndiBinding="/ejb3/EJB3EndpointInterface")
            
            
            public class StandardizeAddressSLSBEndPoint implements
             IStandardizeAddressEndPoint
            {
            
            
             public StandardizeAddressSLSBEndPoint()
             {
             super();
             // TODO Auto-generated constructor stub
             }
            
             @WebMethod
             public AddressContactMethod standardizeAddress(AddressContactMethod addr)
             {
             // TODO Auto-generated method stub
             AddressContactMethod addrCM = new AddressContactMethod();
             addrCM.setAddr1("123 MAIN ST");
             addrCM.setAddr2("");
             addrCM.setCity("SAN DIEGO");
             addrCM.setCountryCode("US");
             addrCM.setPostalCode("92122");
             addrCM.setPostalCodeExt("1234");
             addrCM.setStateProvince("CA");
             return addrCM;
             }
            
             @WebMethod
             public IndividualName standardizeName(IndividualName aname)
             {
             IndividualName name = new IndividualName();
             name.setFirstName("SpongeBob");
             name.setLastName("Squarepants");
             return name;
             }
            }
            


            and the client artifacts are:
            ------- EndpointInterface.java --------
            
            package com.intuit.sds.prs.webservices;
            public interface EndpointInterface extends java.rmi.Remote
            {
            
             public com.intuit.sds.prs.webservices.AddressContactMethod standardizeAddress(com.intuit.sds.prs.webservices.AddressContactMethod addressContactMethod_1) throws java.rmi.RemoteException;
             public com.intuit.sds.prs.webservices.IndividualName standardizeName(com.intuit.sds.prs.webservices.IndividualName individualName_1) throws java.rmi.RemoteException;
            }
            
             --------- StandardizeAddressWebService.java -------
            
            package com.intuit.sds.prs.webservices;
            import javax.xml.rpc.*;
            
            public interface StandardizeAddressWebService extends javax.xml.rpc.Service
            {
            
             public com.intuit.sds.prs.webservices.EndpointInterface getEndpointInterfacePort() throws ServiceException;
            
            }
            
             ------- StandardizeAddress ------
            
            
            package com.intuit.sds.prs.webservices;
            
            
            public class StandardizeAddress
            {
            
            protected com.intuit.sds.prs.webservices.AddressContactMethod addressContactMethod_1;
            public StandardizeAddress(){}
            
            public StandardizeAddress(com.intuit.sds.prs.webservices.AddressContactMethod addressContactMethod_1){
            this.addressContactMethod_1=addressContactMethod_1;
            }
            public com.intuit.sds.prs.webservices.AddressContactMethod getAddressContactMethod_1() { return addressContactMethod_1 ;}
            
            public void setAddressContactMethod_1(com.intuit.sds.prs.webservices.AddressContactMethod addressContactMethod_1){ this.addressContactMethod_1=addressContactMethod_1; }
            
            }
            
             ------- StandardizeAddressResponse ------
            
            package com.intuit.sds.prs.webservices;
            
            
            public class StandardizeAddressResponse
            {
            
            protected com.intuit.sds.prs.webservices.AddressContactMethod result;
            public StandardizeAddressResponse(){}
            
            public StandardizeAddressResponse(com.intuit.sds.prs.webservices.AddressContactMethod result){
            this.result=result;
            }
            public com.intuit.sds.prs.webservices.AddressContactMethod getResult() { return result ;}
            
            public void setResult(com.intuit.sds.prs.webservices.AddressContactMethod result){ this.result=result; }
            
            }
            
             ------- AddressContactMethod -----
            
            package com.intuit.sds.prs.webservices;
            
            
            public class AddressContactMethod
            {
            
            protected java.lang.String addr1;
            
            protected java.lang.String addr2;
            
            protected java.lang.String city;
            
            protected java.lang.String countryCode;
            
            protected java.lang.String postalCode;
            
            protected java.lang.String postalCodeExt;
            
            protected java.lang.String stateProvince;
            public AddressContactMethod(){}
            
            public AddressContactMethod(java.lang.String addr1, java.lang.String addr2, java.lang.String city, java.lang.String countryCode, java.lang.String postalCode, java.lang.String postalCodeExt, java.lang.String stateProvince){
            this.addr1=addr1;
            this.addr2=addr2;
            this.city=city;
            this.countryCode=countryCode;
            this.postalCode=postalCode;
            this.postalCodeExt=postalCodeExt;
            this.stateProvince=stateProvince;
            }
            public java.lang.String getAddr1() { return addr1 ;}
            
            public void setAddr1(java.lang.String addr1){ this.addr1=addr1; }
            
            public java.lang.String getAddr2() { return addr2 ;}
            
            public void setAddr2(java.lang.String addr2){ this.addr2=addr2; }
            
            public java.lang.String getCity() { return city ;}
            
            public void setCity(java.lang.String city){ this.city=city; }
            
            public java.lang.String getCountryCode() { return countryCode ;}
            
            public void setCountryCode(java.lang.String countryCode){ this.countryCode=countryCode; }
            
            public java.lang.String getPostalCode() { return postalCode ;}
            
            public void setPostalCode(java.lang.String postalCode){ this.postalCode=postalCode; }
            
            public java.lang.String getPostalCodeExt() { return postalCodeExt ;}
            
            public void setPostalCodeExt(java.lang.String postalCodeExt){ this.postalCodeExt=postalCodeExt; }
            
            public java.lang.String getStateProvince() { return stateProvince ;}
            
            public void setStateProvince(java.lang.String stateProvince){ this.stateProvince=stateProvince; }
            
            }


            Note I did not include the following artifacts: StandardizeName.java, StandardizeNameResponse.java and IndividualName.java as I am not calling those. These are all the artifacts generated by wsdl. The mapping files and wsdl are as in the earlier post.

            Would appreciate any help again. I am really close to completing this. Thanks.

            --
            Josh

            • 3. Re: NoSuchMethodError on TypeBinding.setBeforeMarshallingCal
              joshlam Newbie

              My mistake. I solved the problem, I really should use:

              AddressContactMethod a = (AddressContactMethod)call.invoke(new Object[]{addr});


              instead of
              StandardizeAddressResponse ctr = (StandardizeAddressResponse) call.invoke(new Object[]{stdAddr})


              Sorry about that, I am still learning ...