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 "David Easley (JIRA)" <ax...@ws.apache.org> on 2006/02/08 20:53:58 UTC

[jira] Updated: (AXIS-2398) WSDL2Java - incorrect Java code when using SOAP headers

     [ http://issues.apache.org/jira/browse/AXIS-2398?page=all ]

David Easley updated AXIS-2398:
-------------------------------

    Attachment: Axis13bug.ZIP

> WSDL2Java - incorrect Java code when using SOAP headers
> -------------------------------------------------------
>
>          Key: AXIS-2398
>          URL: http://issues.apache.org/jira/browse/AXIS-2398
>      Project: Apache Axis
>         Type: Bug
>   Components: WSDL processing
>     Versions: 1.3
>  Environment: Axis version is 1.3, Java version is 1.4, running on WinXP SP2
>     Reporter: David Easley
>  Attachments: Axis13bug.ZIP
>
> The attached WSDL and associated schema defines a single method that uses a SOAP header in the request message. WSDL2Java generates the following method signature in the ...PortType interface:
>   public com.northgateis.compass.ws.axis.dto.CreateRoleResponse
>     createRole(com.northgateis.compass.ws.axis.dto.CreateRole parameters,
>     com.northgateis.compass.ws.axis.dto.SecurityCredentialsHeader securityheader)
>     throws java.rmi.RemoteException;
> When we define a dummy method definition prior the wanted method the following code is generated for the original method:
>   public int createRole(
>     com.northgateis.compass.ws.axis.dto.RoleDto roleDto,
>     com.northgateis.compass.ws.axis.dto.SecurityCredentialsDto securityCredentials)
>     throws java.rmi.RemoteException;
> We believe the second signature is correct (it's close to what we had originally before we defined a SOAP header and therefore what we expected). It seems as if specifying a dummy method (that doesn't use a SOAP header) prior to the wanted methods kicks WSDL2Java into generating code correctly for the methods that follow.
> The provided WSDL has the dummy method commented out (in the messages, portType, and binding sections). To reproduce the bug, just search for "dummy" and uncomment the commented out elements.
> As you can see, we're using a doc/literal(wrapped) style WSDL.
> Command line:
>   java -cp ..\..\compass-lib\apache-axis\lib\axis.jar;..\..\compass-lib\jakarta-commons\lib\commons-logging-1.0.4.jar;..\..\compass-lib\jakarta-commons-web\lib\commons-discovery.jar;..\..\compass-lib\apache-axis\lib\jaxrpc.jar;..\..\compass-lib\apache-axis\lib\saaj.jar;..\..\compass-lib\apache-axis\lib\wsdl4j.jar
>   org.apache.axis.wsdl.WSDL2Java -s -o "srcgen"
>   --NStoPkg http://www.northgate-is.com/compass=com.northgateis.compass.ws.axis.dto
>   --NStoPkg http://www.govtalk.gov.uk/people/PersonDescriptives=com.northgateis.compass.ws.axis.dto
>   --NStoPkg http://www.govtalk.gov.uk/core=com.northgateis.compass.ws.axis.dto
>   "..\web-war\wsdls\compassSecurity.wsdl"
>   --NStoPkg http://www.northgate-is.com/compass/security/wsdl=com.northgateis.compass.ws.security.services
> Command output message:
>   01-Feb-2006 13:12:11 org.apache.axis.utils.JavaUtils isAttachmentSupported
>   WARNING: Unable to find required classes (javax.activation.DataHandler and
>            javax.mail.internet.MimeMultipart). Attachment support is disabled.
> [Note - we get this warning either way; it seems to be benign]

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