All,

I am having a little problem with proxying some webservices with Synapse
(see previous posts today for more history), where I'm finding that
the *response
body is empty* when returned to the client. Using soapUI [
http://www.soapui.org/], I have been able to collect some more information.

Please find attached:
synapsis.soapui.log.diff.report.htm* * ==>    An HTML diff report on the two
log entries / files below
soapui.synapsis.service.log              ==>    The request and response
soapUI log when calling the Synapse proxied 'validateCLI' webservice
soapui.original.service.log                ==>    The request and response
soapUI log when calling the non-proxied, original, 'validateCLI' webservice

Here is my current synapse.xml:

<definitions xmlns="http://ws.apache.org/ns/synapse";>
    <localEntry key="validateCli.wsdl"
src="file:/c:/dev/synapse-1.2/harness/validateCli.wsdl"/>
    <localEntry key="ValidateCLIRequest"
src="file:/c:/dev/synapse-1.2/harness/ValidateCLIRequest_V1.0.xsd"/>
    <localEntry key="ValidateCLIResponse"
src="file:/c:/dev/synapse-1.2/harness/ValidateCLIResponse_V1.0.xsd"/>
    <localEntry key="CommonTypes"
src="file:/c:/dev/synapse-1.2/harness/commontypes.xsd"/>
    <proxy name="ValidateCLI" transports="http" trace="enable">
        <parameter name="useOriginalwsdl">true</parameter>
        <parameter name="modifyUserWSDLPortAddress">true</parameter>
        <publishWSDL key="validateCli.wsdl" trace="enable">
            <resource location="ValidateCLIRequest_V1.0.xsd"
key="ValidateCLIRequest"/>
            <resource location="ValidateCLIResponse_V1.0.xsd"
key="ValidateCLIResponse"/>
            <resource location="commontypes.xsd"
key="CommonTypes"/>
        </publishWSDL>
        <target>
            <inSequence>
                <send/>
            </inSequence>
            <outSequence>
            </outSequence>
        </target>
    </proxy>
</definitions>

I also noted that the the HTTP return codes also differ:

Original WS call: HTTP/1.1 200 OK
Proxied WS call: HTTP/1.1 202 Accepted

I am not sure why this is happening (no response body + returning 202
instead of 200), if I am doing something incorrect here or if I simply have
an incorrect synapse configuration.

Has anyone seen this behaviour before? Any help would be greatly
appreciated.

Many thanks!

Sincerely,
Henrik Pettersen
Sparkling Ideas, ltd.

2008/12/11 Asankha C. Perera <[EMAIL PROTECTED]>

> For the benefit of anyone looking at this later, the solution to this
> question was:
>
> Move the <parameter ...> elements as children to the <proxy> element and
> not to the <publishWSDL...>
> Then you can use any WSDL you like, as Synapse just shows what you specify
> without modifying or validating it
>
> cheers
> asankha
>
>
> Asankha C. Perera wrote:
>
>> Hi Henrik
>>
>>> A complete, standalone test case can be downloaded from here:
>>> http://sparklingideas.co.uk/synapse.test.case.henrik.zip* [28 MB]*
>>>
>>> For convenience, I have also attached to this email:
>>>
>>>   1. /validateCli.wsdl/ [Original WSDL file]
>>>   2. /proxied_validateCli.wsdl /[Proxied WSDL file, served up by Synapse]
>>>   3. /synapse.xml/
>>>   4. /stack.trace/ [stacktrace from the wsimport stubs, when
>>>      "TelewestBindingPort" can not be found]
>>>   5. /generated.java.source.sample.java/ [File generated by wsimport.
>>>      Note the hardcoded binding name "TelewestBindingPort"]
>>>
>>>  Can you also attach the referenced XSD's so that I can just try starting
>> up your configuration? If your original WSDL is displayed your problem is
>> solved right?
>>
>> cheers
>> asankha
>>
>>
>
> --
> Asankha C. Perera
> http://adroitlogic.org
>
> http://esbmagic.blogspot.com
>
>

Reply via email to