小编Abh*_*mar的帖子

SOAPHandler 的 handleMessage 方法没有被调用,而是 getHeaders 被调用

我是 SOAP 世界的新手。

我已经使用 maven 插件将wsdl文件转换为java

下面是 pom.xml 配置。

<plugin>
            <groupId>org.apache.cxf</groupId>
            <artifactId>cxf-codegen-plugin</artifactId>
            <version>3.1.12</version>
            <executions>
                <execution>
                    <id>generate-sources</id>
                    <phase>generate-sources</phase>
                    <configuration>
                        <sourceRoot>${project.basedir}/src/main/java</sourceRoot>
                        <wsdlOptions>
                            <wsdlOption>
                                <wsdl>${project.basedir}/src/main/resources/EIAproxy.wsdl</wsdl>
                                <wsdlLocation>classpath:EIAproxy.wsdl</wsdlLocation>
                            </wsdlOption>
                        </wsdlOptions>
                    </configuration>
                    <goals>
                        <goal>wsdl2java</goal>
                    </goals>
                </execution>
            </executions>
        </plugin>
Run Code Online (Sandbox Code Playgroud)

下面是类文件

接口定义

@WebService(targetNamespace = "http://schema.concierge.com", name = "EaiEnvelopeSoap")
@XmlSeeAlso({com.concierge.schema.envelope.ObjectFactory.class, ObjectFactory.class})
@SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
public interface EaiEnvelopeSoap {

@WebResult(name = "clientRequestResponse", targetNamespace = "http://schema.concierge.com", partName = "parameters")
@WebMethod(action = "http://www.openuri.org/clientRequest")
  public ClientRequestResponse clientRequest(
    @WebParam(partName = "parameters", name = "clientRequest", targetNamespace = "http://schema.concierge.com")
    ClientRequest parameters
); …
Run Code Online (Sandbox Code Playgroud)

java soap web-services soap-client maven

6
推荐指数
0
解决办法
1547
查看次数

Java8 Parallel Stream花费时间对值进行求和

我正在练习java8并行流部分并编写一个程序,它将从0传递给参数的数字加到该数字.

例如,如果我通过10,它将从1到10的数字相加并返回输出.

以下是该计划

public class ParellelStreamExample {



    public static void main(String[] args) {
        System.out.println("Long Range value - "+ Long.MIN_VALUE + " to "+ Long.MAX_VALUE);
        long startTime = System.nanoTime();
        long sum = sequentailSum(100000000);
        System.out.println(
                "Time in sequential execution " + (System.nanoTime() - startTime) / 1000000 + " msec with sum = " + sum);
        long startTime1 = System.nanoTime();
        long sum1 = parellelSum(100000000);
        System.out.println("Time in parallel execution " + (System.nanoTime() - startTime1) / 1000000
                + " msec with sum = " + …
Run Code Online (Sandbox Code Playgroud)

java parallel-processing out-of-memory java-8 java-stream

4
推荐指数
1
解决办法
262
查看次数