[jboss-user] [JBossWS] - Cannot obtain java type mapping

gapesteguia do-not-reply at jboss.com
Sat Jul 21 22:38:05 EDT 2007


I want to use the following code in order to inkoke the USZip web service, but I got the exception: 

org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://www.webserviceX.NET}>GetInfoByZIP 

I'm using jboss-4.2.1.GA. Could anyone help me ?.

Thanks



  | public class CallWS {
  | 	String result;
  | 	public String  CallUSZipCode() {
  | 	try
  | 	
  | 	{
  | 	
  | 	URL url = new URL("http://www.webservicex.net/uszip.asmx?wsdl");
  | 	String targetNamespace = "http://www.webserviceX.NET";
  | 	QName serviceName = new QName(targetNamespace, "USZip");
  | 	QName portName = new QName(targetNamespace, "USZipHttpGet");
  | 	QName operationName = new QName(targetNamespace, "getInfoByZip");
  | 
  | 	// create service
  | 	ServiceFactory factory = ServiceFactory.newInstance();
  | 	
  | 	Service service = factory.createService(url, serviceName);
  | 	
  | 	// create call
  | 	Call call = service.createCall(portName, operationName);
  | 	// invoke the remote web service
  | 	result = (String) call.invoke(new Object[] {"75080"});
  | 	//System.out.println(result); 
  | 
  | 	} catch(Exception e){
  | 		System.out.println(e);
  | 		result = e.toString();
  | 	}
  | 
  | 	return (result);
  | }
  | }
  | 

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4066450#4066450

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4066450



More information about the jboss-user mailing list