On Mar 24, 2009, at 4:47 AM, Jean-Louis MONTEIRO wrote:

@WebService(targetNamespace="http://superbiz.org/wsdl"; )
public interface CalculatorWs {
        public int sum(int add1, int add2);
        public int multiply(int mul1, int mul2);
}

with one implementation
@Stateless
@WebService(
       portName = "CalculatorPort",
       serviceName = "CalculatorWsService",
       targetNamespace = "http://superbiz.org/wsdl";,
       endpointInterface = "org.superbiz.calculator.CalculatorWs")
public class CalculatorImpl implements CalculatorWs, CalculatorRemote {
...
}

I would like to publish again this web service with this implementation.
So my ejb-jar.xml defines a new session
       <session>
<ejb-name>CalculatorImplUsernameTokenPlainPassword</ejb- name>

<service-endpoint>org.superbiz.calculator.CalculatorWs</service- endpoint> <ejb-class>org.superbiz.calculator.CalculatorImpl</ejb- class>
       </session>

The new session bean is created and well bound to JNDI. I'm able to use both
with the local ejb interface.
But, I expected to have 2 web services published, but ... not !

After a short investigation, it seems to me it can not work because in the
WsDeployer.java:291 we have
webserviceDescription.getPortComponent().add(portComponent);

Both session beans have the same portComponentName (the
ejbClass.getSimpleName()) so when deploying the second port component, it
replaces the first one.


You're more of a web service expert than I, so I'll just give some input and bounce this back to you. Unless there's a spec requirement to use the simple name for the port-component-name, seems a better default would be the ejb-name which would seem to solve this issue.

What do you think?


-David

Reply via email to