CreateParamsType params )
throws ResourceException,
ResourceContextException,
ResourceUnknownException
{
Resource resource = null;
long currentId = ++m_instances;
SimpleTypeResourceKey aKey =
ResourceKeyFactory.createKey( RESOURCE_ID, SERVICE_NAME + Long.toString( currentId ) );
try
{
//resource = createInstance(aKey);
resource = new BusinessprocesstypeResource( aKey, params );
//The EPRs should be build using "http://schemas.xmlsoap.org/ws/2003/03/addressing" addressing namespace. It introduces spec conflicts
//To work around thes problem the "http://schemas.xmlsoap.org/ws/2004/08/addressing" is used as namespace for addressing
//EndpointReference epr = getEndpointReference(resourceContext.getBaseURL( ) + "/" + getServiceName().getLocalPart() , null, SPEC_NAMESPACE_SET.getAddressingNamespace());
EndpointReference epr =
getEndpointReference( resourceContext.getBaseURL( ) + "/" + getServiceName( ).getLocalPart( ),
aKey,
ExampleConstants.getAddressingNamespace( ) );
( (BusinessprocesstypeResource) resource ).setEndpointReference( epr );
resource.init( );
add( aKey, resource );
}
catch ( Exception e )
{
throw new ResourceException( e );