Page 3 of 4 FirstFirst 1234 LastLast
Results 21 to 30 of 36

Thread: HTTP 404 Error - Issue

  1. #21

    Default

    Arjen.

    Here's the Tomcat console with extending logging enabled:

    INFO: Find registry server-registry.xml at classpath resource
    Oct 26, 2007 11:11:20 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2083 ms
    2007-10-26 11:11:38,976 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Initializing servlet 'spring-ws'
    2007-10-26 11:11:39,055 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'spring-ws': initialization started
    2007-10-26 11:11:39,055 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Servlet with name 'spring-ws' will try to create custom WebAppl
    icationContext context of class 'org.springframework.web.context.support.XmlWebA
    pplicationContext', using parent context [null]
    2007-10-26 11:11:39,623 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Mapped key [{http://www.springframew
    ork.org/spring-ws/samples/mtom}LoadImageRequest] onto endpoint [public javax.xml
    .bind.JAXBElement org.springframework.ws.samples.mtom.ws.ImageReposi toryEndpoint
    .load(javax.xml.bind.JAXBElement) throws java.io.IOException]
    2007-10-26 11:11:39,623 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Mapped key [{http://www.springframew
    ork.org/spring-ws/samples/mtom}StoreImageRequest] onto endpoint [public void org
    .springframework.ws.samples.mtom.ws.ImageRepositor yEndpoint.store(javax.xml.bind
    .JAXBElement) throws java.io.IOException]
    2007-10-26 11:11:39,702 INFO [org.springframework.oxm.jaxb.Jaxb2Marshaller] - Cr
    eating JAXBContext with context path [org.springframework.ws.samples.mtom.schema
    ]
    2007-10-26 11:11:40,775 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Published WebApplicationContext of servlet 'spring-ws' as Servl
    etContext attribute with name [org.springframework.web.servlet.FrameworkServlet.
    CONTEXT.spring-ws]
    2007-10-26 11:11:40,838 INFO [org.springframework.ws.soap.saaj.SaajSoapMessageFa
    ctory] - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
    2007-10-26 11:11:40,838 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No WebServiceMessageFactory found in servlet 'spring-ws': using
    default
    2007-10-26 11:11:40,869 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - No EndpointExceptionResolvers found, using defaults
    2007-10-26 11:11:40,869 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No MessageDispatcher found in servlet 'spring-ws': using defaul
    t
    2007-10-26 11:11:40,869 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'spring-ws': initialization completed in 1814 m
    s
    2007-10-26 11:11:40,869 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Servlet 'spring-ws' configured successfully
    2007-10-26 11:11:41,122 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - MessageDispatcher with name 'spring-ws' received request [SaajSoapMes
    sage {http://www.springframework.org/ws/samples/mtom/schema}LoadImageRequest]
    2007-10-26 11:11:41,169 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{http://www
    .springframework.org/ws/samples/mtom/schema}LoadImageRequest]
    2007-10-26 11:11:41,185 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.Pay l
    oadRootAnnotationMethodEndpointMapping@1b5391b] has no mapping for request
    2007-10-26 11:11:41,185 WARN [org.springframework.ws.EndpointNotFound] - No endp
    oint mapping found for [SaajSoapMessage {http://www.springframework.org/ws/sampl
    es/mtom/schema}LoadImageRequest]
    2007-10-26 11:11:41,185 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Successfully completed request

    Thanks
    Sunil

  2. #22
    Join Date
    Jul 2005
    Location
    Rotterdam, the Netherlands
    Posts
    1,562

    Default

    Something is very wrong here. The endpoint is mapped to the namespace http://www.springframework.org/spring-ws/samples/mtom, but the requests made by SoapUI use http://www.springframework.org/ws/samples/mtom/schema. Note the addition of "schema" to the namespace, this is wrong.

    Code:
    2007-10-26 11:11:39,623 DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Mapped key [{http://www.springframework.org/spring-ws/samples/mtom}LoadImageRequest] onto endpoint [public javax.xml.bind.JAXBElement org.springframework.ws.samples.mtom.ws.ImageRepositoryEndpoint.load(javax.xml.bind.JAXBElement) throws java.io.IOException]
    ...
    2007-10-26 11:11:41,169 DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{http://www.springframework.org/ws/samples/mtom/schema}LoadImageRequest]
    2007-10-26 11:11:41,185 DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping@1b5391b] has no mapping for request
    I honestly have no clue what's going on here. You could try running it from jetty. Just do a "mvn jetty:run" in the mtom directory. If that works, then it's a Tomcat problem.
    Last edited by Arjen Poutsma; Oct 27th, 2007 at 05:36 AM.
    Arjen Poutsma

    Spring Web Services Dev Lead
    Please read the FAQ

  3. #23

    Default

    Arjen.

    That fixed the MTOM sample. But I still have the problem with my example, which was the original post. The tomcat logs shows as below, which says that

    No EndpointExceptionResolvers found

    INFO: Server startup in 2938 ms
    2007-10-28 18:43:32,369 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Initializing servlet 'caob-shared'
    2007-10-28 18:43:32,495 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'caob-shared': initialization started
    2007-10-28 18:43:32,495 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Servlet with name 'caob-shared' will try to create custom WebAp
    plicationContext context of class 'org.springframework.web.context.support.XmlWe
    bApplicationContext', using parent context [null]
    2007-10-28 18:43:33,048 INFO [org.springframework.oxm.jaxb.Jaxb2Marshaller] - Cr
    eating JAXBContext with context path [com.bofa.jaxb.caob.documentation.ws.jaxb]
    2007-10-28 18:43:33,712 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Published WebApplicationContext of servlet 'caob-shared' as Ser
    vletContext attribute with name [org.springframework.web.servlet.FrameworkServle
    t.CONTEXT.caob-shared]
    2007-10-28 18:43:33,759 INFO [org.springframework.ws.soap.saaj.SaajSoapMessageFa
    ctory] - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
    2007-10-28 18:43:33,759 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No WebServiceMessageFactory found in servlet 'caob-shared': usi
    ng default
    2007-10-28 18:43:33,791 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - No EndpointExceptionResolvers found, using defaults
    2007-10-28 18:43:33,791 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No MessageDispatcher found in servlet 'caob-shared': using defa
    ult
    2007-10-28 18:43:33,791 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'caob-shared': initialization completed in 1296
    ms

    Here's the snippet of my endpoint:
    @Endpoint
    public class DocumentationServiceEndpoint implements DocumentationWebServiceConstants {
    ....
    @PayloadRoot(localPart = "GetDocumentListRequest", namespace = "http://www.bankofamerica.com/caob/webservices/documentation/schemas")

    }

    This is my xsd:
    <xsd:element name="GetDocumentListRequest">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="requestHeader" type="xsd:string" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>
    <xsd:element name="GetDocumentListResponse">
    <xsd:complexType>
    <xsd:sequence>
    <xsd:element name="responseHeader" type="xsd:string" minOccurs="1" maxOccurs="1" />
    </xsd:sequence>
    </xsd:complexType>
    </xsd:element>


    My caob-shared-servlet.xml file contains:

    <bean id="documentationService" class="com.bofa.caob.service.DocumentationServiceI mpl"/>

    <bean class="com.bofa.caob.ws.DocumentationServiceEndpoi nt">
    <constructor-arg ref="documentationService"/>
    </bean>

    <bean class="org.springframework.ws.server.endpoint.mapp ing.PayloadRootAnnotationMethodEndpointMapping"/>

    <bean class="org.springframework.ws.server.endpoint.adap ter.MarshallingMethodEndpointAdapter">
    <description>
    This adapter allows for methods that need and returns marshalled objects. The MarshallingEndpoint
    uses JAXB 2 objects.
    </description>
    <constructor-arg ref="marshaller"/>
    </bean>

    <bean id="marshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshalle r">
    <description>
    The JAXB 2 Marshaller is used by the endpoints.
    </description>
    <property name="contextPath" value="com.bofa.jaxb.caob.documentation.ws.jaxb"/>
    <property name="mtomEnabled" value="true"/>
    </bean>

    <!-- ===================== WSDL DEFINITION ============================== -->
    <!-- Exposing a static WSDL -->
    <bean id="documentPort" class="org.springframework.ws.wsdl.wsdl11.SimpleWs dl11Definition">
    <constructor-arg value="/WEB-INF/DocumentService.wsdl"/>
    </bean>

    Pls. help me. Its kinda crazy, that the sample finds the mapping methods as shown in logs below, but not my example.

    2007-10-28 12:19:41,469 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Mapped key [{http://www.springframew
    ork.org/ws/samples/mtom/schema}LoadImageRequest] onto endpoint [public javax.xml
    .bind.JAXBElement org.spring.ws.samples.mtom.ws.ImageRepositoryEndpo int.load(jav
    ax.xml.bind.JAXBElement) throws java.io.IOException]
    2007-10-28 12:19:41,469 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Mapped key [{http://www.springframew
    ork.org/ws/samples/mtom/schema}StoreImageRequest] onto endpoint [public void org
    .spring.ws.samples.mtom.ws.ImageRepositoryEndpoint .store(javax.xml.bind.JAXBElem
    ent) throws java.io.IOException]

    I really need some pointers here, am not able to figure out what is going on here.

    Thanks
    Sunil

  4. #24
    Join Date
    Oct 2004
    Posts
    207

    Default

    Would you mind posting a new log showing the failure you're having again please?

    Bad input was making the sample fail. Now that we know the sample works we can once again focus on your application.

    I see your endpoint and it's annotations, I see your schema, I see your applicationContext.xml.

    Please post a new log snippet and at least the opening snippet of the XML request you're sending.

  5. #25

    Default

    Ray,
    Here are the logs from tomcat, this is while I request the url from the url http://localhost:8080/caobshared/ser...aobshared.wsdl

    INFO: Find registry server-registry.xml at classpath resource
    Oct 29, 2007 10:01:16 AM org.apache.catalina.startup.Catalina start
    INFO: Server startup in 2938 ms
    2007-10-29 10:01:24,302 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Initializing servlet 'caob-shared'
    2007-10-29 10:01:24,476 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'caob-shared': initialization started
    2007-10-29 10:01:24,476 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Servlet with name 'caob-shared' will try to create custom WebAp
    plicationContext context of class 'org.springframework.web.context.support.XmlWe
    bApplicationContext', using parent context [null]
    2007-10-29 10:01:25,219 INFO [org.springframework.oxm.jaxb.Jaxb2Marshaller] - Cr
    eating JAXBContext with context path [com.bofa.jaxb.caob.documentation.ws.jaxb]
    2007-10-29 10:01:26,309 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Published WebApplicationContext of servlet 'caob-shared' as Ser
    vletContext attribute with name [org.springframework.web.servlet.FrameworkServle
    t.CONTEXT.caob-shared]
    2007-10-29 10:01:26,388 INFO [org.springframework.ws.soap.saaj.SaajSoapMessageFa
    ctory] - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol
    2007-10-29 10:01:26,388 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No WebServiceMessageFactory found in servlet 'caob-shared': usi
    ng default
    2007-10-29 10:01:26,435 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - No EndpointExceptionResolvers found, using defaults
    2007-10-29 10:01:26,435 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - No MessageDispatcher found in servlet 'caob-shared': using defa
    ult
    2007-10-29 10:01:26,435 INFO [org.springframework.ws.transport.http.MessageDispa
    tcherServlet] - FrameworkServlet 'caob-shared': initialization completed in 1959
    ms
    2007-10-29 10:01:26,451 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Servlet 'caob-shared' configured successfully
    2007-10-29 10:01:26,514 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Successfully completed request

    And this is the log, when I submit a webservice request:

    2007-10-29 10:27:37,187 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - MessageDispatcher with name 'caob-shared' received request [SaajSoapM
    essage {http://www.bankofamerica.com/caob/webservices/documentation/schemas}GetD
    ocumentListRequest]
    2007-10-29 10:27:37,250 DEBUG [org.springframework.ws.server.endpoint.mapping.Pa
    yloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [{http://www
    .bankofamerica.com/caob/webservices/documentation/schemas}GetDocumentListRequest
    ]
    2007-10-29 10:27:37,250 DEBUG [org.springframework.ws.soap.server.SoapMessageDis
    patcher] - Endpoint mapping [org.springframework.ws.server.endpoint.mapping.Pay l
    oadRootAnnotationMethodEndpointMapping@db38a4] has no mapping for request
    2007-10-29 10:27:37,250 WARN [org.springframework.ws.EndpointNotFound] - No endp
    oint mapping found for [SaajSoapMessage {http://www.bankofamerica.com/caob/webse
    rvices/documentation/schemas}GetDocumentListRequest]
    2007-10-29 10:27:37,250 DEBUG [org.springframework.ws.transport.http.MessageDisp
    atcherServlet] - Successfully completed request

    Appreciate it.

    Thanks
    Sunil

  6. #26
    Join Date
    Oct 2004
    Posts
    207

    Default

    Any chance you can attach the spring-ws source to your ide and fire up your debugger?

    Set a breakpoint in the PayloadRootAnnotationMethodEndpointMapping::getLoo kupKeyForMethod method, it should get hit at startup.

    And see if it ever gets hit. If not, try setting one in the AbstractAnnotationMethodEndpointMapping:ostProcessBeforeInitialization method and see if it gets hit at startup.

    I'm going to open a Jira to get some more debug logging in place around the AbstractMethodEndpointMapping based operations.

  7. #27
    Join Date
    Oct 2004
    Posts
    207

    Default

    Hey, quick question...

    The @Endpoint annotation on your DocumentationServiceEndpoint...

    Can you double check that it is actually the org.springframework.ws.server.endpoint.annotation. Endpoint annotation, and not some other "Endpoint" annotation?

  8. #28

    Default

    Ray.

    These are the imports I have in the endpoint class:

    import javax.xml.bind.JAXBElement;

    import org.apache.log4j.Logger;
    import org.springframework.util.Assert;
    import org.springframework.ws.server.endpoint.annotation. Endpoint;
    import org.springframework.ws.server.endpoint.annotation. PayloadRoot;

    Regarding setting breakpoint, will have to try that. Do I need to setup a remote debugger? How should I do that ?

    Appreciate your help.

    Thanks
    Sunil

  9. #29

    Default

    There is really not much of difference between the MTOM sample and the example I am working on. Am I missing something ?

  10. #30
    Join Date
    Oct 2004
    Posts
    207

    Default

    You can google how to remote debug tomcat...

    In the mean time add the class below to your application. Then replace your usage of the PayloadRootAnnotationMethodEndpointMapping in your application context with it...

    Code:
    public class DebugPayloadRootAnnotationMethodEndpointMapping extends PayloadRootAnnotationMethodEndpointMapping {
    
        private static final Logger log = Logger.getLogger(DebugPayloadRootAnnotationMethodEndpointMapping.class);
    
        protected Class getEndpointClass(Object endpoint) {
            Class endpointClass = super.getEndpointClass(endpoint);
            log.info("Potential Endpoint: [" + endpointClass + "]");
            return endpointClass;
        }
    
        protected void registerMethods(Object endpoint) {
            log.info("Registering methods for endpoint: [" + endpoint + "]");
            super.registerMethods(endpoint);
        }
    
        protected String getLookupKeyForMethod(Method method) {
            String key = super.getLookupKeyForMethod(method);
            log.info("Lookup key for method [" + method + "]: [" + key + "]");
            return key;
        }
    }
    Fire up your app and let us know what the output looks like. Mainly, does it mention your endpoint as a "Potential Endpoint"? If so, what lookup key does it use?

Posting Permissions

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