[jbossws-issues] [JBoss JIRA] Commented: (JBWS-203) NPE in Call.getTypeMapping

Manjunatha HG (JIRA) jira-events at lists.jboss.org
Wed Nov 7 06:29:44 EST 2007


    [ http://jira.jboss.com/jira/browse/JBWS-203?page=comments#action_12386318 ] 
            
Manjunatha HG commented on JBWS-203:
------------------------------------

here the code:Interface:
package com.javasrc.webservices.age;

import java.rmi.Remote;
import java.rmi.RemoteException;

public interface Age extends Remote
{
 public String age( String name, Integer age ) throws RemoteException;
}


Implimentation of of the interface:

package com.javasrc.webservices.age;

public class Age_Imp
{
	 public String age( String name, Integer age )
	 {
		 return name + " is " + age + " years old!";
	 }
}

client program:
package com.javasrc.webservices.age;

import javax.xml.rpc.Service;
import javax.xml.rpc.ServiceFactory;
import com.javasrc.webservices.age.Age;
import javax.xml.namespace.QName;

import java.net.URL;

public class AgeClient
{
  public static void main( String[] args ) throws Exception {
    if( args.length < 3 )
    {
      System.out.println( "Usage: AgeClient urlstr name age" );
      System.exit( 0 );
    }
    String urlstr  = args[ 0 ];
    String argument = args[ 1 ];
    String argument2 = args[ 2 ];

    System.out.println( "Contacting webservice at " + urlstr );

    URL url = new URL(urlstr);

    QName qname = new QName("http://age.webservices.javasrc.com/",
                "AgeService");

    ServiceFactory factory = ServiceFactory.newInstance();
    Service    service = factory.createService( url, qname );

    Age age  = ( Age ) service.getPort( Age.class );

    System.out.println( "age.age(" + argument + ", " + argument2 + ")" );
    System.out.println( "output:" + age.age( argument, new Integer( argument2 ) ) );
  }
}
 

i am getting this error

Contacting webservice at http://ccgtsd8qzxf1s:8080/agews/age?wsdl
log4j:WARN No appenders could be found for logger (org.apache.axis.i18n.ProjectResourceBundle).
log4j:WARN Please initialize the log4j system properly.
age.age(manju, 29)
java.lang.NullPointerException
	at org.apache.axis.client.Call.getTypeMapping(Call.java:2402)
	at org.apache.axis.client.Call.setReturnType(Call.java:1230)
	at org.apache.axis.client.Call.setOperation(Call.java:1412)
	at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:369)
	at $Proxy0.age(Unknown Source)
	at com.javasrc.webservices.age.AgeClient.main(AgeClient.java:35)
Exception in thread "main" 

how to resolve this

> NPE in Call.getTypeMapping
> --------------------------
>
>                 Key: JBWS-203
>                 URL: http://jira.jboss.com/jira/browse/JBWS-203
>             Project: JBoss Web Services
>          Issue Type: Bug
>          Components: jbossws-jaxws
>            Reporter: Thomas Diesler
>         Assigned To: Jason T. Greene
>             Fix For: jboss-ws4ee-4.0.3
>
>
> java.lang.NullPointerException
> at org.apache.axis.client.Call.getTypeMapping(Call.java:2402)
> at org.apache.axis.client.Call.setReturnType(Call.java:1230)
> at org.apache.axis.client.Call.setOperation(Call.java:1412)
> at org.apache.axis.client.AxisClientProxy.invoke(AxisClientProxy.java:369)
> at $Proxy0.getHello(Unknown Source)
> at utils.locator.WSLocator.main(WSLocator.java:64)
> Exception in thread "main"

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbossws-issues mailing list