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 "Bjorn Harvold (JIRA)" <ji...@apache.org> on 2007/05/31 21:57:15 UTC

[jira] Created: (AXIS2-2747) REST service parameters not being saved

REST service parameters not being saved
---------------------------------------

                 Key: AXIS2-2747
                 URL: https://issues.apache.org/jira/browse/AXIS2-2747
             Project: Axis 2.0 (Axis2)
          Issue Type: Bug
    Affects Versions: nightly
         Environment: Mac OS X 10.4.8, Intel, Firefox
            Reporter: Bjorn Harvold


This issue was said to be fixed by AXIS2-2662. Before AXIS2-2662, axis would throw an error if you added more than one parameter on the rest url.. After the fix the REST web service would lose all parameters. I had to go and patch axis source to fix this problem to make it run in my environment. 

Here is my suggested fix:
I started stepping through the axis code and I think this is the problem:
BuilderUtil line 140 - 154
			String name =
                                qName != null ? qName.getLocalPart() : innerElement.getName();
                        String value;
                        OMNamespace ns = (qName == null ||
                                qName.getNamespaceURI() == null
                                || qName.getNamespaceURI().length() == 0) ?
                                null : soapFactory.createOMNamespace(
                                qName.getNamespaceURI(), null);

                        while ((value = (String) requestParameterMap.get(name)) != null) {

                            soapFactory.createOMElement(name, ns,
                                                        bodyFirstChild).setText(value);
                            minOccurs--;
                        }

If this is where it is supposed to grab the parameters and values that are in requestParameterMap it will never happen. I want to change it to:
		Set keys = requestParameterMap.keySet();
                        Iterator iter = keys.iterator();
                        while (iter.hasNext()) {
                            String key = (String) iter.next();
                            String v = (String) requestParameterMap.get(key);
                            soapFactory.createOMElement(key, ns,
                                                        bodyFirstChild).setText(v);
                            minOccurs--;
                        }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Resolved: (AXIS2-2747) REST service parameters not being saved

Posted by "Keith Godwin Chapman (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Keith Godwin Chapman resolved AXIS2-2747.
-----------------------------------------

    Resolution: Fixed

The problem was when the input was anyType according to the schema. If the schema was present we tried to build the soap message according to the schema. So defaulting to the normal behaviour (Treat the request as it does not contain a schema) in case the schemaType is anyType. The quickStartaxiom sample was also failing. After the fix it is working.

Hope this resolves your issue too.

> REST service parameters not being saved
> ---------------------------------------
>
>                 Key: AXIS2-2747
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2747
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: nightly
>         Environment: Mac OS X 10.4.8, Intel, Firefox
>            Reporter: Bjorn Harvold
>            Assignee: Keith Godwin Chapman
>
> This issue was said to be fixed by AXIS2-2662. Before AXIS2-2662, axis would throw an error if you added more than one parameter on the rest url.. After the fix the REST web service would lose all parameters. I had to go and patch axis source to fix this problem to make it run in my environment. 
> Here is my suggested fix:
> I started stepping through the axis code and I think this is the problem:
> BuilderUtil line 140 - 154
> 			String name =
>                                 qName != null ? qName.getLocalPart() : innerElement.getName();
>                         String value;
>                         OMNamespace ns = (qName == null ||
>                                 qName.getNamespaceURI() == null
>                                 || qName.getNamespaceURI().length() == 0) ?
>                                 null : soapFactory.createOMNamespace(
>                                 qName.getNamespaceURI(), null);
>                         while ((value = (String) requestParameterMap.get(name)) != null) {
>                             soapFactory.createOMElement(name, ns,
>                                                         bodyFirstChild).setText(value);
>                             minOccurs--;
>                         }
> If this is where it is supposed to grab the parameters and values that are in requestParameterMap it will never happen. I want to change it to:
> 		Set keys = requestParameterMap.keySet();
>                         Iterator iter = keys.iterator();
>                         while (iter.hasNext()) {
>                             String key = (String) iter.next();
>                             String v = (String) requestParameterMap.get(key);
>                             soapFactory.createOMElement(key, ns,
>                                                         bodyFirstChild).setText(v);
>                             minOccurs--;
>                         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org


[jira] Assigned: (AXIS2-2747) REST service parameters not being saved

Posted by "Deepal Jayasinghe (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/AXIS2-2747?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Deepal Jayasinghe reassigned AXIS2-2747:
----------------------------------------

    Assignee: Keith Godwin Chapman

> REST service parameters not being saved
> ---------------------------------------
>
>                 Key: AXIS2-2747
>                 URL: https://issues.apache.org/jira/browse/AXIS2-2747
>             Project: Axis 2.0 (Axis2)
>          Issue Type: Bug
>    Affects Versions: nightly
>         Environment: Mac OS X 10.4.8, Intel, Firefox
>            Reporter: Bjorn Harvold
>            Assignee: Keith Godwin Chapman
>
> This issue was said to be fixed by AXIS2-2662. Before AXIS2-2662, axis would throw an error if you added more than one parameter on the rest url.. After the fix the REST web service would lose all parameters. I had to go and patch axis source to fix this problem to make it run in my environment. 
> Here is my suggested fix:
> I started stepping through the axis code and I think this is the problem:
> BuilderUtil line 140 - 154
> 			String name =
>                                 qName != null ? qName.getLocalPart() : innerElement.getName();
>                         String value;
>                         OMNamespace ns = (qName == null ||
>                                 qName.getNamespaceURI() == null
>                                 || qName.getNamespaceURI().length() == 0) ?
>                                 null : soapFactory.createOMNamespace(
>                                 qName.getNamespaceURI(), null);
>                         while ((value = (String) requestParameterMap.get(name)) != null) {
>                             soapFactory.createOMElement(name, ns,
>                                                         bodyFirstChild).setText(value);
>                             minOccurs--;
>                         }
> If this is where it is supposed to grab the parameters and values that are in requestParameterMap it will never happen. I want to change it to:
> 		Set keys = requestParameterMap.keySet();
>                         Iterator iter = keys.iterator();
>                         while (iter.hasNext()) {
>                             String key = (String) iter.next();
>                             String v = (String) requestParameterMap.get(key);
>                             soapFactory.createOMElement(key, ns,
>                                                         bodyFirstChild).setText(v);
>                             minOccurs--;
>                         }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: axis-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: axis-dev-help@ws.apache.org