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 "Aleksandrs Hristoforovs (JIRA)" <ax...@ws.apache.org> on 2004/11/25 18:50:20 UTC

[jira] Created: (AXIS-1685) Invalid element name in response for document/literal services

Invalid element name in response for document/literal services
--------------------------------------------------------------

         Key: AXIS-1685
         URL: http://nagoya.apache.org/jira/browse/AXIS-1685
     Project: Axis
        Type: Bug
  Components: Serialization/Deserialization  
    Versions: 1.2RC1    
    Reporter: Aleksandrs Hristoforovs


I have created simple Java class

public class Test
{
  public String operation1 (String param)
  {
     return  param;
  }
}
compiled with debug info and deployed it as a Web Service

 <service name="TestDoc" provider="java:RPC" style="document" use="literal">
  <parameter name="className" value="Test"/>
 </service>

Axis generates WSDL for this service, which contains such elements:


   <wsdl:message name="operation1Request">
      <wsdl:part element="tns1:param" name="param"/>
   </wsdl:message>
   <wsdl:message name="operation1Response">
      <wsdl:part element="impl:operation1Return" name="operation1Return"/>
   </wsdl:message>
   <wsdl:portType name="Test">
      <wsdl:operation name="operation1" parameterOrder="param">
         <wsdl:input message="impl:operation1Request" name="operation1Request"/>
         <wsdl:output message="impl:operation1Response" name="operation1Response"/>
      </wsdl:operation>
   </wsdl:portType>

  
So the request message I sent is:

<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:Body>
		<doc:param xmlns:doc="http://DefaultNamespace"></doc:param>
	</soapenv:Body>
</soapenv:Envelope>

The response is:

<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:Body>
		<paramReturn xmlns="http://DefaultNamespace"></paramReturn>
	</soapenv:Body>
</soapenv:Envelope>

The problem is that element name "paramReturn" does not correspond to WSDL. It must be "operation1Return". Proxy, genrated by WSDL2Java, does not fail because does not check the actual element name. 



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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


[jira] Commented: (AXIS-1685) Invalid element name in response for document/literal services

Posted by "Jayachandra Sekhara Rao Sunkara (JIRA)" <ax...@ws.apache.org>.
     [ http://nagoya.apache.org/jira/browse/AXIS-1685?page=comments#action_56308 ]
     
Jayachandra Sekhara Rao Sunkara commented on AXIS-1685:
-------------------------------------------------------

Hi Aleksandrs!
I tried to replicate your problem. The behaviour was as said with older versions of axis. But just now I downloaded latest cvs source, compiled it and used the jars on a fresh tomcat instance. Following are the soap envelopes I sent and received respectively

<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:Body>      
      <doc:param xmlns:doc="http://DefaultNamespace"></doc:param>   
   </soapenv:Body></soapenv:Envelope>

---------------

<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:Body>
      <soapenv:Fault>
         <faultcode xmlns:ns1="http://xml.apache.org/axis/">ns1:Client</faultcode>
         <faultstring>No such operation 'param'</faultstring>
         <detail>
            <ns2:hostname xmlns:ns2="http://xml.apache.org/axis/">sunja07-xp</ns2:hostname>
         </detail>
      </soapenv:Fault>
   </soapenv:Body></soapenv:Envelope>

*****

And this behaviour seems to be the desired behaviour. In your case, once cross check if there is any other operation (wsdlPortType) with name 'param'. If not, I'd suggest once try the latest build

Thank you,
Jayachandra



> Invalid element name in response for document/literal services
> --------------------------------------------------------------
>
>          Key: AXIS-1685
>          URL: http://nagoya.apache.org/jira/browse/AXIS-1685
>      Project: Axis
>         Type: Bug
>   Components: Serialization/Deserialization
>     Versions: 1.2RC1
>     Reporter: Aleksandrs Hristoforovs

>
> I have created simple Java class
> public class Test
> {
>   public String operation1 (String param)
>   {
>      return  param;
>   }
> }
> compiled with debug info and deployed it as a Web Service
>  <service name="TestDoc" provider="java:RPC" style="document" use="literal">
>   <parameter name="className" value="Test"/>
>  </service>
> Axis generates WSDL for this service, which contains such elements:
>    <wsdl:message name="operation1Request">
>       <wsdl:part element="tns1:param" name="param"/>
>    </wsdl:message>
>    <wsdl:message name="operation1Response">
>       <wsdl:part element="impl:operation1Return" name="operation1Return"/>
>    </wsdl:message>
>    <wsdl:portType name="Test">
>       <wsdl:operation name="operation1" parameterOrder="param">
>          <wsdl:input message="impl:operation1Request" name="operation1Request"/>
>          <wsdl:output message="impl:operation1Response" name="operation1Response"/>
>       </wsdl:operation>
>    </wsdl:portType>
>   
> So the request message I sent is:
> <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:Body>
> 		<doc:param xmlns:doc="http://DefaultNamespace"></doc:param>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The response is:
> <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:Body>
> 		<paramReturn xmlns="http://DefaultNamespace"></paramReturn>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The problem is that element name "paramReturn" does not correspond to WSDL. It must be "operation1Return". Proxy, genrated by WSDL2Java, does not fail because does not check the actual element name. 

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://nagoya.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


[jira] Commented: (AXIS-1685) Invalid element name in response for document/literal services

Posted by "Sergio Moretto (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1685?page=comments#action_12433800 ] 
            
Sergio Moretto commented on AXIS-1685:
--------------------------------------

This problem exist in 1.4:

the return param is incorrect coded in SOAP reply from Axis 1.4, in WSLD is named: <servicename>Return but the Axis reply use: <input-parameter-name>Return

> Invalid element name in response for document/literal services
> --------------------------------------------------------------
>
>                 Key: AXIS-1685
>                 URL: http://issues.apache.org/jira/browse/AXIS-1685
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.2RC1
>            Reporter: Aleksandrs Hristoforovs
>
> I have created simple Java class
> public class Test
> {
>   public String operation1 (String param)
>   {
>      return  param;
>   }
> }
> compiled with debug info and deployed it as a Web Service
>  <service name="TestDoc" provider="java:RPC" style="document" use="literal">
>   <parameter name="className" value="Test"/>
>  </service>
> Axis generates WSDL for this service, which contains such elements:
>    <wsdl:message name="operation1Request">
>       <wsdl:part element="tns1:param" name="param"/>
>    </wsdl:message>
>    <wsdl:message name="operation1Response">
>       <wsdl:part element="impl:operation1Return" name="operation1Return"/>
>    </wsdl:message>
>    <wsdl:portType name="Test">
>       <wsdl:operation name="operation1" parameterOrder="param">
>          <wsdl:input message="impl:operation1Request" name="operation1Request"/>
>          <wsdl:output message="impl:operation1Response" name="operation1Response"/>
>       </wsdl:operation>
>    </wsdl:portType>
>   
> So the request message I sent is:
> <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:Body>
> 		<doc:param xmlns:doc="http://DefaultNamespace"></doc:param>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The response is:
> <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:Body>
> 		<paramReturn xmlns="http://DefaultNamespace"></paramReturn>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The problem is that element name "paramReturn" does not correspond to WSDL. It must be "operation1Return". Proxy, genrated by WSDL2Java, does not fail because does not check the actual element name. 

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


[jira] Commented: (AXIS-1685) Invalid element name in response for document/literal services

Posted by "Bjorn Townsend (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-1685?page=comments#action_12433916 ] 
            
Bjorn Townsend commented on AXIS-1685:
--------------------------------------

Jayachandra, do you happen to know what commit contained the fix for this? I'm curious to find out what happened to it, since Sergio reports that it's still an issue in 1.4. I figured a fix that old would be in 1.4.  Is it still in the 1.x trunk? Or is it in Axis2?

Thanks,
Bjorn

> Invalid element name in response for document/literal services
> --------------------------------------------------------------
>
>                 Key: AXIS-1685
>                 URL: http://issues.apache.org/jira/browse/AXIS-1685
>             Project: Apache Axis
>          Issue Type: Bug
>          Components: Serialization/Deserialization
>    Affects Versions: 1.2RC1
>            Reporter: Aleksandrs Hristoforovs
>
> I have created simple Java class
> public class Test
> {
>   public String operation1 (String param)
>   {
>      return  param;
>   }
> }
> compiled with debug info and deployed it as a Web Service
>  <service name="TestDoc" provider="java:RPC" style="document" use="literal">
>   <parameter name="className" value="Test"/>
>  </service>
> Axis generates WSDL for this service, which contains such elements:
>    <wsdl:message name="operation1Request">
>       <wsdl:part element="tns1:param" name="param"/>
>    </wsdl:message>
>    <wsdl:message name="operation1Response">
>       <wsdl:part element="impl:operation1Return" name="operation1Return"/>
>    </wsdl:message>
>    <wsdl:portType name="Test">
>       <wsdl:operation name="operation1" parameterOrder="param">
>          <wsdl:input message="impl:operation1Request" name="operation1Request"/>
>          <wsdl:output message="impl:operation1Response" name="operation1Response"/>
>       </wsdl:operation>
>    </wsdl:portType>
>   
> So the request message I sent is:
> <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:Body>
> 		<doc:param xmlns:doc="http://DefaultNamespace"></doc:param>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The response is:
> <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:Body>
> 		<paramReturn xmlns="http://DefaultNamespace"></paramReturn>
> 	</soapenv:Body>
> </soapenv:Envelope>
> The problem is that element name "paramReturn" does not correspond to WSDL. It must be "operation1Return". Proxy, genrated by WSDL2Java, does not fail because does not check the actual element name. 

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