cxf-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From James Mao <james....@iona.com>
Subject Re: Kit testing issues
Date Fri, 01 Dec 2006 06:08:21 GMT
Hi Steve,

Thanks,
Will apply soon.

Cheers,
James.
> Find a patch for this issue below.
>
> Also, you might consider bumping up to Rhino 1.6R5, and 2.2.0 for all 
> the xmlbeans stuff. They're the latest releases, and the JS stuff 
> seems to work fine with them.
>
> --steve
>
> Index: 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml

>
> ===================================================================
> --- 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml
     
> (revision 481148)
> +++ 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq1.xml
     
> (working copy)
> @@ -1 +1,20 @@
> +<?xml version="1.0" encoding="utf-8" ?>
> +<!--
> +  Licensed to the Apache Software Foundation (ASF) under one
> +  or more contributor license agreements. See the NOTICE file
> +  distributed with this work for additional information
> +  regarding copyright ownership. The ASF licenses this file
> +  to you under the Apache License, Version 2.0 (the
> +  "License"); you may not use this file except in compliance
> +  with the License. You may obtain a copy of the License at
> +
> +  http://www.apache.org/licenses/LICENSE-2.0
> +
> +  Unless required by applicable law or agreed to in writing,
> +  software distributed under the License is distributed on an
> +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> +  KIND, either express or implied. See the License for the
> +  specific language governing permissions and limitations
> +  under the License.
> +-->
> <SOAP-ENV:Envelope 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xs="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns4:greetMe

> xmlns:ns4="http://apache.org/hello_world_soap_http/types"><ns4:requestType>Gil</ns4:requestType></ns4:greetMe></SOAP-ENV:Body></SOAP-ENV:Envelope>

>
> Index: 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml

>
> ===================================================================
> --- 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml
     
> (revision 481148)
> +++ 
> distribution/src/main/release/samples/js_provider/src/demo/hwDispatch/client/GreetMeDocLiteralReq3.xml
     
> (working copy)
> @@ -1 +1,20 @@
> +<?xml version="1.0" encoding="utf-8" ?>
> +<!--
> +  Licensed to the Apache Software Foundation (ASF) under one
> +  or more contributor license agreements. See the NOTICE file
> +  distributed with this work for additional information
> +  regarding copyright ownership. The ASF licenses this file
> +  to you under the Apache License, Version 2.0 (the
> +  "License"); you may not use this file except in compliance
> +  with the License. You may obtain a copy of the License at
> +
> +  http://www.apache.org/licenses/LICENSE-2.0
> +
> +  Unless required by applicable law or agreed to in writing,
> +  software distributed under the License is distributed on an
> +  "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
> +  KIND, either express or implied. See the License for the
> +  specific language governing permissions and limitations
> +  under the License.
> +-->
> <SOAP-ENV:Envelope 
> xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" 
> xmlns:xs="http://www.w3.org/2001/XMLSchema" 
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"><SOAP-ENV:Body><ns4:greetMe

> xmlns:ns4="http://apache.org/hello_world_soap_http/types"><ns4:requestType>Heron</ns4:requestType></ns4:greetMe></SOAP-ENV:Body></SOAP-ENV:Envelope>

>
> Index: 
> rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java 
>
> ===================================================================
> --- 
> rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java       
> (revision 481148)
> +++ 
> rt/frontend/js/src/main/java/org/apache/cxf/js/rhino/AbstractDOMProvider.java       
> (working copy)
> @@ -32,6 +32,7 @@
> import org.w3c.dom.Node;
> +import org.apache.xmlbeans.XmlCursor;
> import org.apache.xmlbeans.XmlObject;
> import org.mozilla.javascript.Context;
> @@ -160,7 +161,16 @@
>              Object inDoc = null;
>              if (isE4X) {
>                  try {
> -                    Object xo = XmlObject.Factory.parse(node);
> +                    XmlObject xo = XmlObject.Factory.parse(node);
> +                    XmlCursor cursor = xo.newCursor();
> +                    // strip comments out, as xmlbeans doesn't
> +                    // seem to like them
> +                    do {
> +                        if (cursor.isComment()) {
> +                            cursor.removeXml();
> +                        }
> +                    } while (cursor.toNextToken() != 
> XmlCursor.TokenType.NONE);
> +                    cursor.dispose();
>                      inDoc = Context.toObject(xo, scope);
>                      Object[] args = {inDoc};
>                      inDoc = cx.newObject(scriptScope, "XML", args);
>
>
> On Nov 30, 2006, at 10:32 PM, Steve Vinoski wrote:
>
>> I've looked into this, and it looks like an E4X bug. I'll keep 
>> looking and if I can find a way to deal with it, I'll post a patch.
>>
>> --steve
>>
>> On Nov 30, 2006, at 4:50 AM, James Mao wrote:
>>
>>> Yes, at least we find a work around solution.
>>> I suspect it's a bug in Rhino , but  i'm not 100% sure about this,
>>> I write a  test.html and put the code in, still have the same problem,
>>> without the comment it's ok, add the comment fail, so might be in E4X
>>>
>>> Cheers,
>>> James.
>>>> If adding Apache License headers causes program to break, then we 
>>>> can leave the file without license headers and then add readme or 
>>>> note somewhere to apply for exemptions. I will take care of the issue.
>>>>
>>>> Regards,
>>>> Bo
>>>>
>>>> James Mao wrote:
>>>>> Hi,
>>>>>>
>>>>>>> I found following issues:
>>>>>>>
>>>>>>> 1. js_provider demo:
>>>>>>>        [java] Invoking server through Dispatch interface using

>>>>>>> SOAPMessage
>>>>>>>    [java] Response from server: Hi undefined
>>>>>>>    [java] Invoking server through Dispatch interface using 
>>>>>>> DOMSource in PAYLOAD Mode
>>>>>>>    [java] Response from server: Hi Heron
>>>>>>>
>>>>>>> The first request return "Hi undefined" , not sure it's correct.

>>>>>>> and in server dir, there are three response xml files, but 
>>>>>>> client side only have two request xml files.
>>>>>>> I'll looking into this, and will port a system tests for this.
>>>>> I finally got time to look into the problem, and the problem is 
>>>>> the GreetMeDocLiteralReq1.xml has Apache license header, and it's 
>>>>> xml comment, that cause the impl.jsx
>>>>> can not get the name from (req..ns::requestType)[0];  if we remove 
>>>>> the comment from the xml, demo works fine, or if we place the 
>>>>> license header at the end of the xml, that works also fine.
>>>>>
>>>>> I'm not sure it's the bug in Rhino or something else. i'm not an 
>>>>> expert on E4X
>>>>>
>>>>> So my solutions are
>>>>> 1. Take Apache license header as Apache license footer, not sure 
>>>>> it's OK in Apache process?
>>>>> 2. Hard code the response message, not good though.
>>>>> 3. Ask  JS experts, take time...
>>>>>
>>>>> Cheers,
>>>>> James.
>>>>
>>>
>>
>
>


Mime
View raw message