2011-03-11 15 views
2

私はtutorialの例に基づいてSpring Webサービスを持っています。それは私がそれにアクセスする必要がありますどのようにこのようWebサービスへのアクセス::スキーマの問題

@Endpoint 
public class HolidayEndpoint { 

@PayloadRoot(namespace = NAMESPACE_URI, localPart = "HolidayRequest") 
public void handleHolidayRequest(@RequestPayload Element holidayRequest) throws Exception {...} 

web.xmlの

<servlet> 
    <servlet-name>spring-ws</servlet-name> 
    <servlet-class>org.springframework.ws.transport.http.MessageDispatcherServlet</servlet-class> 
    <init-param> 
     <param-name>transformWsdlLocations</param-name> 
     <param-value>true</param-value> 
    </init-param> 
</servlet> 
<servlet-mapping> 
    <servlet-name>spring-ws</servlet-name> 
    <url-pattern>/ws/*</url-pattern> 
</servlet-mapping> 

春のコンフィグ

<sws:annotation-driven/> 

    <sws:dynamic-wsdl id="holiday" portTypeName="HumanResource" locationUri="/holidayService/" 
         targetNamespace="http://mycompany.com/hr/definitions"> 
     <sws:xsd location="/WEB-INF/somexsd.xsd"/> 
    </sws:dynamic-wsdl> 

で構成されましたか?

私はhttp://localhost:8080/ws/holidayService/holidayに投稿しようとしたが、サーバーは

DEBUG [org.springframework.ws.transport.http.WebServiceMessageReceiverHandlerAdapter] - Accepting incoming [[email protected]5e85] at [http://localhost:8080/ws/holidayService/holiday] 
DEBUG [org.springframework.ws.server.MessageTracing.received] - Received request [SaajSoapMessage HolidayRequest] 
DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking up endpoint for [HolidayRequest] 
DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org.springframework.ws.ser[email protected]2081ca25] has no mapping for request 
DEBUG [org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping] - Looking up endpoint for [] 
DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - Endpoint mapping [org.springframework.ws.soap.se[email protected]3ad8326d] has no mapping for request 
WARN [org.springframework.ws.server.EndpointNotFound] - No endpoint mapping found for [SaajSoapMessage HolidayRequest] 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - Successfully completed request 

あなたには、いくつかの追加情報が必要な場合は、私を聞かせて404を返し、要求ごと

DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Looking for endpoints in application context: WebApplicationContext for namespace 'spring-ws-servlet': startup date [Fri Mar 11 18:41:42 EET 2011]; root of context hierarchy 
DEBUG [org.springframework.ws.server.endpoint.mapping.PayloadRootAnnotationMethodEndpointMapping] - Mapped [{http://mycompany.com/hr/schemas}HolidayRequest] onto endpoint [public void com.mycompany.hr.ws.HolidayEndpoint.handleHolidayRequest(org.jdom.Element) throws java.lang.Exception] 
DEBUG [org.springframework.ws.soap.server.endpoint.mapping.SoapActionAnnotationMethodEndpointMapping] - Looking for endpoints in application context: WebApplicationContext for namespace 'spring-ws-servlet': startup date [Fri Mar 11 18:41:42 EET 2011]; root of context hierarchy 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.InliningXsdSchemaTypesProvider] - Inlining SimpleXsdSchema{http://mycompany.com/hr/schemas} 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.DefaultMessagesProvider] - Looking for elements in schema with target namespace [http://mycompany.com/hr/schemas] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.DefaultMessagesProvider] - Creating message [{http://mycompany.com/hr/definitions}HolidayRequest] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.SuffixBasedPortTypesProvider] - Creating port type [{http://mycompany.com/hr/definitions}HumanResource] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.SuffixBasedPortTypesProvider] - Adding operation [Holiday] to port type [{http://mycompany.com/hr/definitions}HumanResource] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.Soap11Provider] - Creating binding [{http://mycompany.com/hr/definitions}HumanResourceSoap11] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.Soap11Provider] - Creating service [{http://mycompany.com/hr/definitions}HumanResourceService] 
DEBUG [org.springframework.ws.wsdl.wsdl11.provider.Soap11Provider] - Adding port [HumanResourceSoap11] to service [{http://mycompany.com/hr/definitions}HumanResourceService] 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - Published WebApplicationContext of servlet 'spring-ws' as ServletContext attribute with name [org.springframework.web.servlet.FrameworkServlet.CONTEXT.spring-ws] 
INFO [org.springframework.ws.soap.saaj.SaajSoapMessageFactory] - Creating SAAJ 1.3 MessageFactory with SOAP 1.1 Protocol 
DEBUG [org.springframework.ws.soap.saaj.SaajSoapMessageFactory] - Using MessageFactory class [com.sun.xml.internal.messaging.saaj.soap.ver1_1.SOAPMessageFactory1_1Impl] 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - No WebServiceMessageFactory found in servlet 'spring-ws': using default 
DEBUG [org.springframework.ws.soap.server.SoapMessageDispatcher] - No EndpointExceptionResolvers found, using defaults 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - No MessageDispatcher found in servlet 'spring-ws': using default 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - Published [[email protected]e49] as holiday.wsdl 
DEBUG [org.springframework.ws.transport.http.MessageDispatcherServlet] - Published [SimpleXsdSchema{http://mycompany.com/hr/schemas}] as org.springframework.xml.xsd.SimpleXsdSchema#0.xsd 

起動時にログ

に書きましたご了承ください。

UPDそれはスキーム/名前空間のものなしで機能しました。

+0

を持っています。私はそれがmettersなら、私はそれを投稿することができます。 –

+0

ウェブサーバーとしてTomcatを使用しています –

+1

デバッグをオンにしましたか?過去にSpring WSを使って作業していたとき、それがなければこれらの問題をデバッグすることはほとんど不可能でした。あなたはその情報を取得した後にそれを添付してください。 –

答えて

1

は、私は、同じドメインのJavaScriptコードからアクセスしてきた代わりに/ HumanService/

のあなた http://localhost:8080/ws/holidayService/
+0

うん。あなたは正しいです。私は間違った情報を質問に提供します。 –

関連する問題