You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-dev@axis.apache.org by "sebastien tardif (JIRA)" <ax...@ws.apache.org> on 2004/10/28 17:09:34 UTC

[jira] Commented: (AXIS-1628) WSDL2JAVA do not handle having parameter as DIME attachment with others parameters which are not DIME.

     [ http://issues.apache.org/jira/browse/AXIS-1628?page=comments#action_54744 ]
     
sebastien tardif commented on AXIS-1628:
----------------------------------------

Here an other use case that trigger bug:
If I inverse the element from:
<complexType name="importDocumentAsDime_t">
	<sequence>
		<element name="document" type="impl:ReferencedBinary"/>
		<element name="myString" type="xsd:string"/>
	</sequence>
</complexType>

to:

<complexType name="importDocumentAsDime_t">
	<sequence>
		<element name="myString" type="xsd:string"/>
		<element name="document" type="impl:ReferencedBinary"/>
	</sequence>
</complexType>

The method generated is now:
public void importDocumentAsDime(java.lang.String myString, com.docharbor.webservices.ReferencedBinary document) throws java.rmi.RemoteException;

The problem exist because all the code assume supporting DIME seems to assume that just one parameter is used or wrapped document literal is not used.

The faulty code is in SymbolTable.java method fillInDIMEInformation.

> WSDL2JAVA do not handle having parameter as DIME attachment with others parameters which are not DIME.
> ------------------------------------------------------------------------------------------------------
>
>          Key: AXIS-1628
>          URL: http://issues.apache.org/jira/browse/AXIS-1628
>      Project: Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.2RC1
>  Environment: CVS 10/22/2004
>     Reporter: Sébastien Tardif
>  Attachments: docHarbor.wsdl
>
> WSDL2JAVA do not handle having parameter as DIME attachment with others parameters which are not DIME.
> I have a WSDL with this:
> …
> <complexType name="ReferencedBinary">
> <simpleContent>
> 		<extension base="base64Binary">
> 			<annotation>
> 				<appinfo>
> 					<content:mediaType value="application/octetstream"/>
> 				</appinfo>
> 			</annotation>					
> 		</extension>
> 	</simpleContent>
> </complexType>
> <element name="importDocumentAsDime" type="impl:importDocumentAsDime_t"/> 
> <complexType name="importDocumentAsDime_t">
> 		<sequence>
> 			<element name="document" type="impl:ReferencedBinary"/>
> 		</sequence>
> 	</complexType>
> </schema>
> </wsdl:types>
> 	<wsdl:message name="importDocumentRequestAsDime">
> 		<wsdl:part name="parameters" element="impl:importDocumentAsDime"/>
> 	</wsdl:message>
> …
> The Java method generated is:
> public void importDocumentAsDime(javax.activation.DataHandler document) throws java.rmi.RemoteException;
> but if I add a element to the complex type: “importDocumentAsDime_t” Axis now think that all my parameters are DIME attachment. As an example with:
> 	<complexType name="importDocumentAsDime_t">
> 		<sequence>
> 			<element name="document" type="impl:ReferencedBinary"/>
> 			<element name="myString" type="xsd:string"/>
> 		</sequence>
> 	</complexType>
> Axis gives this method signature:
> public void importDocumentAsDime(javax.activation.DataHandler document, javax.activation.DataHandler myString) throws java.rmi.RemoteException;
> You can reproduce with the attached WSDL with operation importDocumentAsDime.

-- 
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