PDA

View Full Version : example of payloadmapping not using defaultEndpoint



farrellr
Jul 26th, 2006, 11:01 AM
Does anyone have an example of the syntax for PayloadRootQNameEndpointMapping
if I don't want to use the defaultEndpoint syntax (or in addition to)?
My namespace for the request is http://my.com/topicWs

The below syntax doesn't seem to work for me:

<bean id="payloadMapping"
class="org.springframework.ws.soap.endpoint.PayloadRootQN ameEndpointMapping">
<description>
This endpoint mapping uses the qualified name of the payload (body contents) to determine the endpoint for
an incoming message.
</description>
<property name="mappings">
<props>
<prop key="{http://my.com/topicWs}retrieve">
topicRetrieveEndpoint</prop>
<prop key="{http://my.com/topicWs}update">
topicUpdateEndpoint</prop>
</props>
</property>
<property name="defaultEndpoint" ref="topicRetrieveEndpoint" />

<property name="interceptors">
<list>
<ref local="validatingInterceptor"/>
<ref local="loggingInterceptor"/>
</list>
</property>
</bean>

Thanks for any thoughts.
... Rich

res1st
Jul 27th, 2006, 01:25 AM
Hi Rich,

you should find this information in your log file. How the request sytax is, depends on your WSDL (which i doesn't know).

I added this log4j config line to get the Spring log messages:
log4j.category.org.springframework=DEBUG

If you want to get the request message in your logfile, your need the DEBUG log-level. In my WS, it looks like this:

DEBUG endpoint.PayloadRootQNameEndpointMapping - Looking up endpoint for [{http://schema.test.cas.de}createObject]

Cheers,

Ingo

farrellr
Jul 28th, 2006, 02:20 PM
Thanks for the feedback.
I did figure out my mistake - the syntax of my endpoints in my
PayloadRootQNameEndpointMapping was correct, however I wasn't expecting the variable after the } to be an input parameter but rather part of the url (which is obvious now, but wasn't when I was searching for the answer). I'm really enjoying working with spring, but the thing that bites me from time to time is that for some of this config stuff there isn't a development time validation (like there is in eclipse for a missing library etc).
Anyway, it's working - thanks.
... Rich

res1st
Jul 31st, 2006, 02:29 AM
Hi,

you are right, configuration takes some time.
Do you have the Spring-IDE and WebToolsPlatform for Eclipse installed? It helps a lot.
If you use Spring2, there are XML Schemas available, which can be used instead of the DTD of Spring1. Maybe it provides a better validation.

Cheers,

Ingo