problem with jaxrpc mapping - can't find type ApacheSoap Map
jaybee Oct 18, 2005 7:31 AMI am using jboss 4.0.3 and trying to deploy a WS backed with a stateless session bean. Some methods in the endpoint return arrays of hashtables, which java2wsdl maps as Apache soap map and this seems related to the error I get when deploying (see below). Presumably I need to tell jboss about this type in the mapping.xml - how do I do this?
This is the error I get:
12:23:35,921 WARN [JavaWsdlMapping] Cannot find jaxrpc-mapping for type: {http: //xml.apache.org/xml-soap}Map 12:23:35,921 ERROR [ServiceDeployer] Cannot startup webservice for: bhcc-gazette er-ejb.jar org.jboss.deployment.DeploymentException: Cannot deploy webservice; - nested thr owable: (java.lang.IllegalArgumentException: Cannot find package type for: {http ://xml.apache.org/xml-soap}Map) at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeploye r.java:376) at org.jboss.webservice.ServiceDeployerEJB.deployWebservices(ServiceDepl oyerEJB.java:106) at org.jboss.webservice.ServiceDeployer.startWebservice(ServiceDeployer. java:229) at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeploy er.java:110) at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.notification.NotificationListenerProxy.invoke(Notificati onListenerProxy.java:138) at $Proxy27.handleNotification(Unknown Source) at org.jboss.mx.util.JBossNotificationBroadcasterSupport.handleNotificat ion(JBossNotificationBroadcasterSupport.java:112) at org.jboss.mx.util.JBossNotificationBroadcasterSupport.sendNotificatio n(JBossNotificationBroadcasterSupport.java:95) at org.jboss.deployment.SubDeployerSupport.emitNotification(SubDeployerS upport.java:325) at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java :293) at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:642) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept or.java:118) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM BeanOperationInterceptor.java:127) at org.jboss.mx.interceptor.DynamicInterceptor.invoke(DynamicInterceptor .java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) at $Proxy24.start(Unknown Source) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:979) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753) at sun.reflect.GeneratedMethodAccessor49.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept or.java:118) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM BeanOperationInterceptor.java:127) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) at $Proxy9.deploy(Unknown Source) at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymen tScanner.java:319) at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentS canner.java:507) at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread. doScan(AbstractDeploymentScanner.java:192) at org.jboss.deployment.scanner.AbstractDeploymentScanner.startService(A bstractDeploymentScanner.java:265) at org.jboss.system.ServiceMBeanSupport.jbossInternalStart(ServiceMBeanS upport.java:274) at org.jboss.system.ServiceMBeanSupport.jbossInternalLifecycle(ServiceMB eanSupport.java:230) at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.system.ServiceController$ServiceProxy.invoke(ServiceControl ler.java:943) at $Proxy0.start(Unknown Source) at org.jboss.system.ServiceController.start(ServiceController.java:428) at sun.reflect.GeneratedMethodAccessor9.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) at $Proxy4.start(Unknown Source) at org.jboss.deployment.SARDeployer.start(SARDeployer.java:285) at org.jboss.deployment.MainDeployer.start(MainDeployer.java:989) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:790) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:753) at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:737) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractIntercept or.java:118) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelM BeanOperationInterceptor.java:127) at org.jboss.mx.server.Invocation.invoke(Invocation.java:74) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176) at $Proxy5.deploy(Unknown Source) at org.jboss.system.server.ServerImpl.doStart(ServerImpl.java:453) at org.jboss.system.server.ServerImpl.start(ServerImpl.java:330) at org.jboss.Main.boot(Main.java:187) at org.jboss.Main$1.run(Main.java:438) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalArgumentException: Cannot find package type for: {ht tp://xml.apache.org/xml-soap}Map at org.jboss.webservice.deployment.ServiceDescription.getPackageName(Ser viceDescription.java:939) at org.jboss.webservice.deployment.ServiceDescription.initTypeMappings(S erviceDescription.java:894) at org.jboss.webservice.deployment.ServiceDescription.initServiceDescrip tion(ServiceDescription.java:141) at org.jboss.webservice.deployment.ServiceDescription.<init>(ServiceDesc ription.java:108) at org.jboss.webservice.AxisService.getServiceDescription(AxisService.ja va:533) at org.jboss.webservice.AxisService.deployService(AxisService.java:359) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch er.java:141) at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80) at org.jboss.mx.server.Invocation.invoke(Invocation.java:72) at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker. java:245) at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:644) at org.jboss.mx.util.JMXInvocationHandler.invoke(JMXInvocationHandler.ja va:273) at $Proxy26.deployService(Unknown Source) at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeploye r.java:370) ... 96 more
this is my mapping.xml
<java-wsdl-mapping 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" version="1.1"> <package-mapping> <package-type>uk.gov.brightonhove.ws.gazetteer.ejb</package-type> <namespaceURI>http://ejb.gazetteer.ws.brightonhove.gov.uk</namespaceURI> </package-mapping> <package-mapping> <package-type>uk.gov.brightonhove.ws.gazetteer.pojo</package-type> <namespaceURI>http://pojo.gazetteer.ws.brightonhove.gov.uk</namespaceURI> </package-mapping> </java-wsdl-mapping>
and this is the wsdl generated by java2wsdl:
<?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions targetNamespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:apachesoap="http://xml.apache.org/xml-soap" xmlns:impl="http://ejb.gazetteer.ws.brightonhove.gov.uk" xmlns:intf="http://ejb.gazetteer.ws.brightonhove.gov.uk" xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:wsdlsoap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <wsdl:types> <schema targetNamespace="http://xml.apache.org/xml-soap" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="mapItem"> <sequence> <element name="key" nillable="true" type="xsd:string"/> <element name="value" nillable="true" type="xsd:string"/> </sequence> </complexType> <complexType name="Map"> <sequence> <element maxOccurs="unbounded" minOccurs="0" name="item" type="apachesoap:mapItem"/> </sequence> </complexType> </schema> <schema targetNamespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" xmlns="http://www.w3.org/2001/XMLSchema"> <import namespace="http://schemas.xmlsoap.org/soap/encoding/"/> <complexType name="ArrayOf_apachesoap_Map"> <complexContent> <restriction base="soapenc:Array"> <attribute ref="soapenc:arrayType" wsdl:arrayType="apachesoap:Map[]"/> </restriction> </complexContent> </complexType> </schema> </wsdl:types> <wsdl:message name="doPropertySearchResponse"> <wsdl:part name="doPropertySearchResponse" type="impl:ArrayOf_apachesoap_Map"/> </wsdl:message> <wsdl:message name="getPropertiesForUsrnResponse"> <wsdl:part name="getPropertiesForUsrnResponse" type="impl:ArrayOf_apachesoap_Map"/> </wsdl:message> <wsdl:message name="getPropertiesForUprnResponse"> <wsdl:part name="getPropertiesForUprnResponse" type="impl:ArrayOf_apachesoap_Map"/> </wsdl:message> <wsdl:message name="getPropertyRequest"> <wsdl:part name="in0" type="xsd:string"/> <wsdl:part name="in1" type="xsd:int"/> </wsdl:message> <wsdl:message name="getStreetResponse"> <wsdl:part name="getStreetResponse" type="apachesoap:Map"/> </wsdl:message> <wsdl:message name="getPropertiesForPostcodeResponse"> <wsdl:part name="getPropertiesForPostcodeResponse" type="impl:ArrayOf_apachesoap_Map"/> </wsdl:message> <wsdl:message name="doPropertySearchRequest"> <wsdl:part name="in0" type="xsd:string"/> <wsdl:part name="in1" type="xsd:int"/> <wsdl:part name="in2" type="xsd:int"/> <wsdl:part name="in3" type="xsd:boolean"/> <wsdl:part name="in4" type="xsd:int"/> </wsdl:message> <wsdl:message name="doStreetSearchRequest"> <wsdl:part name="in0" type="xsd:string"/> </wsdl:message> <wsdl:message name="doStreetSearchResponse"> <wsdl:part name="doStreetSearchResponse" type="impl:ArrayOf_apachesoap_Map"/> </wsdl:message> <wsdl:message name="getPropertiesForUprnRequest"> <wsdl:part name="in0" type="xsd:string"/> <wsdl:part name="in1" type="xsd:int"/> <wsdl:part name="in2" type="xsd:int"/> <wsdl:part name="in3" type="xsd:int"/> </wsdl:message> <wsdl:message name="getPropertyResponse"> <wsdl:part name="getPropertyResponse" type="apachesoap:Map"/> </wsdl:message> <wsdl:message name="getPropertiesForUsrnRequest"> <wsdl:part name="in0" type="xsd:int"/> <wsdl:part name="in1" type="xsd:int"/> <wsdl:part name="in2" type="xsd:int"/> <wsdl:part name="in3" type="xsd:int"/> </wsdl:message> <wsdl:message name="getPropertiesForPostcodeRequest"> <wsdl:part name="in0" type="xsd:string"/> <wsdl:part name="in1" type="xsd:int"/> <wsdl:part name="in2" type="xsd:int"/> <wsdl:part name="in3" type="xsd:int"/> </wsdl:message> <wsdl:message name="getStreetRequest"> <wsdl:part name="in0" type="xsd:int"/> </wsdl:message> <wsdl:portType name="GazetteerPortableWSEndPoint"> <wsdl:operation name="doPropertySearch" parameterOrder="in0 in1 in2 in3 in4"> <wsdl:input message="impl:doPropertySearchRequest" name="doPropertySearchRequest"/> <wsdl:output message="impl:doPropertySearchResponse" name="doPropertySearchResponse"/> </wsdl:operation> <wsdl:operation name="getPropertiesForUprn" parameterOrder="in0 in1 in2 in3"> <wsdl:input message="impl:getPropertiesForUprnRequest" name="getPropertiesForUprnRequest"/> <wsdl:output message="impl:getPropertiesForUprnResponse" name="getPropertiesForUprnResponse"/> </wsdl:operation> <wsdl:operation name="getPropertiesForUsrn" parameterOrder="in0 in1 in2 in3"> <wsdl:input message="impl:getPropertiesForUsrnRequest" name="getPropertiesForUsrnRequest"/> <wsdl:output message="impl:getPropertiesForUsrnResponse" name="getPropertiesForUsrnResponse"/> </wsdl:operation> <wsdl:operation name="getPropertiesForPostcode" parameterOrder="in0 in1 in2 in3"> <wsdl:input message="impl:getPropertiesForPostcodeRequest" name="getPropertiesForPostcodeRequest"/> <wsdl:output message="impl:getPropertiesForPostcodeResponse" name="getPropertiesForPostcodeResponse"/> </wsdl:operation> <wsdl:operation name="doStreetSearch" parameterOrder="in0"> <wsdl:input message="impl:doStreetSearchRequest" name="doStreetSearchRequest"/> <wsdl:output message="impl:doStreetSearchResponse" name="doStreetSearchResponse"/> </wsdl:operation> <wsdl:operation name="getStreet" parameterOrder="in0"> <wsdl:input message="impl:getStreetRequest" name="getStreetRequest"/> <wsdl:output message="impl:getStreetResponse" name="getStreetResponse"/> </wsdl:operation> <wsdl:operation name="getProperty" parameterOrder="in0 in1"> <wsdl:input message="impl:getPropertyRequest" name="getPropertyRequest"/> <wsdl:output message="impl:getPropertyResponse" name="getPropertyResponse"/> </wsdl:operation> </wsdl:portType> <wsdl:binding name="GazetteerPortableEndpointSoapBinding" type="impl:GazetteerPortableWSEndPoint"> <wsdlsoap:binding style="rpc" transport="http://schemas.xmlsoap.org/soap/http"/> <wsdl:operation name="doPropertySearch"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="doPropertySearchRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="doPropertySearchResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getPropertiesForUprn"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getPropertiesForUprnRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="getPropertiesForUprnResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getPropertiesForUsrn"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getPropertiesForUsrnRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="getPropertiesForUsrnResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getPropertiesForPostcode"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getPropertiesForPostcodeRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="getPropertiesForPostcodeResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="doStreetSearch"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="doStreetSearchRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="doStreetSearchResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getStreet"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getStreetRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="getStreetResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> <wsdl:operation name="getProperty"> <wsdlsoap:operation soapAction=""/> <wsdl:input name="getPropertyRequest"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:input> <wsdl:output name="getPropertyResponse"> <wsdlsoap:body namespace="http://ejb.gazetteer.ws.brightonhove.gov.uk" use="literal"/> </wsdl:output> </wsdl:operation> </wsdl:binding> <wsdl:service name="GazetteerPortableService"> <wsdl:port binding="impl:GazetteerPortableEndpointSoapBinding" name="GazetteerPortableEndpoint"> <wsdlsoap:address location="http://this.value.is.replaced.by.jboss"/> </wsdl:port> </wsdl:service> </wsdl:definitions>