2 Replies Latest reply on Nov 9, 2004 12:54 PM by Phillip Lindsay

    Mapping problems with wscompile generated wsdl+mapping file

    Phillip Lindsay Newbie

      ----error (and j2ee ws files follow)-------------------
      16:29:28,109 ERROR [ServiceDeployer] Cannot startup webservice for: event-ejb-0.1.jar
      org.jboss.deployment.DeploymentException: Cannot deploy webservice; - nested throwable: (RuntimeMBeanException: null Cause: java.lang.IllegalArgumentException: Cannot find package type for: {http://com.foobar.bots.service/types}createEvent)
      at org.jboss.webservice.ServiceDeployer.deployWebservices(ServiceDeployer.java:342)
      at org.jboss.webservice.ServiceDeployerEJB.deployWebservices(ServiceDeployerEJB.java:101)
      at org.jboss.webservice.ServiceDeployer.startWebservice(ServiceDeployer.java:203)
      at org.jboss.webservice.ServiceDeployer.handleNotification(ServiceDeployer.java:113)
      at sun.reflect.GeneratedMethodAccessor3.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.notification.NotificationListenerProxy.invoke(NotificationListenerProxy.java:138)
      at $Proxy20.handleNotification(Unknown Source)
      at javax.management.NotificationBroadcasterSupport.handleNotification(NotificationBroadcasterSupport.java:104)
      at javax.management.NotificationBroadcasterSupport.sendNotification(NotificationBroadcasterSupport.java:87)
      at org.jboss.deployment.SubDeployerSupport.start(SubDeployerSupport.java:178)
      at org.jboss.ejb.EJBDeployer.start(EJBDeployer.java:620)
      at org.jboss.deployment.MainDeployer.start(MainDeployer.java:935)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:746)
      at org.jboss.deployment.MainDeployer.deploy(MainDeployer.java:709)
      at sun.reflect.GeneratedMethodAccessor30.invoke(Unknown Source)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatcher.java:141)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.interceptor.AbstractInterceptor.invoke(AbstractInterceptor.java:119)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.interceptor.ModelMBeanOperationInterceptor.invoke(ModelMBeanOperationInterceptor.java:131)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:74)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.java:242)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.mx.util.MBeanProxyExt.invoke(MBeanProxyExt.java:176)
      at $Proxy8.deploy(Unknown Source)
      at org.jboss.deployment.scanner.URLDeploymentScanner.deploy(URLDeploymentScanner.java:305)
      at org.jboss.deployment.scanner.URLDeploymentScanner.scan(URLDeploymentScanner.java:463)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.doScan(AbstractDeploymentScanner.java:204)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.loop(AbstractDeploymentScanner.java:215)
      at org.jboss.deployment.scanner.AbstractDeploymentScanner$ScannerThread.run(AbstractDeploymentScanner.java:194)
      Caused by: RuntimeMBeanException: null Cause: java.lang.IllegalArgumentException: Cannot find package type for: {http://com.foobar.bots.service/types}createEvent
      at org.jboss.mx.interceptor.ReflectedDispatcher.handleInvocationExceptions(ReflectedDispatcher.java:162)

      -----mapping.xml-----------
      <?xml version="1.0" encoding="UTF-8"?>
      <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>com.foobar.bots.service</package-type>
      http://com.foobar.bots.service/types
      </package-mapping>
      <package-mapping>
      <package-type>com.foobar.bots.service</package-type>
      http://com.foobar.bots.service/wsdl
      </package-mapping>
      <java-xml-type-mapping>
      <java-type>com.foobar.bots.model.Address</java-type>
      <root-type-qname xmlns:typeNS="http://com.foobar.bots.service/types">typeNS:Address</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>city</java-variable-name>
      <xml-element-name>city</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>state</java-variable-name>
      <xml-element-name>state</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>street1</java-variable-name>
      <xml-element-name>street1</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>street2</java-variable-name>
      <xml-element-name>street2</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.foobar.bots.service.EventServiceEndpoint_createEvent_ResponseStruct</java-type>
      <root-type-qname xmlns:typeNS="http://com.foobar.bots.service/types">typeNS:createEventResponse</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.foobar.bots.model.Party</java-type>
      <root-type-qname xmlns:typeNS="http://com.foobar.bots.service/types">typeNS:Party</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>address</java-variable-name>
      <xml-element-name>address</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>code</java-variable-name>
      <xml-element-name>code</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>id</java-variable-name>
      <xml-element-name>id</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.foobar.bots.service.EventServiceEndpoint_createEvent_RequestStruct</java-type>
      <root-type-qname xmlns:typeNS="http://com.foobar.bots.service/types">typeNS:createEvent</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>Event_1</java-variable-name>
      <xml-element-name>Event_1</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <java-xml-type-mapping>
      <java-type>com.foobar.bots.model.Event</java-type>
      <root-type-qname xmlns:typeNS="http://com.foobar.bots.service/types">typeNS:Event</root-type-qname>
      <qname-scope>complexType</qname-scope>
      <variable-mapping>
      <java-variable-name>code</java-variable-name>
      <xml-element-name>code</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>details</java-variable-name>
      <xml-element-name>details</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>endDate</java-variable-name>
      <xml-element-name>endDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>id</java-variable-name>
      <xml-element-name>id</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>name</java-variable-name>
      <xml-element-name>name</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>producer</java-variable-name>
      <xml-element-name>producer</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>startDate</java-variable-name>
      <xml-element-name>startDate</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>title</java-variable-name>
      <xml-element-name>title</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>venue</java-variable-name>
      <xml-element-name>venue</xml-element-name>
      </variable-mapping>
      <variable-mapping>
      <java-variable-name>date</java-variable-name>
      <xml-element-name>date</xml-element-name>
      </variable-mapping>
      </java-xml-type-mapping>
      <service-interface-mapping>
      <service-interface>com.foobar.bots.service.EventService</service-interface>
      <wsdl-service-name xmlns:serviceNS="http://com.foobar.bots.service/wsdl">serviceNS:EventService</wsdl-service-name>
      <port-mapping>
      <port-name>EventServiceEndpointPort</port-name>
      <java-port-name>EventServiceEndpointPort</java-port-name>
      </port-mapping>
      </service-interface-mapping>
      <service-endpoint-interface-mapping>
      <service-endpoint-interface>com.foobar.bots.service.EventServiceEndpoint</service-endpoint-interface>
      <wsdl-port-type xmlns:portTypeNS="http://com.foobar.bots.service/wsdl">portTypeNS:EventServiceEndpoint</wsdl-port-type>
      <wsdl-binding xmlns:bindingNS="http://com.foobar.bots.service/wsdl">bindingNS:EventServiceEndpointBinding</wsdl-binding>
      <service-endpoint-method-mapping>
      <java-method-name>createEvent</java-method-name>
      <wsdl-operation>createEvent</wsdl-operation>
      <wrapped-element/>
      <method-param-parts-mapping>
      <param-position>0</param-position>
      <param-type>com.foobar.bots.model.Event</param-type>
      <wsdl-message-mapping>
      <wsdl-message xmlns:wsdlMsgNS="http://com.foobar.bots.service/wsdl">wsdlMsgNS:EventServiceEndpoint_createEvent</wsdl-message>
      <wsdl-message-part-name>Event_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.foobar.bots.model.Event</method-return-value>
      <wsdl-message xmlns:wsdlMsgNS="http://com.foobar.bots.service/wsdl">wsdlMsgNS:EventServiceEndpoint_createEventResponse</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>

      ---webservices.xml-----------------------------
      <?xml version="1.0" encoding="UTF-8"?>
      <webservices
      xmlns="http://java.sun.com/xml/ns/j2ee"
      xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xmlns:impl="http://com.foobar.bots.service/types"
      xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
      http://www.ibm.com/webservices/xsd/j2ee_web_services_1_1.xsd"
      version="1.1">

      <webservice-description>
      <webservice-description-name>EventService</webservice-description-name>
      <wsdl-file>META-INF/wsdl/EventService.wsdl</wsdl-file>
      <jaxrpc-mapping-file>META-INF/mapping.xml</jaxrpc-mapping-file>
      <port-component>
      <port-component-name>EventServiceEndpointPort</port-component-name>
      <wsdl-port>EventServiceEndpointPort</wsdl-port>
      <service-endpoint-interface>com.foobar.bots.service.EventServiceEndpoint</service-endpoint-interface>
      <service-impl-bean>
      <ejb-link>EventService</ejb-link>
      </service-impl-bean>
      </port-component>
      </webservice-description>

      ------wsdl----------------------------------
      <?xml version="1.0" encoding="UTF-8"?>

      <definitions name="EventService" targetNamespace="http://com.foobar.bots.service/wsdl" xmlns:tns="http://com.foobar.bots.service/wsdl" xmlns="http://schemas.xmlsoap.org/wsdl/" xmlns:ns2="http://com.foobar.bots.service/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">

      <schema targetNamespace="http://com.foobar.bots.service/types" xmlns:tns="http://com.foobar.bots.service/types" xmlns:soap11-enc="http://schemas.xmlsoap.org/soap/encoding/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns="http://www.w3.org/2001/XMLSchema">










































      <soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>

      <soap:operation soapAction=""/>

      <soap:body use="literal"/>

      <soap:body use="literal"/>


      <soap:address location="REPLACE_WITH_ACTUAL_URL"/>
      --------------------------
      <?xml version="1.0" encoding="UTF-8"?>





      ------------------------