Uploaded image for project: 'Axis2-C'
  1. Axis2-C
  2. AXIS2C-1123

not able to genrate c/c++ client and server side code from wsdl having complex type

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.0
    • None
    • code generation
    • None
    •  WinXP, Apache Axis2/C 1.3.0, java version "1.6.0_05"

    Description

      Hi,

      I am not able to genrate c/c++ client and server side code from wsdl having complex type.
      Following are the details for the Issue.
      I will appretiate if you can help me out on this issue.

      Project: Axis2C(axis2c-bin-1.3.0-win32.zip)
      Components: WSDL processing
      Environment: WinXP, Apache Axis2/C 1.3.0

      Description:
      I get the following ouput from WSDL2WS for the WSDLs that are listed below:

      D:\project3.2\axis2c\wsdl>Java -classpath %CLASSPATH% org.apache.axis.wsdl.wsdl2ws.WSDL2Ws test.wsdl -lc++ -o./client -sclient
      args =
      args =
      args =
      1

                                1. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  Outcome

                                2. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  >ReplayResponse

                                3. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  Notification

                                4. the type found = {http://www.w3.org/2001/XMLSchema}

                                  any

                                5. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  >PrepareResponse

                                6. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  Vote

                                7. the type found = {http://schemas.xmlsoap.org/ws/2003/09/wsat}

                                  ErrorCodes
                                  Exception in thread "main" org.apache.axis.wsdl.wsdl2ws.WrapperFault: unregisterd type {http://schemas.xmlsoap.org/ws/2003/09/wsat
                                  }Notification refered
                                  at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.getServiceInfo(WSDL2Ws.java:219)
                                  at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.genarateWrappers(WSDL2Ws.java:375)
                                  at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:645)

      1) This is the WSDL I run WSDL2WS on :

      test.wsdl
      <?xml version="1.0" encoding="UTF-8"?>
      <wsdl:definitions name="tx_doc_lit" targetNamespace="http://tempuri.org/tx_doc_lit/" xmlns:tns="http://tempuri.org/tx_doc_lit/"
      xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:wsdl1="http://schemas.xmlsoap.org/ws/2003/09/wsat">
      <wsdl:import namespace="http://schemas.xmlsoap.org/ws/2003/09/wsat" location="wstx.wsdl"></wsdl:import>
      <wsdl:binding name="NewBinding" type="wsdl1:CompletionCoordinatorPortType">
      <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
      <wsdl:operation name="CommitOperation">
      <soap:operation soapAction="http://tempuri.org/tx_doc_lit/CommitOperation" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      </wsdl:operation>
      <wsdl:operation name="RollbackOperation">
      <soap:operation soapAction="http://tempuri.org/tx_doc_lit/RollbackOperation" />
      <wsdl:input>
      <soap:body use="literal" />
      </wsdl:input>
      </wsdl:operation>
      </wsdl:binding>
      <wsdl:service name="NewService">
      <wsdl:port name="NewPort" binding="tns:NewBinding">
      <soap:address location="http://example.com/" />
      </wsdl:port>
      </wsdl:service>
      </wsdl:definitions>

      2) wstx.xsd
      <xsd:schema targetNamespace="http://schemas.xmlsoap.org/ws/2003/09/wsat" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:wsat="http://schemas.xmlsoap.org/ws/2003/09/wsat" elementFormDefault="qualified" attributeFormDefault="unqualified"
      version="1.0">
      <xsd:complexType name="Notification">
      <xsd:sequence>
      <xsd:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
      </xsd:sequence>
      <xsd:anyAttribute namespace="##other" processContents="lax"/>
      </xsd:complexType>
      <xsd:element name="Prepare" type="wsat:Notification"/>
      <xsd:element name="Prepared" type="wsat:Notification"/>
      <xsd:element name="Aborted" type="wsat:Notification"/>
      <xsd:element name="ReadOnly" type="wsat:Notification"/>
      <xsd:element name="Commit" type="wsat:Notification"/>
      <xsd:element name="Rollback" type="wsat:Notification"/>
      <xsd:element name="Committed" type="wsat:Notification"/>
      <xsd:element name="Replay" type="wsat:Notification"/>
      <xsd:simpleType name="Vote">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="VoteCommit"/>
      <xsd:enumeration value="VoteRollback"/>
      <xsd:enumeration value="VoteReadOnly"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:element name="PrepareResponse">
      <xsd:complexType>
      <xsd:attribute name="vote" type="wsat:Vote"/>
      </xsd:complexType>
      </xsd:element>
      <xsd:simpleType name="Outcome">
      <xsd:restriction base="xsd:string">
      <xsd:enumeration value="Commit"/>
      <xsd:enumeration value="Rollback"/>
      </xsd:restriction>
      </xsd:simpleType>
      <xsd:element name="ReplayResponse">
      <xsd:complexType>
      <xsd:attribute name="outcome" type="wsat:Outcome"/>
      </xsd:complexType>
      </xsd:element>
      <xsd:simpleType name="ErrorCodes">
      <xsd:restriction base="xsd:QName">
      <xsd:enumeration value="wsat:InconsistentInternalState"/>
      </xsd:restriction>
      </xsd:simpleType>
      </xsd:schema>

      3) wstx.wsdl

      <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
      xmlns:wsat="http://schemas.xmlsoap.org/ws/2003/09/wsat" targetNamespace="http://schemas.xmlsoap.org/ws/2003/09/wsat">
      <!--
      <wsdl:import namespace="http://schemas.xmlsoap.org/ws/2003/09/wsat" location="http://schemas.xmlsoap.org/ws/2003/09/wsat"/>
      -->
      <wsdl:types>
      <xsd:schema targetNamespace="http://schemas.xmlsoap.org/ws/2003/09/wsat">
      <xsd:include schemaLocation="wstx.xsd"/>
      </xsd:schema>
      </wsdl:types>

      <!-- Messages -->
      <wsdl:message name="Prepare">
      <wsdl:part name="parameters" element="wsat:Prepare"/>
      </wsdl:message>
      <wsdl:message name="Prepared">
      <wsdl:part name="parameters" element="wsat:Prepared"/>
      </wsdl:message>
      <wsdl:message name="Aborted">
      <wsdl:part name="parameters" element="wsat:Aborted"/>
      </wsdl:message>
      <wsdl:message name="ReadOnly">
      <wsdl:part name="parameters" element="wsat:ReadOnly"/>
      </wsdl:message>
      <wsdl:message name="Commit">
      <wsdl:part name="parameters" element="wsat:Commit"/>
      </wsdl:message>
      <wsdl:message name="Rollback">
      <wsdl:part name="parameters" element="wsat:Rollback"/>
      </wsdl:message>
      <wsdl:message name="Committed">
      <wsdl:part name="parameters" element="wsat:Committed"/>
      </wsdl:message>
      <wsdl:message name="Replay">
      <wsdl:part name="parameters" element="wsat:Replay"/>
      </wsdl:message>
      <wsdl:message name="PrepareResponse">
      <wsdl:part name="parameters" element="wsat:PrepareResponse"/>
      </wsdl:message>
      <wsdl:message name="ReplayResponse">
      <wsdl:part name="parameters" element="wsat:ReplayResponse"/>
      </wsdl:message>
      <!-- Mandatory Asynchronous Messaging PortTypes -->
      <wsdl:portType name="CompletionCoordinatorPortType">
      <wsdl:operation name="CommitOperation">
      <wsdl:input message="wsat:Commit"/>
      </wsdl:operation>
      <wsdl:operation name="RollbackOperation">
      <wsdl:input message="wsat:Rollback"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="CompletionInitiatorPortType">
      <wsdl:operation name="CommittedOperation">
      <wsdl:input message="wsat:Committed"/>
      </wsdl:operation>
      <wsdl:operation name="AbortedOperation">
      <wsdl:input message="wsat:Aborted"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="CoordinatorPortType">
      <wsdl:operation name="PreparedOperation">
      <wsdl:input message="wsat:Prepared"/>
      </wsdl:operation>
      <wsdl:operation name="AbortedOperation">
      <wsdl:input message="wsat:Aborted"/>
      </wsdl:operation>
      <wsdl:operation name="ReadOnlyOperation">
      <wsdl:input message="wsat:ReadOnly"/>
      </wsdl:operation>
      <wsdl:operation name="CommittedOperation">
      <wsdl:input message="wsat:Committed"/>
      </wsdl:operation>
      <wsdl:operation name="ReplayOperation">
      <wsdl:input message="wsat:Replay"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="ParticipantPortType">
      <wsdl:operation name="PrepareOperation">
      <wsdl:input message="wsat:Prepare"/>
      </wsdl:operation>
      <wsdl:operation name="CommitOperation">
      <wsdl:input message="wsat:Commit"/>
      </wsdl:operation>
      <wsdl:operation name="RollbackOperation">
      <wsdl:input message="wsat:Rollback"/>
      </wsdl:operation>
      </wsdl:portType>
      <!-- Optional Syncronous RPC Port Types -->
      <wsdl:portType name="CompletionPortTypeRPC">
      <wsdl:operation name="CommitOperation">
      <wsdl:input message="wsat:Commit"/>
      <wsdl:output message="wsat:Committed"/>
      </wsdl:operation>
      <wsdl:operation name="RollbackOperation">
      <wsdl:input message="wsat:Rollback"/>
      <wsdl:output message="wsat:Aborted"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="ParticipantPortTypeRPC">
      <wsdl:operation name="PrepareOperation">
      <wsdl:input message="wsat:Prepare"/>
      <wsdl:output message="wsat:PrepareResponse"/>
      </wsdl:operation>
      <wsdl:operation name="CommitOperation">
      <wsdl:input message="wsat:Commit"/>
      <wsdl:output message="wsat:Committed"/>
      </wsdl:operation>
      <wsdl:operation name="RollbackOperation">
      <wsdl:input message="wsat:Rollback"/>
      <wsdl:output message="wsat:Aborted"/>
      </wsdl:operation>
      </wsdl:portType>
      <wsdl:portType name="CoordinatorPortTypeRPC">
      <wsdl:operation name="ReplayOperation">
      <wsdl:input message="wsat:Replay"/>
      <wsdl:output message="wsat:ReplayResponse"/>
      </wsdl:operation>
      <wsdl:operation name="AbortedOperation">
      <wsdl:input message="wsat:Aborted"/>
      </wsdl:operation>
      <wsdl:operation name="ReadOnlyOperation">
      <wsdl:input message="wsat:ReadOnly"/>
      </wsdl:operation>
      </wsdl:portType>
      </wsdl:definitions>

      Attachments

        Activity

          People

            Unassigned Unassigned
            samir0101 samir joshi
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - 48h
                48h
                Remaining:
                Remaining Estimate - 48h
                48h
                Logged:
                Time Spent - Not Specified
                Not Specified