Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JBWS-4394]:Remove the unused test and resource for wsconsume target … #305

Merged
merged 1 commit into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,7 @@ public interface Messages {

@Message(id = 24002, value = "Failed to invoke %s")
String failedToInvoke(String s);

@Message(id = 24003, value = "Unsupported value '%s' for target, using default value '%s'")
String unsupportedTargetUsingDefault(String target, String defTarget);


@Message(id = 24004, value = "SOAP message could not be sent")
SOAPException soapMessageCouldNotBeSent(@Cause Throwable cause);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -321,56 +321,6 @@ public void testAdditionalCompilerClassPath()
// that is invoked on each test run. See WSConsumeTask.java for more information how this is tested.
}

/**
* Set the target JAX-WS specification target. Defaults to <code>2.0</code>
*/
public void testTarget() throws Exception
{
consumer.setTargetPackage("org.jboss.test.ws.tools.testTarget");
consumer.setGenerateSource(true);
consumer.setTarget("2.2");
consumer.setNoCompile(false);

consumeWSDL();
ClassLoader loader = getArtefactClassLoader();
Class<?> service = loader.loadClass("org.jboss.test.ws.tools.testTarget.TestService");

boolean featureSig = false;
for (Method m : service.getDeclaredMethods())
{
if (m.getName().equals("getEndpointInterfacePort"))
{
for (Class<?> c : m.getParameterTypes())
{
if (c.isArray() && c.getComponentType().equals(WebServiceFeature.class))
{
featureSig = true;
break;
}
}
}
}

assertTrue("JAX-WS 2.1 extensions not generated with 'target=2.1'", featureSig);

Class<?> sei = loader.loadClass("org.jboss.test.ws.tools.testTarget.EndpointInterface");
assertTrue("@XmlSeeAlso expected on SEI (types not referenced by the Port in the wsdl)", sei.isAnnotationPresent(XmlSeeAlso.class));

boolean featureConstructor = false;
for (Constructor<?> c : service.getConstructors())
{
for (Class<?> pt : c.getParameterTypes())
{
if (pt.isArray() && pt.getComponentType().equals(WebServiceFeature.class))
{
featureConstructor = true;
break;
}
}
}
assertTrue("Found JAXWS 2.2 constructor", featureConstructor);
}

/**
* Tests the SOAP 1.2 binding extension
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,15 +185,6 @@ public void testAdditionalCompilerClassPath()
// that is invoked on each test run. See WSConsumeTask.java for more information how this is tested.
}

/**
* Set the target JAX-WS specification target. Defaults to <code>2.0</code>
*/
@Test
@RunAsClient
public void testTarget() throws Exception
{
dispatch("testTarget");
}

/**
* Tests the SOAP 1.2 binding extension
Expand Down
Loading