[JBossWS] - Re: Cannot obtain java type mapping for: {http://org.mazurek
by sandello
What I should do to connect some public webservice in the Internet (like http://www.webservicex.net/WCF/ServiceDetails.aspx?SID=48)?
I create small client method:
| @Test
| public void weather() {
| QName serviceQName = new QName("http://www.webserviceX.NET", "GlobalWeather");
|
| try {
| ServiceFactory factory = ServiceFactory.newInstance();
| assertNotNull(factory);
|
| String endpoint = "http://www.webservicex.net/globalweather.asmx?wsdl";
| URL url = new URL(endpoint);
| assertNotNull(url);
|
| Service service = factory.createService(url, serviceQName);
| assertNotNull(service);
|
| Call call = service.createCall();
|
| QName methodQName = new QName("http://www.webserviceX.NET", "GetWeather");
| call.setOperationName(methodQName);
| assertFalse(call.isParameterAndReturnSpecRequired(methodQName));
|
| call.setTargetEndpointAddress(endpoint);
|
| QName typeName = call.getPortTypeName();
| assertNotNull(typeName);
|
| System.out.println(typeName);
|
| call.invoke(new Object[] {"London", "UK"});
|
|
| } catch (Exception e) {
| e.printStackTrace(); File | Settings | File Templates.
| }
| }
|
When I try to execute this I receive exception:
| org.jboss.ws.WSException: Cannot obtain java type mapping for: {http://www.webserviceX.NET}>GetWeather
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.processDocElement(JAXRPCMetaDataBuilder.java:627)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.buildParameterMetaDataDoc(JAXRPCMetaDataBuilder.java:886)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCMetaDataBuilder.setupOperationsFromWSDL(JAXRPCMetaDataBuilder.java:214)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaDataInternal(JAXRPCClientMetaDataBuilder.java:216)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:133)
| at org.jboss.ws.metadata.builder.jaxrpc.JAXRPCClientMetaDataBuilder.buildMetaData(JAXRPCClientMetaDataBuilder.java:85)
| at org.jboss.ws.core.jaxrpc.client.ServiceImpl.<init>(ServiceImpl.java:111)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:157)
| at org.jboss.ws.core.jaxrpc.client.ServiceFactoryImpl.createService(ServiceFactoryImpl.java:128)
| at com.company.ws.client.TestWS.weather(TestWS.java:131)
| at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
| at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
| at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
| at java.lang.reflect.Method.invoke(Method.java:585)
| at org.junit.internal.runners.TestMethodRunner.executeMethodBody(TestMethodRunner.java:99)
| at org.junit.internal.runners.TestMethodRunner.runUnprotected(TestMethodRunner.java:81)
| at org.junit.internal.runners.BeforeAndAfterRunner.runProtected(BeforeAndAfterRunner.java:34)
| at org.junit.internal.runners.TestMethodRunner.runMethod(TestMethodRunner.java:75)
| at org.junit.internal.runners.TestMethodRunner.run(TestMethodRunner.java:45)
| at org.junit.internal.runners.TestClassMethodsRunner.invokeTestMethod(TestClassMethodsRunner.java:71)
| at org.junit.internal.runners.TestClassMethodsRunner.run(TestClassMethodsRunner.java:35)
| at
|
Where I should get jaxrpc-mapping.xml for this public ws?
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4039148#4039148
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4039148
17 years, 8 months