簡體   English   中英

使用axis2 eclipse插件從wsdl生成Java代碼

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

我需要從以下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>

當我嘗試使用eclipse axis2插件生成代碼時,我得到java.langInterruptedException,未為消息cpStatus定義任何元素類型。 怎么了?

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

需要在某個地方定義cpStatusType ,但不是。 需要包含其他xml或向此xml添加更多行

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM