axis-java-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From axis-...@ws.apache.org
Subject [jira] Commented: (AXIS-1453) WSDL2Java generates incorrect class for SOAPHeader
Date Fri, 08 Oct 2004 19:53:51 GMT
The following comment has been added to this issue:

     Author: Simon Fell
    Created: Fri, 8 Oct 2004 12:53 PM
       Body:
Still an Issue in 1.2RC1
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1453?page=comments#action_53853

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/AXIS-1453

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1453
    Summary: WSDL2Java generates incorrect class for SOAPHeader
       Type: Bug

     Status: Unassigned
   Priority: Minor

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             beta-2

   Assignee: 
   Reporter: Simon Fell

    Created: Wed, 14 Jul 2004 4:51 PM
    Updated: Fri, 8 Oct 2004 12:53 PM
Environment: XP, JDK 1.4.2_03

Description:
using WSDL2Java with the -a switch, a class is now generated for my SOAP header. In it, it
contains

static {
typeDesc.setXmlType(new javax.xml.namespace.QName("urn:enterprise.soap.sforce.com", ">SessionHeader"));
org.apache.axis.description.ElementDesc elemField = new org.apache.axis.description.ElementDesc();
elemField.setFieldName("sessionId");
elemField.setXmlName(new javax.xml.namespace.QName("urn:enterprise.soap.sforce.com", "sessionId"));
elemField.setXmlType(new javax.xml.namespace.QName("http://www.w3.org/2001/XMLSchema", "string"));
typeDesc.addFieldDesc(elemField);
}

the first line that has ">SessionHeader" in it seems very suspect. 

If you use this on the client with a SOAPHeaderELement, e.g.

_SessionHeader hdr = new _SessionHeader();
hdr.setSessionId(lr.getSessionId());
SOAPHeaderElement sh = new SOAPHeaderElement(_SessionHeader.getTypeDesc().getXmlType(), hdr);
stub.setHeader(sh);

then it'll generate invalid XML (see the <ns1:>SessionHeader)

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><soapenv:Header><ns1:>SessionHeader
soapenv:actor="http://schemas.xmlsoap.org/soap/actor/next" soapenv:mustUnderstand="0" xmlns:ns1="urn:enterprise.soap.sforce.com"><ns1:sessionId>mySessionId</ns1:sessionId></ns1:>SessionHeader></soapenv:Header><soapenv:Body><query
xmlns="urn:enterprise.soap.sforce.com"><queryString>Select Id from Account where
firstName like 'A%'</queryString></query></soapenv:Body></soapenv:Envelope>



---------------------------------------------------------------------
JIRA INFORMATION:
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


Mime
View raw message