1 2 Previous Next 23 Replies Latest reply on Feb 14, 2007 3:49 PM by thomas.diesler Go to original post
      • 15. Re: Bug in ServiceDeployerEjb's portURI
        thomas.diesler

        As I said before, you should read the dtd. Here for your convenience

        <!-- Relative path that is appended to the <context-root> element to form fully qualified
        endpoint address for a web service endpoint.
        For backwards compatibility, it may also be the absolute path starting with web context root
        to form fully qualified endpoint address for a web service endpoint. In this case, the port component uri
        must contain at least two token seperated by '/'. The first token is the web context root,
        which must be identical among all port component uris in a given deployment.
        
        
        Used in: port-component
        -->
        <!ELEMENT port-component-uri (#PCDATA) >
        


        • 16. Re: Bug in ServiceDeployerEjb's portURI
          mka

          But what about a good example of a webservice.xml entry that shows more than one ejb endpoint in it? Like the other users, I'm having trouble simply deploying two endpoints. Enough about the issue on whether it's a bug or not, could we just see what the solution is? How do we move forward with getting involved in the pedantic details???

          Thanks in advance..

          • 17. Re: Bug in ServiceDeployerEjb's portURI
            mka

            Here I am sheepishly answering my own question:

            <webservice-description>
             <webservice-description-name>UserService</webservice-description-name>
             <wsdl-file>META-INF/wsdl/UserService.wsdl</wsdl-file>
             <jaxrpc-mapping-file>META-INF/jaxrpc-user-mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>UserPort</port-component-name>
             <wsdl-port>UserSessionEndpointPort</wsdl-port>
             <service-endpoint-interface>
             UserSessionEndpoint
             </service-endpoint-interface>
             <service-impl-bean>
             <ejb-link>UserSessionEJB</ejb-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
             <webservice-description>
             <webservice-description-name>ProcessService</webservice-description-name>
             <wsdl-file>META-INF/wsdl/ProcessService.wsdl</wsdl-file>
             <jaxrpc-mapping-file>META-INF/jaxrpc-process-mapping.xml</jaxrpc-mapping-file>
             <port-component>
             <port-component-name>ProcessPort</port-component-name>
             <wsdl-port>ProcessSessionEndpointPort</wsdl-port>
             <service-endpoint-interface>
             ProcessSessionEndpoint
             </service-endpoint-interface>
             <service-impl-bean>
             <ejb-link>ProcessSessionEJB</ejb-link>
             </service-impl-bean>
             </port-component>
             </webservice-description>
            



            Hope it helps someone...

            • 18. Re: Bug in ServiceDeployerEjb's portURI
              mka

              And the corresponding jboss.xml entry. Note the two part uri value provided which if not provided gives the "porturi error". Thomas' point is that the first part of the uri has to be identical for both uri entries, in the case 'SmartService/':

              <jboss>
               <enterprise-beans>
               <session>
               <ejb-name>ProcessSessionEJB</ejb-name>
               <jndi-name>ProcessSession</jndi-name>
               <local-jndi-name>ProcessSession</local-jndi-name>
               <call-by-value>true</call-by-value>
               <clustered>false</clustered>
               <port-component>
               <port-component-name>ProcessPort</port-component-name>
               <port-component-uri>SmartServices/Process/*</port-component-uri>
               </port-component>
               </session>
               <session>
               <ejb-name>UserSessionEJB</ejb-name>
               <jndi-name>UserSession</jndi-name>
               <port-component>
               <port-component-name>UserPort</port-component-name>
               <port-component-uri>SmartServices/User/*</port-component-uri>
               </port-component>
               </session>
              </jboss>
              


              • 19. Re: Bug in ServiceDeployerEjb's portURI
                thomas.diesler

                Good post, thanks for that.

                • 20. Re: Bug in ServiceDeployerEjb's portURI
                  gigsvoo

                  I doubt why mine identical but still not working?

                  webservices.xml

                  <webservices 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_web_services_1_1\.xsd" version="1.1">
                   <webservice-description>
                   <webservice-description-name>PersistenceService</webservice-description-name>
                   <wsdl-file>META-INF/wsdl/PersistenceService.wsdl</wsdl-file>
                   <jaxrpc-mapping-file>META-INF/mapping-persistence.xml</jaxrpc-mapping-file>
                   <port-component>
                   <port-component-name>PersistencePort</port-component-name>
                   <!--<port-component-name>PersistenceServiceEndpointPort</port-component-name>-->
                   <wsdl-port>PersistenceServiceEndpointPort</wsdl-port>
                   <service-endpoint-interface>gov.mohr.ems.core.entity.logic.PersistenceServiceEndpoint</service-endpoint-interface>
                   <service-impl-bean>
                   <ejb-link>PersistenceEJB</ejb-link>
                   </service-impl-bean>
                   </port-component>
                   </webservice-description>
                   <webservice-description>
                   <webservice-description-name>ORMEngineService</webservice-description-name>
                   <wsdl-file>META-INF/wsdl/ORMEngineService.wsdl</wsdl-file>
                   <jaxrpc-mapping-file>META-INF/mapping-ormengine.xml</jaxrpc-mapping-file>
                   <port-component>
                   <port-component-name>ORMEnginePort</port-component-name>
                   <!--<port-component-name>ORMEngineServiceEndpointPort</port-component-name>-->
                   <wsdl-port>ORMEngineServiceEndpointPort</wsdl-port>
                   <service-endpoint-interface>gov.mohr.ems.core.entity.logic.ORMEngineServiceEndpoint</service-endpoint-interface>
                   <service-impl-bean>
                   <ejb-link>ORMEngineEJB</ejb-link>
                   </service-impl-bean>
                   </port-component>
                   </webservice-description>
                  </webservices>
                  


                  jboss.xml
                  <jboss>
                   <enterprise-beans>
                   <session>
                   <ejb-name>PersistenceEJB</ejb-name>
                   <local-jndi-name>persistenceWebService</local-jndi-name>
                   <port-component>
                   <port-component-name>PersistencePort</port-component-name>
                   <port-component-uri>EMSWebServices/Persistence/*</port-component-uri>
                   </port-component>
                   </session>
                   <session>
                   <ejb-name>ORMEngineEJB</ejb-name>
                   <local-jndi-name>ormengineWebService</local-jndi-name>
                   <port-component>
                   <port-component-name>ORMEnginePort</port-component-name>
                   <port-component-uri>EMSWebServices/ORMEngine/*</port-component-uri>
                   </port-component>
                   </session>
                   </enterprise-beans>
                  </jboss>
                  


                  Error:
                  13:45:38,078 ERROR [ServiceDeployer] Cannot startup webservice for: core.jar
                  java.lang.IllegalArgumentException: Cannot use the same url-pattern with differe
                  nt endpoints, check your <port-component-uri> in jboss.xml
                   at org.jboss.webservice.ServiceDeployerEJB.createWebXML(ServiceDeployerE
                  JB.java:219)
                   at org.jboss.webservice.ServiceDeployerEJB.deployWebservices(ServiceDepl
                  oyerEJB.java:108)
                   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)
                  ...
                  


                  Thanks

                  • 21. Re: Bug in ServiceDeployerEjb's portURI
                    gigsvoo

                    ok my problem solved with the following understanding after i read the posts here 10 times very carefully.

                    1. the jboss.xml must be same path as ejb-jar.xml
                    2. the <port-component-uri> must have 2 slashes "/" patterns

                    • 22. Re: Bug in ServiceDeployerEjb's portURI
                      michele.curioni

                      Can someone tell me why this bug has been rejected?

                      http://jira.jboss.com/jira/browse/JBWS-91

                      In the bug database it says that it's been fixed in jboss-ws4ee-4.0.2, but it also says that the resolution is "Won't Fix".

                      I can confirm that it's still a problem in 4.0.2.

                      I implemented the suggested JBoss solution, but I think it should not be necessary to add more information to jboss.xml, when all it's need is already in webservices.xml

                      Regards,
                      Michele

                      • 23. Re: Bug in ServiceDeployerEjb's portURI
                        thomas.diesler

                        It is the responsibility of the developer to guarantee uniquness of web context + port-uri.

                        Is short with an ejb deployment all ejb endpoints must share the same context root, but must have different port uri's

                        1 2 Previous Next