简体   繁体   English

使用axis2 eclipse插件从wsdl生成Java代码

[英]Generating java code from wsdl with axis2 eclipse plugin

i have the following wsdl from which i need to generate server java code: 我需要从以下wsdl生成服务器Java代码:

<?xml version="1.0" encoding="UTF-8"?>
<definitions xmlns="http://schemas.xmlsoap.org/wsdl/" 
            xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" 
            xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
            xmlns:tns="http://www.smarttrust.com/mdm/clientprovisioning_1.0/initiator" 
            xmlns:types="http://www.smarttrust.com/mdm/clientprovisioning_1.0/initiator-types" 
            xmlns:common="http://www.smarttrust.com/mdm/clientprovisioning_1.0/common" 
            targetNamespace="http://www.smarttrust.com/mdm/clientprovisioning_1.0/initiator">
    <types>
        <documentation>ClientProvisioningInitiator types are defined in web-clientprovisioning-initiator-types.xsd. 
            Types common with ClientProvisioningService are defined in web-clientprovisioning-common.xsd.
        </documentation>
        <xsd:schema targetNamespace="http://www.smarttrust.com/mdm/clientprovisioning_1.0/initiator">
            <xsd:import namespace="http://www.smarttrust.com/mdm/clientprovisioning_1.0/initiator-types" 
                schemaLocation="web-clientprovisioning-initiator-types.xsd"/>
        </xsd:schema>
    </types>
    <message name="cpDiscovery.Response">
        <documentation></documentation>
        <part name="cpDiscovery.Response" type="types:cpDiscovery.ResponseType"/>
    </message>
    <message name="cpStatus">
        <documentation></documentation>
        <part name="cpStatus" type="types:cpStatusType"/>
    </message>
    <portType name="ClientProvisioningInitiator">
        <documentation>Counterpart for the ClientProvisioningService</documentation>
        <operation name="cpDiscovery.Response">
            <documentation>Receives a response with profile information</documentation>
            <input message="tns:cpDiscovery.Response"/>
        </operation>
        <operation name="cpStatus">
            <documentation>Receives status notifications on what happens with the request and the execution status of the server.
            </documentation>
            <input message="tns:cpStatus"/>
        </operation>
    </portType>
    <binding name="clientProvisioningSOAPBinding" type="tns:ClientProvisioningInitiator">
        <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
        <operation name="cpStatus">
            <soap:operation soapAction="urn:#cpStatus"/>
            <input>
                <soap:body use="literal"/>
            </input>
        </operation>
        <operation name="cpDiscovery.Response">
            <soap:operation soapAction="urn:#cpDiscovery.Response"/>
            <input>
                <soap:body use="literal"/>
            </input>
        </operation>
    </binding>
    <service name="ClientProvisioningInitiator">
        <port name="ClientProvisioningInitiator" binding="tns:clientProvisioningSOAPBinding">
            <soap:address location="http://localhost/#"/>
        </port>
    </service>
</definitions>

When i try to generate code with eclipse axis2 plugin i get java.langInterruptedException no element type is defined for message cpStatus. 当我尝试使用eclipse axis2插件生成代码时,我得到java.langInterruptedException,未为消息cpStatus定义任何元素类型。 Whats wrong? 怎么了?

<message name="cpStatus">
    <documentation></documentation>
    <part name="cpStatus" type="types:cpStatusType"/>
</message>

Somewhere need to be defined the cpStatusType and it isn't. 需要在某个地方定义cpStatusType ,但不是。 Need to be include other xml or added more lines to this xml 需要包含其他xml或向此xml添加更多行

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM