<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <br>
    <div class="moz-cite-prefix">On 4/28/16 2:11 AM, Stefan Rasmusson
      wrote:<br>
    </div>
    <blockquote
cite="mid:CACdgycgSxqLudfmRHnVyhTyT41yc8XHBSVphnh4HNtaRbqZqYw@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Brent
        <div>Thanks for answering and thanks for the information.</div>
        <div>I have started experimenting and I am getting somewhere. I
          have managed to send a SOAP message, recieved it, sent a
          response. But when Im trying to recieve the response, I get
          nothing. I know that the respons is being sent because if I
          disable the response encoder I get "Premature end of file" at
          the reciever.</div>
        <div><br>
        </div>
        <div>Any ideas what I'm doing wrong? </div>
      </div>
    </blockquote>
    <br>
    Yes, based on the code you included I think you're not looking at
    the correct inbound MessageContext.  When you create the
    InOutOperationContext, use a null value for the inbound one.  That's
    because it is actually *created* by the response decoder.  So it
    won't be populated on the InOutOperationContext until after the call
    returns.  So at the end try instead like:
    System.out.println(context.getInboundMessageContext().getMessage()).<br>
    <br>
    <blockquote
cite="mid:CACdgycgSxqLudfmRHnVyhTyT41yc8XHBSVphnh4HNtaRbqZqYw@mail.gmail.com"
      type="cite">
      <div dir="ltr">
        <div>By the way is the code I have put together the correct way
          of using the pipeline and encoder etc? I based it on a example
          you gave in a earlier mailing list conversation, it was
          refered to as the "quick and dirty way" =).</div>
      </div>
    </blockquote>
    <br>
    Yes, creating an inline class from the abstract one is an easy way
    to get a concrete impl for simple use cases.  The more sophisticated
    way is to use the PipelineFactory- one, which allows to support
    multiple named pipelines for different cases (with different inbound
    and outbound handlers, etc).  If you're using Spring, there's a
    slick way to use a ServiceLocatorFactoryBean to have it dynamically
    create the factory backed by Spring beans.<br>
    <br>
    Also, I forgot that there are actually SAML-specific impls of the
    client encoder and decoder.  On the decoder I think the main win is
    it allows to get a SAMLObject as the decoded inbound message, rather
    than an Envelope.  That allows for more "payload-oriented" messaging
    style, like that other SAML messaging components.<br>
    <br>
    <br>
  </body>
</html>