Apache Camel和Web服务 [英] Apache Camel and web services

查看:82
本文介绍了Apache Camel和Web服务的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图了解如何将Apache Camel与提供WSDL的任何Web服务集成以生成其类,然后再调用其方法以返回一些请求.

I am trying to understand how to integrate Apache Camel with any web service that provides a WSDL to generate its classes to afterward call his methods to return some requests.

我已经对 camel-spring-ws camel-cxf 软件包进行了一些研究.如我所见,Spring Web Services组件不支持使用WSDL,但CXF支持,但是它仅支持与CXF中托管的JAX-WS服务的连接.

I've studied a little about camel-spring-ws and camel-cxf packages. As I can see Spring Web Services Component does not support the use of WSDL but CXF does, however it only supports connections with JAX-WS services hosted in CXF.

如果我从客户那里收到WSDL,可以使用CXF吗?还是我需要创建一个自定义组件来使用他的方法?

If I receive a WSDL from a customer, could I use CXF? Or would I need to create a custom component to use his methods?

据我所知,最简单的实现方法是创建 Process Bean 来调用远程Web服务.

As far as I can see the simplest way to implement it would be creating a Process or a Bean to invokes the remote web service.

我试图实现一个生产者来调用远程Web服务.我的 beans.xml :

I've tried to implement a producer to call a remote web service. My beans.xml:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xmlns:cxf="http://camel.apache.org/schema/cxf"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd 
       http://camel.apache.org/schema/cxf http://camel.apache.org/schema/cxf/camel-cxf.xsd">

    <import resource="classpath:META-INF/cxf/cxf.xml"/> 

    <cxf:cxfEndpoint 
        id="osvEndpoint" 
        address="http://10.193.1.90:8767/" 
        serviceClass="siemens_hiq8000.SiemensHiq8000PortType"/> 

    <bean id="osvWebServiceProcessor" class="br.com.willianantunes.processor.OsvWebServiceProcessor" />

</beans>

我的路线:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
       xmlns:camel="http://camel.apache.org/schema/spring"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
       http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd">

    <routeContext id="osvWebServiceInvoke" xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="quartz2://test?cron=0/10+*+*+*+*+?"/>
            <process ref="osvWebServiceProcessor" />
            <to uri="cxf:bean:osvEndpoint"/>
            <to uri="log:live?level=INFO" />
        </route>
    </routeContext>

</beans>

和我的处理器:

public class OsvWebServiceProcessor implements Processor
{
    @Override
    public void process(Exchange exchange) throws Exception
    {
        Message inMessage = exchange.getIn();

        // The method to be called
        inMessage.setHeader(CxfConstants.OPERATION_NAME, "getVersion");

        // Parameters to be passed into the web service
        List<Object> params = new ArrayList<Object>();
        ResultCodeStructHolder resultCodeStructHolder = new ResultCodeStructHolder();
        VersionDataHolder versionDataHolder = new VersionDataHolder();
        params.add(resultCodeStructHolder);
        params.add(versionDataHolder);
        inMessage.setBody(params);
    }
}

getVersion方法需要一些参数,如下所示:

The method getVersion needs some parameters as followed:

public void getVersion(siemens_hiq8000.holders.ResultCodeStructHolder result, 
siemens_hiq8000.holders.VersionDataHolder versionData) throws java.rmi.RemoteException;

我如何通过他们?这些持有人必须充满网络服务的响应.当我运行项目时,出现以下错误:

How can I pass them? These holders must be filled with the response of the web service. When I run my project I get the following error:

[main] INFO org.apache.cxf.service.factory.ReflectionServiceFactoryBean - Creating Service {http://siemens_hiq8000/}SiemensHiq8000PortType from class siemens_hiq8000.SiemensHiq8000PortType
Exception in thread "main" java.lang.NoSuchMethodError: org.apache.cxf.wsdl11.WSDLEndpointFactory.createEndpointInfo(Lorg/apache/cxf/service/model/ServiceInfo;Lorg/apache/cxf/service/model/BindingInfo;Ljava/util/List;)Lorg/apache/cxf/service/model/EndpointInfo;
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpointInfo(AbstractWSDLBasedEndpointFactory.java:287)
    at org.apache.cxf.frontend.AbstractWSDLBasedEndpointFactory.createEndpoint(AbstractWSDLBasedEndpointFactory.java:144)
    at org.apache.cxf.frontend.ClientFactoryBean.create(ClientFactoryBean.java:91)
    at org.apache.camel.component.cxf.CxfSpringEndpoint.createClient(CxfSpringEndpoint.java:116)
    at org.apache.camel.component.cxf.CxfProducer.doStart(CxfProducer.java:76)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.startService(DefaultCamelContext.java:2869)
    at org.apache.camel.impl.DefaultCamelContext.doAddService(DefaultCamelContext.java:1097)
    at org.apache.camel.impl.DefaultCamelContext.addService(DefaultCamelContext.java:1058)
    at org.apache.camel.impl.ProducerCache.doGetProducer(ProducerCache.java:405)
    at org.apache.camel.impl.ProducerCache.acquireProducer(ProducerCache.java:123)
    at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:219)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)
    at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)
    at org.apache.camel.processor.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1272)
    at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:44)
    at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:31)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)
    at org.apache.camel.processor.interceptor.DefaultChannel.doStart(DefaultChannel.java:153)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:61)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)
    at org.apache.camel.processor.MulticastProcessor.doStart(MulticastProcessor.java:1060)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:59)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:103)
    at org.apache.camel.util.ServiceHelper.startServices(ServiceHelper.java:89)
    at org.apache.camel.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:79)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.util.ServiceHelper.startService(ServiceHelper.java:74)
    at org.apache.camel.impl.RouteService.startChildService(RouteService.java:340)
    at org.apache.camel.impl.RouteService.warmUp(RouteService.java:182)
    at org.apache.camel.impl.DefaultCamelContext.doWarmUpRoutes(DefaultCamelContext.java:3090)
    at org.apache.camel.impl.DefaultCamelContext.safelyStartRouteServices(DefaultCamelContext.java:3020)
    at org.apache.camel.impl.DefaultCamelContext.doStartOrResumeRoutes(DefaultCamelContext.java:2797)
    at org.apache.camel.impl.DefaultCamelContext.doStartCamel(DefaultCamelContext.java:2653)
    at org.apache.camel.impl.DefaultCamelContext.access$000(DefaultCamelContext.java:167)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2467)
    at org.apache.camel.impl.DefaultCamelContext$2.call(DefaultCamelContext.java:2463)
    at org.apache.camel.impl.DefaultCamelContext.doWithDefinedClassLoader(DefaultCamelContext.java:2486)
    at org.apache.camel.impl.DefaultCamelContext.doStart(DefaultCamelContext.java:2463)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:2432)
    at org.apache.camel.spring.SpringCamelContext.maybeStart(SpringCamelContext.java:255)
    at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:121)
    at org.apache.camel.spring.CamelContextFactoryBean.onApplicationEvent(CamelContextFactoryBean.java:332)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:151)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:128)
    at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:331)
    at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:773)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:483)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
    at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)
    at org.apache.camel.spring.Main.createDefaultApplicationContext(Main.java:216)
    at org.apache.camel.spring.Main.doStart(Main.java:156)
    at org.apache.camel.support.ServiceSupport.start(ServiceSupport.java:61)
    at org.apache.camel.main.MainSupport.run(MainSupport.java:150)
    at br.com.willianantunes.test.Program.main(Program.java:12)

解决方案

对于那些希望骆驼cxf像生产者一样工作的人,请按照以下步骤进行操作:

Solution

For the ones who want a camel-cxf to act like a producer, just follow the steps bellow as an example:

  1. 首先,我在此处 开发者页面中的a>.
  2. 必须使用客户端代码才能在选项serviceClass中告知SEI(服务端点接口).您可以生成以下命令:
  1. First I download the last WSDL file available for OpenScape Voice here in this developer page.
  2. The client code is necessary to inform in the option serviceClass the SEI (Service Endpoint Interface). You can generate issuing the following command:

wsdl2java -client -d"TargetFolderHere" -autoNameResolution"OpenScape-Voice_V8.00.28.01.wsdl"

wsdl2java -client -d "TargetFolderHere" -autoNameResolution "OpenScape-Voice_V8.00.28.01.wsdl"

  1. 将生成的客户端类插入项目中. WSDL文件也是如此.
  2. 在beans.xml中通知cxfEndpoint配置.

  1. Insert the generated client classes in your project. The same applies to the WSDL file.
  2. In your beans.xml inform the cxfEndpoint configuration.

<import resource="classpath:META-INF/cxf/cxf.xml" />    

<cxf:cxfEndpoint xmlns:urn="urn:openscape-voice"
    id="osvEndpoint" 
    address="http://10.193.1.90:8767/" 
    serviceClass="voice.openscape.OpenscapeVoicePortType"
    wsdlURL="OpenScape-Voice_V8.00.28.01.wsdl"
    serviceName="urn:openscape_voice">  
</cxf:cxfEndpoint>

<bean id="osvWebServiceProcessor" class="br.com.willianantunes.processor.OsvWebServiceProcessor" />

  • 在调用Web服务之前,请配置处理器以通知参数和要执行的方法.

  • Before the web service call, configure a processor to inform the parameters and the method to execute.

    Message inMessage = exchange.getIn();
    
    // The method to be called
    inMessage.setHeader(CxfConstants.OPERATION_NAME, "GetVersion");
    
    // Parameters to be passed into the web service
    List<Object> params = new ArrayList<Object>();
    
    Holder<ResultCodeStruct> result = new Holder<>();
    Holder<VersionData> versionData = new Holder<>();
    
    params.add(result);
    params.add(versionData);
    inMessage.setBody(params);
    

  • 现在,您可以配置路由并插入camelContext作为完成任务的参考.

  • Now you can configure the route and insert in your camelContext as a ref to accomplish the task.

    <routeContext id="osvWebServiceInvoke" xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="quartz2://test?cron=0/10+*+*+*+*+?"/>
            <process ref="osvWebServiceProcessor"/>
            <to uri="cxf:bean:osvEndpoint"/>
            <to uri="log:live?level=INFO"/>
        </route>
    </routeContext>
    

  • 日志显示以下内容:

    - Quartz scheduler 'DefaultQuartzScheduler-main-application' initialized from an externally provided properties instance.
    - Quartz scheduler version: 2.2.1
    - Job Camel_main-application.test (triggerType=CronTriggerImpl, jobClass=CamelJob) is scheduled. Next fire date is Tue Mar 31 09:12:00 BRT 2015
    - AllowUseOriginalMessage is enabled. If access to the original message is not needed, then its recommended to turn this option off as it may improve performance.
    - StreamCaching is not in use. If using streams then its recommended to enable stream caching. See more details at http://camel.apache.org/stream-caching.html
    - Creating Service {urn:openscape-voice}openscape_voice from WSDL: OpenScape-Voice_V8.00.28.01.wsdl
    - Could not find endpoint/port for {urn:openscape-voice}openscape_voicePortTypePort in wsdl. Using {urn:openscape-voice}openscape_voice.
    - Route: route1 started and consuming from: Endpoint[quartz2://test?cron=0%2F10+*+*+*+*+%3F]
    - Starting scheduler.
    - Scheduler DefaultQuartzScheduler-main-application_$_NON_CLUSTERED started.
    - Total 1 routes, of which 1 is started.
    - Apache Camel 2.15.0 (CamelContext: main-application) started in 10.759 seconds
    - Exchange[ExchangePattern: InOnly, BodyType: org.apache.cxf.message.MessageContentsList, Body: [null, javax.xml.ws.Holder@508696f5, javax.xml.ws.Holder@333cf1ba]]
    

    我对CXF依赖项有一些问题,所以这是我的pom.xml:

    I had some problems with CXF dependencies, so here is my pom.xml:

    <dependency>
        <groupId>org.apache.camel</groupId>
        <artifactId>camel-cxf</artifactId>
        <version>${camel-version}</version>
    </dependency>
    <!-- Apache CXF -->
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxws</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-frontend-jaxrs</artifactId>
        <version>${cxf.version}</version>
    </dependency>   
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-transports-http-jetty</artifactId>
        <version>${cxf.version}</version>
    </dependency>
    <dependency>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-rt-bindings-soap</artifactId>
        <version>${cxf.version}</version>
    </dependency>   
    <dependency>
        <groupId>javax.ws.rs</groupId>
        <artifactId>jsr311-api</artifactId>
        <version>1.1.1</version>
    </dependency>
    <!-- End of Apache CXF -->
    

    您可以设计一个新的处理器或bean,以从Web服务获取带有响应的主体消息(不是纯SOAP消息,而是以前使用的POJO).

    You can design a new processor or a bean to get the body message with the response (not the pure SOAP message, but the POJO used before) from the web service.

    @Namphibian提供的答案还可以,也可以满足我的目的.

    The answer provided by @Namphibian is OK and can fit to my purpose as well.

    推荐答案

    您指的是Web服务的合同优先或自上而下的开发.用这种方法,您可以从WSDL定义中生成存根代码,并在开发中使用这些类等.我已经做了很多工作,并且使用了.NET,Java,PHP甚至是Delphi中创建的服务中的WSDL(尽管Delphi违反了WSI规范甚至都没有做到这一点).

    You are referring to contract first or top-down development of Web-services. In this approach you generate stub code from the WSDL definitions and use these classes etc in your development. I have done this a lot and I have used WSDL's from service created in .Net, Java, PHP and even Delphi(though Delphi breaks WSI compliance don't even go there).

    CXF几乎可以从您指向该库的任何WSDL生成类.首先,您需要在Maven POM文件中添加一个条目,该条目告诉Maven为您从WSDL生成类.

    CXF will generate classes from just about any WSDL you can point the library at. First thing is that you need to add an entry to your Maven POM file which tell Maven to generate classes from the WSDL for you.

    将以下内容添加到您的POM文件中:

    Add the following to your POM file:

    <plugin>
        <groupId>org.apache.cxf</groupId>
        <artifactId>cxf-codegen-plugin</artifactId>
        <version>get the latest version or the version you want</version>
        <executions>
            <execution>
            <id>generate-sources</id>
            <phase>generate-sources</phase>
            <configuration>
    
                <sourceRoot>
                ${basedir}/target/generated/src/main/java
                </sourceRoot>
                <wsdlOptions>
                    <wsdlOption>
                    <wsdl>
                    URI/FILE PATH OF WSDL HERE
                    </wsdl>
                    <extraargs>
                    <extraarg>-impl</extraarg> <-- use this if you want to implement the service i.e. create it
                    <extraarg>-client</extraarg> <-- us this if you want to generate a client for the service.
                    </extraargs>
                    </wsdlOption>
                </wsdlOptions>
            </configuration>
            <goals>
            <goal>wsdl2java</goal>
            </goals>
            </execution>
        </executions>
    </plugin>
    

    您现在可以运行目标mvn generate-source来生成所需的存根类以使用此文件.

    You can now runt he maven goal mvn generate-source to generate the needed stub classes to use this file.

    由于我生产和使用的大多数Web服务都具有相当复杂的数据结构,因此我通常会进入处理器/bean进行实际的实现.但是,这实际上取决于服务.

    I normally drop into a processor/bean to do the actual implementation as most of the web-services I produce and or consume have rather complex data structures. However this really depends on the service.

    因此,简而言之,您可以使用CXF为几乎(您正在听的Delphi家伙?)Web服务生成存根类,然后在处理器中使用这些生成的类来实现客户端和/或服务器.

    So in short you can use CXF to generate the stub classes for almost(Delphi guys are you listening?) web-service then use these generated classes in a processor to implement the client and or server.

    更新:

    根据上面的示例,您处于正确的轨道.首先,我只想讨论有关骆驼中CXF的一些重要概念. CXF Bean与其他Bean略有不同,例如,当您看到以下代码时:

    Based on your example above you are on the right track. First I want to just discuss something about CXF in camel which is an important concept. The CXF beans are a little different than the other beans for example when you see the following code:

    <from uri="file://....."/>
    <to uri="mock"/>
    

    文件组件是生产者,它毕竟会产生文件,而模拟组件是使用者,因为它接收文件组件产生的数据并将其消耗以完成其任务.

    The file component is a producer it produces files after all and the mock component is a consumer as it takes data produced by the file component and consumes it to do its task.

    Web服务稍微扭曲了这个概念.当您有以下路线时:

    Web-services twists this concept slightly. When you have a route such as:

    由于cxf bean调用Web服务,因此称为生产者.当您将cxf bean用作使用者或路由的<from>部分时,它会变得很有趣.

    The cxf bean is called a producer as it calls a web service. It gets interesting when you use a cxf bean as a consumer or in the <from> part of your route.

    以下是网络服务使用者的示例:

    Here is an example of a web-service consumer:

    <from uri="cxf:bean:someService" />
    

    CXF bean正在使用Web服务调用,然后将消息发送到其他各个部分.这使您可以暴露一些非常复杂的内容,例如从FTP服务器下载文件,通过JDBC调用将内容丰富到其中,然后将所丰富的数据作为Web服务针对SAP系统进行处理.您的路由将<from>中的cxf bean作为服务公开,其余的路由可以完成所有集成,但它作为Web服务公开.非常强大的概念.

    The CXF bean is consuming the web-service call and then sending the message on to various other parts. This allows you to expose something very complex such as downloading a file from an FTP server, enriching the contents to with a JDBC call and then processing the enriched data against a SAP system as web-service. Your route exposes the cxf bean in the <from> as the service the rest of the route can do all the integration but it is exposed as a web-service. VERY powerful concept.

    在您的情况下,您的Web服务Bean是生产者或客户.我通常不将cxf Bean用于客户端,因为我消耗的服务可能相当复杂,并且我需要Java的全部功能来处理这些情况.因此,我将向您展示如何以这种方式进行操作.

    In your case your web-service bean is a producer or a client. I typically don't use cxf beans for clients as te services I consume can be rather complex and i need the full power of Java to handle these cases. So I will show you how to do it this way.

    所以在我的世界里,我会选择以下骆驼路线:

    So in my world I would do the following camel route:

    <routeContext id="osvWebServiceInvoke" xmlns="http://camel.apache.org/schema/spring">
        <route>
            <from uri="quartz2://test?cron=0/10+*+*+*+*+?"/>
            <process ref="osvWebServiceProcessor" />
            <to uri="log:live?level=INFO" />
        </route>
    </routeContext>
    

    我的处理器bean将更改为此:

    And my processor bean will change to this:

    public class OsvWebServiceProcessor implements Processor
    {
        @Override
        public void process(Exchange exchange) throws Exception
        {
            Message inMessage = exchange.getIn();
    
    
    
           /*
                  SInce i dont have access to the WSDL and XSD I cant say how the following code will look but essentially you would need to call the web-service here in Java code and get the result back.
    
           */
          outSOAPMsg=  siemens_hiq8000.SiemensHiq8000PortType.OperationName(inSOAPMsg)
          //set the reply into the inbody and send onto other components for processing.
          inMessage.setBody(outSOAPMsg);
    
      }
    }
    

    看着您的代码,我意识到看来您的存根类未正确生成.我强烈建议您将帖子中描述的项目添加到您的POM文件中.如果您可以发布一些WSDL和XSD文件,我可以为您提供更多描述性的答案.

    Looking at your code I realised that it appears that your stub classes are not generated correctly. I strongly urge you to add the items described in my post to your POM file. If you could post some of the WSDL and XSD files I could give you more descriptive answer.

    这篇关于Apache Camel和Web服务的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

    查看全文
    登录 关闭
    扫码关注1秒登录
    发送“验证码”获取 | 15天全站免登陆