If there were WS-Addressing Reply-To headers in the message then I
would understand this, but there aren't (at least not in those you
sent).

I have only seen this with that situation.

Is this a scenario one of us could replicate to debug it? I.e. is the
service publicly available (on the internet). You could send me some
stuff privately and I could take a look. That said, I couldn't do it
until Thursday as I'm travelling right now.

Paul

On Mon, Dec 15, 2008 at 9:53 AM, Henrik Pettersen
<[email protected]> wrote:
> Hi Ruwan,
>
> thank you for your help. I now have this Synapse configuration:
>
> <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">
>        <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>
>          <parameter name="useOriginalwsdl">true</parameter>
>        <parameter name="modifyUserWSDLPortAddress">true</parameter>
>
>        <target>
>            <inSequence>
>                <send>
>                    <endpoint>
>                        <address uri="
> http://server_name_hidden/ValidateCLI/TelewestBindingPort"/>
>                    </endpoint>
>                </send>
>            </inSequence>
>            <outSequence>
>                <send/>
>            </outSequence>
>        </target>
>    </proxy>
> </definitions>
>
> which still gives me and empty response body and a 202 Accepted. Synapse
> logs do not show any exceptions or problems, as far as I can see.
>
> Any suggestions? Could my problems be related to the fact that my webservice
> endpoint stubs have been generated with Sun's 'wsimport' instead of the
> Axis' 'wsdl2java? Should I perhaps not include the binding port and/or the
> service name in the URL?
>
> After a week, I'm still pretty stuck here, attempting to proxy this web
> service :-) Any suggestions would be very (very) welcome!
>
> Many thanks!
>
> Henrik
>
> 2008/12/13 Ruwan Linton <[email protected]>
>
>> Hi Henrik,
>>
>> I am sorry, the configuration I posted was wrong please try the following
>> as
>> the target in your proxy configuration;
>>
>>     <target>
>>           <inSequence>
>>               <send>
>>                   <endpoint>
>>                       <address uri="
>> http://SERVERNAME_HIDDDEN/ValidateCLI/TelewestBindingPort<
>> http://servername_hiddden/ValidateCLI/TelewestBindingPort>
>> "/>
>>                   </endpoint>
>>                </send>
>>           </inSequence>
>>           <outSequence>
>>               <send/>
>>           </outSequence>
>>        </target>
>>
>> Also please note that the SERVERNAME_HIDDEN has to be replaced with your
>> actual server name where you host the ValidateCLI service, I assume you
>> have
>> done this, but just to make sure. :-)
>>
>> Thanks,
>> Ruwan
>>
>>
>>
>> On Fri, Dec 12, 2008 at 11:24 PM, Henrik Pettersen <
>> [email protected]> wrote:
>>
>> > Hi Ruwan,
>> >
>> > thank you for your help, this is very, very helpfull. I'm completely
>> stuck
>> > here.
>> >
>> > I changed the Synapse configuration to look like this:
>> >
>> > <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">
>> >         <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>
>> >
>> >        <parameter name="useOriginalwsdl">true</parameter>
>> >        <parameter name="modifyUserWSDLPortAddress">true</parameter>
>> >
>> >         <target>
>> >            <inSequence>
>> >                <send>
>> >                    <endpoint address="
>> > http://SERVERNAME_HIDDDEN/ValidateCLI/TelewestBindingPort"/>
>> >                 </send>
>> >            </inSequence>
>> >            <outSequence>
>> >                <send/>
>> >            </outSequence>
>> >         </target>
>> >
>> >    </proxy>
>> > </definitions>
>> >
>> > which I hope is what you indicated to me in your previous email. But
>> > unfortunately, this leads to a NullpointerException when Synapse tries to
>> > start up:
>> >
>> > java.lang.NullPointerException
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.handleException(EndpointFactory.java:475)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.getEndpointFactory(EndpointFactory.java:439)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.getEndpointFromElement(EndpointFactory.java:67)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SendMediatorFactory.createMediator(SendMediatorFactory.java:90)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFactoryFinder.java:173)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.AbstractListMediatorFactory.addChildren(AbstractListMediatorFactory.java:39)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SequenceMediatorFactory.createAnonymousSequence(SequenceMediatorFactory.java:63)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:167)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SynapseXMLConfigurationFactory.defineProxy(SynapseXMLConfigurationFactory.java:148)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SynapseXMLConfigurationFactory.getConfiguration(SynapseXMLConfigurationFactory.java:84)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.getConfiguration(ConfigurationFactoryAndSerializerFinder.java:160)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.XMLConfigurationBuilder.getConfiguration(XMLConfigurationBuilder.java:46)
>> >        at
>> >
>> >
>> org.apache.synapse.config.SynapseConfigurationBuilder.getConfiguration(SynapseConfigurationBuilder.java:74)
>> >        at
>> >
>> >
>> org.apache.synapse.core.axis2.SynapseInitializationModule.getConfiguration(SynapseInitializationModule.java:171)
>> >        at
>> >
>> >
>> org.apache.synapse.core.axis2.SynapseInitializationModule.init(SynapseInitializationModule.java:95)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:248)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:226)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:206)
>> >        at org.apache.synapse.ServerManager.start(ServerManager.java:101)
>> >        at org.apache.synapse.SynapseServer.main(SynapseServer.java:82)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> >        at java.lang.reflect.Method.invoke(Unknown Source)
>> >        at
>> >
>> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>> >        at java.lang.Thread.run(Unknown Source)
>> > 2008-12-12 17:43:16,195 [172.19.64.188-FRY] [WrapperSimpleAppMain] FATAL
>> > ServerManager Synapse startup failed...
>> > org.apache.synapse.SynapseException: Could not initialize Synapse : null
>> >        at
>> >
>> >
>> org.apache.synapse.config.SynapseConfigurationBuilder.handleException(SynapseConfigurationBuilder.java:90)
>> >        at
>> >
>> >
>> org.apache.synapse.config.SynapseConfigurationBuilder.getConfiguration(SynapseConfigurationBuilder.java:83)
>> >        at
>> >
>> >
>> org.apache.synapse.core.axis2.SynapseInitializationModule.getConfiguration(SynapseInitializationModule.java:171)
>> >        at
>> >
>> >
>> org.apache.synapse.core.axis2.SynapseInitializationModule.init(SynapseInitializationModule.java:95)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.initModules(ConfigurationContextFactory.java:248)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.init(ConfigurationContextFactory.java:226)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContext(ConfigurationContextFactory.java:93)
>> >        at
>> >
>> >
>> org.apache.axis2.context.ConfigurationContextFactory.createConfigurationContextFromFileSystem(ConfigurationContextFactory.java:206)
>> >        at org.apache.synapse.ServerManager.start(ServerManager.java:101)
>> >        at org.apache.synapse.SynapseServer.main(SynapseServer.java:82)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>> >        at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
>> >        at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
>> >        at java.lang.reflect.Method.invoke(Unknown Source)
>> >        at
>> >
>> org.tanukisoftware.wrapper.WrapperSimpleApp.run(WrapperSimpleApp.java:240)
>> >        at java.lang.Thread.run(Unknown Source)
>> > Caused by: java.lang.NullPointerException
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.handleException(EndpointFactory.java:475)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.getEndpointFactory(EndpointFactory.java:439)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.endpoints.EndpointFactory.getEndpointFromElement(EndpointFactory.java:67)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SendMediatorFactory.createMediator(SendMediatorFactory.java:90)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.MediatorFactoryFinder.getMediator(MediatorFactoryFinder.java:173)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.AbstractListMediatorFactory.addChildren(AbstractListMediatorFactory.java:39)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SequenceMediatorFactory.createAnonymousSequence(SequenceMediatorFactory.java:63)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.ProxyServiceFactory.createProxy(ProxyServiceFactory.java:167)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SynapseXMLConfigurationFactory.defineProxy(SynapseXMLConfigurationFactory.java:148)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.SynapseXMLConfigurationFactory.getConfiguration(SynapseXMLConfigurationFactory.java:84)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.ConfigurationFactoryAndSerializerFinder.getConfiguration(ConfigurationFactoryAndSerializerFinder.java:160)
>> >        at
>> >
>> >
>> org.apache.synapse.config.xml.XMLConfigurationBuilder.getConfiguration(XMLConfigurationBuilder.java:46)
>> >        at
>> >
>> >
>> org.apache.synapse.config.SynapseConfigurationBuilder.getConfiguration(SynapseConfigurationBuilder.java:74)
>> >        ... 14 more
>> >
>> > so I also tried this Synapse configuration:
>> >
>> > <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">
>> >
>> >         <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>
>> >
>> >          <parameter name="useOriginalwsdl">true</parameter>
>> >        <parameter name="modifyUserWSDLPortAddress">true</parameter>
>> >
>> >
>> >         <target>
>> >            <inSequence>
>> >                <send>
>> >                    <endpoint>
>> >                        <address>
>> > http://SERVERNAME_HIDDDEN/ValidateCLI/TelewestBindingPort</address>
>> >                    </endpoint>
>> >                 </send>
>> >            </inSequence>
>> >            <outSequence>
>> >                <send/>
>> >            </outSequence>
>> >         </target>
>> >    </proxy>
>> > </definitions>
>> >
>> > but this last configuration gives me the same behaviour as before (202
>> > Accepted and empty response body). Any ideas?
>> >
>> > Thanks again, everyone!
>> >
>> > Henrik
>> >
>> > 2008/12/12 Ruwan Linton <[email protected]>:
>> > > Hi Henrik,
>> > >
>> > > Please change the configuration of the proxy inSequence and the
>> > outSequence
>> > > to the following and see whether it works;
>> > >
>> > > <inSequence>
>> > > <send><endpoint address="
>> > > http://SERVER_NAME_AND_PORT_HIDDEN/ValidateCLI/TelewestBindingPort
>> > "/></send>
>> > > </inSequence>
>> > > <outSequence>
>> > > <send/>
>> > > </outSequence>
>> > >
>> > > If you do not specify an outSequence we assume it to be send back but
>> in
>> > > your case there is an outSequence but it is empty :-(
>> > >
>> > > Hope this will help you..
>> > >
>> > > Thanks,
>> > > Ruwan
>> > >
>> > > 2008/12/12 Henrik Pettersen <[email protected]>
>> > >
>> > >> Hi Ruwan,
>> > >>
>> > >> please find attached my original WSDL, a sample request envelope, and
>> a
>> > >> diff of the soapUI debug log for the proxied and non-proxied
>> webservice
>> > >> calls.
>> > >>
>> > >> The WSDL is also dependent on 3 XML Schema documents, so I have
>> attached
>> > >> these as well.
>> > >>
>> > >> Any insight would be much appreciated. Many thanks for your help!
>> > >>
>> > >> Sincerely,
>> > >> Henrik Pettersen
>> > >> Sparkling Ideas, ltd. (for Virgin Media)
>> > >>
>> > >> 2008/12/12 Ruwan Linton <[email protected]>
>> > >>
>> > >> Asankha,
>> > >>>
>> > >>> On the 1.2 release we did a change in such a way that the outSequence
>> > can
>> > >>> be
>> > >>> empty in which case we do a send back. So this should work. :-(
>> > >>>
>> > >>> I am wondering whether Henrik is trying to invoke an In Only
>> operation.
>> > Is
>> > >>> there any possibility for you to share the WSDL that you are using in
>> > this
>> > >>> case, and a sample message?
>> > >>>
>> > >>> Thanks,
>> > >>> Ruwan
>> > >>>
>> > >>> On Thu, Dec 11, 2008 at 10:39 PM, Asankha C. Perera <
>> > [email protected]
>> > >>> >wrote:
>> > >>>
>> > >>> > Hi Henrik
>> > >>> >
>> > >>> >  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.
>> > >>> >>
>> > >>> > Please follow the basic proxy services samples and basic docs [2].
>> > Your
>> > >>> > outsequence is empty, thus no response would be forwarded. Also,
>> you
>> > >>> would
>> > >>> > need to define a target endpoint, or a <send> mediator which
>> > specifies
>> > >>> the
>> > >>> > address of the real service endpoint
>> > >>> >
>> > >>> > [1] http://synapse.apache.org/Synapse_Samples.html#ProxyServices
>> > >>> > [2] http://synapse.apache.org/Synapse_QuickStart.html (part 2 of
>> > this
>> > >>> > called Proxy Services)
>> > >>> >
>> > >>> >
>> > >>> > cheers
>> > >>> > asankha
>> > >>> >
>> > >>> > --
>> > >>> > Asankha C. Perera
>> > >>> > http://adroitlogic.org
>> > >>> >
>> > >>> > http://esbmagic.blogspot.com
>> > >>> >
>> > >>> >
>> > >>>
>> > >>>
>> > >>> --
>> > >>> Ruwan Linton
>> > >>> http://wso2.org - "Oxygenating the Web Services Platform"
>> > >>> http://ruwansblog.blogspot.com/
>> > >>>
>> > >>
>> > >>
>> > >
>> > >
>> > > --
>> > > Ruwan Linton
>> > > http://wso2.org - "Oxygenating the Web Services Platform"
>> > > http://ruwansblog.blogspot.com/
>> > >
>> >
>>
>>
>>
>> --
>> Ruwan Linton
>> http://wso2.org - "Oxygenating the Web Services Platform"
>> http://ruwansblog.blogspot.com/
>>
>



-- 
Paul Fremantle
Co-Founder and CTO, WSO2
Apache Synapse PMC Chair
OASIS WS-RX TC Co-chair

blog: http://pzf.fremantle.org
[email protected]

"Oxygenating the Web Service Platform", www.wso2.com

Reply via email to