You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Bram Biesbrouck <b...@beligum.org> on 2006/01/05 15:12:16 UTC

my wsdl flaw

Hi everybody,

Here I am again (it's driving me crazy, though).
After a lot of testing and validating, my wsdl file still doesn't get parsed 
well by WSDL2java (NullPointerException). I tried two validators and they 
both tell me everything is fine, so perhaps, I'm thinking the flaw may be in 
WSDL2java (if that is even possible).
I'm hoping someone on this list has more knowledge on the topic than I do, so 
if you do, please lend me a hand.

Here's my WSDL file:

<?xml version="1.0" encoding="UTF-8"?>

<definitions name="ScreenkastMetaOptionQueryService"
	    targetNamespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"
	     xmlns="http://schemas.xmlsoap.org/wsdl/"
	     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
	     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
	     xmlns:tns="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"
	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	     xmlns:myxsd="http://ws.test.com/screenkast/xsd"
	     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
	
	<!-- TYPE DEFINITIONS -->
	
	<types>
		<schema targetNamespace="http://ws.test.com/screenkast/xsd"
		        xmlns="http://www.w3.org/2001/XMLSchema"
			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
			elementFormDefault="qualified">
			
			<complexType name="PlatformSelectionType">
				<all>
					<element name="id" type="xsd:int"/>
					<element name="title"  type="xsd:string"/>
				</all>
			</complexType>
			
			<complexType name="PlatformArrayType">
				<sequence>
					<element name="platform" minOccurs="0" maxOccurs="unbounded" 
type="myxsd:PlatformSelectionType"/>
				</sequence>
			</complexType>
			
			<complexType name="OsSelectionType">
				<all>
					<element name="id" type="xsd:int"/>
					<element name="title"  type="xsd:string"/>
				</all>
			</complexType>
			
			<complexType name="OsArrayType">
				<sequence>
					<element name="os" minOccurs="0" maxOccurs="unbounded" 
type="myxsd:OsSelectionType"/>
				</sequence>
			</complexType>
			
			<complexType name="OsVersionSelectionType">
				<all>
					<element name="id" type="xsd:int"/>
					<element name="title"  type="xsd:string"/>
				</all>
			</complexType>
			
			<complexType name="OsVersionArrayType">
				<sequence>
					<element name="osVersion" minOccurs="0" maxOccurs="unbounded" 
type="myxsd:OsVersionSelectionType"/>
				</sequence>
			</complexType>
			
			<element name="PlatformSelection" type="myxsd:PlatformSelectionType"/>
			<element name="PlatformArray" type="myxsd:PlatformArrayType"/>
			
			<element name="OsSelection" type="myxsd:OsSelectionType"/>
			<element name="OsArray" type="myxsd:OsArrayType"/>
			
			<element name="OsVersionSelection" type="myxsd:OsVersionSelectionType"/>
			<element name="OsVersionArray" type="myxsd:OsVersionArrayType"/>
			
		</schema>
	</types>
	
	<!-- MESSAGE DEFINITIONS -->
	
	<message name="getAvailablePlatformsRequest"/>
	<message name="getAvailablePlatformsResponse">
		<part name="return" element="myxsd:PlatformArray"/>
	</message>
	
	<message name="getAvailableOSsRequest">
		<part name="platform" element="myxsd:PlatformSelection"/>
	</message>
	<message name="getAvailableOSsResponse">
		<part name="return" element="myxsd:OsArray"/>
	</message>
	
	<message name="getAvailableOsVersionsRequest">
		<part name="platform" element="myxsd:PlatformSelection"/>
		<part name="os" element="myxsd:OsSelection"/>
	</message>
	<message name="getAvailableOsVersionsResponse">
		<part name="return" element="myxsd:OsVersionArray"/>
	</message>
	
	<!-- PORT DEFINITIONS -->
	
	<portType name="ScreenkastMetaOptionQueryPortType">
		<operation name="getAvailablePlatforms">
			<input message="tns:getAvailablePlatformsRequest"/>
			<output message="tns:getAvailablePlatformsResponse"/>
		</operation>
		
		<operation name="getAvailableOSs">
			<input message="tns:getAvailableOSsRequest"/>
			<output message="tns:getAvailableOSsResponse"/>
		</operation>
	
		<operation name="getAvailableOsVersions">
			<input message="tns:getAvailableOsVersionsRequest"/>
			<output message="tns:getAvailableOsVersionsResponse"/>
		</operation>
	</portType>
	
	<!-- BINDING DEFINITIONS -->
	
	<binding name="ScreenkastMetaOptionQueryBinding" 
type="tns:ScreenkastMetaOptionQueryPortType">
		<soap:binding style="document" 
transport="http://schemas.xmlsoap.org/soap/http"/>
		
		<operation name="getAvailablePlatforms">
			<soap:operation style="document" soapAction="getAvailablePlatforms"/>
			<input>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</input>
			<output>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</output>
		</operation>
		
		<operation name="getAvailableOSs">
			<soap:operation style="document" soapAction="getAvailableOSs"/>
			<input>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</input>
			<output>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</output>
		</operation>
		
		<operation name="getAvailableOsVersions">
			<soap:operation style="document" soapAction="getAvailableOsVersions"/>
			<input>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</input>
			<output>
				<soap:body use="literal" 
namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
			</output>
		</operation>
	</binding>
	
	<!-- SERVICE DEFINITIONS -->
	
	<service name="ScreenkastMetaOptionQueryService">
		<documentation>ScreenKast web service</documentation>
		<port name="ScreenkastMetaOptionQueryPort" 
binding="tns:ScreenkastMetaOptionQueryBinding">
			<soap:address location="http://beligum.org/screenkast.wsdl"/>
		</port>
	</service>
	
</definitions>

Re: my wsdl flaw

Posted by Dies Koper <di...@jp.fujitsu.com>.
Hello Bram,

I ran Axis 1.3's WSDL2java on your WSDL and got no errors.
I only used the -s flag.

I think Ted's points are no problems unless you want to have a WS-I 
BP1.0 compliant service.
Document/literal can have 0 parts (like void methods).

Regards,
Dies


Bram Biesbrouck wrote:
> Hi everybody,
> 
> Here I am again (it's driving me crazy, though).
> After a lot of testing and validating, my wsdl file still doesn't get parsed 
> well by WSDL2java (NullPointerException). I tried two validators and they 
> both tell me everything is fine, so perhaps, I'm thinking the flaw may be in 
> WSDL2java (if that is even possible).
> I'm hoping someone on this list has more knowledge on the topic than I do, so 
> if you do, please lend me a hand.
> 
> Here's my WSDL file:
> 
> <?xml version="1.0" encoding="UTF-8"?>
> 
> <definitions name="ScreenkastMetaOptionQueryService"
> 	    targetNamespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"
> 	     xmlns="http://schemas.xmlsoap.org/wsdl/"
> 	     xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
> 	     xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 	     xmlns:tns="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"
> 	     xmlns:xsd="http://www.w3.org/2001/XMLSchema"
> 	     xmlns:myxsd="http://ws.test.com/screenkast/xsd"
> 	     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
> 	
> 	<!-- TYPE DEFINITIONS -->
> 	
> 	<types>
> 		<schema targetNamespace="http://ws.test.com/screenkast/xsd"
> 		        xmlns="http://www.w3.org/2001/XMLSchema"
> 			xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 			elementFormDefault="qualified">
> 			
> 			<complexType name="PlatformSelectionType">
> 				<all>
> 					<element name="id" type="xsd:int"/>
> 					<element name="title"  type="xsd:string"/>
> 				</all>
> 			</complexType>
> 			
> 			<complexType name="PlatformArrayType">
> 				<sequence>
> 					<element name="platform" minOccurs="0" maxOccurs="unbounded" 
> type="myxsd:PlatformSelectionType"/>
> 				</sequence>
> 			</complexType>
> 			
> 			<complexType name="OsSelectionType">
> 				<all>
> 					<element name="id" type="xsd:int"/>
> 					<element name="title"  type="xsd:string"/>
> 				</all>
> 			</complexType>
> 			
> 			<complexType name="OsArrayType">
> 				<sequence>
> 					<element name="os" minOccurs="0" maxOccurs="unbounded" 
> type="myxsd:OsSelectionType"/>
> 				</sequence>
> 			</complexType>
> 			
> 			<complexType name="OsVersionSelectionType">
> 				<all>
> 					<element name="id" type="xsd:int"/>
> 					<element name="title"  type="xsd:string"/>
> 				</all>
> 			</complexType>
> 			
> 			<complexType name="OsVersionArrayType">
> 				<sequence>
> 					<element name="osVersion" minOccurs="0" maxOccurs="unbounded" 
> type="myxsd:OsVersionSelectionType"/>
> 				</sequence>
> 			</complexType>
> 			
> 			<element name="PlatformSelection" type="myxsd:PlatformSelectionType"/>
> 			<element name="PlatformArray" type="myxsd:PlatformArrayType"/>
> 			
> 			<element name="OsSelection" type="myxsd:OsSelectionType"/>
> 			<element name="OsArray" type="myxsd:OsArrayType"/>
> 			
> 			<element name="OsVersionSelection" type="myxsd:OsVersionSelectionType"/>
> 			<element name="OsVersionArray" type="myxsd:OsVersionArrayType"/>
> 			
> 		</schema>
> 	</types>
> 	
> 	<!-- MESSAGE DEFINITIONS -->
> 	
> 	<message name="getAvailablePlatformsRequest"/>
> 	<message name="getAvailablePlatformsResponse">
> 		<part name="return" element="myxsd:PlatformArray"/>
> 	</message>
> 	
> 	<message name="getAvailableOSsRequest">
> 		<part name="platform" element="myxsd:PlatformSelection"/>
> 	</message>
> 	<message name="getAvailableOSsResponse">
> 		<part name="return" element="myxsd:OsArray"/>
> 	</message>
> 	
> 	<message name="getAvailableOsVersionsRequest">
> 		<part name="platform" element="myxsd:PlatformSelection"/>
> 		<part name="os" element="myxsd:OsSelection"/>
> 	</message>
> 	<message name="getAvailableOsVersionsResponse">
> 		<part name="return" element="myxsd:OsVersionArray"/>
> 	</message>
> 	
> 	<!-- PORT DEFINITIONS -->
> 	
> 	<portType name="ScreenkastMetaOptionQueryPortType">
> 		<operation name="getAvailablePlatforms">
> 			<input message="tns:getAvailablePlatformsRequest"/>
> 			<output message="tns:getAvailablePlatformsResponse"/>
> 		</operation>
> 		
> 		<operation name="getAvailableOSs">
> 			<input message="tns:getAvailableOSsRequest"/>
> 			<output message="tns:getAvailableOSsResponse"/>
> 		</operation>
> 	
> 		<operation name="getAvailableOsVersions">
> 			<input message="tns:getAvailableOsVersionsRequest"/>
> 			<output message="tns:getAvailableOsVersionsResponse"/>
> 		</operation>
> 	</portType>
> 	
> 	<!-- BINDING DEFINITIONS -->
> 	
> 	<binding name="ScreenkastMetaOptionQueryBinding" 
> type="tns:ScreenkastMetaOptionQueryPortType">
> 		<soap:binding style="document" 
> transport="http://schemas.xmlsoap.org/soap/http"/>
> 		
> 		<operation name="getAvailablePlatforms">
> 			<soap:operation style="document" soapAction="getAvailablePlatforms"/>
> 			<input>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</output>
> 		</operation>
> 		
> 		<operation name="getAvailableOSs">
> 			<soap:operation style="document" soapAction="getAvailableOSs"/>
> 			<input>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</output>
> 		</operation>
> 		
> 		<operation name="getAvailableOsVersions">
> 			<soap:operation style="document" soapAction="getAvailableOsVersions"/>
> 			<input>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</input>
> 			<output>
> 				<soap:body use="literal" 
> namespace="http://ws.test.com/screenkast/ScreenkastMetaOptionQuery"/>
> 			</output>
> 		</operation>
> 	</binding>
> 	
> 	<!-- SERVICE DEFINITIONS -->
> 	
> 	<service name="ScreenkastMetaOptionQueryService">
> 		<documentation>ScreenKast web service</documentation>
> 		<port name="ScreenkastMetaOptionQueryPort" 
> binding="tns:ScreenkastMetaOptionQueryBinding">
> 			<soap:address location="http://beligum.org/screenkast.wsdl"/>
> 		</port>
> 	</service>
> 	
> </definitions>
>