You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@axis.apache.org by Oliver Heard <ol...@afinite.co.uk> on 2012/06/26 14:24:46 UTC
Axis2 generating the wrong XML namespace
Hi there,
Axis2 seems to strip off the "www." and tag on "xsd" to the XML
namespaces of elements. E.g., "http://www.example.com/" becomes
"http://example.com/xsd".
The /xsd variant doesn't appear at all in any of my source code nor any
associated assets and is completely generated by Axis2.
I've specified my targetNamespace in services.xml but although this is
being set to the target namespace of the WSDL, it's overridden by
another targetNamespace on the <xs:schema> embedded in the generated
WSDL, like:
<wsdl:definitions ... targetNamespace="http://www.example.com/">
....
<wsdl:types>
<xs:schema ... targetNamespace="http://example.com/xsd">
</xs:schema>
</wsdl:types>
....
</wsdl:definitions>
Does anybody have any ideas?
Thanks in advance,
Oli
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
For additional commands, e-mail: java-user-help@axis.apache.org
RE: Axis2 generating the wrong XML namespace
Posted by Martin Gainty <mg...@hotmail.com>.
Good Evening Oli Looks like we'll need to file a JIRA requesting support for <parameter name="XSD">/xsd</parameter> in services.xmlhttps://issues.apache.org/jira/secure/Dashboard.jspa depending on who is available either Sagara, Andreas or myself will address the item
Thanks for using Axis!
Martin Gainty
______________________________________________
Jogi és Bizalmassági kinyilatkoztatás/Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Ez az
üzenet bizalmas. Ha nem ön az akinek szánva volt, akkorle a JIRA kérjük, hogy
jelentse azt nekünk vissza. Semmiféle továbbítása vagy másolatának
készítése nem megengedett. Ez az üzenet csak ismeret cserét szolgál és
semmiféle jogi alkalmazhatósága sincs. Mivel az electronikus üzenetek
könnyen megváltoztathatóak, ezért minket semmi felelöség nem terhelhet
ezen üzenet tartalma miatt.
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
Date: Tue, 26 Jun 2012 16:38:11 +0100
From: oliver@afinite.co.uk
To: java-user@axis.apache.org
CC: mgainty@hotmail.com
Subject: Re: Axis2 generating the wrong XML namespace
Hi Martin,
Thanks for that, I was hoping to be able to specify the namespace
explicitly rather than have Axis2 generate one. Do you happen to
know how to do this?
Thanks for your help.
Regards,
Oli
On 26/06/12 14:55, Martin Gainty wrote:
yes it is hardwired:
package org.apache.axis2.description.java2wsdl;
public class Java2WsdlUtils {
public static final String SCHEMA_NAMESPACE_EXTN = "/xsd";
String DEFAULT_TARGET_NAMESPACE_PREFIX = "axis2";
public static StringBuffer
schemaNamespaceFromClassName(String packageName, ClassLoader
loader, NamespaceGenerator nsGen) throws Exception {
StringBuffer stringBuffer =
namespaceFromClassName(packageName,
loader,
nsGen);
if (stringBuffer.length() == 0) {
stringBuffer.append(DEFAULT_TARGET_NAMESPACE);
}
stringBuffer.append(SCHEMA_NAMESPACE_EXTN);
return stringBuffer;
}
....
}
did you want set SCHEMA_NAMESPACE_EXTN as either a dynamic
parameter or to be read from services.xml for example
<parameter name="XSD">/xsd</parameter>
?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de
confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der
vorgesehene Empfaenger sein, so bitten wir hoeflich um eine
Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer
Kopie ist unzulaessig. Diese Nachricht dient lediglich dem
Austausch von Informationen und entfaltet keine rechtliche
Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von
E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Tue, 26 Jun 2012 13:24:46 +0100
> From: oliver@afinite.co.uk
> To: java-user@axis.apache.org
> Subject: Axis2 generating the wrong XML namespace
>
> Hi there,
>
> Axis2 seems to strip off the "www." and tag on "xsd" to
the XML
> namespaces of elements. E.g., "http://www.example.com/"
becomes
> "http://example.com/xsd".
>
> The /xsd variant doesn't appear at all in any of my
source code nor any
> associated assets and is completely generated by Axis2.
>
> I've specified my targetNamespace in services.xml but
although this is
> being set to the target namespace of the WSDL, it's
overridden by
> another targetNamespace on the <xs:schema> embedded
in the generated
> WSDL, like:
>
> <wsdl:definitions ...
targetNamespace="http://www.example.com/">
> ....
> <wsdl:types>
> <xs:schema ...
targetNamespace="http://example.com/xsd">
> </xs:schema>
> </wsdl:types>
> ....
> </wsdl:definitions>
>
> Does anybody have any ideas?
>
> Thanks in advance,
> Oli
>
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail:
java-user-help@axis.apache.org
>
Re: Axis2 generating the wrong XML namespace
Posted by Oliver Heard <ol...@afinite.co.uk>.
Hi Martin,
Thanks for that, I was hoping to be able to specify the namespace
explicitly rather than have Axis2 generate one. Do you happen to know
how to do this?
Thanks for your help.
Regards,
Oli
On 26/06/12 14:55, Martin Gainty wrote:
> yes it is hardwired:
>
> package org.apache.axis2.description.java2wsdl;
> public class Java2WsdlUtils {
> public static final String SCHEMA_NAMESPACE_EXTN = "/xsd";
> String DEFAULT_TARGET_NAMESPACE_PREFIX = "axis2";
> public static StringBuffer schemaNamespaceFromClassName(String
> packageName, ClassLoader loader, NamespaceGenerator nsGen) throws
> Exception {
> StringBuffer stringBuffer = namespaceFromClassName(packageName,
> loader,
> nsGen);
> if (stringBuffer.length() == 0) {
> stringBuffer.append(DEFAULT_TARGET_NAMESPACE);
> }
> stringBuffer.append(SCHEMA_NAMESPACE_EXTN);
> return stringBuffer;
> }
> ....
> }
> did you want set SCHEMA_NAMESPACE_EXTN as either a dynamic parameter
> or to be read from services.xml for example
> <parameter name="XSD">/xsd</parameter>
> ?
> Martin Gainty
> ______________________________________________
> Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
>
> Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene
> Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede
> unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig.
> Diese Nachricht dient lediglich dem Austausch von Informationen und
> entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten
> Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den
> Inhalt uebernehmen.
>
> Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
>
>
>
> > Date: Tue, 26 Jun 2012 13:24:46 +0100
> > From: oliver@afinite.co.uk
> > To: java-user@axis.apache.org
> > Subject: Axis2 generating the wrong XML namespace
> >
> > Hi there,
> >
> > Axis2 seems to strip off the "www." and tag on "xsd" to the XML
> > namespaces of elements. E.g., "http://www.example.com/" becomes
> > "http://example.com/xsd".
> >
> > The /xsd variant doesn't appear at all in any of my source code nor any
> > associated assets and is completely generated by Axis2.
> >
> > I've specified my targetNamespace in services.xml but although this is
> > being set to the target namespace of the WSDL, it's overridden by
> > another targetNamespace on the <xs:schema> embedded in the generated
> > WSDL, like:
> >
> > <wsdl:definitions ... targetNamespace="http://www.example.com/">
> > ....
> > <wsdl:types>
> > <xs:schema ... targetNamespace="http://example.com/xsd">
> > </xs:schema>
> > </wsdl:types>
> > ....
> > </wsdl:definitions>
> >
> > Does anybody have any ideas?
> >
> > Thanks in advance,
> > Oli
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-user-help@axis.apache.org
> >
RE: Axis2 generating the wrong XML namespace
Posted by Martin Gainty <mg...@hotmail.com>.
yes it is hardwired:
package org.apache.axis2.description.java2wsdl; public class Java2WsdlUtils { public static final String SCHEMA_NAMESPACE_EXTN = "/xsd"; String DEFAULT_TARGET_NAMESPACE_PREFIX = "axis2"; public static StringBuffer schemaNamespaceFromClassName(String packageName, ClassLoader loader, NamespaceGenerator nsGen) throws Exception {
StringBuffer stringBuffer = namespaceFromClassName(packageName,
loader,
nsGen);
if (stringBuffer.length() == 0) {
stringBuffer.append(DEFAULT_TARGET_NAMESPACE);
}
stringBuffer.append(SCHEMA_NAMESPACE_EXTN);
return stringBuffer;
}
....}did you want set SCHEMA_NAMESPACE_EXTN as either a dynamic parameter or to be read from services.xml for example<parameter name="XSD">/xsd</parameter>?
Martin Gainty
______________________________________________
Verzicht und Vertraulichkeitanmerkung/Note de déni et de confidentialité
Diese Nachricht ist vertraulich. Sollten Sie nicht der vorgesehene Empfaenger sein, so bitten wir hoeflich um eine Mitteilung. Jede unbefugte Weiterleitung oder Fertigung einer Kopie ist unzulaessig. Diese Nachricht dient lediglich dem Austausch von Informationen und entfaltet keine rechtliche Bindungswirkung. Aufgrund der leichten Manipulierbarkeit von E-Mails koennen wir keine Haftung fuer den Inhalt uebernehmen.
Ce message est confidentiel et peut être privilégié. Si vous n'êtes pas le destinataire prévu, nous te demandons avec bonté que pour satisfaire informez l'expéditeur. N'importe quelle diffusion non autorisée ou la copie de ceci est interdite. Ce message sert à l'information seulement et n'aura pas n'importe quel effet légalement obligatoire. Étant donné que les email peuvent facilement être sujets à la manipulation, nous ne pouvons accepter aucune responsabilité pour le contenu fourni.
> Date: Tue, 26 Jun 2012 13:24:46 +0100
> From: oliver@afinite.co.uk
> To: java-user@axis.apache.org
> Subject: Axis2 generating the wrong XML namespace
>
> Hi there,
>
> Axis2 seems to strip off the "www." and tag on "xsd" to the XML
> namespaces of elements. E.g., "http://www.example.com/" becomes
> "http://example.com/xsd".
>
> The /xsd variant doesn't appear at all in any of my source code nor any
> associated assets and is completely generated by Axis2.
>
> I've specified my targetNamespace in services.xml but although this is
> being set to the target namespace of the WSDL, it's overridden by
> another targetNamespace on the <xs:schema> embedded in the generated
> WSDL, like:
>
> <wsdl:definitions ... targetNamespace="http://www.example.com/">
> ....
> <wsdl:types>
> <xs:schema ... targetNamespace="http://example.com/xsd">
> </xs:schema>
> </wsdl:types>
> ....
> </wsdl:definitions>
>
> Does anybody have any ideas?
>
> Thanks in advance,
> Oli
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-user-help@axis.apache.org
>