SOAP service returns 404

hi guys. im developing SOAP web service. but when i call it with SOAP UI, i get
HTTP/1.1 404
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 0
Date: Wed, 14 Aug 2024 13:52:53 GMT
Keep-Alive: timeout=60
Connection: keep-alive
HTTP/1.1 404
X-Content-Type-Options: nosniff
X-XSS-Protection: 1; mode=block
Cache-Control: no-cache, no-store, max-age=0, must-revalidate
Pragma: no-cache
Expires: 0
X-Frame-Options: DENY
Content-Length: 0
Date: Wed, 14 Aug 2024 13:52:53 GMT
Keep-Alive: timeout=60
Connection: keep-alive
my code:
@Endpoint
public class PerlasEndpoint{
private static final String SOAP_NAMESPACE="mynamespace";
@PayloadRoot(namespace=SOAP_NAMESPACE,localPart="idCheckRequest")
@ResponsePayload
public String checkId(@RequestPayload PerlasIdCheckRequestDTO perlasIdCheckRequestDTO) throws IOException{
System.out.println("ASD");
return "perlasIdCheckResponseDTO";
}
}
@Endpoint
public class PerlasEndpoint{
private static final String SOAP_NAMESPACE="mynamespace";
@PayloadRoot(namespace=SOAP_NAMESPACE,localPart="idCheckRequest")
@ResponsePayload
public String checkId(@RequestPayload PerlasIdCheckRequestDTO perlasIdCheckRequestDTO) throws IOException{
System.out.println("ASD");
return "perlasIdCheckResponseDTO";
}
}
@EnableWs
@Configuration
public class PerlasSoapConfig{
@Bean
public ServletRegistrationBean<MessageDispatcherServlet> messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet();
messageDispatcherServlet.setApplicationContext(applicationContext);
messageDispatcherServlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean<MessageDispatcherServlet>(messageDispatcherServlet, "/ws/*");
}
@Bean(name = "perlas")
public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema xsdSchema) {
DefaultWsdl11Definition defaultWsdl11Definition = new DefaultWsdl11Definition();
defaultWsdl11Definition.setPortTypeName("Perlas");
defaultWsdl11Definition.setLocationUri("/ws");
defaultWsdl11Definition.setTargetNamespace("mynamespace");
defaultWsdl11Definition.setSchema(xsdSchema);
return defaultWsdl11Definition;
}
@Bean
public XsdSchema xsdSchema() {
return new SimpleXsdSchema(new ClassPathResource("perlas/perlas.xsd"));
}
}
@EnableWs
@Configuration
public class PerlasSoapConfig{
@Bean
public ServletRegistrationBean<MessageDispatcherServlet> messageDispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet messageDispatcherServlet = new MessageDispatcherServlet();
messageDispatcherServlet.setApplicationContext(applicationContext);
messageDispatcherServlet.setTransformWsdlLocations(true);
return new ServletRegistrationBean<MessageDispatcherServlet>(messageDispatcherServlet, "/ws/*");
}
@Bean(name = "perlas")
public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema xsdSchema) {
DefaultWsdl11Definition defaultWsdl11Definition = new DefaultWsdl11Definition();
defaultWsdl11Definition.setPortTypeName("Perlas");
defaultWsdl11Definition.setLocationUri("/ws");
defaultWsdl11Definition.setTargetNamespace("mynamespace");
defaultWsdl11Definition.setSchema(xsdSchema);
return defaultWsdl11Definition;
}
@Bean
public XsdSchema xsdSchema() {
return new SimpleXsdSchema(new ClassPathResource("perlas/perlas.xsd"));
}
}
idk what im doing wrong. can smb help me out? thx
1 Reply
JavaBot
JavaBot4mo ago
This post has been reserved for your question.
Hey @bambyzas! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here. 💤 Post marked as dormant
This post has been inactive for over 300 minutes, thus, it has been archived. If your question was not answered yet, feel free to re-open this post or create a new one. In case your post is not getting any attention, you can try to use /help ping. Warning: abusing this will result in moderative actions taken against you.
Want results from more Discord servers?
Add your server