cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "maomaode (JIRA)" <j...@apache.org>
Subject [jira] Commented: (CXF-956) Wsdl2java not creating service interface method signatures right for wrapped document literal
Date Fri, 31 Aug 2007 06:56:30 GMT

    [ https://issues.apache.org/jira/browse/CXF-956?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524018
] 

maomaode commented on CXF-956:
------------------------------

According to the spec 2.3.1.2 (v) 

The wrapper elements only contain child elements, they MUST not contain other structures such
as wildcards (element or attribute), xsd:choice, substitution groups (*element references
are not
permitted*) or attributes; furthermore, they MUST not be nillable.

So, I think the bare style is a correct mapping.

> Wsdl2java not creating service interface method signatures right for wrapped document
literal
> ---------------------------------------------------------------------------------------------
>
>                 Key: CXF-956
>                 URL: https://issues.apache.org/jira/browse/CXF-956
>             Project: CXF
>          Issue Type: Bug
>    Affects Versions: 2.0.1
>         Environment: Windows XP, Java 1.5
>            Reporter: Ben Brown
>            Priority: Minor
>
> Created the following WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
> 	xmlns:tns="http://bar.org"
> 	xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
> 	xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="MyWebService"
> 	targetNamespace="http://bar.org">
> 	
> 	<!-- T Y P E S -->
> 	<wsdl:types>
> 	    <xsd:schema targetNamespace="http://foo.org/Transaction"
>             elementFormDefault="qualified"
>             xmlns="http://foo.org/Transaction"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 		    <xsd:element name="Transaction" type="TransactionType"/>
> 		
> 		    <xsd:complexType name="TransactionType">
> 		        <xsd:sequence>
> 		            <xsd:element name="Source" type="xsd:double"/>
> 		            <xsd:element name="Dest" type="xsd:double"/>
> 		        </xsd:sequence>
> 		    </xsd:complexType>
> 		</xsd:schema>
> 	    
> 	    <xsd:schema targetNamespace="http://bar.org/TransactionResponse"
>             elementFormDefault="qualified"
>             xmlns="http://bar.org/TransactionResponse"
>             xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:element name="TransactionResponse">
> 				<xsd:complexType>
> 					<xsd:sequence>
> 						<xsd:element name="SettlementToken" type="xsd:int"/>
> 						<xsd:element name="SettlementTime" type="xsd:dateTime"/>
> 					</xsd:sequence>
> 				</xsd:complexType>
> 			</xsd:element>
> 		</xsd:schema>
> 	    
> 		<xsd:schema targetNamespace="http://bar.org"
> 		    xmlns:ns0="http://foo.org/Transaction"
> 		    xmlns:ns1="http://bar.org/TransactionResponse"
> 		    xmlns="http://bar.org">
> 			<xsd:import namespace="http://foo.org/Transaction"/>
> 			<xsd:import namespace="http://bar.org/TransactionResponse"/>
> 			
> 			<xsd:element name="processTransaction">
> 			    <xsd:complexType>
> 			        <xsd:sequence>
> 			            <xsd:element ref="ns0:Transaction"/>
> 			            <xsd:element name="TransactionTime" type="xsd:dateTime"/>
> 			        </xsd:sequence>
> 			    </xsd:complexType>
> 			</xsd:element>
> 			
> 			<xsd:element name="processTransactionResponse">
> 			    <xsd:complexType>
> 			        <xsd:sequence>
> 			            <xsd:element ref="ns1:TransactionResponse"/>
> 			        </xsd:sequence>
> 			    </xsd:complexType>
> 			</xsd:element>
> 		</xsd:schema>
> 	</wsdl:types>
> 	
> 	<!-- M E S S A G E S -->
> 	<wsdl:message name="processTransactionRequest">
> 		<wsdl:part element="tns:processTransaction" name="parameters"/>
> 	</wsdl:message>
> 	<wsdl:message name="ProcessTransactionResponse">
> 		<wsdl:part element="tns:processTransactionResponse" name="parameters"/>
> 	</wsdl:message>
> 	
> 	<!-- P O R T   T Y P E -->
> 	<wsdl:portType name="MyWebServicePortType">
> 		<wsdl:operation name="processTransaction">
> 			<wsdl:input message="tns:processTransactionRequest"/>
> 			<wsdl:output message="tns:ProcessTransactionResponse"/>
> 		</wsdl:operation>
> 	</wsdl:portType>
> 	
> 	<!-- B I N D I N G -->
> 	<wsdl:binding name="MyWebServiceSOAP" type="tns:MyWebServicePortType">
> 		<soap:binding style="document"
> 			transport="http://schemas.xmlsoap.org/soap/http" />
> 		<wsdl:operation name="processTransaction">
> 			<soap:operation soapAction=""/>
> 			<wsdl:input>
> 				<soap:body use="literal"/>
> 			</wsdl:input>
> 			<wsdl:output>
> 				<soap:body use="literal"/>
> 			</wsdl:output>
> 		</wsdl:operation>
> 	</wsdl:binding>
> 	
> 	<!-- S E R V I C E -->
> 	<wsdl:service name="MyWebService">
> 		<wsdl:port binding="tns:MyWebServiceSOAP" name="MyWebServiceSOAP">
> 			<soap:address location="REPLACE_WITH_ACTUAL_URL"/>
> 		</wsdl:port>
> 	</wsdl:service>
> </wsdl:definitions>
> Ran with following command: "wsdl2java -verbose MyWebService.wsdl"
> Got:
> @WebService(targetNamespace = "http://bar.org", name = "MyWebServicePortType")
> @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
> public interface MyWebServicePortType {
>     @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)
>     @WebResult(targetNamespace = "http://bar.org", partName = "parameters", name = "processTransactionResponse")
>     @WebMethod
>     public org.bar.ProcessTransactionResponse processTransaction(
>         @WebParam(targetNamespace = "http://bar.org", partName = "parameters", name =
"processTransaction")
>         org.bar.ProcessTransaction parameters
>     );
> }
> I think should get something similar to:
> @WebService(name = "MyWebServicePortType", targetNamespace = "http://bar.org")
> @XmlSeeAlso({
>     org.bar.transactionresponse.ObjectFactory.class,
>     org.bar.ObjectFactory.class,
>     org.foo.transaction.ObjectFactory.class
> })
> public interface MyWebServicePortType {
>     /**
>      * 
>      * @param transaction
>      * @param transactionTime
>      * @return
>      *     returns org.bar.transactionresponse.TransactionResponse
>      */
>     @WebMethod
>     @WebResult(name = "TransactionResponse", targetNamespace = "http://bar.org/TransactionResponse")
>     @RequestWrapper(localName = "processTransaction", targetNamespace = "http://bar.org",
className = "org.bar.ProcessTransaction")
>     @ResponseWrapper(localName = "processTransactionResponse", targetNamespace = "http://bar.org",
className = "org.bar.ProcessTransactionResponse")
>     public TransactionResponse processTransaction(
>         @WebParam(name = "Transaction", targetNamespace = "http://foo.org/Transaction")
>         TransactionType transaction,
>         @WebParam(name = "TransactionTime", targetNamespace = "")
>         XMLGregorianCalendar transactionTime);
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message