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 "Kiran Chakravarthy (JIRA)" <ji...@apache.org> on 2010/06/22 10:27:54 UTC

[jira] Commented: (AXIS2-4473) NameSpaces prefix problem when using inherit complex type

    [ https://issues.apache.org/jira/browse/AXIS2-4473?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12881126#action_12881126 ] 

Kiran Chakravarthy commented on AXIS2-4473:
-------------------------------------------

We can resolve this bug by making a  modification to ADBBeanTemplate.xsl .
In the method  writeQNames() a check is being done to see if prefix is null
 if (prefix == null) ....,
there should also be a condition to check if  prefix is empty string because that is what it comes here.
so the condition should be as  follows

if ((prefix == null) || (prefix.length() == 0)) {

This needs to be modified in ADBBeanTemplate.xsl  at line 1914.

> NameSpaces prefix problem when using inherit complex type
> ---------------------------------------------------------
>
>                 Key: AXIS2-4473
>                 URL: https://issues.apache.org/jira/browse/AXIS2-4473
>             Project: Axis2
>          Issue Type: Bug
>          Components: adb
>    Affects Versions: 1.4.1
>         Environment: Windows 2003, Server, Weblogic 9.2, Apache ActiveMQ
>            Reporter: Guillaume ETTORI
>
> Let say you have a service that returns a B class object.
> B class object from com.b package EXTENDS 
> A class object from com.a package
> A has a field_A and B has a field_B.
> The problem is i get something like this in my SOAP Message:
> 				<ns:return xmlns:ax22="http://a.com/xsd" xmlns:ax21="http://b.com/xsd" type="com.b.B">
> 					<ax21:field_A>IT_IS_OK</ax21:field_A>
> 					<ax21:field_B>test</ax21:field_B>
> 				</ns:return>
> As you can see, the prefix for field_A is AX21 instead of AX22.
> So the problem is i got a ADBException (unexpected element field_A) when i called this service with the Stub (generated by wdsl2java).
> In the Stub.B.Factory.parse method, i see something like this:
> 					if (reader.isStartElement()&& new javax.xml.namespace.QName(
> 									"http://a.com/xsd",
> 									"field_A").equals(reader.getName())) {
> In the enveloppe, ax21 = "http://b.com/xsd" so the ax21:field_A do not have the "http://a.com/xsd" like expected by the Stub.

-- 
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: java-dev-unsubscribe@axis.apache.org
For additional commands, e-mail: java-dev-help@axis.apache.org