You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ofbiz.apache.org by Jeremiah Christensen <je...@paceap.com> on 2010/09/10 22:33:56 UTC

Recent change to UtilXml.java breaks talking to jax-ws.

Hello,

The recent change to UtilXml has caused me to be unable to use exported services using jax-ws. The issue is that jax-ws adds namespace prefixes to the element names. getNodeName returns the element name with the prefix; whereas, getLocalName returns just the element name. So, getNodeName fails for me when it's being compared to a string like "map-Key". 

Perhaps instead of replacing getLocalName with getNodeName, ofbiz could 'or' them, looking for the possibility of both? After implementing this locally, I am back in business. See attached patch.

The change to UtilXml.java mentioned above (from ViewSVN):
<snip>
Revision 995384 - (view) (download) (annotate) - [select for diffs] 
Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes ago) by ashish 
File length: 47184 byte(s) 
Diff to previous 995202 (colored)
Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() --> node.getNodeName(). 

Thanks Vivek for the contribution. 
</snip>

Best Regards,

Jeremiah Christensen
Web Services Engineer
PACE Anti-Piracy, Inc.



Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by BJ Freeman <bj...@free-man.net>.
the is a discussion on this in the dev list


=========================
BJ Freeman  <http://bjfreeman.elance.com>
Strategic Power Office with Supplier Automation  <http://www.businessesnetwork.com/automation/viewforum.php?f=52>
Specialtymarket.com  <http://www.specialtymarket.com/>
Systems Integrator-- Glad to Assist

Chat  Y! messenger: bjfr33man


Jeremiah Christensen sent the following on 9/10/2010 1:33 PM:
> Hello,
>
> The recent change to UtilXml has caused me to be unable to use exported services using jax-ws. The issue is that jax-ws adds namespace prefixes to the element names. getNodeName returns the element name with the prefix; whereas, getLocalName returns just the element name. So, getNodeName fails for me when it's being compared to a string like "map-Key".
>
> Perhaps instead of replacing getLocalName with getNodeName, ofbiz could 'or' them, looking for the possibility of both? After implementing this locally, I am back in business. See attached patch.
>
> The change to UtilXml.java mentioned above (from ViewSVN):
> <snip>
> Revision 995384 - (view) (download) (annotate) - [select for diffs]
> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes ago) by ashish
> File length: 47184 byte(s)
> Diff to previous 995202 (colored)
> Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() -->  node.getNodeName().
>
> Thanks Vivek for the contribution.
> </snip>
>
> Best Regards,
>
> Jeremiah Christensen
> Web Services Engineer
> PACE Anti-Piracy, Inc.
>
>


Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by Michał Cukierman <of...@partbook.eu>.
Hi,

It was a problem with reverse dns. In fact, server was able to identify
the domain for my ip address, but it was set to ".".

Thanks for your help.


Dnia 2010-09-11, sob o godzinie 16:53 +0530, Ashish Vijaywargiya pisze:
> Hello Jeremiah,
> 
> For now I have reverted my changes from trunk at r996122 and will get
> back here with better fix.
> Please take update, it will work for you.
> 
> --
> Ashish
> 
> On Sat, Sep 11, 2010 at 4:42 PM, Ashish Vijaywargiya
> <vi...@gmail.com> wrote:
> > I will try to find better fix and will get back here in next week.
> >
> > --
> > Ashish
> >
> > On Sat, Sep 11, 2010 at 2:03 AM, Jeremiah Christensen <je...@paceap.com> wrote:
> >> Hello,
> >>
> >> The recent change to UtilXml has caused me to be unable to use exported services using jax-ws. The issue is that jax-ws adds namespace prefixes to the element names. getNodeName returns the element name with the prefix; whereas, getLocalName returns just the element name. So, getNodeName fails for me when it's being compared to a string like "map-Key".
> >>
> >> Perhaps instead of replacing getLocalName with getNodeName, ofbiz could 'or' them, looking for the possibility of both? After implementing this locally, I am back in business. See attached patch.
> >>
> >> The change to UtilXml.java mentioned above (from ViewSVN):
> >> <snip>
> >> Revision 995384 - (view) (download) (annotate) - [select for diffs]
> >> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes ago) by ashish
> >> File length: 47184 byte(s)
> >> Diff to previous 995202 (colored)
> >> Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() --> node.getNodeName().
> >>
> >> Thanks Vivek for the contribution.
> >> </snip>
> >>
> >> Best Regards,
> >>
> >> Jeremiah Christensen
> >> Web Services Engineer
> >> PACE Anti-Piracy, Inc.
> >>
> >>
> >>
> >


Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
Hello Jeremiah,

For now I have reverted my changes from trunk at r996122 and will get
back here with better fix.
Please take update, it will work for you.

--
Ashish

