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/05 23:59:20 UTC

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

The following comment has been added to this issue:

     Author: Dirk Wollscheid
    Created: Thu, 5 Aug 2004 2:57 PM
       Body:
I tried the WS-Transaction WSDLs with the WSDL2Ws in Axis-C V1.2. Now the initial problem is gone, but there are serval compile errors.

I invoke with:
java org.apache.axis.wsdl.wsdl2ws.WSDL2Ws wstx-soap_lit_coord.wsdl -oout_server -sserver

--------------------------------------------------------------------

WSDL2Ws runtime errors are:
struct writer called ......
Error occured yet we continue to genarate other classes ... you should check the error
org.apache.axis.wsdl.wsdl2ws.WrapperFault: Error : an attribute is not basic type
	at org.apache.axis.wsdl.wsdl2ws.cpp.literal.BeanParamWriter.writeSerializeGlobalMethod(BeanParamWriter.java:125)
	at org.apache.axis.wsdl.wsdl2ws.cpp.literal.BeanParamWriter.writeGlobalCodes(BeanParamWriter.java:84)
	at org.apache.axis.wsdl.wsdl2ws.cpp.literal.ParamCPPFileWriter.writeSource(ParamCPPFileWriter.java:53)
	at org.apache.axis.wsdl.wsdl2ws.cpp.literal.AllParamWriter.writeSource(AllParamWriter.java:75)
	at org.apache.axis.wsdl.wsdl2ws.Genarator.genarate(Genarator.java:36)
	at org.apache.axis.wsdl.wsdl2ws.doclit.DocLitWebServiceGenarator.genarate(DocLitWebServiceGenarator.java:54)
	at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.genarateWrappers(WSDL2Ws.java:434)
	at org.apache.axis.wsdl.wsdl2ws.WSDL2Ws.main(WSDL2Ws.java:699)

--------------------------------------------------------------------
compile errors are (I'm compilin with "cl -GX -c -I..\include *.cpp" on MS VC6):

AttributedDateTime.cpp
AttributedQName.cpp
AttributedURI.cpp
AxisServiceException.cpp
ContextType.cpp
CoordinationContextType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
CreateCoordinationContextResponseType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
CreateCoordinationContextType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
EndpointReferenceType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
ErrorCodes.cpp
ErrorCodes.h(10) : error C2239: unexpected token ':' following declaration of 'ErrorCodes_wscoor'
ErrorCodes.h(10) : error C2059: syntax error : '='
ErrorCodes.h(11) : error C2062: type 'const int' unexpected
ErrorCodes.h(11) : error C2630: ';' found in what should be a comma-separated list
ErrorCodes.h(12) : error C2062: type 'const int' unexpected
ErrorCodes.h(12) : error C2630: ';' found in what should be a comma-separated list
ErrorCodes.h(13) : error C2062: type 'const int' unexpected
ErrorCodes.h(13) : error C2630: ';' found in what should be a comma-separated list
ErrorCodes.h(14) : error C2062: type 'const int' unexpected
ErrorCodes.h(14) : error C2630: ';' found in what should be a comma-separated list
ErrorCodes.cpp(10) : error C2062: type 'int' unexpected
ErrorCodes.cpp(11) : error C2630: ';' found in what should be a comma-separated list
NCName.cpp
Notification.cpp
Outcome.cpp
ParticipantPortType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
ParticipantPortTypeService.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
ParticipantPortTypeWrapper.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
PortReferenceType.cpp
ReceivedType.cpp
ReferencePropertiesType.cpp
RegisterResponseType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
Generating Code...
Compiling...
RegisterType.cpp
EndpointReferenceType.h(11) : fatal error C1083: Cannot open include file: 'ServiceNameType.h': No such file or directory
Relationship.cpp
RelationshipTypeValues.cpp
RelationshipTypeValues.h(10) : error C2239: unexpected token ':' following declaration of 'RelationshipTypeValues_wsa'
RelationshipTypeValues.h(10) : error C2059: syntax error : '='
RelationshipTypeValues.cpp(10) : error C2062: type 'int' unexpected
RelationshipTypeValues.cpp(11) : error C2630: ';' found in what should be a comma-separated list
ServiceNameType.cpp
tContextFault.cpp
tContextFault.h(10) : error C2239: unexpected token ':' following declaration of 'tContextFault_wsu'
tContextFault.h(10) : error C2059: syntax error : '='
tContextFault.h(11) : error C2062: type 'const int' unexpected
tContextFault.h(11) : error C2630: ';' found in what should be a comma-separated list
tContextFault.h(12) : error C2062: type 'const int' unexpected
tContextFault.h(12) : error C2630: ';' found in what should be a comma-separated list
tContextFault.h(13) : error C2062: type 'const int' unexpected
tContextFault.h(13) : error C2630: ';' found in what should be a comma-separated list
tContextFault.h(14) : error C2062: type 'const int' unexpected
tContextFault.h(14) : error C2630: ';' found in what should be a comma-separated list
tContextFault.cpp(10) : error C2062: type 'int' unexpected
tContextFault.cpp(11) : error C2630: ';' found in what should be a comma-separated list
TimestampType.cpp
tTimestampFault.cpp
tTimestampFault.h(10) : error C2239: unexpected token ':' following declaration of 'tTimestampFault_wsu'
tTimestampFault.h(10) : error C2059: syntax error : '='
tTimestampFault.cpp(10) : error C2062: type 'int' unexpected
tTimestampFault.cpp(11) : error C2630: ';' found in what should be a comma-separated list
Vote.cpp
Generating Code...


---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXISCPP-96?page=comments#action_37080

---------------------------------------------------------------------
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: Thu, 5 Aug 2004 2:57 PM
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