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 ax...@ws.apache.org on 2004/10/05 21:08:37 UTC

[jira] Commented: (AXIS-1590) Not consuming SOAP messages according to WSDL

The following comment has been added to this issue:

     Author: Greg Michalopoulos
    Created: Tue, 5 Oct 2004 12:06 PM
       Body:
Issue was due to naming convention of param1, 2, and 3.  I was not using  proper Java variable names (started them with capital letters).  Sorry I reported this as bug of RC1, must have been a bug of the Beta to previously allow the improper name.  This can be closed.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/AXIS-1590?page=comments#action_53724

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

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: AXIS-1590
    Summary: Not consuming SOAP messages according to WSDL
       Type: Bug

     Status: Unassigned
   Priority: Major

    Project: Axis
 Components: 
             WSDL processing
   Versions:
             1.2RC1

   Assignee: 
   Reporter: Greg Michalopoulos

    Created: Tue, 5 Oct 2004 11:47 AM
    Updated: Tue, 5 Oct 2004 12:06 PM
Environment: Apache Axis 1.2 RC1
Jrun Server 4.0 SP3
Windows XP Pro

Description:
Even though I have defined an element (in the WSDL) in my request to be optional, Axis 1.2 RC1 complains that it is an "invalid element" when it is included undefined.  If the <param2></param2> portion of the request is removed and resent (using tcpmon) the request is consumed as it should.  Same exact source code worked fine on 1.2 Beta.  Process was to create the WSDL, use WSDL2Java to create base classes, and then custom program the Impl class.

Request:
...
      <soapenv:Body>
         <Object1 xmlns="http://xml.apache.org/axis/wsdd/">
            <param1 xmlns="" xsi:type="xsd:string">12345</param1>
            <param2 xmlns=""></param2>
         </Object1>
      </soapenv:Body>
...

Response:
...
      <soapenv:Fault>
         <faultcode>soapenv:Server.userException</faultcode>
         <faultstring>org.xml.sax.SAXException: Invalid element in org.apache.xml.axis.wsdd._Object1 - param2</faultstring>
         <detail>
            <ns1:hostname xmlns:ns1="http://xml.apache.org/axis/">hostname</ns1:hostname>
         </detail>
      </soapenv:Fault>
...

Element <param2> is described in _param2.java and is properly defined int he WSDD file.

Here is the relevant portion of the WSDL.
<wsdl:types>
  <schema targetNamespace="http://xml.apache.org/axis/wsdd/" xmlns="http://www.w3.org/2001/XMLSchema">
    <element name="param3">
      <complexType>
        <sequence>
	  <element maxOccurs="1" minOccurs="0" name="var1" type="xsd:int" />
	</sequence>
      </complexType>
    </element>
    <element name="param2">
      <complexType>
	<sequence>
	  <element maxOccurs="unbounded" minOccurs="0" ref="impl:param3"/>
	</sequence>
      </complexType>
    </element>
    <element name="Object1">
      <complexType>
	<sequence>
	  <element maxOccurs="1" minOccurs="1" name="param1" type="xsd:string"/>
	  <element maxOccurs="1" minOccurs="0" ref="impl:param2"/>
	</sequence>
      </complexType>
    </element>
  </schema>
</wsdl:types>


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