Class collision between LIME and START on the same JVM

02/01/2012

The new START wsdl 2.0 has introduced an issue that is causing a collision with a LIME server on the same JVM (but possibly on .NET implementation too).

The class org.w3._2009._02.ws_tra.Resource generated for both the LIME and START web services is different because the "create" method has changed.  This reason we have on different JARs the same class with different structure which is a really bad design as the class loader cannot understand which class must be used for LIME or START for using the create method...

This is how the create method appears on the org.w3._2009._02.ws_tra.Resource class for LIME and START:


*** LIME AP ***

@WebMethod(operationName = "Create")
@WebResult(name = "CreateResponse", targetNamespace = "http://www.w3.org/2009/02/ws-tra", partName = "Body")
@Action(input = "http://www.w3.org/2009/02/ws-tra/Create", output = "http://www.w3.org/2009/02/ws-tra/CreateResponse")
public CreateResponse create(
@WebParam(name = "Create", targetNamespace = "http://www.w3.org/2009/02/ws-tra", partName = "Body")
Create body,
@WebParam(name = "MessageIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "MessageIdHeader")
String messageIdHeader,
@WebParam(name = "ChannelIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "ChannelIdHeader")
String channelIdHeader,
@WebParam(name = "RecipientIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "RecipientIdHeader")
ParticipantIdentifierType recipientIdHeader,
@WebParam(name = "SenderIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "SenderIdHeader")
ParticipantIdentifierType senderIdHeader,
@WebParam(name = "DocumentIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "DocumentIdHeader")
DocumentIdentifierType documentIdHeader,
@WebParam(name = "ProcessIdentifier", targetNamespace = "http://busdox.org/transport/identifiers/1.0/", header = true, partName = "ProcessIdHeader")
ProcessIdentifierType processIdHeader);

}

*** START AP ***

@WebMethod(operationName = "Create")
@WebResult(name = "CreateResponse", targetNamespace = "http://www.w3.org/2009/02/ws-tra", partName = "Body")
public CreateResponse create(
@WebParam(name = "Create", targetNamespace = "http://www.w3.org/2009/02/ws-tra", partName = "Body")
Create body)
throws FaultMessage
;
}
----------------------------------------------------

Such difference is not an issue at compile time, but while on runtime this error appears:

java.lang.NoSuchMethodError: org.w3._2009._02.ws_tra.Resource.create(Lorg/w3/_2009/_02/ws_tra/Create;)Lorg/w3/_2009/_02/ws_tra/CreateResponse;

... because there are two different versions of the same class in memory and the class loader cannot retrieve the right one.

If we stay with the same class name "org.w3._2009._02.ws_tra.Resource" we need to align the LIME wsdl to use a create methid like that one in the START wsdl 2.0

 

Component

Code

Category

bug
The content of this field is kept private and will not be shown publicly.