- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
SpringWS 服务不通过 SOAP UI 响应请求?
同学们,我是Spring初学者,需要帮助。我创建了 Web 服务并可以在 SOAP UI 中接收 wsdl 描述,但问题是服务不响应请求。这是我的网络服务配置:
package com.mayacomp.app;
import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.ws.config.annotation.EnableWs;
import org.springframework.ws.config.annotation.WsConfigurerAdapter;
import org.springframework.ws.transport.http.MessageDispatcherServlet;
import org.springframework.ws.wsdl.wsdl11.DefaultWsdl11Definition;
import org.springframework.xml.xsd.SimpleXsdSchema;
import org.springframework.xml.xsd.XsdSchema;
@EnableWs
@Configuration
public class WebServiceConfig extends WsConfigurerAdapter {
@Bean
public ServletRegistrationBean dispatcherServlet(ApplicationContext applicationContext) {
MessageDispatcherServlet servlet = new MessageDispatcherServlet();
servlet.setApplicationContext(applicationContext);
return new ServletRegistrationBean(servlet, "/services/*");
}
@Bean(name = "APPService")
public DefaultWsdl11Definition defaultWsdl11Definition(XsdSchema APPServiceSchema) {
DefaultWsdl11Definition wsdl11Definition = new DefaultWsdl11Definition();
wsdl11Definition.setPortTypeName("ApplicationWS");
wsdl11Definition.setLocationUri("/APPService/");
wsdl11Definition.setTargetNamespace("http://mayaapp.com/application");
wsdl11Definition.setSchema(APPServiceSchema);
return wsdl11Definition;
}
@Bean
public XsdSchema APPServiceSchema() {
return new SimpleXsdSchema(new ClassPathResource("META-INF/schemas/application.xsd"));
}
}
我的端点类:
package com.mayacomp.endpoint;
import java.util.logging.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ws.server.endpoint.annotation.Endpoint;
import org.springframework.ws.server.endpoint.annotation.PayloadRoot;
import org.springframework.ws.server.endpoint.annotation.RequestPayload;
import org.springframework.ws.server.endpoint.annotation.ResponsePayload;
import com.mayacomp.app.InternalHistRequest;
import com.mayacomp.app.InternalHistResponse;
import com.mayacomp.app.InternalCreditHistFlagsType;
import com.mayacomp.app.InternalCreditHistIndicatorsType;
import com.mayacomp.app.ResponseHeaderType;
import com.mayacomp.service.APPService;
@Endpoint
public class WsEndpoint {
private static final Logger LOG = Logger.getLogger(WsEndpoint.class.getName());
private static final String TARGET_NAMESPACE = "http://mayaapp.com/application";
@Autowired
public APPService APPService_i;
@PayloadRoot(localPart = "InternalHistRequest", namespace = TARGET_NAMESPACE)
public @ResponsePayload InternalHistResponse getInternalCredHist(@RequestPayload InternalHistRequest request) {
LOG.info("Test");
InternalHistResponse _return = new InternalHistResponse();
_return.setClientID(new java.math.BigInteger("42823928316076042522945935239155481381"));
try
{
ResponseHeaderType _returnResponseHeader = new ResponseHeaderType();
_returnResponseHeader.setRequestUid("RequestUid-207722529");
_returnResponseHeader.setRequestTimestamp(javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar("2015-05-06T10:28:37.616+03:00"));
_returnResponseHeader.setResponseUid("ResponseUid2066314058");
_returnResponseHeader.setResponseTimestamp(javax.xml.datatype.DatatypeFactory.newInstance().newXMLGregorianCalendar("2015-05-06T10:28:37.616+03:00"));
_returnResponseHeader.setResponseCode(1883325675);
_returnResponseHeader.setResponseDescription("ResponseDescription-1084371447");
_return.setResponseHeader(_returnResponseHeader);
/* call Spring injected service implementation to retrieve credit history data */
InternalCreditHistFlagsType _returnInternalCreditHistFlags = APPService_i.getInternalCreditHistFlagsType(request);
_return.setInternalCreditHistFlags(_returnInternalCreditHistFlags);
/* call Spring injected service implementation to retrieve credit history data */
InternalCreditHistIndicatorsType _returnInternalCreditHisIndicators = APPService_i.getInternalCredHist(request);
_return.setInternalCreditHisIndicators(_returnInternalCreditHisIndicators);
return _return;
}
catch (java.lang.Exception ex) {
ex.printStackTrace();
throw new RuntimeException(ex);
}
}
public void setAPPService(APPService APPService_p)
{
this.APPService_i = APPService_p;
}
}
我的pom文件(可能是有依赖的东西)
http://maven.apache.org/maven-v4_0_0.xsd"> 4.0.0 com.mayacomp.pco 应用服务
<version>0.0.1-SNAPSHOT</version>
<name>APPService Spring-WS Application</name>
<url>http://www.springframework.org/spring-ws</url>
<inceptionYear>2015</inceptionYear>
<packaging>jar</packaging>
<build>
<finalName>PCOService</finalName>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tomcat-maven-plugin</artifactId>
<version>1.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<goals>
<goal>xjc</goal>
</goals>
<phase>generate-sources</phase>
</execution>
</executions>
<configuration>
<clearOutputDir>false</clearOutputDir>
<outputDirectory>src/main/java</outputDirectory>
<schemaDirectory>src/main/resources/META-INF/schemas</schemaDirectory>
<includeSchema>**/*.xsd</includeSchema>
<bindingDirectory>src/main/java/com/mayacomp/app</bindingDirectory>
<enableIntrospection>false</enableIntrospection>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>wsdl4j</groupId>
<artifactId>wsdl4j</artifactId>
<version>1.6.3</version>
</dependency>
<!-- Spring dependencies -->
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>4.1.7.RELEASE</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<artifactId>commons-logging</artifactId>
<groupId>commons-logging</groupId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter</artifactId>
<version>1.2.5.RELEASE</version>
<exclusions>
<exclusion>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-logging</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-log4j</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.ws</groupId>
<artifactId>spring-ws-core</artifactId>
<version>2.2.1.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-ws</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
<version>4.1.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-ws</artifactId>
<version>1.2.5.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>4.1.7.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-expression</artifactId>
<version>4.1.7.RELEASE</version>
</dependency>
</dependencies>
正如我所说,我在
之后有可用的 wsdlmvn -U spring-boot:run
通过网址 http://localhost:8080/services/APPService/APPService.wsdl但操作不工作。请帮忙。
更新Spring Boot 日志跟踪:
DEBUG: [авг-03 13:08:33,082] boot.logging.ClasspathLoggingApplicationListener - Application started with classpath: [file:/C:/Users/Maya/workspace/APPService/src/main/resources/, file:/C:/Users/Maya/workspace/APPService/target/classes/, file:/C:/Users/Maya/.m2/repository/com/fasterxml/classmate/1.0.0/classmate-1.0.0.jar, file:/C:/Users/Maya/.m2/repository/log4j/log4j/1.2.17/log4j-1.2.17.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-starter/1.2.5.RELEASE/spring-boot-starter-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/yaml/snakeyaml/1.14/snakeyaml-1.14.jar, file:/C:/Users/Maya/.m2/repository/aopalliance/aopalliance/1.0/aopalliance-1.0.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-beans/4.1.7.RELEASE/spring-beans-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/slf4j/slf4j-api/1.7.12/slf4j-api-1.7.12.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-jms/4.1.7.RELEASE/spring-jms-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/ws/spring-ws-support/2.2.1.RELEASE/spring-ws-support-2.2.1.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/com/fasterxml/jackson/core/jackson-annotations/2.4.0/jackson-annotations-2.4.0.jar, file:/C:/Users/Maya/.m2/repository/org/slf4j/jul-to-slf4j/1.7.12/jul-to-slf4j-1.7.12.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-starter-web/1.2.5.RELEASE/spring-boot-starter-web-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/slf4j/jcl-over-slf4j/1.7.12/jcl-over-slf4j-1.7.12.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/ws/spring-xml/2.2.1.RELEASE/spring-xml-2.2.1.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-aop/4.0.9.RELEASE/spring-aop-4.0.9.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/com/fasterxml/jackson/core/jackson-databind/2.4.6/jackson-databind-2.4.6.jar, file:/C:/Users/Maya/.m2/repository/org/jboss/logging/jboss-logging/3.1.3.GA/jboss-logging-3.1.3.GA.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-starter-log4j/1.2.5.RELEASE/spring-boot-starter-log4j-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/wsdl4j/wsdl4j/1.6.3/wsdl4j-1.6.3.jar, file:/C:/Users/Maya/.m2/repository/org/hibernate/hibernate-validator/5.1.3.Final/hibernate-validator-5.1.3.Final.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-context/4.1.7.RELEASE/spring-context-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/ws/spring-ws-core/2.2.1.RELEASE/spring-ws-core-2.2.1.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-webmvc/4.0.9.RELEASE/spring-webmvc-4.0.9.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-autoconfigure/1.2.5.RELEASE/spring-boot-autoconfigure-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/apache/tomcat/embed/tomcat-embed-websocket/8.0.23/tomcat-embed-websocket-8.0.23.jar, file:/C:/Users/Maya/.m2/repository/org/apache/tomcat/embed/tomcat-embed-el/8.0.23/tomcat-embed-el-8.0.23.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-starter-tomcat/1.2.5.RELEASE/spring-boot-starter-tomcat-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-web/4.1.7.RELEASE/spring-web-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/apache/tomcat/embed/tomcat-embed-logging-juli/8.0.23/tomcat-embed-logging-juli-8.0.23.jar, file:/C:/Users/Maya/.m2/repository/commons-logging/commons-logging/1.1.3/commons-logging-1.1.3.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-messaging/4.1.7.RELEASE/spring-messaging-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-oxm/4.0.9.RELEASE/spring-oxm-4.0.9.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot-starter-ws/1.2.5.RELEASE/spring-boot-starter-ws-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-tx/4.1.7.RELEASE/spring-tx-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/slf4j/slf4j-log4j12/1.7.12/slf4j-log4j12-1.7.12.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-expression/4.1.7.RELEASE/spring-expression-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/boot/spring-boot/1.2.5.RELEASE/spring-boot-1.2.5.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/com/fasterxml/jackson/core/jackson-core/2.4.6/jackson-core-2.4.6.jar, file:/C:/Users/Maya/.m2/repository/org/springframework/spring-core/4.1.7.RELEASE/spring-core-4.1.7.RELEASE.jar, file:/C:/Users/Maya/.m2/repository/org/apache/tomcat/embed/tomcat-embed-core/8.0.23/tomcat-embed-core-8.0.23.jar]
DEBUG: [авг-03 13:08:33,572] springframework.boot.SpringApplication - Loading source class com.mayacomp.app.WsApplication
DEBUG: [авг-03 13:08:33,627] context.config.ConfigFileApplicationListener - Skipped config file 'file:./config/application.xml' resource not found
DEBUG: [авг-03 13:08:33,627] context.config.ConfigFileApplicationListener - Skipped config file 'file:./config/application.yml' resource not found
DEBUG: [авг-03 13:08:33,628] context.config.ConfigFileApplicationListener - Skipped config file 'file:./config/application.properties' resource not found
DEBUG: [авг-03 13:08:33,628] context.config.ConfigFileApplicationListener - Skipped config file 'file:./config/application.yaml' resource not found
DEBUG: [авг-03 13:08:33,629] context.config.ConfigFileApplicationListener - Skipped config file 'file:./application.xml' resource not found
DEBUG: [авг-03 13:08:33,629] context.config.ConfigFileApplicationListener - Skipped config file 'file:./application.yml' resource not found
DEBUG: [авг-03 13:08:33,630] context.config.ConfigFileApplicationListener - Skipped config file 'file:./application.properties' resource not found
DEBUG: [авг-03 13:08:33,630] context.config.ConfigFileApplicationListener - Skipped config file 'file:./application.yaml' resource not found
DEBUG: [авг-03 13:08:33,631] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/config/application.xml' resource not found
DEBUG: [авг-03 13:08:33,631] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/config/application.yml' resource not found
DEBUG: [авг-03 13:08:33,632] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/config/application.properties' resource not found
DEBUG: [авг-03 13:08:33,632] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/config/application.yaml' resource not found
DEBUG: [авг-03 13:08:33,633] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/application.xml' resource not found
DEBUG: [авг-03 13:08:33,633] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/application.yml' resource not found
DEBUG: [авг-03 13:08:33,634] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/application.properties' resource not found
DEBUG: [авг-03 13:08:33,634] context.config.ConfigFileApplicationListener - Skipped config file 'classpath:/application.yaml' resource not found
INFO : [авг-03 13:08:33,642] context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Refreshing org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@731b45a8: startup date [Mon Aug 03 13:08:33 MSK 2015]; root of context hierarchy
DEBUG: [aug-03 13:08:33,649] context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Bean factory for org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@731b45a8: org.springframework.beans.factory.support.DefaultListableBeanFactory@5ff5d9af: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,wsApplication]; root of factory hierarchy
DEBUG: [aug-03 13:08:35,233] context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Unable to locate MessageSource with name 'messageSource': using default [org.springframework.context.support.DelegatingMessageSource@2fffdd6a]
DEBUG: [aug-03 13:08:35,233] context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Using ApplicationEventMulticaster [org.springframework.context.event.SimpleApplicationEventMulticaster@4cc2be65]
DEBUG: [aug-03 13:08:35,658] embedded.tomcat.TomcatEmbeddedServletContainerFactory - Code archive: C:\Users\Maya\.m2\repository\org\springframework\boot\spring-boot\1.2.5.RELEASE\spring-boot-1.2.5.RELEASE.jar
DEBUG: [aug-03 13:08:35,659] embedded.tomcat.TomcatEmbeddedServletContainerFactory - Code archive: C:\Users\Maya\.m2\repository\org\springframework\boot\spring-boot\1.2.5.RELEASE\spring-boot-1.2.5.RELEASE.jar
DEBUG: [aug-03 13:08:35,660] embedded.tomcat.TomcatEmbeddedServletContainerFactory - Document root: C:\Users\Maya\workspace\APPService\src\main\webapp
INFO : [aug-03 13:08:35,705] embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat initialized with port(s): 8080 (http)
DEBUG: [aug-03 13:08:36,156] context.embedded.ServletContextInitializerBeans - Added existing Servlet initializer bean 'dispatcherServlet'; order=2147483647, resource=class path resource [com/mayacomp/app/WebServiceConfig.class]
DEBUG: [aug-03 13:08:36,271] context.embedded.ServletContextInitializerBeans - Created Filter initializer for bean 'characterEncodingFilter'; order=-2147483648, resource=class path resource [org/springframework/boot/autoconfigure/web/HttpEncodingAutoConfiguration.class]
DEBUG: [aug-03 13:08:36,272] context.embedded.ServletContextInitializerBeans - Created Filter initializer for bean 'hiddenHttpMethodFilter'; order=-2147483638, resource=class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration.class]
DEBUG: [aug-03 13:08:36,827] context.embedded.ServletContextInitializerBeans - Created EventListener initializer for bean 'requestContextListener'; order=2147483647, resource=class path resource [org/springframework/boot/autoconfigure/web/WebMvcAutoConfiguration$WebMvcAutoConfigurationAdapter.class]
INFO : [aug-03 13:08:36,830] context.embedded.ServletRegistrationBean - Mapping servlet: 'messageDispatcherServlet' to [/services/*]
INFO : [aug-03 13:08:36,837] context.embedded.FilterRegistrationBean - Mapping filter: 'characterEncodingFilter' to: [/*]
INFO : [aug-03 13:08:36,838] context.embedded.FilterRegistrationBean - Mapping filter: 'hiddenHttpMethodFilter' to: [/*]
DEBUG: [aug-03 13:08:36,987] context.web.OrderedHiddenHttpMethodFilter - Initializing filter 'hiddenHttpMethodFilter'
DEBUG: [aug-03 13:08:36,989] context.web.OrderedHiddenHttpMethodFilter - Filter 'hiddenHttpMethodFilter' configured successfully
DEBUG: [aug-03 13:08:36,990] context.web.OrderedCharacterEncodingFilter - Initializing filter 'characterEncodingFilter'
DEBUG: [aug-03 13:08:36,990] context.web.OrderedCharacterEncodingFilter - Filter 'characterEncodingFilter' configured successfully
DEBUG: [aug-03 13:08:37,676] context.embedded.AnnotationConfigEmbeddedWebApplicationContext - Unable to locate LifecycleProcessor with name 'lifecycleProcessor': using default [org.springframework.context.support.DefaultLifecycleProcessor@5579e98a]
DEBUG: [aug-03 13:08:37,682] autoconfigure.logging.AutoConfigurationReportLoggingInitializer -
=========================
AUTO-CONFIGURATION REPORT
=========================
Positive matches:
-----------------
bla bla
Negative matches:
bla bla
INFO : [aug-03 13:08:37,877] embedded.tomcat.TomcatEmbeddedServletContainer - Tomcat started on port(s): 8080 (http)
最佳答案
请删除您的 pom 中的重复条目:
在您的 WebServiceConfig 中请添加:
servlet.setTransformWsdlLocations(true);
您必须在构建期间自动生成基于 XML 架构的域类。因此,请将其添加到您的 POM 并根据您的要求修改 schemaDir 和 outputDir:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>jaxb2-maven-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<id>xjc</id>
<goals>
<goal>xjc</goal>
</goals>
</execution>
</executions>
<configuration>
<schemaDirectory>${project.basedir}/src/main/resources/</schemaDirectory>
<outputDirectory>${project.basedir}/src/main/java</outputDirectory>
<clearOutputDir>false</clearOutputDir>
</configuration>
我看到您的主要应用程序位于 com.mayacomp.app 包中,并且您已使用 @SpringBootApplication 对此类进行注释。因此,让您的 WS 组件位于包 com.mayacomp.app 下非常重要,否则组件扫描无法找到它们。请注意,使您的 targetNamespace 在依赖组件和 Xml-Request 的 SoapEnvelop 元素中相同。您可以在端点/services 上尝试一下,并使用像 test.xml 这样的测试文件,例如使用 curl:
curl --header "content-type: text/xml" -d @test.xml http://localhost:8080/services/
关于java - Spring WS 服务不通过 SOAPUI 响应任何请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/31783500/
我尝试阅读有关 Spring BOM、Spring Boot 和 Spring IO 的文档。 但是没有说明,我们应该如何一起使用它们? 在我的项目中,我们已经有了自己的 Parent POM ,所以
我正在开发的很酷的企业应用程序正在转向 Spring。这对所有团队来说都是非常酷和令人兴奋的练习,但也是一个巨大的压力源。我们所做的是逐渐将遗留组件移至 Spring 上下文。现在我们有一个 huuu
我正在尝试使用 @Scheduled 运行 Spring 批处理作业注释如下: @Scheduled(cron = "* * * * * ?") public void launchMessageDi
我对这两个概念有点困惑。阅读 Spring 文档,我发现,例如。 bean 工厂是 Spring 容器。我还读到“ApplicationContext 是 BeanFactory 的完整超集”。但两者
我们有一个使用 Spring BlazeDS 集成的应用程序。到目前为止,我们一直在使用 Spring 和 Flex,它运行良好。我们现在还需要添加一些 Spring MVC Controller 。
假设我有一个类(class) Person带属性name和 age ,它可以像这样用 Spring 配置: 我想要一个自定义的 Spring 模式元素,这很容易做到,允许我在我的 Sp
如何在 Java 中以编程方式使用 Spring Data 创建 MongoDB 复合索引? 使用 MongoTemplate 我可以创建一个这样的索引:mongoTemplate.indexOps(
我想使用 spring-complex-task 执行我的应用程序,并且我已经构建了复杂的 spring-batch Flow Jobs,它执行得非常好。 你能解释一下spring批处理流作业与spr
我实现了 spring-boot 应用程序,现在我想将它用作非 spring 应用程序的库。 如何初始化 lib 类,以便 Autowiring 的依赖项按预期工作?显然,如果我使用“new”创建类实
我刚开始学习 spring cloud security,我有一个基本问题。它与 Spring Security 有何不同?我们是否需要在 spring boot 上构建我们的应用程序才能使用 spr
有很多人建议我使用 Spring Boot 而不是 Spring 来开发 REST Web 服务。我想知道这两者到底有什么区别? 最佳答案 总之 Spring Boot 减少了编写大量配置和样板代码的
您能向我解释一下如何使用 Spring 正确构建 Web 应用程序吗?我知道 Spring 框架的最新版本是 4.0.0.RELEASE,但是 Spring Security 的最新版本是 3.2.0
我如何才能知道作为 Spring Boot 应用程序的一部分加载的所有 bean 的名称?我想在 main 方法中有一些代码来打印服务器启动后加载的 bean 的详细信息。 最佳答案 如spring-
我有一个使用 Spring 3.1 构建的 RESTful API,也使用 Spring Security。我有一个 Web 应用程序,也是一个 Spring 3.1 MVC 应用程序。我计划让移动客
升级到 Spring 5 后,我在 Spring Rabbit 和 Spring AMQP 中遇到错误。 两者现在都设置为 1.5.6.RELEASE 有谁知道哪些版本应该与 Spring 5 兼容?
我现在已经使用 Spring Framework 3.0.5 和 Spring Security 3.0.5 多次了。我知道Spring框架使用DI和AOP。我还知道 Spring Security
我收到错误 Unable to Location NamespaceHandler when using context:annotation-config running (java -jar) 由
在 Spring 应用程序中嵌入唯一版本号的策略是什么? 我有一个使用 Spring Boot 和 Spring Web 的应用程序。 它已经足够成熟,我想对其进行版本控制并在运行时看到它显示在屏幕上
我正在使用 spring data jpa 进行持久化。如果存在多个具有相同名称的实体,是否有一种方法可以将一个实体标记为默认值。类似@Primary注解的东西用来解决多个bean的依赖问题 @Ent
我阅读了 Spring 框架的 DAOSupport 类。但是我无法理解这些 DAOSuport 类的优点。在 DAOSupport 类中,我们调用 getXXXTemplate() 方法来获取特定的
我是一名优秀的程序员,十分优秀!