On Sat, Sep 11, 2010 at 4:42 PM, Ashish Vijaywargiya
<vi...@gmail.com> wrote:
> I will try to find better fix and will get back here in next week.
>
> --
> Ashish
>
> On Sat, Sep 11, 2010 at 2:03 AM, Jeremiah Christensen <je...@paceap.com> wrote:
>> Hello,
>>
>> The recent change to UtilXml has caused me to be unable to use exported services using jax-ws. The issue is that jax-ws adds namespace prefixes to the element names. getNodeName returns the element name with the prefix; whereas, getLocalName returns just the element name. So, getNodeName fails for me when it's being compared to a string like "map-Key".
>>
>> Perhaps instead of replacing getLocalName with getNodeName, ofbiz could 'or' them, looking for the possibility of both? After implementing this locally, I am back in business. See attached patch.
>>
>> The change to UtilXml.java mentioned above (from ViewSVN):
>> <snip>
>> Revision 995384 - (view) (download) (annotate) - [select for diffs]
>> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes ago) by ashish
>> File length: 47184 byte(s)
>> Diff to previous 995202 (colored)
>> Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() --> node.getNodeName().
>>
>> Thanks Vivek for the contribution.
>> </snip>
>>
>> Best Regards,
>>
>> Jeremiah Christensen
>> Web Services Engineer
>> PACE Anti-Piracy, Inc.
>>
>>
>>
>

Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by Ashish Vijaywargiya <vi...@gmail.com>.
I will try to find better fix and will get back here in next week.

--
Ashish

On Sat, Sep 11, 2010 at 2:03 AM, Jeremiah Christensen <je...@paceap.com> wrote:
> Hello,
>
> The recent change to UtilXml has caused me to be unable to use exported services using jax-ws. The issue is that jax-ws adds namespace prefixes to the element names. getNodeName returns the element name with the prefix; whereas, getLocalName returns just the element name. So, getNodeName fails for me when it's being compared to a string like "map-Key".
>
> Perhaps instead of replacing getLocalName with getNodeName, ofbiz could 'or' them, looking for the possibility of both? After implementing this locally, I am back in business. See attached patch.
>
> The change to UtilXml.java mentioned above (from ViewSVN):
> <snip>
> Revision 995384 - (view) (download) (annotate) - [select for diffs]
> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes ago) by ashish
> File length: 47184 byte(s)
> Diff to previous 995202 (colored)
> Fixing bug of reading node name. When we read first child element of the response of any third party integration for example ups etc, node name can't be read using "node.getLocalName()". So changing  node.getLocalName() --> node.getNodeName().
>
> Thanks Vivek for the contribution.
> </snip>
>
> Best Regards,
>
> Jeremiah Christensen
> Web Services Engineer
> PACE Anti-Piracy, Inc.
>
>
>

Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by Adrian Crum <ad...@yahoo.com>.
What we really need to do is make UtilXML support namespaces by providing methods that accept a namespace argument. Then client code that uses namespaces should be updated to use the namespace-aware methods.

-Adrian

--- On Fri, 9/10/10, Jeremiah Christensen <je...@paceap.com> wrote:
> Hello,
> 
> The recent change to UtilXml has caused me to be unable to
> use exported services using jax-ws. The issue is that jax-ws
> adds namespace prefixes to the element names. getNodeName
> returns the element name with the prefix; whereas,
> getLocalName returns just the element name. So, getNodeName
> fails for me when it's being compared to a string like
> "map-Key". 
> 
> Perhaps instead of replacing getLocalName with getNodeName,
> ofbiz could 'or' them, looking for the possibility of both?
> After implementing this locally, I am back in business. See
> attached patch.
> 
> The change to UtilXml.java mentioned above (from ViewSVN):
> <snip>
> Revision 995384 - (view) (download) (annotate) - [select
> for diffs] 
> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes
> ago) by ashish 
> File length: 47184 byte(s) 
> Diff to previous 995202 (colored)
> Fixing bug of reading node name. When we read first child
> element of the response of any third party integration for
> example ups etc, node name can't be read using
> "node.getLocalName()". So changing  node.getLocalName()
> --> node.getNodeName(). 
> 
> Thanks Vivek for the contribution. 
> </snip>
> 
> Best Regards,
> 
> Jeremiah Christensen
> Web Services Engineer
> PACE Anti-Piracy, Inc.
> 
> 
> 


      

Re: Recent change to UtilXml.java breaks talking to jax-ws.

Posted by Adrian Crum <ad...@yahoo.com>.
What we really need to do is make UtilXML support namespaces by providing methods that accept a namespace argument. Then client code that uses namespaces should be updated to use the namespace-aware methods.

-Adrian

--- On Fri, 9/10/10, Jeremiah Christensen <je...@paceap.com> wrote:
> Hello,
> 
> The recent change to UtilXml has caused me to be unable to
> use exported services using jax-ws. The issue is that jax-ws
> adds namespace prefixes to the element names. getNodeName
> returns the element name with the prefix; whereas,
> getLocalName returns just the element name. So, getNodeName
> fails for me when it's being compared to a string like
> "map-Key". 
> 
> Perhaps instead of replacing getLocalName with getNodeName,
> ofbiz could 'or' them, looking for the possibility of both?
> After implementing this locally, I am back in business. See
> attached patch.
> 
> The change to UtilXml.java mentioned above (from ViewSVN):
> <snip>
> Revision 995384 - (view) (download) (annotate) - [select
> for diffs] 
> Modified Thu Sep 9 11:32:28 2010 UTC (31 hours, 44 minutes
> ago) by ashish 
> File length: 47184 byte(s) 
> Diff to previous 995202 (colored)
> Fixing bug of reading node name. When we read first child
> element of the response of any third party integration for
> example ups etc, node name can't be read using
> "node.getLocalName()". So changing  node.getLocalName()
> --> node.getNodeName(). 
> 
> Thanks Vivek for the contribution. 
> </snip>
> 
> Best Regards,
> 
> Jeremiah Christensen
> Web Services Engineer
> PACE Anti-Piracy, Inc.
> 
> 
>