user365314
user365314

Reputation: 336

Spring-ws SOAP 404 error

i did a tutorial after this -> http://java.dzone.com/articles/spring-ws-how when i go to url http://localhost:8080/myService/services/MemberDetailsRequest.wsdl , i get the static wsdl file.. but when i use SoapUI to import in the wsdl file and then test it.. i only get 404 error, any1 has a solution to that?

any suggestions, why i can't get any responses with soapUI?

Upvotes: 5

Views: 9244

Answers (4)

Lee Alexis
Lee Alexis

Reputation: 11

Make sure SoapUI follows your URL mapping. In my case, SoapUI did not automatically append ".wsdl" at the end.

in my web.xml:

<servlet-mapping>
    <servlet-name>Hello</servlet-name>
    <url-pattern>/services/HelloPersonService.wsdl</url-pattern>
</servlet-mapping>

In Soap UI, the ".wsdl" was not there. Just add it manually in the address-bar like thing in Soap UI and proceed with your test.

Upvotes: 1

shaeqk
shaeqk

Reputation: 11

Do a component scan on the package that contains all the endpoints. This worked for me. In memberservice-servlet.xml include the following

<context:component-scan base-package="org.bk.memberservice.endpoint" />

Upvotes: 0

Deepu Surendran
Deepu Surendran

Reputation: 215

PayloadRoot namespace and schema namespace should be same

Upvotes: 0

Simon Tower
Simon Tower

Reputation: 694

Check to make sure that your @PayloadRoot initializers are correct. My "localpart" definition did not match the element name in the XSD. here is how my Java class looks now:

 @PayloadRoot(localPart = "GetLoginRequest", namespace = "<namespace>")

And here is the XSD:

<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema targetNamespace="<namespace>" elementFormDefault="qualified" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="<namespace>">
    <xsd:include schemaLocation="user-types.xsd"></xsd:include>

    <xsd:element name="GetLoginRequest" type="loginRequest"></xsd:element>

    <xsd:element name="GetLoginReply" type="loginReply"></xsd:element>
</xsd:schema>

Upvotes: 3

Related Questions