1

Closed

Bizmock - samples doesnt work

description

We are developing on Biztalk 2009 and Windows 2008 R2 . My intention is to use Bizmock for our Unit testing , since it caters to our existing requirements where-in we make a lot of request / response calls to the services. And like every other real work project , the Services are really not existing and in parallel development mode . So the most best solution is to mock up the service invokation and work isolated in Biztalk. I've downloaded the samples the latest ones and got 2 errors .
  1. The Test didnt run the first time , giving a receive location error at C:\ProgramData\Bizmock . It works the second time interestingly
    Well all good for now
  2. Previously I tried to run the test in Debug mode . I did a direct run of the test and it fails again giving the error
    BizMockReceive: Info: BizMockReceiveEndpoint.BizMockReceiveEndpoint( url:BizMock://PurchaseRequisitionRequest_Port ) called
    BizMockReceive: Info: BizMockReceiveEndpoint.BizMockReceiveEndpoint( url:BizMock://ReceiveLocationDirect ) called
    BizMockReceive: Info: BizMockReceiveEndpoint.BizMockReceiveEndpoint( url:BizMock://PurchaseRequisitionApprovalStatus_Port ) called
    BizMockReceive: Info: BizMockReceiveAdapter.ProcessRequest( uri:bizmock://receivelocationdirect ) called
    BizMockReceive: Error: BizMockReceiveAdapter.ProcessRequest(): Failed to process the BizMock Request!
     
    Could figure out this is happening in the following method .
    private void ProcessRequest(string uri, BizMockMsgContext context, BizMockReceiverEndpoint ep)
    {
        // Create a new message...
        IBaseMessage msg = ConstructMessage(uri, context, ep);
     
        // Submit the message using the StandardReceiveBatchHandler
        SyncReceiveSubmitBatch batch = new SyncReceiveSubmitBatch(transportProxy, terminator, 1);
        try
        {
            batch.SubmitMessage(msg, null);
            batch.Done();
     
            if (!batch.Wait())
            {
                Trace.WriteLine("BizMockReceiveAdapter.ProcessRequest(): Failed to process the BizMock Request!", "BizMockReceive: Error");
                throw new Exception("Failed to process the BizMock Request");
            }
        }
        finally
        {
            batch.Dispose();
        }
    }
     
    Could I please get some help.
     
    Honestly, I'm a bit disappointed that the most simplest sample doesnt work.
     
    thanks,
    Anthstone
Closed Sep 24, 2010 at 3:20 PM by haddock747

comments

haddock747 wrote Sep 24, 2010 at 3:19 PM

try out the latest version of the adapter, i think it solves this issue, that is related we the two other issues

wrote Sep 24, 2010 at 3:20 PM

wrote Feb 13, 2013 at 8:29 PM

wrote May 16, 2013 at 3:27 AM