asanka,

I agree that the response shoud be consistent with the original request.  I
will raise a Jira issue for this.

There are a couple of other things relevant to this issue that I think
Synapse should provide for:

1. using an xpath expression to test for an error condition in the POX
response to cause a SOAP fault to be generated
2. ability to generate SOAP header elements in the response based on HTTP
response headers or via xpath extraction from the POX response
3. ability to use SOAP header elements or xpath extractions from the SOAP
body to set HTTP request headers in the call to the POX service.

And to your email regarding improving Synapse and current plans for
utilization.

The basic scenario that I am trying to support is to have an exposed SOAP
service (or services) that proxy back to internal REST/POX services.  My
goal is to provide a layer of abstraction between my interface and
implementation, and have that layer perform as many of the generic / non
business functional aspects of the communication as possible:

transport security in the form of HTTPS (I believe the next release's NIO
based http listener will support)
authorization / authentication using credentials passed as part of the SOAP
header (i've written a simple ClassMediator that does this for now as I
don't think my integration partners are ready for WS-Security)
message validation against XML schema definitions
audit logging of message traffic to a database

Your thoughts?

Regards,
Michael
-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED]
Sent: Tuesday, February 27, 2007 10:22 AM
To: [email protected]
Subject: Re: SOAP in HTTP Form Post Out


  Hi Michael

  Since you forced your SOAP message as POX to your endpoint, the response
we receive back is considered as POX as well. However I think its the duty
of Synapse to convert this into a SOAP message when sending it back to its
client. Basically the pattern is that Synapse should reply back to the
client in a consistent way to his original request. If you agree on thid,
could you raise a JIRA for this issue? and we'd be happy to fix it for the
next release

  asankha

  Michael Griffin wrote:
asankha,

I was able to get this working with 0.91.  Thank you for pointing me in the
right direction.

I found that in order for my original caller to recieve a SOAP response that
I had to perform a transformation on the response recieved from the POX
service to re-insert it in a SOAP envelope before it was returned.  Was this
the right approach, or should I have done something else to ensure the
response to the original client was SOAP?  Here are the relevant sections of
my configuration

    <definitions>

        <set-property name="POX-to-SOAP-transform"
key="transform/POX-to-SOAP.xslt"/>

       <endpoint name="OrderStatusUpdateServiceForm"
                 force="pox"
                 address="http://localhost:8500/griffin/MyFormService.cfm"; />

        <sequence name="OrderStatusUpdateService-OutSequence">
                <xslt key="POX-to-SOAP-transform">
                        <property name="live" value="false"/>
                </xslt>
                <send/>
        </sequence>

        <sequence name="OrderStatusUpdateService-InSequence">
         <send>
            <endpoint ref="OrderStatusUpdateServiceForm"/>
         </send>
        </sequence>


    </definitions>

    <proxies>

        <proxy name="OSU">
                <wsdl key="OrderStatusUpdateService.wsdl"/>
            <target inSequence="OrderStatusUpdateService-InSequence"
outSequence="OrderStatusUpdateService-OutSequence"/>
        </proxy>

</proxies>

  <!-- The most simple Synapse configuration -->
  <rules>
        <log level="none"/>
        <send/>
  </rules>

Regards,
Michael

-----Original Message-----
From: Asankha C. Perera [mailto:[EMAIL PROTECTED]
Sent: Friday, February 23, 2007 11:38 AM
To: [email protected]
Subject: Re: SOAP in HTTP Form Post Out


Hi Michael

What you need is a SOAP Proxy service, directing to a REST endpoint, and
this is possible with Synapse. You could create a proxy service as usual
to accept the messages, and then send them through a sequence if you
require any transformation. Then the trick is to use an endpoint where
force="pox" is turned on.

If I can remember correctly, this switch was not marked in the 0.91
release documentation, but you could view the latest synapse config
language from the new synapse home page link that fetches it right from
the SVN trunk. The link is
http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resourc
es/Synapse_Configuration_Language.html?content-type=text%2Fhtml&view=co
<http://svn.apache.org/viewvc/webservices/synapse/trunk/java/src/site/resour
ces/Synapse_Configuration_Language.html?content-type=text%2Fhtml&view=co>

Let me know if you get this working with 0.91, else you could get a
build of Synapse off the SVN trunk and it will definitely work. I am
thinking of doing a 0.92 release next week before we start working on
some of the changes proposed by Paul on the dev list, and I could get
this into that release.

asankha

Michael Griffin wrote:
  Does anyone know if I can use to Synapse to proxy an incoming SOAP request
to HTTP form Post?  If so, how might I do this?



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


  --------------------------------------------------------------------- To
unsubscribe, e-mail: [EMAIL PROTECTED] For additional
commands, e-mail: [EMAIL PROTECTED]

Reply via email to