Spring -ws SOAP 404 Error

After that I did a tutorial -> http://java.dzone.com/articles/spring-ws-how when I go to the url http : // localhost: 8080 / myService / services / MemberDetailsRequest.wsdl , I get a static file wsdl .. but when I use SoapUI to import into the wsdl file and then check this .. I get only 404 error, does any1 have a solution?

any suggestions why can't I get answers using soapUI?

+4
source share
4 answers

Make sure your @PayloadRoot initializers are correct. My definition of "localpart" did not match the element name in XSD. this is what my java class looks like:

@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> 
+3
source

Make sure SoapUI follows your url. In my case, SoapUI did not automatically add “.wsdl” at the end.

in my web.xml:

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

There was no ".wsdl" soap in the user interface. Just add it manually in the address bar, as in the Soap user interface, and continue your test.

+1
source

The namespace and PayloadRoot namespace should be the same

0
source

Test the components in a package that contains all endpoints. It worked for me. The following are included in memberervice-servlet.xml

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

Source: https://habr.com/ru/post/1340859/


All Articles