axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sandip Bhattacharyya (JIRA)" <axis-...@ws.apache.org>
Subject [jira] [Commented] (AXIS-2096) Custom simpleType as attribute of an element causes problems when displaying deployed service's WSDL
Date Thu, 19 Nov 2015 11:09:11 GMT

    [ https://issues.apache.org/jira/browse/AXIS-2096?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15013345#comment-15013345
] 

Sandip Bhattacharyya commented on AXIS-2096:
--------------------------------------------

In my case , I have tried the same , but the same issue persists . Any other workaround for
this issue ? I am working on Axis 1.4 .

> Custom simpleType as attribute of an element causes problems when displaying deployed
service's WSDL
> ----------------------------------------------------------------------------------------------------
>
>                 Key: AXIS-2096
>                 URL: https://issues.apache.org/jira/browse/AXIS-2096
>             Project: Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.2.1
>         Environment: WinXP, Tomcat 5.5.9, jdk1.5.0_03
>            Reporter: Daniel Kador
>
> If you create a WSDL similar to the one below in wrapped/literal style, you will not
be able to create a complexType whose attribute is of a custom simpleType.  In the example
below, the following error is listed when you try to view the deployed service's WSDL through
the browser interface:
> AXIS error
> Sorry, something seems to have gone wrong... here are the details:
> Fault - Bean attribute testAttribute is of type org.apache.axis.types.NormalizedString,
which is not a simple type
> AxisFault
>  faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.generalException
>  faultSubcode: 
>  faultString: Bean attribute testAttribute is of type org.apache.axis.types.NormalizedString,
which is not a simple type
>  faultActor: 
>  faultNode: 
>  faultDetail: 
> 	{http://xml.apache.org/axis/}hostname:ORLIWG2H5Y61
> I can fix the above error by changing the attribute type from "y:testAttribute" to "xs:normalizedString".
 Is Axis designed to behave this way?  It's my understanding that XML allows for custom simpleTypes
to be defined and then used as attributes, and the schemas I work with use this feature a
good deal.  They validate with no problems in XMLSpy.  The WSDL I use in this example is posted
below.  
> <?xml version="1.0" encoding="utf-8"?>
> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" 											xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 			xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" 
> 			xmlns:xs="http://www.w3.org/2001/XMLSchema" 
> 			xmlns:y="http://test.wsdl" 
> 			xmlns:types="http://test.wsdl/types"
> 			targetNamespace="http://test.wsdl">
> 	<wsdl:types>
> 		<xs:schema>
> 			<xs:complexType name="testType">
> 				<xs:sequence>
> 					<xs:element name="testElement" type="xs:normalizedString"/>
> 				</xs:sequence>
> 				<xs:attribute name="testAttribute" type="y:testAttribute"/>
> 			</xs:complexType>
> 			<xs:simpleType name="testAttribute">
> 				<xs:restriction base="xs:normalizedString"/>
> 			</xs:simpleType>
> 			<xs:element name="testAction">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="testParam" type="y:testType"/>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> 			<xs:element name="testActionResp">
> 				<xs:complexType>
> 					<xs:sequence>
> 						<xs:element name="testResp" type="xs:string"/>
> 					</xs:sequence>
> 				</xs:complexType>
> 			</xs:element>
> 		</xs:schema>
> 	</wsdl:types>
> 	<wsdl:message name="testActionRequest">
> 		<wsdl:part name="parameters" element="y:testAction"/>
> 	</wsdl:message>
> 	<wsdl:message name="testActionResponse">
> 		<wsdl:part name="parameters" element="y:testActionResp"/>
> 	</wsdl:message>
> 	<wsdl:portType name="testPortType">
> 		<wsdl:operation name="testAction">
> 			<wsdl:input message="y:testActionRequest"/>
> 			<wsdl:output message="y:testActionResponse"/>
> 		</wsdl:operation>
> 	</wsdl:portType>
> 	<wsdl:binding name="testSoapBinding" type="y:testPortType">
> 		<soap:binding transport="http://schemas.xmlsoap.org/soap/http" style="document"/>
> 		<wsdl:operation name="testAction">
> 			<wsdl:input>
> 				<soap:body use="literal"/>
> 			</wsdl:input>
> 			<wsdl:output>
> 				<soap:body use="literal"/>
> 			</wsdl:output>
> 		</wsdl:operation>
> 	</wsdl:binding>
> 	<wsdl:service name="testService">
> 		<wsdl:port name="testPort" binding="y:testSoapBinding">
> 			<soap:address location="http://localhost:8080/axis/services/testPort"/>
> 		</wsdl:port>
> 	</wsdl:service>
> </wsdl:definitions>



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org


Mime
View raw message