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 Martin Gainty <mg...@hotmail.com> on 2007/11/29 01:02:49 UTC

Re: compile error with generated code

Jesse-

you're trying to read a <xml:>lang attribute
as in this example from
/modules/integration/test-resources/SOAP12Testing/ReplyMessages/SOAP12Rest12
xml

<env:Text xml:lang="en-US"> Header not understood </env:Text>

M--
----- Original Message -----
From: "Jesse Vitrone" <je...@yahoo.com>
To: <ax...@ws.apache.org>
Sent: Thursday, November 29, 2007 2:14 PM
Subject: Re: compile error with generated code


> Sorry, premature send...damn new Yahoo Mail.  Let me try again:
>
>
>
> I'm getting a compile error (same one) a few different places in my
>  code.  Here's a sample of one of the areas:
>
>                 // handle attribute "lang"
>                 java.lang.String tempAttribLang =
>  reader.getAttributeValue("http://www.w3.org/XML/1998/namespace",
>                         "lang");
>
>                 if (tempAttribLang != null) {
>                     java.lang.String content = tempAttribLang;
>
>                     if (tempAttribLang.indexOf(":") > 0) {
>                         // this seems to be a Qname so find the
>  namespace and send
>                         prefix = tempAttribLang.substring(0,
>                                 tempAttribLang.indexOf(":"));
>                         namespaceuri = reader.getNamespaceURI(prefix);
>
>
object.setLang(org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(
>                                 tempAttribLang, namespaceuri));
>                     } else {
>                         // this seems to be not a qname send and empty
>  namespace incase of it is
>                         // check is done in fromString method
>
>
object.setLang(org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(
>                                 tempAttribLang, ""));
>                     }
>                 } else {
>                 }
>
> The problem is with this line:
>
>
>
object.setLang(org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(
>
>                                 tempAttribLang, namespaceuri));
>
>
> The definition for that method is generated like this:
>
>     public static class Factory {
>         public static Lang_type0 fromString(
>             javax.xml.stream.XMLStreamReader xmlStreamReader,
>             java.lang.String namespaceURI, java.lang.String type)
>             throws org.apache.axis2.databinding.ADBException {
>
>
> The code that is generated to use the method is only passing 2 params, but
the generated fromString method is expecting 3.
> Any idea why that would happen?
>
> I'd post the WSDL if I could, but it's work related and protected
information :(
>
> Thanks in advance - Jesse
>
>
>
>
>
>
>
>
>
> ----- Original Message ----
> From: Jesse Vitrone <je...@yahoo.com>
> To: axis-user@ws.apache.org
> Sent: Thursday, November 29, 2007 2:12:08 PM
> Subject: compile error with generated code
>
>
> I'm getting a compile error (same one) a few different places in my
>  code.  Here's a sample of one of the areas:
>
>                 // handle attribute "lang"
>                 java.lang.String tempAttribLang =
>  reader.getAttributeValue("http://www.w3.org/XML/1998/namespace",
>                         "lang");
>
>                 if (tempAttribLang != null) {
>                     java.lang.String content = tempAttribLang;
>
>                     if (tempAttribLang.indexOf(":") > 0) {
>                         // this seems to be a Qname so find the
>  namespace and send
>                         prefix = tempAttribLang.substring(0,
>                                 tempAttribLang.indexOf(":"));
>                         namespaceuri = reader.getNamespaceURI(prefix);
>
>
object.setLang(org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(
>                                 tempAttribLang, namespaceuri));
>                     } else {
>                         // this seems to be not a qname send and empty
>  namespace incase of it is
>                         // check is done in fromString method
>
>
object.setLang(org.w3.www.xml._1998.namespace.Lang_type0.Factory.fromString(
>                                 tempAttribLang, ""));
>                     }
>                 } else {
>                 }
>
>
> The problem is with this line:
>
>
>
>
>
>
____________________________________________________________________________
________
> Be a better sports nut!  Let your teams follow you
> with Yahoo Mobile. Try it now.
>   http://mobile.yahoo.com/sports;_ylt=At9_qDKvtAbMuh1G1SQtBI7ntAcJ
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>
>
>
>
>
>
____________________________________________________________________________
________
> Never miss a thing.  Make Yahoo your home page.
> http://www.yahoo.com/r/hs
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: axis-user-unsubscribe@ws.apache.org
> For additional commands, e-mail: axis-user-help@ws.apache.org
>
>


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