Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  package com.arjuna.webservices11.wsba.client;
  
  import  org.jboss.ws.api.addressing.MAPBuilder;
  import  org.jboss.ws.api.addressing.MAP;
  import  org.jboss.ws.api.addressing.MAPBuilderFactory;
  
 import java.util.Map;

Created by IntelliJ IDEA. User: adinn Date: Oct 7, 2007 Time: 3:14:28 PM To change this template use File | Settings | File Templates.
 
 public class WSBAClient
 {
     // TODO -- do we really need a thread local here or can we just use one service?
     
thread local which maintains a per thread participant completion coordinator service instance
 
thread local which maintains a per thread participant completion participant service instance
 
thread local which maintains a per thread coordinator completion coordinator service instance
 
thread local which maintains a per thread coordinator completion participant service instance
 
builder used to construct addressing info for calls
 
     private static MAPBuilder builder = MAPBuilderFactory.getInstance().getBuilderInstance();

    
fetch a participant completion coordinator service unique to the current thread

Returns:
 
     {
         if (.get() == null) {
             //participantCompletionCoordinatorService.set(new BusinessAgreementWithParticipantCompletionCoordinatorService(null, new QName("http://docs.oasis-open.org/ws-tx/wsba/2006/06", "BusinessAgreementWithParticipantCompletionCoordinatorService")));
         }
         return .get();
     }

    
fetch a participant completion participant service unique to the current thread

Returns:
 
     {
         if (.get() == null) {
             //participantCompletionParticipantService.set(new BusinessAgreementWithParticipantCompletionParticipantService(null, new QName("http://docs.oasis-open.org/ws-tx/wsba/2006/06", "BusinessAgreementWithParticipantCompletionParticipantService")));
         }
         return .get();
     }

    
fetch a coordinator completion coordinator service unique to the current thread

Returns:
 
     {
         if (.get() == null) {
             //coordinatorCompletionCoordinatorService.set(new BusinessAgreementWithCoordinatorCompletionCoordinatorService(null, new QName("http://docs.oasis-open.org/ws-tx/wsba/2006/06", "BusinessAgreementWithCoordinatorCompletionCoordinatorService")));
         }
         return .get();
     }

    
fetch a coordinator completion participant service unique to the current thread

Returns:
 
     {
         if (.get() == null) {
             //coordinatorCompletionParticipantService.set(new BusinessAgreementWithCoordinatorCompletionParticipantService(null, new QName("http://docs.oasis-open.org/ws-tx/wsba/2006/06", "BusinessAgreementWithCoordinatorCompletionParticipantService")));
         }
         return .get();
    }
    // get ports where we HAVE an endpoint to create the port from
                                                         String action,
                                                         MAP map)
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configureEndpointPort(bindingProvideractionmap);
        return port;
    }
                                                         String action,
                                                         MAP map)
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configureEndpointPort(bindingProvideractionmap);
        return port;
    }
                                                                             String action,
                                                                             MAP map)
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configureEndpointPort(bindingProvideractionmap);
        return port;
    }
                                                                         String action,
                                                                         MAP map)
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configureEndpointPort(bindingProvideractionmap);
        return port;
    }
    // get ports where we have NO endpoint to create the port from
                                            MAP map)
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configurePort(bindingProvideractionmap);
        return port;
    }
    
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configurePort(bindingProvideractionmap);
        return port;
    }
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configurePort(bindingProvideractionmap);
        return port;
    }
    {
        BindingProvider bindingProvider = (BindingProvider)port;
        configurePort(bindingProvideractionmap);
        return port;
    }
    private static void configureEndpointPort(BindingProvider bindingProviderString action, MAP map)
    {
        /*
         * we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
        List<Handler> customHandlerChain = new ArrayList<Handler>();
		customHandlerChain.add(new WSAddressingClientHandler());
		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
         */
        Map<StringObjectrequestContext = bindingProvider.getRequestContext();
        MAP requestMap = AddressingHelper.outboundMap(requestContext);
        map.setAction(action);
        AddressingHelper.installCallerProperties(maprequestMap);
        AddressingHelper.configureRequestContext(requestContextrequestMap.getTo(), action);
    }
    private static void configurePort(BindingProvider bindingProviderString action, MAP map)
    {
        /*
         * we no longer have to add the JaxWS WSAddressingClientHandler because we can specify the WSAddressing feature
        List<Handler> customHandlerChain = new ArrayList<Handler>();
		customHandlerChain.add(new WSAddressingClientHandler());
		bindingProvider.getBinding().setHandlerChain(customHandlerChain);
         */
        Map<StringObjectrequestContext = bindingProvider.getRequestContext();
        map.setAction(action);
        AddressingHelper.configureRequestContext(requestContextmapmap.getTo(), action);
    }
New to GrepCode? Check out our FAQ X