You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by ax...@ws.apache.org on 2004/08/09 18:31:20 UTC

[jira] Updated: (AXISCPP-96) WSDL2WS problem with complex type in WSDL

The following issue has been updated:

    Updater: Dirk Wollscheid (mailto:wollsch@us.ibm.com)
       Date: Mon, 9 Aug 2004 9:29 AM
    Comment:
WSDLs and XSDs for this bug. Main file to use is wstx-soap_lit_coord.wsdl.
    Changes:
             Attachment changed to wsdls.zip
    ---------------------------------------------------------------------
For a full history of the issue, see:

  http://issues.apache.org/jira/browse/AXISCPP-96?page=history

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXISCPP-96

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXISCPP-96
    Summary: WSDL2WS problem with complex type in WSDL
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis-C++
 Components: 
             WSDL processing
   Versions:
             1.1 Final

   Assignee: 
   Reporter: Dirk Wollscheid

    Created: Wed, 9 Jun 2004 11:06 AM
    Updated: Mon, 9 Aug 2004 9:29 AM
Environment: Win2K, Axis4c 1.1.1 code

Description:
I get the following ouput from WSDL2WS for the WSDLs that are listed below:
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}>PrepareResponse
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}Vote
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}Notification
############## the type found ={http://www.w3.org/2001/XMLSchema}any
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}ErrorCodes
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}Outcome
############## the type found ={http://schemas.xmlsoap.org/ws/2003/09/wsat}>ReplayResponse
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:376)
	at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:646)
Exception in thread "main" 

The problem seems to be in this line in WSDL2WsWSDL2Ws::getServiceInfo

this.typeMap.removeType(qname);

when I comment that out code generation works (I haven't tried compiling and running it).

Here are the relevant WSDLs and XSDs:

1) This is the WSDL I run WSDL2WS on ( there's 1 WSDL and and 1XSDs that are imported. see below):

<?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>



---------------------------------------------------------------------
JIRA INFORMATION:
This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira