Benjamin Marwell created CXF-8769:
-------------------------------------

             Summary: inherited static method 'fromString(String)' not 
considered on localTransport
                 Key: CXF-8769
                 URL: https://issues.apache.org/jira/browse/CXF-8769
             Project: CXF
          Issue Type: Bug
          Components: JAX-RS, JAX-WS Runtime
    Affects Versions: 3.5.3
         Environment: Junit 5
cxf local transport
            Reporter: Benjamin Marwell


Hi CXF team!
I tried to use a local transport for testing my services. However, I have a 
path and/or query parameter set to something like this:
{code:java}
@Path("api")
public class HelmResource {

  // body left out for brevity
  @PUT
  @Path("helm/{id}/files")
  public Response putFile(@PathParam("id") HelmId helmId, String entity);

}

// important parts of the parameter class

abstract class AbstractHelmId {

  // watch the return type!
  public static HelmId fromString(String id) {
    return HelmId.of(new UUID(id));
  }
}

@Generated // by immutables.org
public class HelmId {

  private final UUID id;

  // should inherit the fromString(String id) method.

  public static HelmId of(UUID uuid) {
    return new HelmId(uuid);
  }
}
{code}
This works perfectly fine on Open Liberty (which uses CXF), but it does not 
when using CXF in local test mode. I wrote a Junit5 extension based on your 
wiki: 
[https://cwiki.apache.org/confluence/display/CXF20DOC/JAXRS+Testing#JAXRSTesting-LocalTransport]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to