Hi all,

    I'm currently working on deploying a web service to IBM Websphere( I'm exposing an EJB as a web service ).  I have all of the steps required to generate, package, and enable a web service for Websphere.  When I go to deploy the web service to Websphere I was getting the following error:
[WSWS0022E: In the Web services Deployment Descriptor for module "myws.jar,META-INF/ejb-jar.xml", the portcomponent element number 0 of webservice-description element number 0 is not properly formed.]
This error pointed me to the webservices.xml file.  So I compared my generated ( by XDoclet ) webservices.xml to an example provided by IBM.  The one significant difference between the two was the <wsdl-port> tag.  The IBM sample was defined as follows:
<wsdl-port xmlns:pfx="http://stock.webservices.samples.websphere.ibm.com">pfx:StockQuote</wsdl-port>
My generated webservices.xml file looked like this:
<wsdl-port>MyWebService</wsdl-port>
So played around with this for a while.  What I found was the targetNamespace in the *.wsdl file has a relationship with the wsdl-port qname.  So if the targetNamespace is set to http://interfaces.services.com, then the wsdl-port must use that namespace when defining the wsdl-port.  So I modified my webservices.xml ( by hand ) with the following:
<wsdl-port xmlns:pfx="http://interfaces.services.com">pfx:MyWebService</wsdl-port>
And now the web service deploys successfully in Websphere.  Have I uncovered a bug here?  Or maybe missing functionality within wsee?  Or am I missing something in my XDoclet tags or in my build.xml ( see below for that information ).


XDoclet Tags:
-------------------
 @ejb.bean
    name="MyWebService"
    view-type="service-endpoint"
 @ejb.interface
    generate="service-endpoint"
    service-endpoint-class="com.services.interfaces.MyWebService"
 @wsee.port-component
    name="MyWebService"

Snip from build.xml:
----------------------
      <wseedoclet wsdlFile="wsdl/${wsdl.name}.wsdl"
        wseeSpec="1.1"
        excludedTags="@version,@author,@todo"
        verbose="true"
        destdir="${development}/src/${meta-inf.dir}"
        jaxrpcMappingFile="jaxrpc-mapping.xml"
        force="yes">
       
        <!-- so this should set the targetNamespace in my .wsdl to http://interfaces.services.com -->
         <packageNamespaceMapping packages="com.services.interfaces" namespace="http://interfaces.services.com"/>
        
         <fileset dir="${development}/src">
            <include name="${ws.dir}/*Bean.java"/>
         </fileset>
        
         <wsdl/>
         <jaxrpc-mapping/>
         <deploymentdescriptor
               description="My Web Service"
               displayName="MyWebService"
               name="MyWebService"
               validateXML="true"/>
      </wseedoclet>


Cheers,


Jeff
 


Reply via email to