WLS 10.3.2: JAX-WS build fails when the module has more than one JWS file with Endpoint Interface. (Doc ID 1280645.1)

Last updated on JUNE 09, 2016

Applies to:

Oracle Weblogic Server - Version: 10.3.2 and later   [Release: and later ]
Information in this document applies to any platform.

Symptoms

You will notice that JAX-WS build fails when the module has more than one JWS file with endpoint Interface.

The build process fails when using the "module" element of the "jwsc" ant task with multiple web services. This only seems to occur when the "jws" elements are pointing to web services that uses "endpointinterface" attribute to specify a specific interface.

For example:

package com.bea;
import javax.jws.*;
import javax.xml.ws.BindingType;

@WebService(serviceName = "HelloWorldService",
portName = "HelloWorldPort",
endpointInterface="com.bea.IHelloworld")
@BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
public class HelloWorld implements IHelloworld{
public void hello() {
}
}
=======================================================================================
package com.bea;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.WebEndpoint;


@WebService(name = "HelloWorldServiceInterface")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface IHelloworld {

@WebEndpoint(name = "HelloWorldPort")
public void hello();

}

package com.oracle;
import javax.jws.*;
import javax.xml.ws.BindingType;

@WebService(serviceName = "TestService",
portName = "TestPort",
endpointInterface="com.oracle.ITest")
@BindingType(value = javax.xml.ws.soap.SOAPBinding.SOAP12HTTP_BINDING)
public class Test implements com.oracle.ITest{


public void hello() {
}
}
========================================================================================
package com.oracle;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.xml.ws.WebEndpoint;

@WebService(name = "TestServiceInterface")
@SOAPBinding(style = SOAPBinding.Style.DOCUMENT,
use = SOAPBinding.Use.LITERAL,
parameterStyle = SOAPBinding.ParameterStyle.WRAPPED)
public interface ITest {

@WebEndpoint(name = "TestPort")
public void hello();

}

Sample build.xml:

<jwsc srcdir="src" destdir="output">
<module name="war" contextPath="mycontextRoot" explode="true">
<jws file="com/bea/HelloWorld.java" type="JAXWS" />
<jws file="com/oracle/Test.java" type="JAXWS" />

</module>
</jwsc>

When creating web service, using the above build, the below exception is thrown:

[jwsc] Processing 2 JAX-WS web services...
[jwsc] C:\SunilCases\Orion\3-2546319600(webserviceModule)\src\com\oracle\ITest.java:11: The endpoint interface com.bea.IHelloworld does not match the interface com.oracle.ITest.
[jwsc] public interface ITest {
[jwsc] ^
[jwsc] 1 error

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms