Page 2 of 2 FirstFirst 12
Results 11 to 16 of 16

Thread: Spring WS and SOAP UI

  1. #11
    Join Date
    May 2005
    Posts
    208

    Default

    Looking in the WebLogic console after submitting my request, I see these messages:

    Code:
    02 Jun 2008 13:20:24 DEBUG received - Received request [SaajSoapMessage {http://com.hlikk.ingenium/machi/schemas}MACHI_RESTRICT_DATA_REQUEST]
    02 Jun 2008 13:20:24 DEBUG PayloadRootQNameEndpointMapping - Looking up endpoint for [{http://com.hlikk.ingenium/machi/schemas}MACHI_RESTRICT_DATA_REQUEST]
    02 Jun 2008 13:20:24 DEBUG SoapMessageDispatcher - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping@6597d1] has no mapping for request
    02 Jun 2008 13:20:24  WARN EndpointNotFound - No endpoint mapping found for [SaajSoapMessage {http://com.hlikk.ingenium/machi/schemas}MACHI_RESTRICT_DATA_REQUEST]
    02 Jun 2008 13:20:24 DEBUG MessageDispatcherServlet - Successfully completed request
    Why no mapping? My config isn't correct, but I'm not seeing it.

    Here's my Spring app context for the service:

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <beans xmlns="http://www.springframework.org/schema/beans"
           xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
           xmlns:aop="http://www.springframework.org/schema/aop"
           xmlns:tx="http://www.springframework.org/schema/tx"
           xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.0.xsd
           http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.0.xsd
           http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.0.xsd">
    
       <bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
          <property name="sessionFactory" ref="sessionFactory"/>
       </bean>
    
       <bean id="restrictionService" class="org.springframework.transaction.interceptor.TransactionProxyFactoryBean">
          <property name="transactionManager" ref="transactionManager"/>
          <property name="target" ref="restrictionServiceTarget"/>
          <property name="transactionAttributes">
             <props>
                <prop key="find*">PROPAGATION_REQUIRED, readOnly</prop>
                <prop key="save*">PROPAGATION_REQUIRED</prop>
                <prop key="*">PROPAGATION_REQUIRED, readOnly</prop>
             </props>
          </property>
       </bean>
    
       <bean id="restrictionServiceTarget" class="com.hlikk.ingenium.service.RestrictionServiceImpl">
          <constructor-arg ref="restrictionDao"/>
       </bean>
    
       <bean id="restrictionEndpoint" class="com.hlikk.ingenium.ws.RestrictionEndpoint">
          <constructor-arg ref="restrictionService"/>
       </bean>
       
       <bean class="org.springframework.ws.server.endpoint.mapping.PayloadRootQNameEndpointMapping">
          <property name="mappings">
             <props>
                <prop key="{http://com.hlikk.ingenium/machi/schemas}RestrictionRequest">restrictionEndpoint</prop>
             </props>
          </property>
          <property name="interceptors">
             <bean class="org.springframework.ws.server.endpoint.interceptor.PayloadLoggingInterceptor"/>
          </property>
       </bean>
    
       <bean id="restrictionSchema" class="org.springframework.xml.xsd.SimpleXsdSchema">
          <property name="xsd" value="/WEB-INF/schemas/machi-restrict-data-request.xsd"/>
       </bean>
    
       <bean id="restriction" class="org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition">
          <property name="requestSuffix" value="_REQUEST"/>
          <property name="schema" ref="restrictionSchema"/>
          <property name="portTypeName" value="${restriction.port}"/>
          <property name="locationUri" value="${restriction.uri}"/>
          <property name="targetNamespace" value="${restriction.namespace"/>
       </bean>
    
    </beans>
    %

  2. #12
    Join Date
    Apr 2008
    Posts
    151

    Default

    Is it the brace in the key?

    Code:
          <property name="mappings">
             <props>
                <prop key="{

  3. #13
    Join Date
    May 2005
    Posts
    208

    Default

    Yes:

    Code:
                <prop key="{http://com.hlikk.ingenium/machi/schemas}RestrictionRequest">restrictionEndpoint</prop>
    That's the way it appears in the HolidayRequest tutorial.

    %

  4. #14
    Join Date
    May 2005
    Posts
    208

    Default

    More progress: I had the wrong key in my Spring configuration.

    Was:

    Code:
    <prop key="{http://com.hlikk.ingenium/machi/schemas}RestrictionRequest">restrictionEndpoint</prop>
    Should be:

    Code:
    <prop key="{http://com.hlikk.ingenium/machi/schemas}MACHI_RESTRICT_DATA_REQUEST">restrictionEndpoint</prop>
    The root tag of my XML stream was incorrect.

    Now I can see that my endpoint is being mapped and invoked properly, but I've got another issue regarding namespaces. Stay tuned.

    %

  5. #15
    Join Date
    Dec 2005
    Posts
    24

    Default

    Glad to hear that there is progress. That's probably a weblogic issue, I encountered that before with using weblogic implementation.
    Last edited by sroach; Jun 2nd, 2008 at 04:37 PM.

  6. #16
    Join Date
    May 2005
    Posts
    208

    Default

    Nope, can't blame WebLogic. Operator error, as usual. 8)

    SOAP UI client is working perfectly for me now. After fixing that namespace problem the mapping was fine, and I was seeing the invokeInternal() method called. But the values that XPath was pulling out of the stream were blank. The XML stream that SOAP UI was generating for me had whitespace in it. I removed those nodes from the stream and all was well. Now I'm seeing the whole chain: SOAP request from the client; values extracted from the message body and used to instantiate a Java object; object passed to the service to the DAO to the database, its final resting place.

    I have one method working on this service. I would like to try adding a couple of other methods before putting it to bed. I assume that means different endpoints for each request, since the XML request and response streams are different for each method.

    Thanks for watching, Steve. I always do better when I'm paired with you.

    %

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •