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 "Colin Ruthven (JIRA)" <ax...@ws.apache.org> on 2005/09/27 23:25:48 UTC

[jira] Created: (AXIS-2237) Using method= the parameters appear in random order to the impl method

Using method= the parameters appear in random order to the impl method
----------------------------------------------------------------------

         Key: AXIS-2237
         URL: http://issues.apache.org/jira/browse/AXIS-2237
     Project: Apache Axis
        Type: Bug
    Versions: 1.2.1    
 Environment: Fedora Core 4, x86 Tomcat 5.0.28, JDK1.5, Axis 1.2.1
    Reporter: Colin Ruthven


I have a web service derived from a functioning WSDL for .Net using wsdl2java.
I am calling this using ?method=fetchProducts&mn=1&pn=345&ProductsWanted=a
The Impl method is invoked with these in varying orders. I can use different parameter names and it will not complain, just put the parameters in yet more orders.
I turned on debugging at DEBUG. The following log extract shows it SAX parsing the parameters with the correct names and values and then the "body is" line shows the values scrambled -
- body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>

The fetchProducts method fails depending on this randomness.

Extract begins -
- Enter: RPCProvider.processMessage()
- org.apache.axis.i18n.resource::handleGetObject(bodyElems00)
- There are 1 body elements.
- SAXOutputter.startElement ['' fetchProducts]
- org.apache.axis.i18n.resource::handleGetObject(startElem00)
- Start element []:fetchProducts
- NSPush (32)
- SAXOutputter.startElement ['' PN]
- org.apache.axis.i18n.resource::handleGetObject(startElem00)
- Start element []:PN
- NSPush (32)
- SAXOutputter.characters ['345']
- SAXOutputter.endElement ['' PN]
- org.apache.axis.i18n.resource::handleGetObject(endElem00)
- End element PN
- NSPop (32)
- SAXOutputter.startElement ['' PRODUCTSWANTED]
- org.apache.axis.i18n.resource::handleGetObject(startElem00)
- Start element []:PRODUCTSWANTED
- NSPush (32)
- SAXOutputter.characters ['a']
- SAXOutputter.endElement ['' PRODUCTSWANTED]
- org.apache.axis.i18n.resource::handleGetObject(endElem00)
- End element PRODUCTSWANTED
- NSPop (32)
- SAXOutputter.startElement ['' MN]
- org.apache.axis.i18n.resource::handleGetObject(startElem00)
- Start element []:MN
- NSPush (32)
- SAXOutputter.characters ['1']
- SAXOutputter.endElement ['' MN]
- org.apache.axis.i18n.resource::handleGetObject(endElem00)
- End element MN
- NSPop (32)
- SAXOutputter.endElement ['' fetchProducts]
- org.apache.axis.i18n.resource::handleGetObject(endElem00)
- End element fetchProducts
- org.apache.axis.i18n.resource::handleGetObject(empty00)
- NSPop (empty)
- org.apache.axis.i18n.resource::handleGetObject(bodyIs00)
- body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>



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


[jira] Commented: (AXIS-2237) Using method= the parameters appear in random order to the impl method

Posted by "Colin Ruthven (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2237?page=comments#action_12330732 ] 

Colin Ruthven commented on AXIS-2237:
-------------------------------------

Further looking at the log shows that after the above extract the matching of paramater name to value is scrambled -

Curiously, RPCHandler.java has this comment -
            // If that didn't work, try position
            // FIXME : Do we need to be in EITHER named OR positional
            //         mode?  I.e. will it screw us up to find something
            //         by position if we've already looked something up
            //         by name?  I think so...

Log extract from original message continues -
- body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
- Pushing handler org.apache.axis.message.EnvelopeHandler@76458f
- Enter: DeserializationContext::startElement(, fetchProducts)
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
- Pushing handler org.apache.axis.message.RPCHandler@d0deb5
- NSPush (32)
- Exit: DeserializationContext::startElement()
- Enter: DeserializationContext::startElement(, PN)
- Enter: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(typeFromAttr00)
- Type from attributes is:  null
- Exit: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
- Pushing handler org.apache.axis.encoding.ser.SimpleDeserializer@14596d5
- NSPush (32)
- Exit: DeserializationContext::startElement()
- Enter: DeserializationContext::endElement(, PN)
- org.apache.axis.i18n.resource::handleGetObject(popHandler00)
- Popping handler org.apache.axis.encoding.ser.SimpleDeserializer@14596d5
- org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
- Set value 345 in target org.apache.axis.message.RPCParamTarget@1b19753
- NSPop (32)
- Popped element stack to org.apache.axis.message.RPCElement:fetchProducts
- Exit: DeserializationContext::endElement()
- Enter: DeserializationContext::startElement(, PRODUCTSWANTED)
- Enter: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(typeFromAttr00)
- Type from attributes is:  null
- Exit: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
- Pushing handler org.apache.axis.encoding.ser.SimpleDeserializer@45ce17
- NSPush (32)
- Exit: DeserializationContext::startElement()
- Enter: DeserializationContext::endElement(, PRODUCTSWANTED)
- org.apache.axis.i18n.resource::handleGetObject(popHandler00)
- Popping handler org.apache.axis.encoding.ser.SimpleDeserializer@45ce17
- org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
- Set value a in target org.apache.axis.message.RPCParamTarget@dd5681
- NSPop (32)
- Popped element stack to org.apache.axis.message.RPCElement:fetchProducts
- Exit: DeserializationContext::endElement()
- Enter: DeserializationContext::startElement(, MN)
- Enter: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(typeFromAttr00)
- Type from attributes is:  null
- Exit: RPCHandler.onStartChild()
- org.apache.axis.i18n.resource::handleGetObject(pushHandler00)
- Pushing handler org.apache.axis.encoding.ser.SimpleDeserializer@57828d
- NSPush (32)
- Exit: DeserializationContext::startElement()
- Enter: DeserializationContext::endElement(, MN)
- org.apache.axis.i18n.resource::handleGetObject(popHandler00)
- Popping handler org.apache.axis.encoding.ser.SimpleDeserializer@57828d
- org.apache.axis.i18n.resource::handleGetObject(setValueInTarget00)
- Set value 1 in target org.apache.axis.message.RPCParamTarget@13c296b
- NSPop (32)
- Popped element stack to org.apache.axis.message.RPCElement:fetchProducts
- Exit: DeserializationContext::endElement()
- Enter: DeserializationContext::endElement(, fetchProducts)
- org.apache.axis.i18n.resource::handleGetObject(popHandler00)
- Popping handler org.apache.axis.message.RPCHandler@d0deb5
- org.apache.axis.i18n.resource::handleGetObject(setProp00)
- Setting MessageContext property in RPCHandler.endElement().
- org.apache.axis.i18n.resource::handleGetObject(empty00)
- NSPop (empty)
- Popped element stack to org.apache.axis.message.SOAPBody:Body
- Exit: DeserializationContext::endElement()
- org.apache.axis.i18n.resource::handleGetObject(value00)
-   value:  345
- org.apache.axis.i18n.resource::handleGetObject(value00)
-   value:  a
- org.apache.axis.i18n.resource::handleGetObject(convert00)
- Trying to convert java.lang.Integer to int
- org.apache.axis.i18n.resource::handleGetObject(value00)
-   value:  1
We are in the Impl method of a SOAP/Get call with mn,pn,ProductsWanted = 345/a/1



> Using method= the parameters appear in random order to the impl method
> ----------------------------------------------------------------------
>
>          Key: AXIS-2237
>          URL: http://issues.apache.org/jira/browse/AXIS-2237
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Fedora Core 4, x86 Tomcat 5.0.28, JDK1.5, Axis 1.2.1
>     Reporter: Colin Ruthven

>
> I have a web service derived from a functioning WSDL for .Net using wsdl2java.
> I am calling this using ?method=fetchProducts&mn=1&pn=345&ProductsWanted=a
> The Impl method is invoked with these in varying orders. I can use different parameter names and it will not complain, just put the parameters in yet more orders.
> I turned on debugging at DEBUG. The following log extract shows it SAX parsing the parameters with the correct names and values and then the "body is" line shows the values scrambled -
> - body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>
> The fetchProducts method fails depending on this randomness.
> Extract begins -
> - Enter: RPCProvider.processMessage()
> - org.apache.axis.i18n.resource::handleGetObject(bodyElems00)
> - There are 1 body elements.
> - SAXOutputter.startElement ['' fetchProducts]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:fetchProducts
> - NSPush (32)
> - SAXOutputter.startElement ['' PN]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:PN
> - NSPush (32)
> - SAXOutputter.characters ['345']
> - SAXOutputter.endElement ['' PN]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element PN
> - NSPop (32)
> - SAXOutputter.startElement ['' PRODUCTSWANTED]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:PRODUCTSWANTED
> - NSPush (32)
> - SAXOutputter.characters ['a']
> - SAXOutputter.endElement ['' PRODUCTSWANTED]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element PRODUCTSWANTED
> - NSPop (32)
> - SAXOutputter.startElement ['' MN]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:MN
> - NSPush (32)
> - SAXOutputter.characters ['1']
> - SAXOutputter.endElement ['' MN]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element MN
> - NSPop (32)
> - SAXOutputter.endElement ['' fetchProducts]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element fetchProducts
> - org.apache.axis.i18n.resource::handleGetObject(empty00)
> - NSPop (empty)
> - org.apache.axis.i18n.resource::handleGetObject(bodyIs00)
> - body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>

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


[jira] Commented: (AXIS-2237) Using method= the parameters appear in random order to the impl method

Posted by "Colin Ruthven (JIRA)" <ax...@ws.apache.org>.
    [ http://issues.apache.org/jira/browse/AXIS-2237?page=comments#action_12330641 ] 

Colin Ruthven commented on AXIS-2237:
-------------------------------------

Please forget the stupid log extract - my eyes are blurry. It's getting the parameters correctly there.

The impl method signature written by wsdl2java is -
fetchProducts(java.lang.String mn, java.lang.String pn, int productsWanted)
The order of parameters passed is -
 345, a, 1



> Using method= the parameters appear in random order to the impl method
> ----------------------------------------------------------------------
>
>          Key: AXIS-2237
>          URL: http://issues.apache.org/jira/browse/AXIS-2237
>      Project: Apache Axis
>         Type: Bug
>     Versions: 1.2.1
>  Environment: Fedora Core 4, x86 Tomcat 5.0.28, JDK1.5, Axis 1.2.1
>     Reporter: Colin Ruthven

>
> I have a web service derived from a functioning WSDL for .Net using wsdl2java.
> I am calling this using ?method=fetchProducts&mn=1&pn=345&ProductsWanted=a
> The Impl method is invoked with these in varying orders. I can use different parameter names and it will not complain, just put the parameters in yet more orders.
> I turned on debugging at DEBUG. The following log extract shows it SAX parsing the parameters with the correct names and values and then the "body is" line shows the values scrambled -
> - body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>
> The fetchProducts method fails depending on this randomness.
> Extract begins -
> - Enter: RPCProvider.processMessage()
> - org.apache.axis.i18n.resource::handleGetObject(bodyElems00)
> - There are 1 body elements.
> - SAXOutputter.startElement ['' fetchProducts]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:fetchProducts
> - NSPush (32)
> - SAXOutputter.startElement ['' PN]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:PN
> - NSPush (32)
> - SAXOutputter.characters ['345']
> - SAXOutputter.endElement ['' PN]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element PN
> - NSPop (32)
> - SAXOutputter.startElement ['' PRODUCTSWANTED]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:PRODUCTSWANTED
> - NSPush (32)
> - SAXOutputter.characters ['a']
> - SAXOutputter.endElement ['' PRODUCTSWANTED]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element PRODUCTSWANTED
> - NSPop (32)
> - SAXOutputter.startElement ['' MN]
> - org.apache.axis.i18n.resource::handleGetObject(startElem00)
> - Start element []:MN
> - NSPush (32)
> - SAXOutputter.characters ['1']
> - SAXOutputter.endElement ['' MN]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element MN
> - NSPop (32)
> - SAXOutputter.endElement ['' fetchProducts]
> - org.apache.axis.i18n.resource::handleGetObject(endElem00)
> - End element fetchProducts
> - org.apache.axis.i18n.resource::handleGetObject(empty00)
> - NSPop (empty)
> - org.apache.axis.i18n.resource::handleGetObject(bodyIs00)
> - body is <fetchProducts><PN>345</PN><PRODUCTSWANTED>a</PRODUCTSWANTED><MN>1</MN></fetchProducts>

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