首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >CXF中的WebService误差

CXF中的WebService误差
EN

Stack Overflow用户
提问于 2011-12-19 18:49:53
回答 1查看 1.3K关注 0票数 2

我在eclipse中创建了一个wsdl,并使用Apache生成了类。之后,我将该服务集成到Jetty中。我实现服务器端代码。我使用SOAP工具来测试服务器的实现。在执行代码时,我得到的错误类似于错误:

代码语言:javascript
复制
WARN  23:47:30,240 | org.apache.cxf.aegis.type.TypeUtil | xsi:type absent, and no type available for sessionId
WARN  23:47:30,240 | org.apache.cxf.aegis.type.TypeUtil | xsi:type absent, and no type available for serverUrlenter code here
WARN  23:47:30,240 | org.apache.cxf.aegis.type.TypeUtil | xsi:type absent, and no type available for cipherTextValue
INFO  23:47:44,188 | org.apache.cxf.interceptor.LoggingOutInterceptor | Outbound Message

这里,sessionId、serverUrl和cipherTextValue是输入。我不知道如何解决这个错误。有人能告诉我答案吗。我挡住了这里。

示例XML请求:

代码语言:javascript
复制
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:dpa="http://ws.ciphercloud.com/dpaas/">
   <soapenv:Header/>
   <soapenv:Body>
      <dpa:detokenizeRequest>
         <sessionId>?</sessionId>
         <serverUrl>?</serverUrl>
         <!--1 or more repetitions:-->
         <cipherTextValue>**ajgkjfagla009!</cipherTextValue>
      </dpa:detokenizeRequest>
   </soapenv:Body>
</soapenv:Envelope>

还有一点是关于如何使用Jetty配置the服务的教程。

请回答我。这是我的阻滞剂..。

提前鸣谢。

谢谢你的回复。

我使用Aegis --当我从java代码生成wsdl时,它工作得很好--当时我的when服务运行良好。但是我从wsdl中生成了java代码,当时我得到了这种类型的错误。我正在发送我的appcontext.xml文件。

代码语言:javascript
复制
<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
    xmlns:cxf="http://cxf.apache.org/core" xmlns:sec="http://cxf.apache.org/configuration/security"
    xmlns:http="http://cxf.apache.org/transports/http/configuration"
    xmlns:httpj="http://cxf.apache.org/transports/http-jetty/configuration"
    xmlns:jaxws="http://cxf.apache.org/jaxws"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
        http://www.springframework.org/schema/beans/spring-beans-2.5.xsd
        http://www.springframework.org/schema/context
        http://www.springframework.org/schema/context/spring-context-2.5.xsd
        http://cxf.apache.org/core
        http://cxf.apache.org/schemas/core.xsd
        http://cxf.apache.org/jaxws
        http://cxf.apache.org/schemas/jaxws.xsd
        http://cxf.apache.org/configuration/security
        http://cxf.apache.org/schemas/configuration/security.xsd
        http://cxf.apache.org/transports/http/configuration
        http://cxf.apache.org/schemas/configuration/http-conf.xsd
        http://cxf.apache.org/transports/http-jetty/configuration
        http://cxf.apache.org/schemas/configuration/http-jetty.xsd"
    default-autowire="byName">

    <!-- Load CXF modules from cxf.jar -->
    <import resource="classpath:META-INF/cxf/cxf.xml" />
    <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml" />
    <import resource="classpath:META-INF/cxf/cxf-servlet.xml" />

    <!-- Enable message logging using the CXF logging feature -->
    <cxf:bus>
        <cxf:features>
            <cxf:logging />
        </cxf:features>
    </cxf:bus>

    <!-- The service bean -->
    <bean id="dataProtectionWebServiceImpl" class="com.ciphercloud.ws.dpaas.DataProtectionWebServiceImpl" />

    <!-- Aegis data binding -->
    <bean id="aegisBean" class="org.apache.cxf.aegis.databinding.AegisDatabinding"
        scope="prototype" />
    <bean id="jaxws-and-aegis-service-factory" class="org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean"
        scope="prototype">
        <property name="dataBinding" ref="aegisBean" />
        <property name="serviceConfigurations">
            <list>
                <bean class="org.apache.cxf.jaxws.support.JaxWsServiceConfiguration" />
                <bean class="org.apache.cxf.aegis.databinding.AegisServiceConfiguration" />
                <bean class="org.apache.cxf.service.factory.DefaultServiceConfiguration" />
            </list>
        </property>
    </bean>

    <!-- Service endpoint -->
    <!--
        See http://incubator.apache.org/cxf/faq.html regarding CXF + Spring
        AOP
    -->
    <jaxws:endpoint id="DataProtectionWebService"
        implementorClass="com.ciphercloud.ws.dpaas.DataProtectionWebServiceImpl"
        implementor="#dataProtectionWebServiceImpl" address="/ws">
        <jaxws:serviceFactory>
            <ref bean="jaxws-and-aegis-service-factory" />
        </jaxws:serviceFactory>
    </jaxws:endpoint>
</beans>

这是我的appcontext.xml。当java代码到wsdl时,这是很好的。但是,当我从wsdl生成代码到java时,请了解Aegis的问题。

就像你说的,我会用jaxb而不是宙斯盾。同时,有任何与您的关注有关的教程,请发送给我的链接。同时,我也会看到这个jaxb。

EN

回答 1

Stack Overflow用户

发布于 2011-12-19 19:03:03

您不能在WSDL优先服务中使用Aegis。你必须使用JAX-B。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/8565950

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档