Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4255382
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T05:12:42+00:00 2026-05-21T05:12:42+00:00

I am working on a WCF – WSIT (Metro) integration project and I would

  • 0

I am working on a WCF – WSIT (Metro) integration project and I would like to allow Java clients to connect to Durable Services.

Durable Services
http://msdn.microsoft.com/en-us/library/bb410767(v=vs.90).aspx

Durable services require wsHttpContextBinding, which seems to be working fine. The only issues is that the WSIT client generated proxy doesn’t seem to be able to assign a instanceId to the soap envelope. Is there a config setting I am not aware of or maybe a way to intercept the outgoing messages and append the instanceId?

The following SOAP example is generated by a .NET client. The only difference between the envelop WSIT send and this one is that the Context node is missing from the WSIT one:

      <s:Envelope xmlns:s="http://www.w3.org/2003/05/soap-envelope" xmlns:r="http://schemas.xmlsoap.org/ws/2005/02/rm" xmlns:a="http://www.w3.org/2005/08/addressing">
        <s:Header> 
...
          <Context xmlns="http://schemas.microsoft.com/ws/2006/05/context">
            <Property name="instanceId">{I want to set this Id}</Property>
          </Context>
...
        </s:Header>
        <s:Body>
          <IncreaseCounter xmlns="http://tempuri.org/"/>
        </s:Body>
      </s:Envelope>

I hope it makes sense. The question is not ws2007HttpBinding or wsHttpBinding related or WCF instance management related like; per/call, session, single. I need help with the WSIT, Java bit only.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-21T05:12:43+00:00Added an answer on May 21, 2026 at 5:12 am

    A colleague of mine who is working on the Java end of the project helped to figure out the syntax. I share the solution because it could be useful for others. The significance of this post is that neither the WSIT documentation neglects to mention that durable WCF services can be used with Java clients. Durable WCF is essential if you need to write a java client which can participate in long running workflows or a client of a hosted Windows Workflow (WF).

    The following Java code returns the relevant header:

    private static Header getContextHeader(IDemoService port) {
        Header contextHeader = null;
    
        Iterator<Header> iterator = ((WSBindingProvider)port).getInboundHeaders().iterator();
    
        while(iterator. hasNext()){        
            Header header = iterator.next();
    
            if (header.getLocalPart().equalsIgnoreCase("Context")) {
                contextHeader = header;
            }
    
        }
    
        return contextHeader;
    }
    

    Then you can set the Context like this:

    Header contextHeader = getContextHeader(port);  
    ((WSBindingProvider)port).setOutboundHeaders(contextHeader); 
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on few WCF tutorials and I would like to understand the difference
I'm working on a project using Windows 2008, .NET 3.5 and WCF for some
I'm working on a project where I need the following. WCF service on the
When working with WCF services, is it better to create a new instance of
I am new to WCF services. I have been working with WCF for over
I am working with WCF RIA services and have come across a sample using
I am working with WCF Webhttp services. I have created a bunch of services
Does WCF Data Services support working with Entity Framework Code First (4.1)? It seems
I'm working on an ASP.NET application containing WCF services that is meant to act
I'm trying to get this sample for AJAX to WCF working, with the following

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.