axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Anthony Hobart (JIRA)" <j...@apache.org>
Subject [jira] Commented: (AXIS2-1388) CLONE -When generating Java code from WSDL using SOAP1.2 the Stub class has "Unknown Style" comments throughout preventing compilation.
Date Sun, 15 Oct 2006 22:26:35 GMT
    [ http://issues.apache.org/jira/browse/AXIS2-1388?page=comments#action_12442428 ] 
            
Anthony Hobart commented on AXIS2-1388:
---------------------------------------

I have tried the latest nightly build (15/10/2006) and while the generated code now compiles
the code that creates the envelope is missing and the comment indicating an unknown style
is still present. Below is an example of the code generated for the SaveAddress method:

	public void SaveAddress(

	) throws java.rmi.RemoteException

	{

		org.apache.axis2.client.OperationClient _operationClient = _serviceClient
				.createClient(_operations[0].getName());
		_operationClient.getOptions().setAction("urn:SaveAddress");
		_operationClient.getOptions().setExceptionToBeThrownOnSOAPFault(true);

		org.apache.axiom.soap.SOAPEnvelope env = null;

		// Unknown style detected !! No code is generated

		// adding SOAP headers
		_serviceClient.addHeadersToEnvelope(env);
		// create message context with that soap envelope
		org.apache.axis2.context.MessageContext _messageContext = new org.apache.axis2.context.MessageContext();
		_messageContext.setEnvelope(env);

		// add the message contxt to the operation client
		_operationClient.addMessageContext(_messageContext);

		_operationClient.execute(true);

		return;
	}

> CLONE -When generating Java code from WSDL using SOAP1.2 the Stub class has "Unknown
Style" comments throughout preventing compilation.
> ---------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AXIS2-1388
>                 URL: http://issues.apache.org/jira/browse/AXIS2-1388
>             Project: Apache Axis 2.0 (Axis2)
>          Issue Type: Bug
>          Components: wsdl
>    Affects Versions: 1.0
>         Environment: Windows XP SP2
>            Reporter: Anthony Hobart
>
> I am trying to use Axis2 with SOAP1.2. The WSDL I am using is below and the comman line
I am using (within ant) is also below. This code generation works perfectly and the service
works perfectly if I change the soap namespace to suit SOAP1.1 and remove the SOAP1.2 soapActionRequired
attributes from the <soap:operation> tags.
> Ant command:
> 		<java classname="org.apache.axis2.wsdl.WSDL2Java" fork="true">
> 			<classpath refid="classpath" />
> 			<arg value="-uri" />
> 			<arg file="${webservices.indir}/${wsdl.file}" />
> 			<!--		          <arg value="-d"/>
> 		          <arg value="xmlbeans"/> -->
> 			<arg value="-pn" />
> 			<arg value="AddressBookPort" />
> 			<arg value="-sn" />
> 			<arg value="AddressBookService" />
> 			<arg value="-ss" />
> 			<arg value="-g" />
> 			<arg value="-t" />
> 			<arg value="-sd" />
> 			<arg value="-o" />
> 			<arg file="${source.indir}/temp" />
> 			<arg value="-p" />
> 			<arg value="${axis.namespace.package}" />
> 			<arg value="-ns2p" />
> 			<arg value="http://addressbook.com/AddressBook/=${axis.namespace.package}" />
> 		</java>
> WSDL:
> <?xml version="1.0" encoding="UTF-8"?>
> <wsdl:definitions name="AddressBook" 
>                   targetNamespace="http://addressbook.com/AddressBook/"
>                   xmlns:tns="http://addressbook.com/AddressBook/"
>                   xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>                   xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>                   xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap12/">
>   <wsdl:types>
>     <xsd:schema elementFormDefault="qualified" targetNamespace="http://addressbook.com/AddressBook/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
> 			<xsd:complexType name="PhoneNumberType">
> 				<xsd:sequence>
> 					<xsd:element name="Area" type="xsd:int"/>
> 					<xsd:element name="Prefix" type="xsd:int"/>
> 					<xsd:element name="Local" type="xsd:int"/>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="AddressType">
> 				<xsd:sequence>
> 					<xsd:element name="City" type="xsd:string"/>
> 					<xsd:element name="Street" type="xsd:string"/>
> 					<xsd:element name="Province" type="xsd:string"/>
> 					<xsd:element name="PostalCode" type="xsd:string"/>
> 					<xsd:element name="PhoneNumber" type="tns:PhoneNumberType"/>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="NameType">
> 				<xsd:sequence>
> 					<xsd:element name="Name" type="xsd:string"/>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="PersonType">
> 				<xsd:sequence>
> 					<xsd:element name="Name" type="tns:NameType"/>
> 					<xsd:element name="Address" type="tns:AddressType"/>
> 				</xsd:sequence>
> 			</xsd:complexType>
> 			<xsd:complexType name="FindAddressResponseType">
> 				<xsd:choice>
> 					<xsd:element name="Address" type="tns:AddressType"/>
> 					<xsd:element name="AddressNotFound" type="xsd:string"/>
> 				</xsd:choice>
> 			</xsd:complexType>
> 			
> 			<xsd:element name="FindAddressResponse" type="tns:FindAddressResponseType"/>
> 			<xsd:element name="FindAddressRequest" type="tns:NameType"/>
> 			<xsd:element name="SaveAddressRequest" type="tns:PersonType"/>
> 		</xsd:schema>
>   </wsdl:types>
>   <wsdl:message name="SaveAddressRequest">
>     <wsdl:part name="SaveAddressRequest" element="tns:SaveAddressRequest"/>
>   </wsdl:message>
>   <wsdl:message name="FindAddressResponse">
>     <wsdl:part name="FindAddressResponse" element="tns:FindAddressResponse"/>
>   </wsdl:message>
>   <wsdl:message name="FindAddressRequest">
>     <wsdl:part name="FindAddressRequest" element="tns:FindAddressRequest"/>
>   </wsdl:message>
>   <wsdl:portType name="AddressBookPortType">
>     <wsdl:operation name="SaveAddress">
>        <wsdl:input message="tns:SaveAddressRequest"/>
>     </wsdl:operation>
>     <wsdl:operation name="FindAddress">
>       <wsdl:input message="tns:FindAddressRequest"/>
>       <wsdl:output message="tns:FindAddressResponse"/>
>     </wsdl:operation>
>   </wsdl:portType>
>   
>   <wsdl:binding name="AddressBookBinding" type="tns:AddressBookPortType">
>     <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/>
>     <wsdl:operation name="SaveAddress">
>       <soap:operation soapAction="http://addressbook.com/AddressBook/SaveAddress"
soapActionRequired="true"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>     </wsdl:operation>
>     <wsdl:operation name="FindAddress">
>       <soap:operation soapAction="http://addressbook.com/AddressBook/FindAddress"
soapActionRequired="true"/>
>       <wsdl:input>
>         <soap:body use="literal"/>
>       </wsdl:input>
>       <wsdl:output>
>         <soap:body use="literal"/>
>       </wsdl:output>
>     </wsdl:operation>
>   </wsdl:binding>
>   <wsdl:service name="AddressBookService">
>     <wsdl:port name="AddressBookPort" binding="tns:AddressBookBinding">
>       <soap:address location="http://localhost:8080/axis2/services/AddressBookService"/>
>     </wsdl:port>
>   </wsdl:service>
> </wsdl:definitions>

-- 
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
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

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


Mime
View raw message