You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-commits@axis.apache.org by is...@apache.org on 2010/09/01 07:47:28 UTC

svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Author: isurues
Date: Wed Sep  1 05:47:27 2010
New Revision: 991441

URL: http://svn.apache.org/viewvc?rev=991441&view=rev
Log:
changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com

Modified:
    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
==============================================================================
--- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
+++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
@@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
 
     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
-    String HTTP_PREFIX = "http";
+    String HTTP_PREFIX = "http1";
     String MIME_PREFIX = "mime";
     String URN_PREFIX = "urn";
     String COLON_SEPARATOR = ":";



Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 10:14 AM, Sanjiva Weerawarana
<sa...@opensource.lk>wrote:

> On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:
>
>>
>> I did have a look into the code generator code. There, wsdl4j returns the
>> action as a QName. That is why this issue occurs. Have a look at the
>> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> WSDL11ActionHelper. Ideally it should provide a method to get the string
>> value of the attribute. But currently there's no such method.
>>
>
> I suggest opening an issue in WSDL4J and living with the workaround until
> they provide the extra method.
>

+1

Thanks,
~Isuru


>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Director & Chief Scientist; Lanka Software Foundation;
> http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2; http://wso2.com/
> Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Member; Sahana Software Foundation; http://www.sahanafoundation.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.org/
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 10:14 AM, Sanjiva Weerawarana
<sa...@opensource.lk>wrote:

> On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:
>
>>
>> I did have a look into the code generator code. There, wsdl4j returns the
>> action as a QName. That is why this issue occurs. Have a look at the
>> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> WSDL11ActionHelper. Ideally it should provide a method to get the string
>> value of the attribute. But currently there's no such method.
>>
>
> I suggest opening an issue in WSDL4J and living with the workaround until
> they provide the extra method.
>

+1

Thanks,
~Isuru


>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Director & Chief Scientist; Lanka Software Foundation;
> http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2; http://wso2.com/
> Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Member; Sahana Software Foundation; http://www.sahanafoundation.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.org/
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 10:14 AM, Sanjiva Weerawarana
<sa...@opensource.lk>wrote:

> On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:
>
>>
>> I did have a look into the code generator code. There, wsdl4j returns the
>> action as a QName. That is why this issue occurs. Have a look at the
>> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> WSDL11ActionHelper. Ideally it should provide a method to get the string
>> value of the attribute. But currently there's no such method.
>>
>
> I suggest opening an issue in WSDL4J and living with the workaround until
> they provide the extra method.
>

+1

Thanks,
~Isuru


>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Director & Chief Scientist; Lanka Software Foundation;
> http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2; http://wso2.com/
> Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Member; Sahana Software Foundation; http://www.sahanafoundation.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.org/
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 10:14 AM, Sanjiva Weerawarana
<sa...@opensource.lk>wrote:

> On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:
>
>>
>> I did have a look into the code generator code. There, wsdl4j returns the
>> action as a QName. That is why this issue occurs. Have a look at the
>> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> WSDL11ActionHelper. Ideally it should provide a method to get the string
>> value of the attribute. But currently there's no such method.
>>
>
> I suggest opening an issue in WSDL4J and living with the workaround until
> they provide the extra method.
>

+1

Thanks,
~Isuru


>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Director & Chief Scientist; Lanka Software Foundation;
> http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2; http://wso2.com/
> Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Member; Sahana Software Foundation; http://www.sahanafoundation.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.org/
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 10:14 AM, Sanjiva Weerawarana
<sa...@opensource.lk>wrote:

> On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:
>
>>
>> I did have a look into the code generator code. There, wsdl4j returns the
>> action as a QName. That is why this issue occurs. Have a look at the
>> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> WSDL11ActionHelper. Ideally it should provide a method to get the string
>> value of the attribute. But currently there's no such method.
>>
>
> I suggest opening an issue in WSDL4J and living with the workaround until
> they provide the extra method.
>

+1

Thanks,
~Isuru


>
> Sanjiva.
> --
> Sanjiva Weerawarana, Ph.D.
> Founder, Director & Chief Scientist; Lanka Software Foundation;
> http://www.opensource.lk/
> Founder, Chairman & CEO; WSO2; http://wso2.com/
> Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
> Member; Apache Software Foundation; http://www.apache.org/
> Member; Sahana Software Foundation; http://www.sahanafoundation.org/
> Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/
>
> Blog: http://sanjiva.weerawarana.org/
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.
>

I suggest opening an issue in WSDL4J and living with the workaround until
they provide the extra method.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 30, 2010 at 1:54 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Apparently, this is because my code creates an ExtensionRegistry from
> scratch. Creating the initial ExtensionRegistry using
> WSDLFactory#newPopulatedExtensionRegistry() should fix this.
>

Yes. This fixes the issue. Committed the fix for the original problem and
reverted the workaround I applied earlier. Thanks Andreas for pointing this
out..

~Isuru


>
> Andreas
>
> On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Hi Andreas,
> >
> > I applied your solution into codegen engine. It solves the original
> problem
> > and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> > correct action (http://../..). But unfortunately this fix creates a
> separate
> > issue.
> >
> > WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> > checks whether the extensibility elements returned by
> > port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> > type. But when I apply the above fix, it retuns ports of some unknown
> type
> > and generates an invalid code. And also it prints the following log on
> the
> > console.
> >
> > "A SOAP port was not found - picking a random port!"
> >
> > I'm attaching the patch here and you can apply it and check the above
> method
> > to reproduce the issue.
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> > wrote:
> >>
> >>
> >> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
> >> <an...@gmail.com> wrote:
> >>>
> >>> Isuru,
> >>>
> >>> Actually, the proper way of doing this is to configure an
> >>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> >>> expected type for the wsas:Action attribute (otherwise it will try to
> >>> guess the attribute type, and this fails in this particular case).
> >>> Here is the code that should be added in the appropriate place in
> >>> Axis2 ("reader" is the WSDLReader instance):
> >>>
> >>> ExtensionRegistry extReg = new ExtensionRegistry();
> >>> extReg.registerExtensionAttributeType(Input.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> extReg.registerExtensionAttributeType(Output.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> reader.setExtensionRegistry(extReg);
> >>>
> >>> Can you do the necessary changes?
> >>
> >> Sure. Will do the changes and update the list..
> >>
> >> Thanks,
> >> ~Isuru
> >>
> >>>
> >>> Andreas
> >>>
> >>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> >>> wrote:
> >>> > Attaching the wsdl and the schema..
> >>> >
> >>> > Thanks,
> >>> > ~Isuru
> >>> >
> >>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
> >>> > <an...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Isuru,
> >>> >>
> >>> >> Can you send me a sample WSDL for which the problem occurs?
> >>> >>
> >>> >> Andreas
> >>> >>
> >>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <isurues@gmail.com
> >
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >>> >> > <an...@gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
> >>> >> >> <is...@gmail.com>
> >>> >> >> wrote:
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >>> >> >> > <an...@gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
> >>> >> >> >> <is...@gmail.com>
> >>> >> >> >> wrote:
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >>> >> >> >> > <an...@gmail.com>
> >>> >> >> >> > wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >>> >> >> >> >> sounds
> >>> >> >> >> >> like a quick and dirty workaround for a more fundamental
> >>> >> >> >> >> issue.
> >>> >> >> >> >
> >>> >> >> >> > Let me explain it further.. I came up with a WSDL generated
> by
> >>> >> >> >> > our
> >>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
> >>> >> >> >> > for
> >>> >> >> >> > some
> >>> >> >> >> > message of some operation.
> >>> >> >> >> >
> >>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest
> "
> >>> >> >> >> >
> >>> >> >> >> > And also there is a namespace declaration in this WSDL as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >>> >> >> >> >
> >>> >> >> >> > When I generate the stub for this WSDL, it sets the Action
> on
> >>> >> >> >> > the
> >>> >> >> >> > stub
> >>> >> >> >> > as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >>> >> >> >> >
> >>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
> >>> >> >> >> > and it
> >>> >> >> >> > has
> >>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >>> >> >> >>
> >>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason
> why
> >>> >> >> >> the
> >>> >> >> >> code generator would interpret "http" as a prefix.
> >>> >> >> >
> >>> >> >> > Yes agreed..
> >>> >> >> >
> >>> >> >> >>
> >>> >> >> >> I think you should
> >>> >> >> >> try to determine why it is doing that instead of working
> around
> >>> >> >> >> the
> >>> >> >> >> issue by changing the WSDL generation code.
> >>> >> >> >
> >>> >> >> > I did have a look into the code generator code. There, wsdl4j
> >>> >> >> > returns
> >>> >> >> > the
> >>> >> >> > action as a QName. That is why this issue occurs. Have a look
> at
> >>> >> >> > the
> >>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method
> in
> >>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get
> the
> >>> >> >> > string
> >>> >> >> > value of the attribute. But currently there's no such method.
> >>> >> >>
> >>> >> >> Then I would suggest to review the following code in
> >>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>> >> >>
> >>> >> >>        if (attribute instanceof QName) {
> >>> >> >>            QName qn = (QName) attribute;
> >>> >> >>            attribute = qn.getLocalPart();
> >>> >> >>        }
> >>> >> >>
> >>> >> >> The code is used only for the action attribute and we know that
> the
> >>> >> >> action is not a QName. Thus, instead of just taking the local
> part,
> >>> >> >> we
> >>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >>> >> >> reconstruct the original value of the attribute. WDYT?
> >>> >> >
> >>> >> > Actually I initially tried this as well. But as Amila has already
> >>> >> > pointed
> >>> >> > out, prefix is "" in this case.
> >>> >> >
> >>> >> >>
> >>> >> >> >>
> >>> >> >> >> > Thanks,
> >>> >> >> >> > ~Isuru
> >>> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >> Andreas
> >>> >> >> >> >>
> >>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >>> >> >> >> >> > Author: isurues
> >>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > New Revision: 991441
> >>> >> >> >> >> >
> >>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >>> >> >> >> >> > Log:
> >>> >> >> >> >> > changing the http prefix from http to http1. This is
> >>> >> >> >> >> > because,
> >>> >> >> >> >> > use
> >>> >> >> >> >> > of
> >>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >>> >> >> >> >> > http://foo.com
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > URL:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> ==============================================================================
> >>> >> >> >> >> > ---
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > (original)
> >>> >> >> >> >> > +++
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >>> >> >> >> >> >
> >>> >> >> >> >> >     String HTTP_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >>> >> >> >> >> >     String MIME_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >>> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >>> >> >> >> >> >     String MIME_PREFIX = "mime";
> >>> >> >> >> >> >     String URN_PREFIX = "urn";
> >>> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> >> To unsubscribe, e-mail:
> java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> >> For additional commands, e-mail:
> >>> >> >> >> >> java-dev-help@axis.apache.org
> >>> >> >> >> >>
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > --
> >>> >> >> >> > Technical Lead,
> >>> >> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> For additional commands, e-mail:
> java-dev-help@axis.apache.org
> >>> >> >> >>
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > --
> >>> >> >> > Technical Lead,
> >>> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> ---------------------------------------------------------------------
> >>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Technical Lead,
> >>> >> > WSO2 Inc. http://wso2.org/
> >>> >> > Blog : http://isurues.wordpress.com/
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Technical Lead,
> >>> > WSO2 Inc. http://wso2.org/
> >>> > Blog : http://isurues.wordpress.com/
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Technical Lead,
> >> WSO2 Inc. http://wso2.org/
> >> Blog : http://isurues.wordpress.com/
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 30, 2010 at 1:54 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Apparently, this is because my code creates an ExtensionRegistry from
> scratch. Creating the initial ExtensionRegistry using
> WSDLFactory#newPopulatedExtensionRegistry() should fix this.
>

Yes. This fixes the issue. Committed the fix for the original problem and
reverted the workaround I applied earlier. Thanks Andreas for pointing this
out..

~Isuru


>
> Andreas
>
> On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Hi Andreas,
> >
> > I applied your solution into codegen engine. It solves the original
> problem
> > and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> > correct action (http://../..). But unfortunately this fix creates a
> separate
> > issue.
> >
> > WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> > checks whether the extensibility elements returned by
> > port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> > type. But when I apply the above fix, it retuns ports of some unknown
> type
> > and generates an invalid code. And also it prints the following log on
> the
> > console.
> >
> > "A SOAP port was not found - picking a random port!"
> >
> > I'm attaching the patch here and you can apply it and check the above
> method
> > to reproduce the issue.
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> > wrote:
> >>
> >>
> >> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
> >> <an...@gmail.com> wrote:
> >>>
> >>> Isuru,
> >>>
> >>> Actually, the proper way of doing this is to configure an
> >>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> >>> expected type for the wsas:Action attribute (otherwise it will try to
> >>> guess the attribute type, and this fails in this particular case).
> >>> Here is the code that should be added in the appropriate place in
> >>> Axis2 ("reader" is the WSDLReader instance):
> >>>
> >>> ExtensionRegistry extReg = new ExtensionRegistry();
> >>> extReg.registerExtensionAttributeType(Input.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> extReg.registerExtensionAttributeType(Output.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> reader.setExtensionRegistry(extReg);
> >>>
> >>> Can you do the necessary changes?
> >>
> >> Sure. Will do the changes and update the list..
> >>
> >> Thanks,
> >> ~Isuru
> >>
> >>>
> >>> Andreas
> >>>
> >>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> >>> wrote:
> >>> > Attaching the wsdl and the schema..
> >>> >
> >>> > Thanks,
> >>> > ~Isuru
> >>> >
> >>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
> >>> > <an...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Isuru,
> >>> >>
> >>> >> Can you send me a sample WSDL for which the problem occurs?
> >>> >>
> >>> >> Andreas
> >>> >>
> >>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <isurues@gmail.com
> >
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >>> >> > <an...@gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
> >>> >> >> <is...@gmail.com>
> >>> >> >> wrote:
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >>> >> >> > <an...@gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
> >>> >> >> >> <is...@gmail.com>
> >>> >> >> >> wrote:
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >>> >> >> >> > <an...@gmail.com>
> >>> >> >> >> > wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >>> >> >> >> >> sounds
> >>> >> >> >> >> like a quick and dirty workaround for a more fundamental
> >>> >> >> >> >> issue.
> >>> >> >> >> >
> >>> >> >> >> > Let me explain it further.. I came up with a WSDL generated
> by
> >>> >> >> >> > our
> >>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
> >>> >> >> >> > for
> >>> >> >> >> > some
> >>> >> >> >> > message of some operation.
> >>> >> >> >> >
> >>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest
> "
> >>> >> >> >> >
> >>> >> >> >> > And also there is a namespace declaration in this WSDL as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >>> >> >> >> >
> >>> >> >> >> > When I generate the stub for this WSDL, it sets the Action
> on
> >>> >> >> >> > the
> >>> >> >> >> > stub
> >>> >> >> >> > as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >>> >> >> >> >
> >>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
> >>> >> >> >> > and it
> >>> >> >> >> > has
> >>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >>> >> >> >>
> >>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason
> why
> >>> >> >> >> the
> >>> >> >> >> code generator would interpret "http" as a prefix.
> >>> >> >> >
> >>> >> >> > Yes agreed..
> >>> >> >> >
> >>> >> >> >>
> >>> >> >> >> I think you should
> >>> >> >> >> try to determine why it is doing that instead of working
> around
> >>> >> >> >> the
> >>> >> >> >> issue by changing the WSDL generation code.
> >>> >> >> >
> >>> >> >> > I did have a look into the code generator code. There, wsdl4j
> >>> >> >> > returns
> >>> >> >> > the
> >>> >> >> > action as a QName. That is why this issue occurs. Have a look
> at
> >>> >> >> > the
> >>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method
> in
> >>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get
> the
> >>> >> >> > string
> >>> >> >> > value of the attribute. But currently there's no such method.
> >>> >> >>
> >>> >> >> Then I would suggest to review the following code in
> >>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>> >> >>
> >>> >> >>        if (attribute instanceof QName) {
> >>> >> >>            QName qn = (QName) attribute;
> >>> >> >>            attribute = qn.getLocalPart();
> >>> >> >>        }
> >>> >> >>
> >>> >> >> The code is used only for the action attribute and we know that
> the
> >>> >> >> action is not a QName. Thus, instead of just taking the local
> part,
> >>> >> >> we
> >>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >>> >> >> reconstruct the original value of the attribute. WDYT?
> >>> >> >
> >>> >> > Actually I initially tried this as well. But as Amila has already
> >>> >> > pointed
> >>> >> > out, prefix is "" in this case.
> >>> >> >
> >>> >> >>
> >>> >> >> >>
> >>> >> >> >> > Thanks,
> >>> >> >> >> > ~Isuru
> >>> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >> Andreas
> >>> >> >> >> >>
> >>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >>> >> >> >> >> > Author: isurues
> >>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > New Revision: 991441
> >>> >> >> >> >> >
> >>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >>> >> >> >> >> > Log:
> >>> >> >> >> >> > changing the http prefix from http to http1. This is
> >>> >> >> >> >> > because,
> >>> >> >> >> >> > use
> >>> >> >> >> >> > of
> >>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >>> >> >> >> >> > http://foo.com
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > URL:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> ==============================================================================
> >>> >> >> >> >> > ---
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > (original)
> >>> >> >> >> >> > +++
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >>> >> >> >> >> >
> >>> >> >> >> >> >     String HTTP_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >>> >> >> >> >> >     String MIME_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >>> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >>> >> >> >> >> >     String MIME_PREFIX = "mime";
> >>> >> >> >> >> >     String URN_PREFIX = "urn";
> >>> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> >> To unsubscribe, e-mail:
> java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> >> For additional commands, e-mail:
> >>> >> >> >> >> java-dev-help@axis.apache.org
> >>> >> >> >> >>
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > --
> >>> >> >> >> > Technical Lead,
> >>> >> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> For additional commands, e-mail:
> java-dev-help@axis.apache.org
> >>> >> >> >>
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > --
> >>> >> >> > Technical Lead,
> >>> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> ---------------------------------------------------------------------
> >>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Technical Lead,
> >>> >> > WSO2 Inc. http://wso2.org/
> >>> >> > Blog : http://isurues.wordpress.com/
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Technical Lead,
> >>> > WSO2 Inc. http://wso2.org/
> >>> > Blog : http://isurues.wordpress.com/
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Technical Lead,
> >> WSO2 Inc. http://wso2.org/
> >> Blog : http://isurues.wordpress.com/
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 30, 2010 at 1:54 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Apparently, this is because my code creates an ExtensionRegistry from
> scratch. Creating the initial ExtensionRegistry using
> WSDLFactory#newPopulatedExtensionRegistry() should fix this.
>

Yes. This fixes the issue. Committed the fix for the original problem and
reverted the workaround I applied earlier. Thanks Andreas for pointing this
out..

~Isuru


>
> Andreas
>
> On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Hi Andreas,
> >
> > I applied your solution into codegen engine. It solves the original
> problem
> > and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> > correct action (http://../..). But unfortunately this fix creates a
> separate
> > issue.
> >
> > WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> > checks whether the extensibility elements returned by
> > port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> > type. But when I apply the above fix, it retuns ports of some unknown
> type
> > and generates an invalid code. And also it prints the following log on
> the
> > console.
> >
> > "A SOAP port was not found - picking a random port!"
> >
> > I'm attaching the patch here and you can apply it and check the above
> method
> > to reproduce the issue.
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> > wrote:
> >>
> >>
> >> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
> >> <an...@gmail.com> wrote:
> >>>
> >>> Isuru,
> >>>
> >>> Actually, the proper way of doing this is to configure an
> >>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> >>> expected type for the wsas:Action attribute (otherwise it will try to
> >>> guess the attribute type, and this fails in this particular case).
> >>> Here is the code that should be added in the appropriate place in
> >>> Axis2 ("reader" is the WSDLReader instance):
> >>>
> >>> ExtensionRegistry extReg = new ExtensionRegistry();
> >>> extReg.registerExtensionAttributeType(Input.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> extReg.registerExtensionAttributeType(Output.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> reader.setExtensionRegistry(extReg);
> >>>
> >>> Can you do the necessary changes?
> >>
> >> Sure. Will do the changes and update the list..
> >>
> >> Thanks,
> >> ~Isuru
> >>
> >>>
> >>> Andreas
> >>>
> >>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> >>> wrote:
> >>> > Attaching the wsdl and the schema..
> >>> >
> >>> > Thanks,
> >>> > ~Isuru
> >>> >
> >>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
> >>> > <an...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Isuru,
> >>> >>
> >>> >> Can you send me a sample WSDL for which the problem occurs?
> >>> >>
> >>> >> Andreas
> >>> >>
> >>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <isurues@gmail.com
> >
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >>> >> > <an...@gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
> >>> >> >> <is...@gmail.com>
> >>> >> >> wrote:
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >>> >> >> > <an...@gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
> >>> >> >> >> <is...@gmail.com>
> >>> >> >> >> wrote:
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >>> >> >> >> > <an...@gmail.com>
> >>> >> >> >> > wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >>> >> >> >> >> sounds
> >>> >> >> >> >> like a quick and dirty workaround for a more fundamental
> >>> >> >> >> >> issue.
> >>> >> >> >> >
> >>> >> >> >> > Let me explain it further.. I came up with a WSDL generated
> by
> >>> >> >> >> > our
> >>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
> >>> >> >> >> > for
> >>> >> >> >> > some
> >>> >> >> >> > message of some operation.
> >>> >> >> >> >
> >>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest
> "
> >>> >> >> >> >
> >>> >> >> >> > And also there is a namespace declaration in this WSDL as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >>> >> >> >> >
> >>> >> >> >> > When I generate the stub for this WSDL, it sets the Action
> on
> >>> >> >> >> > the
> >>> >> >> >> > stub
> >>> >> >> >> > as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >>> >> >> >> >
> >>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
> >>> >> >> >> > and it
> >>> >> >> >> > has
> >>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >>> >> >> >>
> >>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason
> why
> >>> >> >> >> the
> >>> >> >> >> code generator would interpret "http" as a prefix.
> >>> >> >> >
> >>> >> >> > Yes agreed..
> >>> >> >> >
> >>> >> >> >>
> >>> >> >> >> I think you should
> >>> >> >> >> try to determine why it is doing that instead of working
> around
> >>> >> >> >> the
> >>> >> >> >> issue by changing the WSDL generation code.
> >>> >> >> >
> >>> >> >> > I did have a look into the code generator code. There, wsdl4j
> >>> >> >> > returns
> >>> >> >> > the
> >>> >> >> > action as a QName. That is why this issue occurs. Have a look
> at
> >>> >> >> > the
> >>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method
> in
> >>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get
> the
> >>> >> >> > string
> >>> >> >> > value of the attribute. But currently there's no such method.
> >>> >> >>
> >>> >> >> Then I would suggest to review the following code in
> >>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>> >> >>
> >>> >> >>        if (attribute instanceof QName) {
> >>> >> >>            QName qn = (QName) attribute;
> >>> >> >>            attribute = qn.getLocalPart();
> >>> >> >>        }
> >>> >> >>
> >>> >> >> The code is used only for the action attribute and we know that
> the
> >>> >> >> action is not a QName. Thus, instead of just taking the local
> part,
> >>> >> >> we
> >>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >>> >> >> reconstruct the original value of the attribute. WDYT?
> >>> >> >
> >>> >> > Actually I initially tried this as well. But as Amila has already
> >>> >> > pointed
> >>> >> > out, prefix is "" in this case.
> >>> >> >
> >>> >> >>
> >>> >> >> >>
> >>> >> >> >> > Thanks,
> >>> >> >> >> > ~Isuru
> >>> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >> Andreas
> >>> >> >> >> >>
> >>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >>> >> >> >> >> > Author: isurues
> >>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > New Revision: 991441
> >>> >> >> >> >> >
> >>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >>> >> >> >> >> > Log:
> >>> >> >> >> >> > changing the http prefix from http to http1. This is
> >>> >> >> >> >> > because,
> >>> >> >> >> >> > use
> >>> >> >> >> >> > of
> >>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >>> >> >> >> >> > http://foo.com
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > URL:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> ==============================================================================
> >>> >> >> >> >> > ---
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > (original)
> >>> >> >> >> >> > +++
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >>> >> >> >> >> >
> >>> >> >> >> >> >     String HTTP_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >>> >> >> >> >> >     String MIME_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >>> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >>> >> >> >> >> >     String MIME_PREFIX = "mime";
> >>> >> >> >> >> >     String URN_PREFIX = "urn";
> >>> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> >> To unsubscribe, e-mail:
> java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> >> For additional commands, e-mail:
> >>> >> >> >> >> java-dev-help@axis.apache.org
> >>> >> >> >> >>
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > --
> >>> >> >> >> > Technical Lead,
> >>> >> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> For additional commands, e-mail:
> java-dev-help@axis.apache.org
> >>> >> >> >>
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > --
> >>> >> >> > Technical Lead,
> >>> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> ---------------------------------------------------------------------
> >>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Technical Lead,
> >>> >> > WSO2 Inc. http://wso2.org/
> >>> >> > Blog : http://isurues.wordpress.com/
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Technical Lead,
> >>> > WSO2 Inc. http://wso2.org/
> >>> > Blog : http://isurues.wordpress.com/
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Technical Lead,
> >> WSO2 Inc. http://wso2.org/
> >> Blog : http://isurues.wordpress.com/
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 30, 2010 at 1:54 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Apparently, this is because my code creates an ExtensionRegistry from
> scratch. Creating the initial ExtensionRegistry using
> WSDLFactory#newPopulatedExtensionRegistry() should fix this.
>

Yes. This fixes the issue. Committed the fix for the original problem and
reverted the workaround I applied earlier. Thanks Andreas for pointing this
out..

~Isuru


>
> Andreas
>
> On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Hi Andreas,
> >
> > I applied your solution into codegen engine. It solves the original
> problem
> > and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> > correct action (http://../..). But unfortunately this fix creates a
> separate
> > issue.
> >
> > WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> > checks whether the extensibility elements returned by
> > port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> > type. But when I apply the above fix, it retuns ports of some unknown
> type
> > and generates an invalid code. And also it prints the following log on
> the
> > console.
> >
> > "A SOAP port was not found - picking a random port!"
> >
> > I'm attaching the patch here and you can apply it and check the above
> method
> > to reproduce the issue.
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> > wrote:
> >>
> >>
> >> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
> >> <an...@gmail.com> wrote:
> >>>
> >>> Isuru,
> >>>
> >>> Actually, the proper way of doing this is to configure an
> >>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> >>> expected type for the wsas:Action attribute (otherwise it will try to
> >>> guess the attribute type, and this fails in this particular case).
> >>> Here is the code that should be added in the appropriate place in
> >>> Axis2 ("reader" is the WSDLReader instance):
> >>>
> >>> ExtensionRegistry extReg = new ExtensionRegistry();
> >>> extReg.registerExtensionAttributeType(Input.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> extReg.registerExtensionAttributeType(Output.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> reader.setExtensionRegistry(extReg);
> >>>
> >>> Can you do the necessary changes?
> >>
> >> Sure. Will do the changes and update the list..
> >>
> >> Thanks,
> >> ~Isuru
> >>
> >>>
> >>> Andreas
> >>>
> >>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> >>> wrote:
> >>> > Attaching the wsdl and the schema..
> >>> >
> >>> > Thanks,
> >>> > ~Isuru
> >>> >
> >>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
> >>> > <an...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Isuru,
> >>> >>
> >>> >> Can you send me a sample WSDL for which the problem occurs?
> >>> >>
> >>> >> Andreas
> >>> >>
> >>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <isurues@gmail.com
> >
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >>> >> > <an...@gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
> >>> >> >> <is...@gmail.com>
> >>> >> >> wrote:
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >>> >> >> > <an...@gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
> >>> >> >> >> <is...@gmail.com>
> >>> >> >> >> wrote:
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >>> >> >> >> > <an...@gmail.com>
> >>> >> >> >> > wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >>> >> >> >> >> sounds
> >>> >> >> >> >> like a quick and dirty workaround for a more fundamental
> >>> >> >> >> >> issue.
> >>> >> >> >> >
> >>> >> >> >> > Let me explain it further.. I came up with a WSDL generated
> by
> >>> >> >> >> > our
> >>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
> >>> >> >> >> > for
> >>> >> >> >> > some
> >>> >> >> >> > message of some operation.
> >>> >> >> >> >
> >>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest
> "
> >>> >> >> >> >
> >>> >> >> >> > And also there is a namespace declaration in this WSDL as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >>> >> >> >> >
> >>> >> >> >> > When I generate the stub for this WSDL, it sets the Action
> on
> >>> >> >> >> > the
> >>> >> >> >> > stub
> >>> >> >> >> > as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >>> >> >> >> >
> >>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
> >>> >> >> >> > and it
> >>> >> >> >> > has
> >>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >>> >> >> >>
> >>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason
> why
> >>> >> >> >> the
> >>> >> >> >> code generator would interpret "http" as a prefix.
> >>> >> >> >
> >>> >> >> > Yes agreed..
> >>> >> >> >
> >>> >> >> >>
> >>> >> >> >> I think you should
> >>> >> >> >> try to determine why it is doing that instead of working
> around
> >>> >> >> >> the
> >>> >> >> >> issue by changing the WSDL generation code.
> >>> >> >> >
> >>> >> >> > I did have a look into the code generator code. There, wsdl4j
> >>> >> >> > returns
> >>> >> >> > the
> >>> >> >> > action as a QName. That is why this issue occurs. Have a look
> at
> >>> >> >> > the
> >>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method
> in
> >>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get
> the
> >>> >> >> > string
> >>> >> >> > value of the attribute. But currently there's no such method.
> >>> >> >>
> >>> >> >> Then I would suggest to review the following code in
> >>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>> >> >>
> >>> >> >>        if (attribute instanceof QName) {
> >>> >> >>            QName qn = (QName) attribute;
> >>> >> >>            attribute = qn.getLocalPart();
> >>> >> >>        }
> >>> >> >>
> >>> >> >> The code is used only for the action attribute and we know that
> the
> >>> >> >> action is not a QName. Thus, instead of just taking the local
> part,
> >>> >> >> we
> >>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >>> >> >> reconstruct the original value of the attribute. WDYT?
> >>> >> >
> >>> >> > Actually I initially tried this as well. But as Amila has already
> >>> >> > pointed
> >>> >> > out, prefix is "" in this case.
> >>> >> >
> >>> >> >>
> >>> >> >> >>
> >>> >> >> >> > Thanks,
> >>> >> >> >> > ~Isuru
> >>> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >> Andreas
> >>> >> >> >> >>
> >>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >>> >> >> >> >> > Author: isurues
> >>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > New Revision: 991441
> >>> >> >> >> >> >
> >>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >>> >> >> >> >> > Log:
> >>> >> >> >> >> > changing the http prefix from http to http1. This is
> >>> >> >> >> >> > because,
> >>> >> >> >> >> > use
> >>> >> >> >> >> > of
> >>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >>> >> >> >> >> > http://foo.com
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > URL:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> ==============================================================================
> >>> >> >> >> >> > ---
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > (original)
> >>> >> >> >> >> > +++
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >>> >> >> >> >> >
> >>> >> >> >> >> >     String HTTP_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >>> >> >> >> >> >     String MIME_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >>> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >>> >> >> >> >> >     String MIME_PREFIX = "mime";
> >>> >> >> >> >> >     String URN_PREFIX = "urn";
> >>> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> >> To unsubscribe, e-mail:
> java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> >> For additional commands, e-mail:
> >>> >> >> >> >> java-dev-help@axis.apache.org
> >>> >> >> >> >>
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > --
> >>> >> >> >> > Technical Lead,
> >>> >> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> For additional commands, e-mail:
> java-dev-help@axis.apache.org
> >>> >> >> >>
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > --
> >>> >> >> > Technical Lead,
> >>> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> ---------------------------------------------------------------------
> >>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Technical Lead,
> >>> >> > WSO2 Inc. http://wso2.org/
> >>> >> > Blog : http://isurues.wordpress.com/
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Technical Lead,
> >>> > WSO2 Inc. http://wso2.org/
> >>> > Blog : http://isurues.wordpress.com/
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Technical Lead,
> >> WSO2 Inc. http://wso2.org/
> >> Blog : http://isurues.wordpress.com/
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 30, 2010 at 1:54 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Apparently, this is because my code creates an ExtensionRegistry from
> scratch. Creating the initial ExtensionRegistry using
> WSDLFactory#newPopulatedExtensionRegistry() should fix this.
>

Yes. This fixes the issue. Committed the fix for the original problem and
reverted the workaround I applied earlier. Thanks Andreas for pointing this
out..

~Isuru


>
> Andreas
>
> On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Hi Andreas,
> >
> > I applied your solution into codegen engine. It solves the original
> problem
> > and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> > correct action (http://../..). But unfortunately this fix creates a
> separate
> > issue.
> >
> > WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> > checks whether the extensibility elements returned by
> > port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> > type. But when I apply the above fix, it retuns ports of some unknown
> type
> > and generates an invalid code. And also it prints the following log on
> the
> > console.
> >
> > "A SOAP port was not found - picking a random port!"
> >
> > I'm attaching the patch here and you can apply it and check the above
> method
> > to reproduce the issue.
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> > wrote:
> >>
> >>
> >> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
> >> <an...@gmail.com> wrote:
> >>>
> >>> Isuru,
> >>>
> >>> Actually, the proper way of doing this is to configure an
> >>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> >>> expected type for the wsas:Action attribute (otherwise it will try to
> >>> guess the attribute type, and this fails in this particular case).
> >>> Here is the code that should be added in the appropriate place in
> >>> Axis2 ("reader" is the WSDLReader instance):
> >>>
> >>> ExtensionRegistry extReg = new ExtensionRegistry();
> >>> extReg.registerExtensionAttributeType(Input.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> extReg.registerExtensionAttributeType(Output.class, new
> >>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> >>> AttributeExtensible.STRING_TYPE);
> >>> reader.setExtensionRegistry(extReg);
> >>>
> >>> Can you do the necessary changes?
> >>
> >> Sure. Will do the changes and update the list..
> >>
> >> Thanks,
> >> ~Isuru
> >>
> >>>
> >>> Andreas
> >>>
> >>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> >>> wrote:
> >>> > Attaching the wsdl and the schema..
> >>> >
> >>> > Thanks,
> >>> > ~Isuru
> >>> >
> >>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
> >>> > <an...@gmail.com>
> >>> > wrote:
> >>> >>
> >>> >> Isuru,
> >>> >>
> >>> >> Can you send me a sample WSDL for which the problem occurs?
> >>> >>
> >>> >> Andreas
> >>> >>
> >>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <isurues@gmail.com
> >
> >>> >> wrote:
> >>> >> >
> >>> >> >
> >>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >>> >> > <an...@gmail.com>
> >>> >> > wrote:
> >>> >> >>
> >>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
> >>> >> >> <is...@gmail.com>
> >>> >> >> wrote:
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >>> >> >> > <an...@gmail.com>
> >>> >> >> > wrote:
> >>> >> >> >>
> >>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
> >>> >> >> >> <is...@gmail.com>
> >>> >> >> >> wrote:
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >>> >> >> >> > <an...@gmail.com>
> >>> >> >> >> > wrote:
> >>> >> >> >> >>
> >>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >>> >> >> >> >> sounds
> >>> >> >> >> >> like a quick and dirty workaround for a more fundamental
> >>> >> >> >> >> issue.
> >>> >> >> >> >
> >>> >> >> >> > Let me explain it further.. I came up with a WSDL generated
> by
> >>> >> >> >> > our
> >>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
> >>> >> >> >> > for
> >>> >> >> >> > some
> >>> >> >> >> > message of some operation.
> >>> >> >> >> >
> >>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest
> "
> >>> >> >> >> >
> >>> >> >> >> > And also there is a namespace declaration in this WSDL as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >>> >> >> >> >
> >>> >> >> >> > When I generate the stub for this WSDL, it sets the Action
> on
> >>> >> >> >> > the
> >>> >> >> >> > stub
> >>> >> >> >> > as
> >>> >> >> >> > follows..
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >>> >> >> >> >
> >>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
> >>> >> >> >> > and it
> >>> >> >> >> > has
> >>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >>> >> >> >>
> >>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason
> why
> >>> >> >> >> the
> >>> >> >> >> code generator would interpret "http" as a prefix.
> >>> >> >> >
> >>> >> >> > Yes agreed..
> >>> >> >> >
> >>> >> >> >>
> >>> >> >> >> I think you should
> >>> >> >> >> try to determine why it is doing that instead of working
> around
> >>> >> >> >> the
> >>> >> >> >> issue by changing the WSDL generation code.
> >>> >> >> >
> >>> >> >> > I did have a look into the code generator code. There, wsdl4j
> >>> >> >> > returns
> >>> >> >> > the
> >>> >> >> > action as a QName. That is why this issue occurs. Have a look
> at
> >>> >> >> > the
> >>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method
> in
> >>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get
> the
> >>> >> >> > string
> >>> >> >> > value of the attribute. But currently there's no such method.
> >>> >> >>
> >>> >> >> Then I would suggest to review the following code in
> >>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>> >> >>
> >>> >> >>        if (attribute instanceof QName) {
> >>> >> >>            QName qn = (QName) attribute;
> >>> >> >>            attribute = qn.getLocalPart();
> >>> >> >>        }
> >>> >> >>
> >>> >> >> The code is used only for the action attribute and we know that
> the
> >>> >> >> action is not a QName. Thus, instead of just taking the local
> part,
> >>> >> >> we
> >>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >>> >> >> reconstruct the original value of the attribute. WDYT?
> >>> >> >
> >>> >> > Actually I initially tried this as well. But as Amila has already
> >>> >> > pointed
> >>> >> > out, prefix is "" in this case.
> >>> >> >
> >>> >> >>
> >>> >> >> >>
> >>> >> >> >> > Thanks,
> >>> >> >> >> > ~Isuru
> >>> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >> Andreas
> >>> >> >> >> >>
> >>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >>> >> >> >> >> > Author: isurues
> >>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > New Revision: 991441
> >>> >> >> >> >> >
> >>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >>> >> >> >> >> > Log:
> >>> >> >> >> >> > changing the http prefix from http to http1. This is
> >>> >> >> >> >> > because,
> >>> >> >> >> >> > use
> >>> >> >> >> >> > of
> >>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >>> >> >> >> >> > http://foo.com
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> >
> >>> >> >> >> >> > Modified:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > URL:
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> ==============================================================================
> >>> >> >> >> >> > ---
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > (original)
> >>> >> >> >> >> > +++
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >>> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >>> >> >> >> >> >
> >>> >> >> >> >> >     String HTTP_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >>> >> >> >> >> >     String MIME_NAMESPACE =
> >>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >>> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >>> >> >> >> >> >     String MIME_PREFIX = "mime";
> >>> >> >> >> >> >     String URN_PREFIX = "urn";
> >>> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >> >
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> >>> >> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> >> To unsubscribe, e-mail:
> java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> >> For additional commands, e-mail:
> >>> >> >> >> >> java-dev-help@axis.apache.org
> >>> >> >> >> >>
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> >
> >>> >> >> >> > --
> >>> >> >> >> > Technical Lead,
> >>> >> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >> >
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> >>> >> >> >>
> ---------------------------------------------------------------------
> >>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> >> For additional commands, e-mail:
> java-dev-help@axis.apache.org
> >>> >> >> >>
> >>> >> >> >
> >>> >> >> >
> >>> >> >> >
> >>> >> >> > --
> >>> >> >> > Technical Lead,
> >>> >> >> > WSO2 Inc. http://wso2.org/
> >>> >> >> > Blog : http://isurues.wordpress.com/
> >>> >> >> >
> >>> >> >>
> >>> >> >>
> >>> >> >>
> ---------------------------------------------------------------------
> >>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >> >>
> >>> >> >
> >>> >> >
> >>> >> >
> >>> >> > --
> >>> >> > Technical Lead,
> >>> >> > WSO2 Inc. http://wso2.org/
> >>> >> > Blog : http://isurues.wordpress.com/
> >>> >> >
> >>> >>
> >>> >>
> ---------------------------------------------------------------------
> >>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >>
> >>> >
> >>> >
> >>> >
> >>> > --
> >>> > Technical Lead,
> >>> > WSO2 Inc. http://wso2.org/
> >>> > Blog : http://isurues.wordpress.com/
> >>> >
> >>> >
> >>> > ---------------------------------------------------------------------
> >>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >>> >
> >>>
> >>> ---------------------------------------------------------------------
> >>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >>> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>>
> >>
> >>
> >>
> >> --
> >> Technical Lead,
> >> WSO2 Inc. http://wso2.org/
> >> Blog : http://isurues.wordpress.com/
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Apparently, this is because my code creates an ExtensionRegistry from
scratch. Creating the initial ExtensionRegistry using
WSDLFactory#newPopulatedExtensionRegistry() should fix this.

Andreas

On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com> wrote:
> Hi Andreas,
>
> I applied your solution into codegen engine. It solves the original problem
> and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> correct action (http://../..). But unfortunately this fix creates a separate
> issue.
>
> WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> checks whether the extensibility elements returned by
> port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> type. But when I apply the above fix, it retuns ports of some unknown type
> and generates an invalid code. And also it prints the following log on the
> console.
>
> "A SOAP port was not found - picking a random port!"
>
> I'm attaching the patch here and you can apply it and check the above method
> to reproduce the issue.
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> wrote:
>>
>>
>> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Isuru,
>>>
>>> Actually, the proper way of doing this is to configure an
>>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>>> expected type for the wsas:Action attribute (otherwise it will try to
>>> guess the attribute type, and this fails in this particular case).
>>> Here is the code that should be added in the appropriate place in
>>> Axis2 ("reader" is the WSDLReader instance):
>>>
>>> ExtensionRegistry extReg = new ExtensionRegistry();
>>> extReg.registerExtensionAttributeType(Input.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> extReg.registerExtensionAttributeType(Output.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> reader.setExtensionRegistry(extReg);
>>>
>>> Can you do the necessary changes?
>>
>> Sure. Will do the changes and update the list..
>>
>> Thanks,
>> ~Isuru
>>
>>>
>>> Andreas
>>>
>>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>>> wrote:
>>> > Attaching the wsdl and the schema..
>>> >
>>> > Thanks,
>>> > ~Isuru
>>> >
>>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
>>> > <an...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Isuru,
>>> >>
>>> >> Can you send me a sample WSDL for which the problem occurs?
>>> >>
>>> >> Andreas
>>> >>
>>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >
>>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>>> >> > <an...@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
>>> >> >> <is...@gmail.com>
>>> >> >> wrote:
>>> >> >> >
>>> >> >> >
>>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>>> >> >> > <an...@gmail.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
>>> >> >> >> <is...@gmail.com>
>>> >> >> >> wrote:
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>>> >> >> >> > <an...@gmail.com>
>>> >> >> >> > wrote:
>>> >> >> >> >>
>>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>>> >> >> >> >> sounds
>>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>>> >> >> >> >> issue.
>>> >> >> >> >
>>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>>> >> >> >> > our
>>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>>> >> >> >> > for
>>> >> >> >> > some
>>> >> >> >> > message of some operation.
>>> >> >> >> >
>>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>>> >> >> >> >
>>> >> >> >> > And also there is a namespace declaration in this WSDL as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>> >> >> >> >
>>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>>> >> >> >> > the
>>> >> >> >> > stub
>>> >> >> >> > as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>>> >> >> >> >
>>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
>>> >> >> >> > and it
>>> >> >> >> > has
>>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>>> >> >> >>
>>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>>> >> >> >> the
>>> >> >> >> code generator would interpret "http" as a prefix.
>>> >> >> >
>>> >> >> > Yes agreed..
>>> >> >> >
>>> >> >> >>
>>> >> >> >> I think you should
>>> >> >> >> try to determine why it is doing that instead of working around
>>> >> >> >> the
>>> >> >> >> issue by changing the WSDL generation code.
>>> >> >> >
>>> >> >> > I did have a look into the code generator code. There, wsdl4j
>>> >> >> > returns
>>> >> >> > the
>>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>>> >> >> > the
>>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>>> >> >> > string
>>> >> >> > value of the attribute. But currently there's no such method.
>>> >> >>
>>> >> >> Then I would suggest to review the following code in
>>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>> >> >>
>>> >> >>        if (attribute instanceof QName) {
>>> >> >>            QName qn = (QName) attribute;
>>> >> >>            attribute = qn.getLocalPart();
>>> >> >>        }
>>> >> >>
>>> >> >> The code is used only for the action attribute and we know that the
>>> >> >> action is not a QName. Thus, instead of just taking the local part,
>>> >> >> we
>>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>>> >> >> reconstruct the original value of the attribute. WDYT?
>>> >> >
>>> >> > Actually I initially tried this as well. But as Amila has already
>>> >> > pointed
>>> >> > out, prefix is "" in this case.
>>> >> >
>>> >> >>
>>> >> >> >>
>>> >> >> >> > Thanks,
>>> >> >> >> > ~Isuru
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Andreas
>>> >> >> >> >>
>>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>>> >> >> >> >> > Author: isurues
>>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > New Revision: 991441
>>> >> >> >> >> >
>>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>>> >> >> >> >> > Log:
>>> >> >> >> >> > changing the http prefix from http to http1. This is
>>> >> >> >> >> > because,
>>> >> >> >> >> > use
>>> >> >> >> >> > of
>>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>>> >> >> >> >> > http://foo.com
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > URL:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > ==============================================================================
>>> >> >> >> >> > ---
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > (original)
>>> >> >> >> >> > +++
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>>> >> >> >> >> >
>>> >> >> >> >> >     String HTTP_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>>> >> >> >> >> >     String MIME_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>>> >> >> >> >> >     String MIME_PREFIX = "mime";
>>> >> >> >> >> >     String URN_PREFIX = "urn";
>>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> >> For additional commands, e-mail:
>>> >> >> >> >> java-dev-help@axis.apache.org
>>> >> >> >> >>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > Technical Lead,
>>> >> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Technical Lead,
>>> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Technical Lead,
>>> >> > WSO2 Inc. http://wso2.org/
>>> >> > Blog : http://isurues.wordpress.com/
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Technical Lead,
>>> > WSO2 Inc. http://wso2.org/
>>> > Blog : http://isurues.wordpress.com/
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>>
>> --
>> Technical Lead,
>> WSO2 Inc. http://wso2.org/
>> Blog : http://isurues.wordpress.com/
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Apparently, this is because my code creates an ExtensionRegistry from
scratch. Creating the initial ExtensionRegistry using
WSDLFactory#newPopulatedExtensionRegistry() should fix this.

Andreas

On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com> wrote:
> Hi Andreas,
>
> I applied your solution into codegen engine. It solves the original problem
> and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> correct action (http://../..). But unfortunately this fix creates a separate
> issue.
>
> WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> checks whether the extensibility elements returned by
> port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> type. But when I apply the above fix, it retuns ports of some unknown type
> and generates an invalid code. And also it prints the following log on the
> console.
>
> "A SOAP port was not found - picking a random port!"
>
> I'm attaching the patch here and you can apply it and check the above method
> to reproduce the issue.
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> wrote:
>>
>>
>> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Isuru,
>>>
>>> Actually, the proper way of doing this is to configure an
>>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>>> expected type for the wsas:Action attribute (otherwise it will try to
>>> guess the attribute type, and this fails in this particular case).
>>> Here is the code that should be added in the appropriate place in
>>> Axis2 ("reader" is the WSDLReader instance):
>>>
>>> ExtensionRegistry extReg = new ExtensionRegistry();
>>> extReg.registerExtensionAttributeType(Input.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> extReg.registerExtensionAttributeType(Output.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> reader.setExtensionRegistry(extReg);
>>>
>>> Can you do the necessary changes?
>>
>> Sure. Will do the changes and update the list..
>>
>> Thanks,
>> ~Isuru
>>
>>>
>>> Andreas
>>>
>>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>>> wrote:
>>> > Attaching the wsdl and the schema..
>>> >
>>> > Thanks,
>>> > ~Isuru
>>> >
>>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
>>> > <an...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Isuru,
>>> >>
>>> >> Can you send me a sample WSDL for which the problem occurs?
>>> >>
>>> >> Andreas
>>> >>
>>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >
>>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>>> >> > <an...@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
>>> >> >> <is...@gmail.com>
>>> >> >> wrote:
>>> >> >> >
>>> >> >> >
>>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>>> >> >> > <an...@gmail.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
>>> >> >> >> <is...@gmail.com>
>>> >> >> >> wrote:
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>>> >> >> >> > <an...@gmail.com>
>>> >> >> >> > wrote:
>>> >> >> >> >>
>>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>>> >> >> >> >> sounds
>>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>>> >> >> >> >> issue.
>>> >> >> >> >
>>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>>> >> >> >> > our
>>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>>> >> >> >> > for
>>> >> >> >> > some
>>> >> >> >> > message of some operation.
>>> >> >> >> >
>>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>>> >> >> >> >
>>> >> >> >> > And also there is a namespace declaration in this WSDL as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>> >> >> >> >
>>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>>> >> >> >> > the
>>> >> >> >> > stub
>>> >> >> >> > as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>>> >> >> >> >
>>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
>>> >> >> >> > and it
>>> >> >> >> > has
>>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>>> >> >> >>
>>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>>> >> >> >> the
>>> >> >> >> code generator would interpret "http" as a prefix.
>>> >> >> >
>>> >> >> > Yes agreed..
>>> >> >> >
>>> >> >> >>
>>> >> >> >> I think you should
>>> >> >> >> try to determine why it is doing that instead of working around
>>> >> >> >> the
>>> >> >> >> issue by changing the WSDL generation code.
>>> >> >> >
>>> >> >> > I did have a look into the code generator code. There, wsdl4j
>>> >> >> > returns
>>> >> >> > the
>>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>>> >> >> > the
>>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>>> >> >> > string
>>> >> >> > value of the attribute. But currently there's no such method.
>>> >> >>
>>> >> >> Then I would suggest to review the following code in
>>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>> >> >>
>>> >> >>        if (attribute instanceof QName) {
>>> >> >>            QName qn = (QName) attribute;
>>> >> >>            attribute = qn.getLocalPart();
>>> >> >>        }
>>> >> >>
>>> >> >> The code is used only for the action attribute and we know that the
>>> >> >> action is not a QName. Thus, instead of just taking the local part,
>>> >> >> we
>>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>>> >> >> reconstruct the original value of the attribute. WDYT?
>>> >> >
>>> >> > Actually I initially tried this as well. But as Amila has already
>>> >> > pointed
>>> >> > out, prefix is "" in this case.
>>> >> >
>>> >> >>
>>> >> >> >>
>>> >> >> >> > Thanks,
>>> >> >> >> > ~Isuru
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Andreas
>>> >> >> >> >>
>>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>>> >> >> >> >> > Author: isurues
>>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > New Revision: 991441
>>> >> >> >> >> >
>>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>>> >> >> >> >> > Log:
>>> >> >> >> >> > changing the http prefix from http to http1. This is
>>> >> >> >> >> > because,
>>> >> >> >> >> > use
>>> >> >> >> >> > of
>>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>>> >> >> >> >> > http://foo.com
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > URL:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > ==============================================================================
>>> >> >> >> >> > ---
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > (original)
>>> >> >> >> >> > +++
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>>> >> >> >> >> >
>>> >> >> >> >> >     String HTTP_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>>> >> >> >> >> >     String MIME_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>>> >> >> >> >> >     String MIME_PREFIX = "mime";
>>> >> >> >> >> >     String URN_PREFIX = "urn";
>>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> >> For additional commands, e-mail:
>>> >> >> >> >> java-dev-help@axis.apache.org
>>> >> >> >> >>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > Technical Lead,
>>> >> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Technical Lead,
>>> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Technical Lead,
>>> >> > WSO2 Inc. http://wso2.org/
>>> >> > Blog : http://isurues.wordpress.com/
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Technical Lead,
>>> > WSO2 Inc. http://wso2.org/
>>> > Blog : http://isurues.wordpress.com/
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>>
>> --
>> Technical Lead,
>> WSO2 Inc. http://wso2.org/
>> Blog : http://isurues.wordpress.com/
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Apparently, this is because my code creates an ExtensionRegistry from
scratch. Creating the initial ExtensionRegistry using
WSDLFactory#newPopulatedExtensionRegistry() should fix this.

Andreas

On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com> wrote:
> Hi Andreas,
>
> I applied your solution into codegen engine. It solves the original problem
> and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> correct action (http://../..). But unfortunately this fix creates a separate
> issue.
>
> WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> checks whether the extensibility elements returned by
> port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> type. But when I apply the above fix, it retuns ports of some unknown type
> and generates an invalid code. And also it prints the following log on the
> console.
>
> "A SOAP port was not found - picking a random port!"
>
> I'm attaching the patch here and you can apply it and check the above method
> to reproduce the issue.
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> wrote:
>>
>>
>> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Isuru,
>>>
>>> Actually, the proper way of doing this is to configure an
>>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>>> expected type for the wsas:Action attribute (otherwise it will try to
>>> guess the attribute type, and this fails in this particular case).
>>> Here is the code that should be added in the appropriate place in
>>> Axis2 ("reader" is the WSDLReader instance):
>>>
>>> ExtensionRegistry extReg = new ExtensionRegistry();
>>> extReg.registerExtensionAttributeType(Input.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> extReg.registerExtensionAttributeType(Output.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> reader.setExtensionRegistry(extReg);
>>>
>>> Can you do the necessary changes?
>>
>> Sure. Will do the changes and update the list..
>>
>> Thanks,
>> ~Isuru
>>
>>>
>>> Andreas
>>>
>>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>>> wrote:
>>> > Attaching the wsdl and the schema..
>>> >
>>> > Thanks,
>>> > ~Isuru
>>> >
>>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
>>> > <an...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Isuru,
>>> >>
>>> >> Can you send me a sample WSDL for which the problem occurs?
>>> >>
>>> >> Andreas
>>> >>
>>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >
>>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>>> >> > <an...@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
>>> >> >> <is...@gmail.com>
>>> >> >> wrote:
>>> >> >> >
>>> >> >> >
>>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>>> >> >> > <an...@gmail.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
>>> >> >> >> <is...@gmail.com>
>>> >> >> >> wrote:
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>>> >> >> >> > <an...@gmail.com>
>>> >> >> >> > wrote:
>>> >> >> >> >>
>>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>>> >> >> >> >> sounds
>>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>>> >> >> >> >> issue.
>>> >> >> >> >
>>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>>> >> >> >> > our
>>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>>> >> >> >> > for
>>> >> >> >> > some
>>> >> >> >> > message of some operation.
>>> >> >> >> >
>>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>>> >> >> >> >
>>> >> >> >> > And also there is a namespace declaration in this WSDL as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>> >> >> >> >
>>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>>> >> >> >> > the
>>> >> >> >> > stub
>>> >> >> >> > as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>>> >> >> >> >
>>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
>>> >> >> >> > and it
>>> >> >> >> > has
>>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>>> >> >> >>
>>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>>> >> >> >> the
>>> >> >> >> code generator would interpret "http" as a prefix.
>>> >> >> >
>>> >> >> > Yes agreed..
>>> >> >> >
>>> >> >> >>
>>> >> >> >> I think you should
>>> >> >> >> try to determine why it is doing that instead of working around
>>> >> >> >> the
>>> >> >> >> issue by changing the WSDL generation code.
>>> >> >> >
>>> >> >> > I did have a look into the code generator code. There, wsdl4j
>>> >> >> > returns
>>> >> >> > the
>>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>>> >> >> > the
>>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>>> >> >> > string
>>> >> >> > value of the attribute. But currently there's no such method.
>>> >> >>
>>> >> >> Then I would suggest to review the following code in
>>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>> >> >>
>>> >> >>        if (attribute instanceof QName) {
>>> >> >>            QName qn = (QName) attribute;
>>> >> >>            attribute = qn.getLocalPart();
>>> >> >>        }
>>> >> >>
>>> >> >> The code is used only for the action attribute and we know that the
>>> >> >> action is not a QName. Thus, instead of just taking the local part,
>>> >> >> we
>>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>>> >> >> reconstruct the original value of the attribute. WDYT?
>>> >> >
>>> >> > Actually I initially tried this as well. But as Amila has already
>>> >> > pointed
>>> >> > out, prefix is "" in this case.
>>> >> >
>>> >> >>
>>> >> >> >>
>>> >> >> >> > Thanks,
>>> >> >> >> > ~Isuru
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Andreas
>>> >> >> >> >>
>>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>>> >> >> >> >> > Author: isurues
>>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > New Revision: 991441
>>> >> >> >> >> >
>>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>>> >> >> >> >> > Log:
>>> >> >> >> >> > changing the http prefix from http to http1. This is
>>> >> >> >> >> > because,
>>> >> >> >> >> > use
>>> >> >> >> >> > of
>>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>>> >> >> >> >> > http://foo.com
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > URL:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > ==============================================================================
>>> >> >> >> >> > ---
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > (original)
>>> >> >> >> >> > +++
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>>> >> >> >> >> >
>>> >> >> >> >> >     String HTTP_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>>> >> >> >> >> >     String MIME_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>>> >> >> >> >> >     String MIME_PREFIX = "mime";
>>> >> >> >> >> >     String URN_PREFIX = "urn";
>>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> >> For additional commands, e-mail:
>>> >> >> >> >> java-dev-help@axis.apache.org
>>> >> >> >> >>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > Technical Lead,
>>> >> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Technical Lead,
>>> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Technical Lead,
>>> >> > WSO2 Inc. http://wso2.org/
>>> >> > Blog : http://isurues.wordpress.com/
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Technical Lead,
>>> > WSO2 Inc. http://wso2.org/
>>> > Blog : http://isurues.wordpress.com/
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>>
>> --
>> Technical Lead,
>> WSO2 Inc. http://wso2.org/
>> Blog : http://isurues.wordpress.com/
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Apparently, this is because my code creates an ExtensionRegistry from
scratch. Creating the initial ExtensionRegistry using
WSDLFactory#newPopulatedExtensionRegistry() should fix this.

Andreas

On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com> wrote:
> Hi Andreas,
>
> I applied your solution into codegen engine. It solves the original problem
> and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> correct action (http://../..). But unfortunately this fix creates a separate
> issue.
>
> WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> checks whether the extensibility elements returned by
> port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> type. But when I apply the above fix, it retuns ports of some unknown type
> and generates an invalid code. And also it prints the following log on the
> console.
>
> "A SOAP port was not found - picking a random port!"
>
> I'm attaching the patch here and you can apply it and check the above method
> to reproduce the issue.
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> wrote:
>>
>>
>> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Isuru,
>>>
>>> Actually, the proper way of doing this is to configure an
>>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>>> expected type for the wsas:Action attribute (otherwise it will try to
>>> guess the attribute type, and this fails in this particular case).
>>> Here is the code that should be added in the appropriate place in
>>> Axis2 ("reader" is the WSDLReader instance):
>>>
>>> ExtensionRegistry extReg = new ExtensionRegistry();
>>> extReg.registerExtensionAttributeType(Input.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> extReg.registerExtensionAttributeType(Output.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> reader.setExtensionRegistry(extReg);
>>>
>>> Can you do the necessary changes?
>>
>> Sure. Will do the changes and update the list..
>>
>> Thanks,
>> ~Isuru
>>
>>>
>>> Andreas
>>>
>>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>>> wrote:
>>> > Attaching the wsdl and the schema..
>>> >
>>> > Thanks,
>>> > ~Isuru
>>> >
>>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
>>> > <an...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Isuru,
>>> >>
>>> >> Can you send me a sample WSDL for which the problem occurs?
>>> >>
>>> >> Andreas
>>> >>
>>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >
>>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>>> >> > <an...@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
>>> >> >> <is...@gmail.com>
>>> >> >> wrote:
>>> >> >> >
>>> >> >> >
>>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>>> >> >> > <an...@gmail.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
>>> >> >> >> <is...@gmail.com>
>>> >> >> >> wrote:
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>>> >> >> >> > <an...@gmail.com>
>>> >> >> >> > wrote:
>>> >> >> >> >>
>>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>>> >> >> >> >> sounds
>>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>>> >> >> >> >> issue.
>>> >> >> >> >
>>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>>> >> >> >> > our
>>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>>> >> >> >> > for
>>> >> >> >> > some
>>> >> >> >> > message of some operation.
>>> >> >> >> >
>>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>>> >> >> >> >
>>> >> >> >> > And also there is a namespace declaration in this WSDL as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>> >> >> >> >
>>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>>> >> >> >> > the
>>> >> >> >> > stub
>>> >> >> >> > as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>>> >> >> >> >
>>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
>>> >> >> >> > and it
>>> >> >> >> > has
>>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>>> >> >> >>
>>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>>> >> >> >> the
>>> >> >> >> code generator would interpret "http" as a prefix.
>>> >> >> >
>>> >> >> > Yes agreed..
>>> >> >> >
>>> >> >> >>
>>> >> >> >> I think you should
>>> >> >> >> try to determine why it is doing that instead of working around
>>> >> >> >> the
>>> >> >> >> issue by changing the WSDL generation code.
>>> >> >> >
>>> >> >> > I did have a look into the code generator code. There, wsdl4j
>>> >> >> > returns
>>> >> >> > the
>>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>>> >> >> > the
>>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>>> >> >> > string
>>> >> >> > value of the attribute. But currently there's no such method.
>>> >> >>
>>> >> >> Then I would suggest to review the following code in
>>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>> >> >>
>>> >> >>        if (attribute instanceof QName) {
>>> >> >>            QName qn = (QName) attribute;
>>> >> >>            attribute = qn.getLocalPart();
>>> >> >>        }
>>> >> >>
>>> >> >> The code is used only for the action attribute and we know that the
>>> >> >> action is not a QName. Thus, instead of just taking the local part,
>>> >> >> we
>>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>>> >> >> reconstruct the original value of the attribute. WDYT?
>>> >> >
>>> >> > Actually I initially tried this as well. But as Amila has already
>>> >> > pointed
>>> >> > out, prefix is "" in this case.
>>> >> >
>>> >> >>
>>> >> >> >>
>>> >> >> >> > Thanks,
>>> >> >> >> > ~Isuru
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Andreas
>>> >> >> >> >>
>>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>>> >> >> >> >> > Author: isurues
>>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > New Revision: 991441
>>> >> >> >> >> >
>>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>>> >> >> >> >> > Log:
>>> >> >> >> >> > changing the http prefix from http to http1. This is
>>> >> >> >> >> > because,
>>> >> >> >> >> > use
>>> >> >> >> >> > of
>>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>>> >> >> >> >> > http://foo.com
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > URL:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > ==============================================================================
>>> >> >> >> >> > ---
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > (original)
>>> >> >> >> >> > +++
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>>> >> >> >> >> >
>>> >> >> >> >> >     String HTTP_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>>> >> >> >> >> >     String MIME_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>>> >> >> >> >> >     String MIME_PREFIX = "mime";
>>> >> >> >> >> >     String URN_PREFIX = "urn";
>>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> >> For additional commands, e-mail:
>>> >> >> >> >> java-dev-help@axis.apache.org
>>> >> >> >> >>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > Technical Lead,
>>> >> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Technical Lead,
>>> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Technical Lead,
>>> >> > WSO2 Inc. http://wso2.org/
>>> >> > Blog : http://isurues.wordpress.com/
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Technical Lead,
>>> > WSO2 Inc. http://wso2.org/
>>> > Blog : http://isurues.wordpress.com/
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>>
>> --
>> Technical Lead,
>> WSO2 Inc. http://wso2.org/
>> Blog : http://isurues.wordpress.com/
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Apparently, this is because my code creates an ExtensionRegistry from
scratch. Creating the initial ExtensionRegistry using
WSDLFactory#newPopulatedExtensionRegistry() should fix this.

Andreas

On Wed, Sep 29, 2010 at 14:57, Isuru Suriarachchi <is...@gmail.com> wrote:
> Hi Andreas,
>
> I applied your solution into codegen engine. It solves the original problem
> and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
> correct action (http://../..). But unfortunately this fix creates a separate
> issue.
>
> WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
> checks whether the extensibility elements returned by
> port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
> type. But when I apply the above fix, it retuns ports of some unknown type
> and generates an invalid code. And also it prints the following log on the
> console.
>
> "A SOAP port was not found - picking a random port!"
>
> I'm attaching the patch here and you can apply it and check the above method
> to reproduce the issue.
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>
> wrote:
>>
>>
>> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
>> <an...@gmail.com> wrote:
>>>
>>> Isuru,
>>>
>>> Actually, the proper way of doing this is to configure an
>>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>>> expected type for the wsas:Action attribute (otherwise it will try to
>>> guess the attribute type, and this fails in this particular case).
>>> Here is the code that should be added in the appropriate place in
>>> Axis2 ("reader" is the WSDLReader instance):
>>>
>>> ExtensionRegistry extReg = new ExtensionRegistry();
>>> extReg.registerExtensionAttributeType(Input.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> extReg.registerExtensionAttributeType(Output.class, new
>>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>>> AttributeExtensible.STRING_TYPE);
>>> reader.setExtensionRegistry(extReg);
>>>
>>> Can you do the necessary changes?
>>
>> Sure. Will do the changes and update the list..
>>
>> Thanks,
>> ~Isuru
>>
>>>
>>> Andreas
>>>
>>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>>> wrote:
>>> > Attaching the wsdl and the schema..
>>> >
>>> > Thanks,
>>> > ~Isuru
>>> >
>>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
>>> > <an...@gmail.com>
>>> > wrote:
>>> >>
>>> >> Isuru,
>>> >>
>>> >> Can you send me a sample WSDL for which the problem occurs?
>>> >>
>>> >> Andreas
>>> >>
>>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>>> >> wrote:
>>> >> >
>>> >> >
>>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>>> >> > <an...@gmail.com>
>>> >> > wrote:
>>> >> >>
>>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi
>>> >> >> <is...@gmail.com>
>>> >> >> wrote:
>>> >> >> >
>>> >> >> >
>>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>>> >> >> > <an...@gmail.com>
>>> >> >> > wrote:
>>> >> >> >>
>>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi
>>> >> >> >> <is...@gmail.com>
>>> >> >> >> wrote:
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>>> >> >> >> > <an...@gmail.com>
>>> >> >> >> > wrote:
>>> >> >> >> >>
>>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>>> >> >> >> >> sounds
>>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>>> >> >> >> >> issue.
>>> >> >> >> >
>>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>>> >> >> >> > our
>>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>>> >> >> >> > for
>>> >> >> >> > some
>>> >> >> >> > message of some operation.
>>> >> >> >> >
>>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>>> >> >> >> >
>>> >> >> >> > And also there is a namespace declaration in this WSDL as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>>> >> >> >> >
>>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>>> >> >> >> > the
>>> >> >> >> > stub
>>> >> >> >> > as
>>> >> >> >> > follows..
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>>> >> >> >> >
>>> >> >> >> > So this is due to the usage of "http" as a namespace prefix
>>> >> >> >> > and it
>>> >> >> >> > has
>>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>>> >> >> >>
>>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>>> >> >> >> the
>>> >> >> >> code generator would interpret "http" as a prefix.
>>> >> >> >
>>> >> >> > Yes agreed..
>>> >> >> >
>>> >> >> >>
>>> >> >> >> I think you should
>>> >> >> >> try to determine why it is doing that instead of working around
>>> >> >> >> the
>>> >> >> >> issue by changing the WSDL generation code.
>>> >> >> >
>>> >> >> > I did have a look into the code generator code. There, wsdl4j
>>> >> >> > returns
>>> >> >> > the
>>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>>> >> >> > the
>>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>>> >> >> > string
>>> >> >> > value of the attribute. But currently there's no such method.
>>> >> >>
>>> >> >> Then I would suggest to review the following code in
>>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>> >> >>
>>> >> >>        if (attribute instanceof QName) {
>>> >> >>            QName qn = (QName) attribute;
>>> >> >>            attribute = qn.getLocalPart();
>>> >> >>        }
>>> >> >>
>>> >> >> The code is used only for the action attribute and we know that the
>>> >> >> action is not a QName. Thus, instead of just taking the local part,
>>> >> >> we
>>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>>> >> >> reconstruct the original value of the attribute. WDYT?
>>> >> >
>>> >> > Actually I initially tried this as well. But as Amila has already
>>> >> > pointed
>>> >> > out, prefix is "" in this case.
>>> >> >
>>> >> >>
>>> >> >> >>
>>> >> >> >> > Thanks,
>>> >> >> >> > ~Isuru
>>> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >> Andreas
>>> >> >> >> >>
>>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>>> >> >> >> >> > Author: isurues
>>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > New Revision: 991441
>>> >> >> >> >> >
>>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>>> >> >> >> >> > Log:
>>> >> >> >> >> > changing the http prefix from http to http1. This is
>>> >> >> >> >> > because,
>>> >> >> >> >> > use
>>> >> >> >> >> > of
>>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>>> >> >> >> >> > http://foo.com
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> >
>>> >> >> >> >> > Modified:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > URL:
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > ==============================================================================
>>> >> >> >> >> > ---
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > (original)
>>> >> >> >> >> > +++
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>>> >> >> >> >> >
>>> >> >> >> >> >     String HTTP_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>>> >> >> >> >> >     String MIME_NAMESPACE =
>>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>>> >> >> >> >> >     String MIME_PREFIX = "mime";
>>> >> >> >> >> >     String URN_PREFIX = "urn";
>>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >> >
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >>
>>> >> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> >> For additional commands, e-mail:
>>> >> >> >> >> java-dev-help@axis.apache.org
>>> >> >> >> >>
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> >
>>> >> >> >> > --
>>> >> >> >> > Technical Lead,
>>> >> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >> >
>>> >> >> >>
>>> >> >> >>
>>> >> >> >>
>>> >> >> >> ---------------------------------------------------------------------
>>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >> >>
>>> >> >> >
>>> >> >> >
>>> >> >> >
>>> >> >> > --
>>> >> >> > Technical Lead,
>>> >> >> > WSO2 Inc. http://wso2.org/
>>> >> >> > Blog : http://isurues.wordpress.com/
>>> >> >> >
>>> >> >>
>>> >> >>
>>> >> >> ---------------------------------------------------------------------
>>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >> >>
>>> >> >
>>> >> >
>>> >> >
>>> >> > --
>>> >> > Technical Lead,
>>> >> > WSO2 Inc. http://wso2.org/
>>> >> > Blog : http://isurues.wordpress.com/
>>> >> >
>>> >>
>>> >> ---------------------------------------------------------------------
>>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >>
>>> >
>>> >
>>> >
>>> > --
>>> > Technical Lead,
>>> > WSO2 Inc. http://wso2.org/
>>> > Blog : http://isurues.wordpress.com/
>>> >
>>> >
>>> > ---------------------------------------------------------------------
>>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>>> >
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>>
>>
>>
>>
>> --
>> Technical Lead,
>> WSO2 Inc. http://wso2.org/
>> Blog : http://isurues.wordpress.com/
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Hi Andreas,

I applied your solution into codegen engine. It solves the original problem
and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
correct action (http://../..). But unfortunately this fix creates a separate
issue.

WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
checks whether the extensibility elements returned by
port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
type. But when I apply the above fix, it retuns ports of some unknown type
and generates an invalid code. And also it prints the following log on the
console.

"A SOAP port was not found - picking a random port!"

I'm attaching the patch here and you can apply it and check the above method
to reproduce the issue.

Thanks,
~Isuru

On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
>
> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> Isuru,
>>
>> Actually, the proper way of doing this is to configure an
>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>> expected type for the wsas:Action attribute (otherwise it will try to
>> guess the attribute type, and this fails in this particular case).
>> Here is the code that should be added in the appropriate place in
>> Axis2 ("reader" is the WSDLReader instance):
>>
>> ExtensionRegistry extReg = new ExtensionRegistry();
>> extReg.registerExtensionAttributeType(Input.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> extReg.registerExtensionAttributeType(Output.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> reader.setExtensionRegistry(extReg);
>>
>> Can you do the necessary changes?
>>
>
> Sure. Will do the changes and update the list..
>
> Thanks,
> ~Isuru
>
>
>>
>> Andreas
>>
>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> > Attaching the wsdl and the schema..
>> >
>> > Thanks,
>> > ~Isuru
>> >
>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
>> andreas.veithen@gmail.com>
>> > wrote:
>> >>
>> >> Isuru,
>> >>
>> >> Can you send me a sample WSDL for which the problem occurs?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <isurues@gmail.com
>> >
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
>> isurues@gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> >> > <an...@gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> >> sounds
>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>> issue.
>> >> >> >> >
>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>> our
>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>> for
>> >> >> >> > some
>> >> >> >> > message of some operation.
>> >> >> >> >
>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >> >
>> >> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >> >
>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>> the
>> >> >> >> > stub
>> >> >> >> > as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > _operationClient.getOptions().setAction("//
>> www.webtest.org/echoStringMethodRequest");
>> >> >> >> >
>> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
>> it
>> >> >> >> > has
>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >> >>
>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>> the
>> >> >> >> code generator would interpret "http" as a prefix.
>> >> >> >
>> >> >> > Yes agreed..
>> >> >> >
>> >> >> >>
>> >> >> >> I think you should
>> >> >> >> try to determine why it is doing that instead of working around
>> the
>> >> >> >> issue by changing the WSDL generation code.
>> >> >> >
>> >> >> > I did have a look into the code generator code. There, wsdl4j
>> returns
>> >> >> > the
>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>> the
>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> >> > string
>> >> >> > value of the attribute. But currently there's no such method.
>> >> >>
>> >> >> Then I would suggest to review the following code in
>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >> >>
>> >> >>        if (attribute instanceof QName) {
>> >> >>            QName qn = (QName) attribute;
>> >> >>            attribute = qn.getLocalPart();
>> >> >>        }
>> >> >>
>> >> >> The code is used only for the action attribute and we know that the
>> >> >> action is not a QName. Thus, instead of just taking the local part,
>> we
>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> >> reconstruct the original value of the attribute. WDYT?
>> >> >
>> >> > Actually I initially tried this as well. But as Amila has already
>> >> > pointed
>> >> > out, prefix is "" in this case.
>> >> >
>> >> >>
>> >> >> >>
>> >> >> >> > Thanks,
>> >> >> >> > ~Isuru
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Andreas
>> >> >> >> >>
>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> >> > Author: isurues
>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> >> > New Revision: 991441
>> >> >> >> >> >
>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> >> > Log:
>> >> >> >> >> > changing the http prefix from http to http1. This is
>> because,
>> >> >> >> >> > use
>> >> >> >> >> > of
>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> >> > http://foo.com
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > URL:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> ==============================================================================
>> >> >> >> >> > ---
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > (original)
>> >> >> >> >> > +++
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >> >
>> >> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> >> For additional commands, e-mail:
>> java-dev-help@axis.apache.org
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Technical Lead,
>> >> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>



-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Hi Andreas,

I applied your solution into codegen engine. It solves the original problem
and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
correct action (http://../..). But unfortunately this fix creates a separate
issue.

WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
checks whether the extensibility elements returned by
port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
type. But when I apply the above fix, it retuns ports of some unknown type
and generates an invalid code. And also it prints the following log on the
console.

"A SOAP port was not found - picking a random port!"

I'm attaching the patch here and you can apply it and check the above method
to reproduce the issue.

Thanks,
~Isuru

On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
>
> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> Isuru,
>>
>> Actually, the proper way of doing this is to configure an
>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>> expected type for the wsas:Action attribute (otherwise it will try to
>> guess the attribute type, and this fails in this particular case).
>> Here is the code that should be added in the appropriate place in
>> Axis2 ("reader" is the WSDLReader instance):
>>
>> ExtensionRegistry extReg = new ExtensionRegistry();
>> extReg.registerExtensionAttributeType(Input.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> extReg.registerExtensionAttributeType(Output.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> reader.setExtensionRegistry(extReg);
>>
>> Can you do the necessary changes?
>>
>
> Sure. Will do the changes and update the list..
>
> Thanks,
> ~Isuru
>
>
>>
>> Andreas
>>
>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> > Attaching the wsdl and the schema..
>> >
>> > Thanks,
>> > ~Isuru
>> >
>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
>> andreas.veithen@gmail.com>
>> > wrote:
>> >>
>> >> Isuru,
>> >>
>> >> Can you send me a sample WSDL for which the problem occurs?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <isurues@gmail.com
>> >
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
>> isurues@gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> >> > <an...@gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> >> sounds
>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>> issue.
>> >> >> >> >
>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>> our
>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>> for
>> >> >> >> > some
>> >> >> >> > message of some operation.
>> >> >> >> >
>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >> >
>> >> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >> >
>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>> the
>> >> >> >> > stub
>> >> >> >> > as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > _operationClient.getOptions().setAction("//
>> www.webtest.org/echoStringMethodRequest");
>> >> >> >> >
>> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
>> it
>> >> >> >> > has
>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >> >>
>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>> the
>> >> >> >> code generator would interpret "http" as a prefix.
>> >> >> >
>> >> >> > Yes agreed..
>> >> >> >
>> >> >> >>
>> >> >> >> I think you should
>> >> >> >> try to determine why it is doing that instead of working around
>> the
>> >> >> >> issue by changing the WSDL generation code.
>> >> >> >
>> >> >> > I did have a look into the code generator code. There, wsdl4j
>> returns
>> >> >> > the
>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>> the
>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> >> > string
>> >> >> > value of the attribute. But currently there's no such method.
>> >> >>
>> >> >> Then I would suggest to review the following code in
>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >> >>
>> >> >>        if (attribute instanceof QName) {
>> >> >>            QName qn = (QName) attribute;
>> >> >>            attribute = qn.getLocalPart();
>> >> >>        }
>> >> >>
>> >> >> The code is used only for the action attribute and we know that the
>> >> >> action is not a QName. Thus, instead of just taking the local part,
>> we
>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> >> reconstruct the original value of the attribute. WDYT?
>> >> >
>> >> > Actually I initially tried this as well. But as Amila has already
>> >> > pointed
>> >> > out, prefix is "" in this case.
>> >> >
>> >> >>
>> >> >> >>
>> >> >> >> > Thanks,
>> >> >> >> > ~Isuru
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Andreas
>> >> >> >> >>
>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> >> > Author: isurues
>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> >> > New Revision: 991441
>> >> >> >> >> >
>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> >> > Log:
>> >> >> >> >> > changing the http prefix from http to http1. This is
>> because,
>> >> >> >> >> > use
>> >> >> >> >> > of
>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> >> > http://foo.com
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > URL:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> ==============================================================================
>> >> >> >> >> > ---
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > (original)
>> >> >> >> >> > +++
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >> >
>> >> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> >> For additional commands, e-mail:
>> java-dev-help@axis.apache.org
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Technical Lead,
>> >> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>



-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Hi Andreas,

I applied your solution into codegen engine. It solves the original problem
and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
correct action (http://../..). But unfortunately this fix creates a separate
issue.

WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
checks whether the extensibility elements returned by
port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
type. But when I apply the above fix, it retuns ports of some unknown type
and generates an invalid code. And also it prints the following log on the
console.

"A SOAP port was not found - picking a random port!"

I'm attaching the patch here and you can apply it and check the above method
to reproduce the issue.

Thanks,
~Isuru

On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
>
> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> Isuru,
>>
>> Actually, the proper way of doing this is to configure an
>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>> expected type for the wsas:Action attribute (otherwise it will try to
>> guess the attribute type, and this fails in this particular case).
>> Here is the code that should be added in the appropriate place in
>> Axis2 ("reader" is the WSDLReader instance):
>>
>> ExtensionRegistry extReg = new ExtensionRegistry();
>> extReg.registerExtensionAttributeType(Input.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> extReg.registerExtensionAttributeType(Output.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> reader.setExtensionRegistry(extReg);
>>
>> Can you do the necessary changes?
>>
>
> Sure. Will do the changes and update the list..
>
> Thanks,
> ~Isuru
>
>
>>
>> Andreas
>>
>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> > Attaching the wsdl and the schema..
>> >
>> > Thanks,
>> > ~Isuru
>> >
>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
>> andreas.veithen@gmail.com>
>> > wrote:
>> >>
>> >> Isuru,
>> >>
>> >> Can you send me a sample WSDL for which the problem occurs?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <isurues@gmail.com
>> >
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
>> isurues@gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> >> > <an...@gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> >> sounds
>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>> issue.
>> >> >> >> >
>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>> our
>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>> for
>> >> >> >> > some
>> >> >> >> > message of some operation.
>> >> >> >> >
>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >> >
>> >> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >> >
>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>> the
>> >> >> >> > stub
>> >> >> >> > as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > _operationClient.getOptions().setAction("//
>> www.webtest.org/echoStringMethodRequest");
>> >> >> >> >
>> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
>> it
>> >> >> >> > has
>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >> >>
>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>> the
>> >> >> >> code generator would interpret "http" as a prefix.
>> >> >> >
>> >> >> > Yes agreed..
>> >> >> >
>> >> >> >>
>> >> >> >> I think you should
>> >> >> >> try to determine why it is doing that instead of working around
>> the
>> >> >> >> issue by changing the WSDL generation code.
>> >> >> >
>> >> >> > I did have a look into the code generator code. There, wsdl4j
>> returns
>> >> >> > the
>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>> the
>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> >> > string
>> >> >> > value of the attribute. But currently there's no such method.
>> >> >>
>> >> >> Then I would suggest to review the following code in
>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >> >>
>> >> >>        if (attribute instanceof QName) {
>> >> >>            QName qn = (QName) attribute;
>> >> >>            attribute = qn.getLocalPart();
>> >> >>        }
>> >> >>
>> >> >> The code is used only for the action attribute and we know that the
>> >> >> action is not a QName. Thus, instead of just taking the local part,
>> we
>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> >> reconstruct the original value of the attribute. WDYT?
>> >> >
>> >> > Actually I initially tried this as well. But as Amila has already
>> >> > pointed
>> >> > out, prefix is "" in this case.
>> >> >
>> >> >>
>> >> >> >>
>> >> >> >> > Thanks,
>> >> >> >> > ~Isuru
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Andreas
>> >> >> >> >>
>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> >> > Author: isurues
>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> >> > New Revision: 991441
>> >> >> >> >> >
>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> >> > Log:
>> >> >> >> >> > changing the http prefix from http to http1. This is
>> because,
>> >> >> >> >> > use
>> >> >> >> >> > of
>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> >> > http://foo.com
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > URL:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> ==============================================================================
>> >> >> >> >> > ---
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > (original)
>> >> >> >> >> > +++
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >> >
>> >> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> >> For additional commands, e-mail:
>> java-dev-help@axis.apache.org
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Technical Lead,
>> >> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>



-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Hi Andreas,

I applied your solution into codegen engine. It solves the original problem
and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
correct action (http://../..). But unfortunately this fix creates a separate
issue.

WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
checks whether the extensibility elements returned by
port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
type. But when I apply the above fix, it retuns ports of some unknown type
and generates an invalid code. And also it prints the following log on the
console.

"A SOAP port was not found - picking a random port!"

I'm attaching the patch here and you can apply it and check the above method
to reproduce the issue.

Thanks,
~Isuru

On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
>
> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> Isuru,
>>
>> Actually, the proper way of doing this is to configure an
>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>> expected type for the wsas:Action attribute (otherwise it will try to
>> guess the attribute type, and this fails in this particular case).
>> Here is the code that should be added in the appropriate place in
>> Axis2 ("reader" is the WSDLReader instance):
>>
>> ExtensionRegistry extReg = new ExtensionRegistry();
>> extReg.registerExtensionAttributeType(Input.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> extReg.registerExtensionAttributeType(Output.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> reader.setExtensionRegistry(extReg);
>>
>> Can you do the necessary changes?
>>
>
> Sure. Will do the changes and update the list..
>
> Thanks,
> ~Isuru
>
>
>>
>> Andreas
>>
>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> > Attaching the wsdl and the schema..
>> >
>> > Thanks,
>> > ~Isuru
>> >
>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
>> andreas.veithen@gmail.com>
>> > wrote:
>> >>
>> >> Isuru,
>> >>
>> >> Can you send me a sample WSDL for which the problem occurs?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <isurues@gmail.com
>> >
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
>> isurues@gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> >> > <an...@gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> >> sounds
>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>> issue.
>> >> >> >> >
>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>> our
>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>> for
>> >> >> >> > some
>> >> >> >> > message of some operation.
>> >> >> >> >
>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >> >
>> >> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >> >
>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>> the
>> >> >> >> > stub
>> >> >> >> > as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > _operationClient.getOptions().setAction("//
>> www.webtest.org/echoStringMethodRequest");
>> >> >> >> >
>> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
>> it
>> >> >> >> > has
>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >> >>
>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>> the
>> >> >> >> code generator would interpret "http" as a prefix.
>> >> >> >
>> >> >> > Yes agreed..
>> >> >> >
>> >> >> >>
>> >> >> >> I think you should
>> >> >> >> try to determine why it is doing that instead of working around
>> the
>> >> >> >> issue by changing the WSDL generation code.
>> >> >> >
>> >> >> > I did have a look into the code generator code. There, wsdl4j
>> returns
>> >> >> > the
>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>> the
>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> >> > string
>> >> >> > value of the attribute. But currently there's no such method.
>> >> >>
>> >> >> Then I would suggest to review the following code in
>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >> >>
>> >> >>        if (attribute instanceof QName) {
>> >> >>            QName qn = (QName) attribute;
>> >> >>            attribute = qn.getLocalPart();
>> >> >>        }
>> >> >>
>> >> >> The code is used only for the action attribute and we know that the
>> >> >> action is not a QName. Thus, instead of just taking the local part,
>> we
>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> >> reconstruct the original value of the attribute. WDYT?
>> >> >
>> >> > Actually I initially tried this as well. But as Amila has already
>> >> > pointed
>> >> > out, prefix is "" in this case.
>> >> >
>> >> >>
>> >> >> >>
>> >> >> >> > Thanks,
>> >> >> >> > ~Isuru
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Andreas
>> >> >> >> >>
>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> >> > Author: isurues
>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> >> > New Revision: 991441
>> >> >> >> >> >
>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> >> > Log:
>> >> >> >> >> > changing the http prefix from http to http1. This is
>> because,
>> >> >> >> >> > use
>> >> >> >> >> > of
>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> >> > http://foo.com
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > URL:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> ==============================================================================
>> >> >> >> >> > ---
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > (original)
>> >> >> >> >> > +++
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >> >
>> >> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> >> For additional commands, e-mail:
>> java-dev-help@axis.apache.org
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Technical Lead,
>> >> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>



-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Hi Andreas,

I applied your solution into codegen engine. It solves the original problem
and WSDL11ActionHelper#getWSAWActionExtensionAttribute method returns the
correct action (http://../..). But unfortunately this fix creates a separate
issue.

WSDL11ToAxisServiceBuilder#findPort method finds a SOAP port. There, it
checks whether the extensibility elements returned by
port.getExtensibilityElements() method is of SOAP 1.1, SOAP 1.2 or HTTP
type. But when I apply the above fix, it retuns ports of some unknown type
and generates an invalid code. And also it prints the following log on the
console.

"A SOAP port was not found - picking a random port!"

I'm attaching the patch here and you can apply it and check the above method
to reproduce the issue.

Thanks,
~Isuru

On Tue, Sep 28, 2010 at 5:58 PM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
>
> On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen <
> andreas.veithen@gmail.com> wrote:
>
>> Isuru,
>>
>> Actually, the proper way of doing this is to configure an
>> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
>> expected type for the wsas:Action attribute (otherwise it will try to
>> guess the attribute type, and this fails in this particular case).
>> Here is the code that should be added in the appropriate place in
>> Axis2 ("reader" is the WSDLReader instance):
>>
>> ExtensionRegistry extReg = new ExtensionRegistry();
>> extReg.registerExtensionAttributeType(Input.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> extReg.registerExtensionAttributeType(Output.class, new
>> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
>> AttributeExtensible.STRING_TYPE);
>> reader.setExtensionRegistry(extReg);
>>
>> Can you do the necessary changes?
>>
>
> Sure. Will do the changes and update the list..
>
> Thanks,
> ~Isuru
>
>
>>
>> Andreas
>>
>> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> > Attaching the wsdl and the schema..
>> >
>> > Thanks,
>> > ~Isuru
>> >
>> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
>> andreas.veithen@gmail.com>
>> > wrote:
>> >>
>> >> Isuru,
>> >>
>> >> Can you send me a sample WSDL for which the problem occurs?
>> >>
>> >> Andreas
>> >>
>> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <isurues@gmail.com
>> >
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
>> isurues@gmail.com>
>> >> >> >> wrote:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> >> > <an...@gmail.com>
>> >> >> >> > wrote:
>> >> >> >> >>
>> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> >> sounds
>> >> >> >> >> like a quick and dirty workaround for a more fundamental
>> issue.
>> >> >> >> >
>> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
>> our
>> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action
>> for
>> >> >> >> > some
>> >> >> >> > message of some operation.
>> >> >> >> >
>> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >> >
>> >> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >> >
>> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
>> the
>> >> >> >> > stub
>> >> >> >> > as
>> >> >> >> > follows..
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > _operationClient.getOptions().setAction("//
>> www.webtest.org/echoStringMethodRequest");
>> >> >> >> >
>> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
>> it
>> >> >> >> > has
>> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >> >>
>> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
>> the
>> >> >> >> code generator would interpret "http" as a prefix.
>> >> >> >
>> >> >> > Yes agreed..
>> >> >> >
>> >> >> >>
>> >> >> >> I think you should
>> >> >> >> try to determine why it is doing that instead of working around
>> the
>> >> >> >> issue by changing the WSDL generation code.
>> >> >> >
>> >> >> > I did have a look into the code generator code. There, wsdl4j
>> returns
>> >> >> > the
>> >> >> > action as a QName. That is why this issue occurs. Have a look at
>> the
>> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> >> > string
>> >> >> > value of the attribute. But currently there's no such method.
>> >> >>
>> >> >> Then I would suggest to review the following code in
>> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >> >>
>> >> >>        if (attribute instanceof QName) {
>> >> >>            QName qn = (QName) attribute;
>> >> >>            attribute = qn.getLocalPart();
>> >> >>        }
>> >> >>
>> >> >> The code is used only for the action attribute and we know that the
>> >> >> action is not a QName. Thus, instead of just taking the local part,
>> we
>> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> >> reconstruct the original value of the attribute. WDYT?
>> >> >
>> >> > Actually I initially tried this as well. But as Amila has already
>> >> > pointed
>> >> > out, prefix is "" in this case.
>> >> >
>> >> >>
>> >> >> >>
>> >> >> >> > Thanks,
>> >> >> >> > ~Isuru
>> >> >> >> >
>> >> >> >> >>
>> >> >> >> >> Andreas
>> >> >> >> >>
>> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> >> > Author: isurues
>> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> >> > New Revision: 991441
>> >> >> >> >> >
>> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> >> > Log:
>> >> >> >> >> > changing the http prefix from http to http1. This is
>> because,
>> >> >> >> >> > use
>> >> >> >> >> > of
>> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> >> > http://foo.com
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> >
>> >> >> >> >> > Modified:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > URL:
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> ==============================================================================
>> >> >> >> >> > ---
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > (original)
>> >> >> >> >> > +++
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >> >
>> >> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >> >
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> >> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> >> For additional commands, e-mail:
>> java-dev-help@axis.apache.org
>> >> >> >> >>
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > --
>> >> >> >> > Technical Lead,
>> >> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>> >
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> > For additional commands, e-mail: java-dev-help@axis.apache.org
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>



-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Actually, the proper way of doing this is to configure an
> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> expected type for the wsas:Action attribute (otherwise it will try to
> guess the attribute type, and this fails in this particular case).
> Here is the code that should be added in the appropriate place in
> Axis2 ("reader" is the WSDLReader instance):
>
> ExtensionRegistry extReg = new ExtensionRegistry();
> extReg.registerExtensionAttributeType(Input.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> extReg.registerExtensionAttributeType(Output.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> reader.setExtensionRegistry(extReg);
>
> Can you do the necessary changes?
>

Sure. Will do the changes and update the list..

Thanks,
~Isuru


>
> Andreas
>
> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Attaching the wsdl and the schema..
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> Isuru,
> >>
> >> Can you send me a sample WSDL for which the problem occurs?
> >>
> >> Andreas
> >>
> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
> isurues@gmail.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> >> > <an...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >> >> >> >> sounds
> >> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >> >
> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
> our
> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> >> >> >> > some
> >> >> >> > message of some operation.
> >> >> >> >
> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >> >
> >> >> >> > And also there is a namespace declaration in this WSDL as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >> >
> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
> the
> >> >> >> > stub
> >> >> >> > as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >> >
> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
> it
> >> >> >> > has
> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >> >>
> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
> the
> >> >> >> code generator would interpret "http" as a prefix.
> >> >> >
> >> >> > Yes agreed..
> >> >> >
> >> >> >>
> >> >> >> I think you should
> >> >> >> try to determine why it is doing that instead of working around
> the
> >> >> >> issue by changing the WSDL generation code.
> >> >> >
> >> >> > I did have a look into the code generator code. There, wsdl4j
> returns
> >> >> > the
> >> >> > action as a QName. That is why this issue occurs. Have a look at
> the
> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> >> >> > string
> >> >> > value of the attribute. But currently there's no such method.
> >> >>
> >> >> Then I would suggest to review the following code in
> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >> >>
> >> >>        if (attribute instanceof QName) {
> >> >>            QName qn = (QName) attribute;
> >> >>            attribute = qn.getLocalPart();
> >> >>        }
> >> >>
> >> >> The code is used only for the action attribute and we know that the
> >> >> action is not a QName. Thus, instead of just taking the local part,
> we
> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> >> reconstruct the original value of the attribute. WDYT?
> >> >
> >> > Actually I initially tried this as well. But as Amila has already
> >> > pointed
> >> > out, prefix is "" in this case.
> >> >
> >> >>
> >> >> >>
> >> >> >> > Thanks,
> >> >> >> > ~Isuru
> >> >> >> >
> >> >> >> >>
> >> >> >> >> Andreas
> >> >> >> >>
> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> >> > Author: isurues
> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> >> > New Revision: 991441
> >> >> >> >> >
> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> >> > Log:
> >> >> >> >> > changing the http prefix from http to http1. This is because,
> >> >> >> >> > use
> >> >> >> >> > of
> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> >> > http://foo.com
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > URL:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> ==============================================================================
> >> >> >> >> > ---
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > (original)
> >> >> >> >> > +++
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >> >
> >> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Technical Lead,
> >> >> >> > WSO2 Inc. http://wso2.org/
> >> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Actually, the proper way of doing this is to configure an
> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> expected type for the wsas:Action attribute (otherwise it will try to
> guess the attribute type, and this fails in this particular case).
> Here is the code that should be added in the appropriate place in
> Axis2 ("reader" is the WSDLReader instance):
>
> ExtensionRegistry extReg = new ExtensionRegistry();
> extReg.registerExtensionAttributeType(Input.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> extReg.registerExtensionAttributeType(Output.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> reader.setExtensionRegistry(extReg);
>
> Can you do the necessary changes?
>

Sure. Will do the changes and update the list..

Thanks,
~Isuru


>
> Andreas
>
> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Attaching the wsdl and the schema..
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> Isuru,
> >>
> >> Can you send me a sample WSDL for which the problem occurs?
> >>
> >> Andreas
> >>
> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
> isurues@gmail.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> >> > <an...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >> >> >> >> sounds
> >> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >> >
> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
> our
> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> >> >> >> > some
> >> >> >> > message of some operation.
> >> >> >> >
> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >> >
> >> >> >> > And also there is a namespace declaration in this WSDL as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >> >
> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
> the
> >> >> >> > stub
> >> >> >> > as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >> >
> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
> it
> >> >> >> > has
> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >> >>
> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
> the
> >> >> >> code generator would interpret "http" as a prefix.
> >> >> >
> >> >> > Yes agreed..
> >> >> >
> >> >> >>
> >> >> >> I think you should
> >> >> >> try to determine why it is doing that instead of working around
> the
> >> >> >> issue by changing the WSDL generation code.
> >> >> >
> >> >> > I did have a look into the code generator code. There, wsdl4j
> returns
> >> >> > the
> >> >> > action as a QName. That is why this issue occurs. Have a look at
> the
> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> >> >> > string
> >> >> > value of the attribute. But currently there's no such method.
> >> >>
> >> >> Then I would suggest to review the following code in
> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >> >>
> >> >>        if (attribute instanceof QName) {
> >> >>            QName qn = (QName) attribute;
> >> >>            attribute = qn.getLocalPart();
> >> >>        }
> >> >>
> >> >> The code is used only for the action attribute and we know that the
> >> >> action is not a QName. Thus, instead of just taking the local part,
> we
> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> >> reconstruct the original value of the attribute. WDYT?
> >> >
> >> > Actually I initially tried this as well. But as Amila has already
> >> > pointed
> >> > out, prefix is "" in this case.
> >> >
> >> >>
> >> >> >>
> >> >> >> > Thanks,
> >> >> >> > ~Isuru
> >> >> >> >
> >> >> >> >>
> >> >> >> >> Andreas
> >> >> >> >>
> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> >> > Author: isurues
> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> >> > New Revision: 991441
> >> >> >> >> >
> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> >> > Log:
> >> >> >> >> > changing the http prefix from http to http1. This is because,
> >> >> >> >> > use
> >> >> >> >> > of
> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> >> > http://foo.com
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > URL:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> ==============================================================================
> >> >> >> >> > ---
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > (original)
> >> >> >> >> > +++
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >> >
> >> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Technical Lead,
> >> >> >> > WSO2 Inc. http://wso2.org/
> >> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Actually, the proper way of doing this is to configure an
> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> expected type for the wsas:Action attribute (otherwise it will try to
> guess the attribute type, and this fails in this particular case).
> Here is the code that should be added in the appropriate place in
> Axis2 ("reader" is the WSDLReader instance):
>
> ExtensionRegistry extReg = new ExtensionRegistry();
> extReg.registerExtensionAttributeType(Input.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> extReg.registerExtensionAttributeType(Output.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> reader.setExtensionRegistry(extReg);
>
> Can you do the necessary changes?
>

Sure. Will do the changes and update the list..

Thanks,
~Isuru


>
> Andreas
>
> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Attaching the wsdl and the schema..
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> Isuru,
> >>
> >> Can you send me a sample WSDL for which the problem occurs?
> >>
> >> Andreas
> >>
> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
> isurues@gmail.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> >> > <an...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >> >> >> >> sounds
> >> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >> >
> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
> our
> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> >> >> >> > some
> >> >> >> > message of some operation.
> >> >> >> >
> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >> >
> >> >> >> > And also there is a namespace declaration in this WSDL as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >> >
> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
> the
> >> >> >> > stub
> >> >> >> > as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >> >
> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
> it
> >> >> >> > has
> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >> >>
> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
> the
> >> >> >> code generator would interpret "http" as a prefix.
> >> >> >
> >> >> > Yes agreed..
> >> >> >
> >> >> >>
> >> >> >> I think you should
> >> >> >> try to determine why it is doing that instead of working around
> the
> >> >> >> issue by changing the WSDL generation code.
> >> >> >
> >> >> > I did have a look into the code generator code. There, wsdl4j
> returns
> >> >> > the
> >> >> > action as a QName. That is why this issue occurs. Have a look at
> the
> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> >> >> > string
> >> >> > value of the attribute. But currently there's no such method.
> >> >>
> >> >> Then I would suggest to review the following code in
> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >> >>
> >> >>        if (attribute instanceof QName) {
> >> >>            QName qn = (QName) attribute;
> >> >>            attribute = qn.getLocalPart();
> >> >>        }
> >> >>
> >> >> The code is used only for the action attribute and we know that the
> >> >> action is not a QName. Thus, instead of just taking the local part,
> we
> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> >> reconstruct the original value of the attribute. WDYT?
> >> >
> >> > Actually I initially tried this as well. But as Amila has already
> >> > pointed
> >> > out, prefix is "" in this case.
> >> >
> >> >>
> >> >> >>
> >> >> >> > Thanks,
> >> >> >> > ~Isuru
> >> >> >> >
> >> >> >> >>
> >> >> >> >> Andreas
> >> >> >> >>
> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> >> > Author: isurues
> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> >> > New Revision: 991441
> >> >> >> >> >
> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> >> > Log:
> >> >> >> >> > changing the http prefix from http to http1. This is because,
> >> >> >> >> > use
> >> >> >> >> > of
> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> >> > http://foo.com
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > URL:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> ==============================================================================
> >> >> >> >> > ---
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > (original)
> >> >> >> >> > +++
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >> >
> >> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Technical Lead,
> >> >> >> > WSO2 Inc. http://wso2.org/
> >> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Actually, the proper way of doing this is to configure an
> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> expected type for the wsas:Action attribute (otherwise it will try to
> guess the attribute type, and this fails in this particular case).
> Here is the code that should be added in the appropriate place in
> Axis2 ("reader" is the WSDLReader instance):
>
> ExtensionRegistry extReg = new ExtensionRegistry();
> extReg.registerExtensionAttributeType(Input.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> extReg.registerExtensionAttributeType(Output.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> reader.setExtensionRegistry(extReg);
>
> Can you do the necessary changes?
>

Sure. Will do the changes and update the list..

Thanks,
~Isuru


>
> Andreas
>
> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Attaching the wsdl and the schema..
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> Isuru,
> >>
> >> Can you send me a sample WSDL for which the problem occurs?
> >>
> >> Andreas
> >>
> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
> isurues@gmail.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> >> > <an...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >> >> >> >> sounds
> >> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >> >
> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
> our
> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> >> >> >> > some
> >> >> >> > message of some operation.
> >> >> >> >
> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >> >
> >> >> >> > And also there is a namespace declaration in this WSDL as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >> >
> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
> the
> >> >> >> > stub
> >> >> >> > as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >> >
> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
> it
> >> >> >> > has
> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >> >>
> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
> the
> >> >> >> code generator would interpret "http" as a prefix.
> >> >> >
> >> >> > Yes agreed..
> >> >> >
> >> >> >>
> >> >> >> I think you should
> >> >> >> try to determine why it is doing that instead of working around
> the
> >> >> >> issue by changing the WSDL generation code.
> >> >> >
> >> >> > I did have a look into the code generator code. There, wsdl4j
> returns
> >> >> > the
> >> >> > action as a QName. That is why this issue occurs. Have a look at
> the
> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> >> >> > string
> >> >> > value of the attribute. But currently there's no such method.
> >> >>
> >> >> Then I would suggest to review the following code in
> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >> >>
> >> >>        if (attribute instanceof QName) {
> >> >>            QName qn = (QName) attribute;
> >> >>            attribute = qn.getLocalPart();
> >> >>        }
> >> >>
> >> >> The code is used only for the action attribute and we know that the
> >> >> action is not a QName. Thus, instead of just taking the local part,
> we
> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> >> reconstruct the original value of the attribute. WDYT?
> >> >
> >> > Actually I initially tried this as well. But as Amila has already
> >> > pointed
> >> > out, prefix is "" in this case.
> >> >
> >> >>
> >> >> >>
> >> >> >> > Thanks,
> >> >> >> > ~Isuru
> >> >> >> >
> >> >> >> >>
> >> >> >> >> Andreas
> >> >> >> >>
> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> >> > Author: isurues
> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> >> > New Revision: 991441
> >> >> >> >> >
> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> >> > Log:
> >> >> >> >> > changing the http prefix from http to http1. This is because,
> >> >> >> >> > use
> >> >> >> >> > of
> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> >> > http://foo.com
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > URL:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> ==============================================================================
> >> >> >> >> > ---
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > (original)
> >> >> >> >> > +++
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >> >
> >> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Technical Lead,
> >> >> >> > WSO2 Inc. http://wso2.org/
> >> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Mon, Sep 27, 2010 at 9:48 PM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Actually, the proper way of doing this is to configure an
> ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
> expected type for the wsas:Action attribute (otherwise it will try to
> guess the attribute type, and this fails in this particular case).
> Here is the code that should be added in the appropriate place in
> Axis2 ("reader" is the WSDLReader instance):
>
> ExtensionRegistry extReg = new ExtensionRegistry();
> extReg.registerExtensionAttributeType(Input.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> extReg.registerExtensionAttributeType(Output.class, new
> QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
> AttributeExtensible.STRING_TYPE);
> reader.setExtensionRegistry(extReg);
>
> Can you do the necessary changes?
>

Sure. Will do the changes and update the list..

Thanks,
~Isuru


>
> Andreas
>
> On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> > Attaching the wsdl and the schema..
> >
> > Thanks,
> > ~Isuru
> >
> > On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> Isuru,
> >>
> >> Can you send me a sample WSDL for which the problem occurs?
> >>
> >> Andreas
> >>
> >> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <
> isurues@gmail.com>
> >> >> >> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> >> > <an...@gmail.com>
> >> >> >> > wrote:
> >> >> >> >>
> >> >> >> >> How can a namespace prefix conflict with a URI scheme? That
> >> >> >> >> sounds
> >> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >> >
> >> >> >> > Let me explain it further.. I came up with a WSDL generated by
> our
> >> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> >> >> >> > some
> >> >> >> > message of some operation.
> >> >> >> >
> >> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >> >
> >> >> >> > And also there is a namespace declaration in this WSDL as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >> >
> >> >> >> > When I generate the stub for this WSDL, it sets the Action on
> the
> >> >> >> > stub
> >> >> >> > as
> >> >> >> > follows..
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >> >
> >> >> >> > So this is due to the usage of "http" as a namespace prefix and
> it
> >> >> >> > has
> >> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >> >>
> >> >> >> The SOAP action is a URI, not a QName, so there is no reason why
> the
> >> >> >> code generator would interpret "http" as a prefix.
> >> >> >
> >> >> > Yes agreed..
> >> >> >
> >> >> >>
> >> >> >> I think you should
> >> >> >> try to determine why it is doing that instead of working around
> the
> >> >> >> issue by changing the WSDL generation code.
> >> >> >
> >> >> > I did have a look into the code generator code. There, wsdl4j
> returns
> >> >> > the
> >> >> > action as a QName. That is why this issue occurs. Have a look at
> the
> >> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> >> >> > string
> >> >> > value of the attribute. But currently there's no such method.
> >> >>
> >> >> Then I would suggest to review the following code in
> >> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >> >>
> >> >>        if (attribute instanceof QName) {
> >> >>            QName qn = (QName) attribute;
> >> >>            attribute = qn.getLocalPart();
> >> >>        }
> >> >>
> >> >> The code is used only for the action attribute and we know that the
> >> >> action is not a QName. Thus, instead of just taking the local part,
> we
> >> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> >> reconstruct the original value of the attribute. WDYT?
> >> >
> >> > Actually I initially tried this as well. But as Amila has already
> >> > pointed
> >> > out, prefix is "" in this case.
> >> >
> >> >>
> >> >> >>
> >> >> >> > Thanks,
> >> >> >> > ~Isuru
> >> >> >> >
> >> >> >> >>
> >> >> >> >> Andreas
> >> >> >> >>
> >> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> >> > Author: isurues
> >> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> >> > New Revision: 991441
> >> >> >> >> >
> >> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> >> > Log:
> >> >> >> >> > changing the http prefix from http to http1. This is because,
> >> >> >> >> > use
> >> >> >> >> > of
> >> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> >> > http://foo.com
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> >
> >> >> >> >> > Modified:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > URL:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> ==============================================================================
> >> >> >> >> > ---
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > (original)
> >> >> >> >> > +++
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >> >
> >> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> >> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >> >>
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > --
> >> >> >> > Technical Lead,
> >> >> >> > WSO2 Inc. http://wso2.org/
> >> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> > For additional commands, e-mail: java-dev-help@axis.apache.org
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Actually, the proper way of doing this is to configure an
ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
expected type for the wsas:Action attribute (otherwise it will try to
guess the attribute type, and this fails in this particular case).
Here is the code that should be added in the appropriate place in
Axis2 ("reader" is the WSDLReader instance):

ExtensionRegistry extReg = new ExtensionRegistry();
extReg.registerExtensionAttributeType(Input.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
extReg.registerExtensionAttributeType(Output.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
reader.setExtensionRegistry(extReg);

Can you do the necessary changes?

Andreas

On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com> wrote:
> Attaching the wsdl and the schema..
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> Isuru,
>>
>> Can you send me a sample WSDL for which the problem occurs?
>>
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> sounds
>> >> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >> >
>> >> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
>> >> >> > some
>> >> >> > message of some operation.
>> >> >> >
>> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >
>> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> > follows..
>> >> >> >
>> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >
>> >> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> >> > stub
>> >> >> > as
>> >> >> > follows..
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >> >
>> >> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> >> > has
>> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >>
>> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> >> code generator would interpret "http" as a prefix.
>> >> >
>> >> > Yes agreed..
>> >> >
>> >> >>
>> >> >> I think you should
>> >> >> try to determine why it is doing that instead of working around the
>> >> >> issue by changing the WSDL generation code.
>> >> >
>> >> > I did have a look into the code generator code. There, wsdl4j returns
>> >> > the
>> >> > action as a QName. That is why this issue occurs. Have a look at the
>> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> > string
>> >> > value of the attribute. But currently there's no such method.
>> >>
>> >> Then I would suggest to review the following code in
>> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >>
>> >>        if (attribute instanceof QName) {
>> >>            QName qn = (QName) attribute;
>> >>            attribute = qn.getLocalPart();
>> >>        }
>> >>
>> >> The code is used only for the action attribute and we know that the
>> >> action is not a QName. Thus, instead of just taking the local part, we
>> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> reconstruct the original value of the attribute. WDYT?
>> >
>> > Actually I initially tried this as well. But as Amila has already
>> > pointed
>> > out, prefix is "" in this case.
>> >
>> >>
>> >> >>
>> >> >> > Thanks,
>> >> >> > ~Isuru
>> >> >> >
>> >> >> >>
>> >> >> >> Andreas
>> >> >> >>
>> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> > Author: isurues
>> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> > New Revision: 991441
>> >> >> >> >
>> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> > Log:
>> >> >> >> > changing the http prefix from http to http1. This is because,
>> >> >> >> > use
>> >> >> >> > of
>> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> > http://foo.com
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > URL:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ==============================================================================
>> >> >> >> > ---
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > (original)
>> >> >> >> > +++
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >
>> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Actually, the proper way of doing this is to configure an
ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
expected type for the wsas:Action attribute (otherwise it will try to
guess the attribute type, and this fails in this particular case).
Here is the code that should be added in the appropriate place in
Axis2 ("reader" is the WSDLReader instance):

ExtensionRegistry extReg = new ExtensionRegistry();
extReg.registerExtensionAttributeType(Input.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
extReg.registerExtensionAttributeType(Output.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
reader.setExtensionRegistry(extReg);

Can you do the necessary changes?

Andreas

On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com> wrote:
> Attaching the wsdl and the schema..
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> Isuru,
>>
>> Can you send me a sample WSDL for which the problem occurs?
>>
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> sounds
>> >> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >> >
>> >> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
>> >> >> > some
>> >> >> > message of some operation.
>> >> >> >
>> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >
>> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> > follows..
>> >> >> >
>> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >
>> >> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> >> > stub
>> >> >> > as
>> >> >> > follows..
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >> >
>> >> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> >> > has
>> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >>
>> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> >> code generator would interpret "http" as a prefix.
>> >> >
>> >> > Yes agreed..
>> >> >
>> >> >>
>> >> >> I think you should
>> >> >> try to determine why it is doing that instead of working around the
>> >> >> issue by changing the WSDL generation code.
>> >> >
>> >> > I did have a look into the code generator code. There, wsdl4j returns
>> >> > the
>> >> > action as a QName. That is why this issue occurs. Have a look at the
>> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> > string
>> >> > value of the attribute. But currently there's no such method.
>> >>
>> >> Then I would suggest to review the following code in
>> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >>
>> >>        if (attribute instanceof QName) {
>> >>            QName qn = (QName) attribute;
>> >>            attribute = qn.getLocalPart();
>> >>        }
>> >>
>> >> The code is used only for the action attribute and we know that the
>> >> action is not a QName. Thus, instead of just taking the local part, we
>> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> reconstruct the original value of the attribute. WDYT?
>> >
>> > Actually I initially tried this as well. But as Amila has already
>> > pointed
>> > out, prefix is "" in this case.
>> >
>> >>
>> >> >>
>> >> >> > Thanks,
>> >> >> > ~Isuru
>> >> >> >
>> >> >> >>
>> >> >> >> Andreas
>> >> >> >>
>> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> > Author: isurues
>> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> > New Revision: 991441
>> >> >> >> >
>> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> > Log:
>> >> >> >> > changing the http prefix from http to http1. This is because,
>> >> >> >> > use
>> >> >> >> > of
>> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> > http://foo.com
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > URL:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ==============================================================================
>> >> >> >> > ---
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > (original)
>> >> >> >> > +++
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >
>> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Actually, the proper way of doing this is to configure an
ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
expected type for the wsas:Action attribute (otherwise it will try to
guess the attribute type, and this fails in this particular case).
Here is the code that should be added in the appropriate place in
Axis2 ("reader" is the WSDLReader instance):

ExtensionRegistry extReg = new ExtensionRegistry();
extReg.registerExtensionAttributeType(Input.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
extReg.registerExtensionAttributeType(Output.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
reader.setExtensionRegistry(extReg);

Can you do the necessary changes?

Andreas

On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com> wrote:
> Attaching the wsdl and the schema..
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> Isuru,
>>
>> Can you send me a sample WSDL for which the problem occurs?
>>
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> sounds
>> >> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >> >
>> >> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
>> >> >> > some
>> >> >> > message of some operation.
>> >> >> >
>> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >
>> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> > follows..
>> >> >> >
>> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >
>> >> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> >> > stub
>> >> >> > as
>> >> >> > follows..
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >> >
>> >> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> >> > has
>> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >>
>> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> >> code generator would interpret "http" as a prefix.
>> >> >
>> >> > Yes agreed..
>> >> >
>> >> >>
>> >> >> I think you should
>> >> >> try to determine why it is doing that instead of working around the
>> >> >> issue by changing the WSDL generation code.
>> >> >
>> >> > I did have a look into the code generator code. There, wsdl4j returns
>> >> > the
>> >> > action as a QName. That is why this issue occurs. Have a look at the
>> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> > string
>> >> > value of the attribute. But currently there's no such method.
>> >>
>> >> Then I would suggest to review the following code in
>> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >>
>> >>        if (attribute instanceof QName) {
>> >>            QName qn = (QName) attribute;
>> >>            attribute = qn.getLocalPart();
>> >>        }
>> >>
>> >> The code is used only for the action attribute and we know that the
>> >> action is not a QName. Thus, instead of just taking the local part, we
>> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> reconstruct the original value of the attribute. WDYT?
>> >
>> > Actually I initially tried this as well. But as Amila has already
>> > pointed
>> > out, prefix is "" in this case.
>> >
>> >>
>> >> >>
>> >> >> > Thanks,
>> >> >> > ~Isuru
>> >> >> >
>> >> >> >>
>> >> >> >> Andreas
>> >> >> >>
>> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> > Author: isurues
>> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> > New Revision: 991441
>> >> >> >> >
>> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> > Log:
>> >> >> >> > changing the http prefix from http to http1. This is because,
>> >> >> >> > use
>> >> >> >> > of
>> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> > http://foo.com
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > URL:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ==============================================================================
>> >> >> >> > ---
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > (original)
>> >> >> >> > +++
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >
>> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Actually, the proper way of doing this is to configure an
ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
expected type for the wsas:Action attribute (otherwise it will try to
guess the attribute type, and this fails in this particular case).
Here is the code that should be added in the appropriate place in
Axis2 ("reader" is the WSDLReader instance):

ExtensionRegistry extReg = new ExtensionRegistry();
extReg.registerExtensionAttributeType(Input.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
extReg.registerExtensionAttributeType(Output.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
reader.setExtensionRegistry(extReg);

Can you do the necessary changes?

Andreas

On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com> wrote:
> Attaching the wsdl and the schema..
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> Isuru,
>>
>> Can you send me a sample WSDL for which the problem occurs?
>>
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> sounds
>> >> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >> >
>> >> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
>> >> >> > some
>> >> >> > message of some operation.
>> >> >> >
>> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >
>> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> > follows..
>> >> >> >
>> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >
>> >> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> >> > stub
>> >> >> > as
>> >> >> > follows..
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >> >
>> >> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> >> > has
>> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >>
>> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> >> code generator would interpret "http" as a prefix.
>> >> >
>> >> > Yes agreed..
>> >> >
>> >> >>
>> >> >> I think you should
>> >> >> try to determine why it is doing that instead of working around the
>> >> >> issue by changing the WSDL generation code.
>> >> >
>> >> > I did have a look into the code generator code. There, wsdl4j returns
>> >> > the
>> >> > action as a QName. That is why this issue occurs. Have a look at the
>> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> > string
>> >> > value of the attribute. But currently there's no such method.
>> >>
>> >> Then I would suggest to review the following code in
>> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >>
>> >>        if (attribute instanceof QName) {
>> >>            QName qn = (QName) attribute;
>> >>            attribute = qn.getLocalPart();
>> >>        }
>> >>
>> >> The code is used only for the action attribute and we know that the
>> >> action is not a QName. Thus, instead of just taking the local part, we
>> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> reconstruct the original value of the attribute. WDYT?
>> >
>> > Actually I initially tried this as well. But as Amila has already
>> > pointed
>> > out, prefix is "" in this case.
>> >
>> >>
>> >> >>
>> >> >> > Thanks,
>> >> >> > ~Isuru
>> >> >> >
>> >> >> >>
>> >> >> >> Andreas
>> >> >> >>
>> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> > Author: isurues
>> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> > New Revision: 991441
>> >> >> >> >
>> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> > Log:
>> >> >> >> > changing the http prefix from http to http1. This is because,
>> >> >> >> > use
>> >> >> >> > of
>> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> > http://foo.com
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > URL:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ==============================================================================
>> >> >> >> > ---
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > (original)
>> >> >> >> > +++
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >
>> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Actually, the proper way of doing this is to configure an
ExtensionRegistry on the WSDLReader so that WSDL4J knows what is the
expected type for the wsas:Action attribute (otherwise it will try to
guess the attribute type, and this fails in this particular case).
Here is the code that should be added in the appropriate place in
Axis2 ("reader" is the WSDLReader instance):

ExtensionRegistry extReg = new ExtensionRegistry();
extReg.registerExtensionAttributeType(Input.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
extReg.registerExtensionAttributeType(Output.class, new
QName("http://www.w3.org/2006/05/addressing/wsdl", "Action"),
AttributeExtensible.STRING_TYPE);
reader.setExtensionRegistry(extReg);

Can you do the necessary changes?

Andreas

On Tue, Sep 7, 2010 at 13:36, Isuru Suriarachchi <is...@gmail.com> wrote:
> Attaching the wsdl and the schema..
>
> Thanks,
> ~Isuru
>
> On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> Isuru,
>>
>> Can you send me a sample WSDL for which the problem occurs?
>>
>> Andreas
>>
>> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> >> wrote:
>> >> >> >
>> >> >> >
>> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> >> > <an...@gmail.com>
>> >> >> > wrote:
>> >> >> >>
>> >> >> >> How can a namespace prefix conflict with a URI scheme? That
>> >> >> >> sounds
>> >> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >> >
>> >> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
>> >> >> > some
>> >> >> > message of some operation.
>> >> >> >
>> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >> >
>> >> >> > And also there is a namespace declaration in this WSDL as
>> >> >> > follows..
>> >> >> >
>> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >> >
>> >> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> >> > stub
>> >> >> > as
>> >> >> > follows..
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >> >
>> >> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> >> > has
>> >> >> > treated the http://.. URL as <prefix>:<localname>.
>> >> >>
>> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> >> code generator would interpret "http" as a prefix.
>> >> >
>> >> > Yes agreed..
>> >> >
>> >> >>
>> >> >> I think you should
>> >> >> try to determine why it is doing that instead of working around the
>> >> >> issue by changing the WSDL generation code.
>> >> >
>> >> > I did have a look into the code generator code. There, wsdl4j returns
>> >> > the
>> >> > action as a QName. That is why this issue occurs. Have a look at the
>> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
>> >> > string
>> >> > value of the attribute. But currently there's no such method.
>> >>
>> >> Then I would suggest to review the following code in
>> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>> >>
>> >>        if (attribute instanceof QName) {
>> >>            QName qn = (QName) attribute;
>> >>            attribute = qn.getLocalPart();
>> >>        }
>> >>
>> >> The code is used only for the action attribute and we know that the
>> >> action is not a QName. Thus, instead of just taking the local part, we
>> >> should rebuild the qualified name (prefix + ":" + localPart) to
>> >> reconstruct the original value of the attribute. WDYT?
>> >
>> > Actually I initially tried this as well. But as Amila has already
>> > pointed
>> > out, prefix is "" in this case.
>> >
>> >>
>> >> >>
>> >> >> > Thanks,
>> >> >> > ~Isuru
>> >> >> >
>> >> >> >>
>> >> >> >> Andreas
>> >> >> >>
>> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> >> > Author: isurues
>> >> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> >> > New Revision: 991441
>> >> >> >> >
>> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> >> > Log:
>> >> >> >> > changing the http prefix from http to http1. This is because,
>> >> >> >> > use
>> >> >> >> > of
>> >> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> >> > http://foo.com
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> >
>> >> >> >> > Modified:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > URL:
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > ==============================================================================
>> >> >> >> > ---
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > (original)
>> >> >> >> > +++
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >> >
>> >> >> >> >     String HTTP_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >> >     String MIME_NAMESPACE =
>> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >> >     String URN_PREFIX = "urn";
>> >> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >> >
>> >> >> >> >
>> >> >> >> >
>> >> >> >>
>> >> >> >>
>> >> >> >>
>> >> >> >> ---------------------------------------------------------------------
>> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >> >>
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > --
>> >> >> > Technical Lead,
>> >> >> > WSO2 Inc. http://wso2.org/
>> >> >> > Blog : http://isurues.wordpress.com/
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Can you send me a sample WSDL for which the problem occurs?
>
> Andreas
>
> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >
> >> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> some
> >> >> > message of some operation.
> >> >> >
> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >
> >> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >> >
> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >
> >> >> > When I generate the stub for this WSDL, it sets the Action on the
> >> >> > stub
> >> >> > as
> >> >> > follows..
> >> >> >
> >> >> >
> >> >> >
> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >
> >> >> > So this is due to the usage of "http" as a namespace prefix and it
> >> >> > has
> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >>
> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> >> code generator would interpret "http" as a prefix.
> >> >
> >> > Yes agreed..
> >> >
> >> >>
> >> >> I think you should
> >> >> try to determine why it is doing that instead of working around the
> >> >> issue by changing the WSDL generation code.
> >> >
> >> > I did have a look into the code generator code. There, wsdl4j returns
> >> > the
> >> > action as a QName. That is why this issue occurs. Have a look at the
> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> string
> >> > value of the attribute. But currently there's no such method.
> >>
> >> Then I would suggest to review the following code in
> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>
> >>        if (attribute instanceof QName) {
> >>            QName qn = (QName) attribute;
> >>            attribute = qn.getLocalPart();
> >>        }
> >>
> >> The code is used only for the action attribute and we know that the
> >> action is not a QName. Thus, instead of just taking the local part, we
> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> reconstruct the original value of the attribute. WDYT?
> >
> > Actually I initially tried this as well. But as Amila has already pointed
> > out, prefix is "" in this case.
> >
> >>
> >> >>
> >> >> > Thanks,
> >> >> > ~Isuru
> >> >> >
> >> >> >>
> >> >> >> Andreas
> >> >> >>
> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> > Author: isurues
> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> > New Revision: 991441
> >> >> >> >
> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> > Log:
> >> >> >> > changing the http prefix from http to http1. This is because,
> use
> >> >> >> > of
> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> > http://foo.com
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > URL:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> ==============================================================================
> >> >> >> > ---
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > (original)
> >> >> >> > +++
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >
> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Can you send me a sample WSDL for which the problem occurs?
>
> Andreas
>
> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >
> >> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> some
> >> >> > message of some operation.
> >> >> >
> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >
> >> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >> >
> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >
> >> >> > When I generate the stub for this WSDL, it sets the Action on the
> >> >> > stub
> >> >> > as
> >> >> > follows..
> >> >> >
> >> >> >
> >> >> >
> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >
> >> >> > So this is due to the usage of "http" as a namespace prefix and it
> >> >> > has
> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >>
> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> >> code generator would interpret "http" as a prefix.
> >> >
> >> > Yes agreed..
> >> >
> >> >>
> >> >> I think you should
> >> >> try to determine why it is doing that instead of working around the
> >> >> issue by changing the WSDL generation code.
> >> >
> >> > I did have a look into the code generator code. There, wsdl4j returns
> >> > the
> >> > action as a QName. That is why this issue occurs. Have a look at the
> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> string
> >> > value of the attribute. But currently there's no such method.
> >>
> >> Then I would suggest to review the following code in
> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>
> >>        if (attribute instanceof QName) {
> >>            QName qn = (QName) attribute;
> >>            attribute = qn.getLocalPart();
> >>        }
> >>
> >> The code is used only for the action attribute and we know that the
> >> action is not a QName. Thus, instead of just taking the local part, we
> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> reconstruct the original value of the attribute. WDYT?
> >
> > Actually I initially tried this as well. But as Amila has already pointed
> > out, prefix is "" in this case.
> >
> >>
> >> >>
> >> >> > Thanks,
> >> >> > ~Isuru
> >> >> >
> >> >> >>
> >> >> >> Andreas
> >> >> >>
> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> > Author: isurues
> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> > New Revision: 991441
> >> >> >> >
> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> > Log:
> >> >> >> > changing the http prefix from http to http1. This is because,
> use
> >> >> >> > of
> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> > http://foo.com
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > URL:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> ==============================================================================
> >> >> >> > ---
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > (original)
> >> >> >> > +++
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >
> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Can you send me a sample WSDL for which the problem occurs?
>
> Andreas
>
> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >
> >> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> some
> >> >> > message of some operation.
> >> >> >
> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >
> >> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >> >
> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >
> >> >> > When I generate the stub for this WSDL, it sets the Action on the
> >> >> > stub
> >> >> > as
> >> >> > follows..
> >> >> >
> >> >> >
> >> >> >
> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >
> >> >> > So this is due to the usage of "http" as a namespace prefix and it
> >> >> > has
> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >>
> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> >> code generator would interpret "http" as a prefix.
> >> >
> >> > Yes agreed..
> >> >
> >> >>
> >> >> I think you should
> >> >> try to determine why it is doing that instead of working around the
> >> >> issue by changing the WSDL generation code.
> >> >
> >> > I did have a look into the code generator code. There, wsdl4j returns
> >> > the
> >> > action as a QName. That is why this issue occurs. Have a look at the
> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> string
> >> > value of the attribute. But currently there's no such method.
> >>
> >> Then I would suggest to review the following code in
> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>
> >>        if (attribute instanceof QName) {
> >>            QName qn = (QName) attribute;
> >>            attribute = qn.getLocalPart();
> >>        }
> >>
> >> The code is used only for the action attribute and we know that the
> >> action is not a QName. Thus, instead of just taking the local part, we
> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> reconstruct the original value of the attribute. WDYT?
> >
> > Actually I initially tried this as well. But as Amila has already pointed
> > out, prefix is "" in this case.
> >
> >>
> >> >>
> >> >> > Thanks,
> >> >> > ~Isuru
> >> >> >
> >> >> >>
> >> >> >> Andreas
> >> >> >>
> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> > Author: isurues
> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> > New Revision: 991441
> >> >> >> >
> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> > Log:
> >> >> >> > changing the http prefix from http to http1. This is because,
> use
> >> >> >> > of
> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> > http://foo.com
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > URL:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> ==============================================================================
> >> >> >> > ---
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > (original)
> >> >> >> > +++
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >
> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Can you send me a sample WSDL for which the problem occurs?
>
> Andreas
>
> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >
> >> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> some
> >> >> > message of some operation.
> >> >> >
> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >
> >> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >> >
> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >
> >> >> > When I generate the stub for this WSDL, it sets the Action on the
> >> >> > stub
> >> >> > as
> >> >> > follows..
> >> >> >
> >> >> >
> >> >> >
> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >
> >> >> > So this is due to the usage of "http" as a namespace prefix and it
> >> >> > has
> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >>
> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> >> code generator would interpret "http" as a prefix.
> >> >
> >> > Yes agreed..
> >> >
> >> >>
> >> >> I think you should
> >> >> try to determine why it is doing that instead of working around the
> >> >> issue by changing the WSDL generation code.
> >> >
> >> > I did have a look into the code generator code. There, wsdl4j returns
> >> > the
> >> > action as a QName. That is why this issue occurs. Have a look at the
> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> string
> >> > value of the attribute. But currently there's no such method.
> >>
> >> Then I would suggest to review the following code in
> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>
> >>        if (attribute instanceof QName) {
> >>            QName qn = (QName) attribute;
> >>            attribute = qn.getLocalPart();
> >>        }
> >>
> >> The code is used only for the action attribute and we know that the
> >> action is not a QName. Thus, instead of just taking the local part, we
> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> reconstruct the original value of the attribute. WDYT?
> >
> > Actually I initially tried this as well. But as Amila has already pointed
> > out, prefix is "" in this case.
> >
> >>
> >> >>
> >> >> > Thanks,
> >> >> > ~Isuru
> >> >> >
> >> >> >>
> >> >> >> Andreas
> >> >> >>
> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> > Author: isurues
> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> > New Revision: 991441
> >> >> >> >
> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> > Log:
> >> >> >> > changing the http prefix from http to http1. This is because,
> use
> >> >> >> > of
> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> > http://foo.com
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > URL:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> ==============================================================================
> >> >> >> > ---
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > (original)
> >> >> >> > +++
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >
> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<an...@gmail.com>wrote:

> Isuru,
>
> Can you send me a sample WSDL for which the problem occurs?
>
> Andreas
>
> On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <an...@gmail.com>
> >> >> > wrote:
> >> >> >>
> >> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >> >
> >> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> >> > AxisService2WSDL11 class which has the following wsaw:Action for
> some
> >> >> > message of some operation.
> >> >> >
> >> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >> >
> >> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >> >
> >> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >> >
> >> >> > When I generate the stub for this WSDL, it sets the Action on the
> >> >> > stub
> >> >> > as
> >> >> > follows..
> >> >> >
> >> >> >
> >> >> >
> >> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >> >
> >> >> > So this is due to the usage of "http" as a namespace prefix and it
> >> >> > has
> >> >> > treated the http://.. URL as <prefix>:<localname>.
> >> >>
> >> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> >> code generator would interpret "http" as a prefix.
> >> >
> >> > Yes agreed..
> >> >
> >> >>
> >> >> I think you should
> >> >> try to determine why it is doing that instead of working around the
> >> >> issue by changing the WSDL generation code.
> >> >
> >> > I did have a look into the code generator code. There, wsdl4j returns
> >> > the
> >> > action as a QName. That is why this issue occurs. Have a look at the
> >> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> >> > WSDL11ActionHelper. Ideally it should provide a method to get the
> string
> >> > value of the attribute. But currently there's no such method.
> >>
> >> Then I would suggest to review the following code in
> >> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
> >>
> >>        if (attribute instanceof QName) {
> >>            QName qn = (QName) attribute;
> >>            attribute = qn.getLocalPart();
> >>        }
> >>
> >> The code is used only for the action attribute and we know that the
> >> action is not a QName. Thus, instead of just taking the local part, we
> >> should rebuild the qualified name (prefix + ":" + localPart) to
> >> reconstruct the original value of the attribute. WDYT?
> >
> > Actually I initially tried this as well. But as Amila has already pointed
> > out, prefix is "" in this case.
> >
> >>
> >> >>
> >> >> > Thanks,
> >> >> > ~Isuru
> >> >> >
> >> >> >>
> >> >> >> Andreas
> >> >> >>
> >> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> >> > Author: isurues
> >> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> >> > New Revision: 991441
> >> >> >> >
> >> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> >> > Log:
> >> >> >> > changing the http prefix from http to http1. This is because,
> use
> >> >> >> > of
> >> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> >> > http://foo.com
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> >
> >> >> >> > Modified:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > URL:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> >
> ==============================================================================
> >> >> >> > ---
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > (original)
> >> >> >> > +++
> >> >> >> >
> >> >> >> >
> >> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >> > Wed Sep  1 05:47:27 2010
> >> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >> >
> >> >> >> >     String HTTP_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
> >> >> >> >     String MIME_NAMESPACE =
> >> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
> >> >> >> > -    String HTTP_PREFIX = "http";
> >> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >> >     String MIME_PREFIX = "mime";
> >> >> >> >     String URN_PREFIX = "urn";
> >> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >>
> >> >> >>
> >> >> >>
> ---------------------------------------------------------------------
> >> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Can you send me a sample WSDL for which the problem occurs?

Andreas

On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >
>> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> >> > message of some operation.
>> >> >
>> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >
>> >> > And also there is a namespace declaration in this WSDL as follows..
>> >> >
>> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >
>> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> > stub
>> >> > as
>> >> > follows..
>> >> >
>> >> >
>> >> >
>> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >
>> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> > has
>> >> > treated the http://.. URL as <prefix>:<localname>.
>> >>
>> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> code generator would interpret "http" as a prefix.
>> >
>> > Yes agreed..
>> >
>> >>
>> >> I think you should
>> >> try to determine why it is doing that instead of working around the
>> >> issue by changing the WSDL generation code.
>> >
>> > I did have a look into the code generator code. There, wsdl4j returns
>> > the
>> > action as a QName. That is why this issue occurs. Have a look at the
>> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> > WSDL11ActionHelper. Ideally it should provide a method to get the string
>> > value of the attribute. But currently there's no such method.
>>
>> Then I would suggest to review the following code in
>> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>
>>        if (attribute instanceof QName) {
>>            QName qn = (QName) attribute;
>>            attribute = qn.getLocalPart();
>>        }
>>
>> The code is used only for the action attribute and we know that the
>> action is not a QName. Thus, instead of just taking the local part, we
>> should rebuild the qualified name (prefix + ":" + localPart) to
>> reconstruct the original value of the attribute. WDYT?
>
> Actually I initially tried this as well. But as Amila has already pointed
> out, prefix is "" in this case.
>
>>
>> >>
>> >> > Thanks,
>> >> > ~Isuru
>> >> >
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> > Author: isurues
>> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> > New Revision: 991441
>> >> >> >
>> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> > Log:
>> >> >> > changing the http prefix from http to http1. This is because, use
>> >> >> > of
>> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> > http://foo.com
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > URL:
>> >> >> >
>> >> >> >
>> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ==============================================================================
>> >> >> > ---
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > (original)
>> >> >> > +++
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >
>> >> >> >     String HTTP_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >     String MIME_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >     String URN_PREFIX = "urn";
>> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Can you send me a sample WSDL for which the problem occurs?

Andreas

On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >
>> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> >> > message of some operation.
>> >> >
>> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >
>> >> > And also there is a namespace declaration in this WSDL as follows..
>> >> >
>> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >
>> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> > stub
>> >> > as
>> >> > follows..
>> >> >
>> >> >
>> >> >
>> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >
>> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> > has
>> >> > treated the http://.. URL as <prefix>:<localname>.
>> >>
>> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> code generator would interpret "http" as a prefix.
>> >
>> > Yes agreed..
>> >
>> >>
>> >> I think you should
>> >> try to determine why it is doing that instead of working around the
>> >> issue by changing the WSDL generation code.
>> >
>> > I did have a look into the code generator code. There, wsdl4j returns
>> > the
>> > action as a QName. That is why this issue occurs. Have a look at the
>> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> > WSDL11ActionHelper. Ideally it should provide a method to get the string
>> > value of the attribute. But currently there's no such method.
>>
>> Then I would suggest to review the following code in
>> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>
>>        if (attribute instanceof QName) {
>>            QName qn = (QName) attribute;
>>            attribute = qn.getLocalPart();
>>        }
>>
>> The code is used only for the action attribute and we know that the
>> action is not a QName. Thus, instead of just taking the local part, we
>> should rebuild the qualified name (prefix + ":" + localPart) to
>> reconstruct the original value of the attribute. WDYT?
>
> Actually I initially tried this as well. But as Amila has already pointed
> out, prefix is "" in this case.
>
>>
>> >>
>> >> > Thanks,
>> >> > ~Isuru
>> >> >
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> > Author: isurues
>> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> > New Revision: 991441
>> >> >> >
>> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> > Log:
>> >> >> > changing the http prefix from http to http1. This is because, use
>> >> >> > of
>> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> > http://foo.com
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > URL:
>> >> >> >
>> >> >> >
>> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ==============================================================================
>> >> >> > ---
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > (original)
>> >> >> > +++
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >
>> >> >> >     String HTTP_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >     String MIME_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >     String URN_PREFIX = "urn";
>> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Can you send me a sample WSDL for which the problem occurs?

Andreas

On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >
>> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> >> > message of some operation.
>> >> >
>> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >
>> >> > And also there is a namespace declaration in this WSDL as follows..
>> >> >
>> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >
>> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> > stub
>> >> > as
>> >> > follows..
>> >> >
>> >> >
>> >> >
>> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >
>> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> > has
>> >> > treated the http://.. URL as <prefix>:<localname>.
>> >>
>> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> code generator would interpret "http" as a prefix.
>> >
>> > Yes agreed..
>> >
>> >>
>> >> I think you should
>> >> try to determine why it is doing that instead of working around the
>> >> issue by changing the WSDL generation code.
>> >
>> > I did have a look into the code generator code. There, wsdl4j returns
>> > the
>> > action as a QName. That is why this issue occurs. Have a look at the
>> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> > WSDL11ActionHelper. Ideally it should provide a method to get the string
>> > value of the attribute. But currently there's no such method.
>>
>> Then I would suggest to review the following code in
>> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>
>>        if (attribute instanceof QName) {
>>            QName qn = (QName) attribute;
>>            attribute = qn.getLocalPart();
>>        }
>>
>> The code is used only for the action attribute and we know that the
>> action is not a QName. Thus, instead of just taking the local part, we
>> should rebuild the qualified name (prefix + ":" + localPart) to
>> reconstruct the original value of the attribute. WDYT?
>
> Actually I initially tried this as well. But as Amila has already pointed
> out, prefix is "" in this case.
>
>>
>> >>
>> >> > Thanks,
>> >> > ~Isuru
>> >> >
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> > Author: isurues
>> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> > New Revision: 991441
>> >> >> >
>> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> > Log:
>> >> >> > changing the http prefix from http to http1. This is because, use
>> >> >> > of
>> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> > http://foo.com
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > URL:
>> >> >> >
>> >> >> >
>> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ==============================================================================
>> >> >> > ---
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > (original)
>> >> >> > +++
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >
>> >> >> >     String HTTP_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >     String MIME_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >     String URN_PREFIX = "urn";
>> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Can you send me a sample WSDL for which the problem occurs?

Andreas

On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >
>> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> >> > message of some operation.
>> >> >
>> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >
>> >> > And also there is a namespace declaration in this WSDL as follows..
>> >> >
>> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >
>> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> > stub
>> >> > as
>> >> > follows..
>> >> >
>> >> >
>> >> >
>> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >
>> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> > has
>> >> > treated the http://.. URL as <prefix>:<localname>.
>> >>
>> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> code generator would interpret "http" as a prefix.
>> >
>> > Yes agreed..
>> >
>> >>
>> >> I think you should
>> >> try to determine why it is doing that instead of working around the
>> >> issue by changing the WSDL generation code.
>> >
>> > I did have a look into the code generator code. There, wsdl4j returns
>> > the
>> > action as a QName. That is why this issue occurs. Have a look at the
>> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> > WSDL11ActionHelper. Ideally it should provide a method to get the string
>> > value of the attribute. But currently there's no such method.
>>
>> Then I would suggest to review the following code in
>> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>
>>        if (attribute instanceof QName) {
>>            QName qn = (QName) attribute;
>>            attribute = qn.getLocalPart();
>>        }
>>
>> The code is used only for the action attribute and we know that the
>> action is not a QName. Thus, instead of just taking the local part, we
>> should rebuild the qualified name (prefix + ":" + localPart) to
>> reconstruct the original value of the attribute. WDYT?
>
> Actually I initially tried this as well. But as Amila has already pointed
> out, prefix is "" in this case.
>
>>
>> >>
>> >> > Thanks,
>> >> > ~Isuru
>> >> >
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> > Author: isurues
>> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> > New Revision: 991441
>> >> >> >
>> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> > Log:
>> >> >> > changing the http prefix from http to http1. This is because, use
>> >> >> > of
>> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> > http://foo.com
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > URL:
>> >> >> >
>> >> >> >
>> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ==============================================================================
>> >> >> > ---
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > (original)
>> >> >> > +++
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >
>> >> >> >     String HTTP_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >     String MIME_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >     String URN_PREFIX = "urn";
>> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
Isuru,

Can you send me a sample WSDL for which the problem occurs?

Andreas

On Mon, Sep 6, 2010 at 10:24, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> >> wrote:
>> >> >
>> >> >
>> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> >> > <an...@gmail.com>
>> >> > wrote:
>> >> >>
>> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> >> like a quick and dirty workaround for a more fundamental issue.
>> >> >
>> >> > Let me explain it further.. I came up with a WSDL generated by our
>> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> >> > message of some operation.
>> >> >
>> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >> >
>> >> > And also there is a namespace declaration in this WSDL as follows..
>> >> >
>> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >> >
>> >> > When I generate the stub for this WSDL, it sets the Action on the
>> >> > stub
>> >> > as
>> >> > follows..
>> >> >
>> >> >
>> >> >
>> >> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >> >
>> >> > So this is due to the usage of "http" as a namespace prefix and it
>> >> > has
>> >> > treated the http://.. URL as <prefix>:<localname>.
>> >>
>> >> The SOAP action is a URI, not a QName, so there is no reason why the
>> >> code generator would interpret "http" as a prefix.
>> >
>> > Yes agreed..
>> >
>> >>
>> >> I think you should
>> >> try to determine why it is doing that instead of working around the
>> >> issue by changing the WSDL generation code.
>> >
>> > I did have a look into the code generator code. There, wsdl4j returns
>> > the
>> > action as a QName. That is why this issue occurs. Have a look at the
>> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
>> > WSDL11ActionHelper. Ideally it should provide a method to get the string
>> > value of the attribute. But currently there's no such method.
>>
>> Then I would suggest to review the following code in
>> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>>
>>        if (attribute instanceof QName) {
>>            QName qn = (QName) attribute;
>>            attribute = qn.getLocalPart();
>>        }
>>
>> The code is used only for the action attribute and we know that the
>> action is not a QName. Thus, instead of just taking the local part, we
>> should rebuild the qualified name (prefix + ":" + localPart) to
>> reconstruct the original value of the attribute. WDYT?
>
> Actually I initially tried this as well. But as Amila has already pointed
> out, prefix is "" in this case.
>
>>
>> >>
>> >> > Thanks,
>> >> > ~Isuru
>> >> >
>> >> >>
>> >> >> Andreas
>> >> >>
>> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> >> > Author: isurues
>> >> >> > Date: Wed Sep  1 05:47:27 2010
>> >> >> > New Revision: 991441
>> >> >> >
>> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> >> > Log:
>> >> >> > changing the http prefix from http to http1. This is because, use
>> >> >> > of
>> >> >> > http as a prefix causes conflicts with actual URLs like
>> >> >> > http://foo.com
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> >
>> >> >> > Modified:
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > URL:
>> >> >> >
>> >> >> >
>> >> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >> > ==============================================================================
>> >> >> > ---
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > (original)
>> >> >> > +++
>> >> >> >
>> >> >> >
>> >> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >> > Wed Sep  1 05:47:27 2010
>> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >> >
>> >> >> >     String HTTP_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >> >     String MIME_NAMESPACE =
>> >> >> > "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> >> > -    String HTTP_PREFIX = "http";
>> >> >> > +    String HTTP_PREFIX = "http1";
>> >> >> >     String MIME_PREFIX = "mime";
>> >> >> >     String URN_PREFIX = "urn";
>> >> >> >     String COLON_SEPARATOR = ":";
>> >> >> >
>> >> >> >
>> >> >> >
>> >> >>
>> >> >>
>> >> >> ---------------------------------------------------------------------
>> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >> >>
>> >> >
>> >> >
>> >> >
>> >> > --
>> >> > Technical Lead,
>> >> > WSO2 Inc. http://wso2.org/
>> >> > Blog : http://isurues.wordpress.com/
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

Actually I initially tried this as well. But as Amila has already pointed
out, prefix is "" in this case.


>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

In this case prefix seems to be returning "".

I think all these code is written since it does not have a method like
getAttribute(String). Therefore one would say all these code is a hack
because of the above reason.

thanks,
Amila.




>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

In this case prefix seems to be returning "".

I think all these code is written since it does not have a method like
getAttribute(String). Therefore one would say all these code is a hack
because of the above reason.

thanks,
Amila.




>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

In this case prefix seems to be returning "".

I think all these code is written since it does not have a method like
getAttribute(String). Therefore one would say all these code is a hack
because of the above reason.

thanks,
Amila.




>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

Actually I initially tried this as well. But as Amila has already pointed
out, prefix is "" in this case.


>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

Actually I initially tried this as well. But as Amila has already pointed
out, prefix is "" in this case.


>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

In this case prefix seems to be returning "".

I think all these code is written since it does not have a method like
getAttribute(String). Therefore one would say all these code is a hack
because of the above reason.

thanks,
Amila.




>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Amila Suriarachchi <am...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

In this case prefix seems to be returning "".

I think all these code is written since it does not have a method like
getAttribute(String). Therefore one would say all these code is a hack
because of the above reason.

thanks,
Amila.




>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Amila Suriarachchi
WSO2 Inc.
blog: http://amilachinthaka.blogspot.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

Actually I initially tried this as well. But as Amila has already pointed
out, prefix is "" in this case.


>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> >> wrote:
> >> >
> >> >
> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> > <an...@gmail.com>
> >> > wrote:
> >> >>
> >> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> >> like a quick and dirty workaround for a more fundamental issue.
> >> >
> >> > Let me explain it further.. I came up with a WSDL generated by our
> >> > AxisService2WSDL11 class which has the following wsaw:Action for some
> >> > message of some operation.
> >> >
> >> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >> >
> >> > And also there is a namespace declaration in this WSDL as follows..
> >> >
> >> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >> >
> >> > When I generate the stub for this WSDL, it sets the Action on the stub
> >> > as
> >> > follows..
> >> >
> >> >
> >> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >> >
> >> > So this is due to the usage of "http" as a namespace prefix and it has
> >> > treated the http://.. URL as <prefix>:<localname>.
> >>
> >> The SOAP action is a URI, not a QName, so there is no reason why the
> >> code generator would interpret "http" as a prefix.
> >
> > Yes agreed..
> >
> >>
> >> I think you should
> >> try to determine why it is doing that instead of working around the
> >> issue by changing the WSDL generation code.
> >
> > I did have a look into the code generator code. There, wsdl4j returns the
> > action as a QName. That is why this issue occurs. Have a look at the
> > getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> > WSDL11ActionHelper. Ideally it should provide a method to get the string
> > value of the attribute. But currently there's no such method.
>
> Then I would suggest to review the following code in
> WSDL11ActionHelper#getWSAWActionExtensionAttribute:
>
>        if (attribute instanceof QName) {
>            QName qn = (QName) attribute;
>            attribute = qn.getLocalPart();
>        }
>
> The code is used only for the action attribute and we know that the
> action is not a QName. Thus, instead of just taking the local part, we
> should rebuild the qualified name (prefix + ":" + localPart) to
> reconstruct the original value of the attribute. WDYT?
>

Actually I initially tried this as well. But as Amila has already pointed
out, prefix is "" in this case.


>
> >>
> >> > Thanks,
> >> > ~Isuru
> >> >
> >> >>
> >> >> Andreas
> >> >>
> >> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> >> > Author: isurues
> >> >> > Date: Wed Sep  1 05:47:27 2010
> >> >> > New Revision: 991441
> >> >> >
> >> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> >> > Log:
> >> >> > changing the http prefix from http to http1. This is because, use
> of
> >> >> > http as a prefix causes conflicts with actual URLs like
> >> >> > http://foo.com
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> >> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> >
> >> >> > Modified:
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > URL:
> >> >> >
> >> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >> >
> >> >> >
> >> >> >
> ==============================================================================
> >> >> > ---
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > (original)
> >> >> > +++
> >> >> >
> >> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >> > Wed Sep  1 05:47:27 2010
> >> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >> >
> >> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/
> ";
> >> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/
> ";
> >> >> > -    String HTTP_PREFIX = "http";
> >> >> > +    String HTTP_PREFIX = "http1";
> >> >> >     String MIME_PREFIX = "mime";
> >> >> >     String URN_PREFIX = "urn";
> >> >> >     String COLON_SEPARATOR = ":";
> >> >> >
> >> >> >
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> like a quick and dirty workaround for a more fundamental issue.
>> >
>> > Let me explain it further.. I came up with a WSDL generated by our
>> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> > message of some operation.
>> >
>> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >
>> > And also there is a namespace declaration in this WSDL as follows..
>> >
>> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >
>> > When I generate the stub for this WSDL, it sets the Action on the stub
>> > as
>> > follows..
>> >
>> >
>> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >
>> > So this is due to the usage of "http" as a namespace prefix and it has
>> > treated the http://.. URL as <prefix>:<localname>.
>>
>> The SOAP action is a URI, not a QName, so there is no reason why the
>> code generator would interpret "http" as a prefix.
>
> Yes agreed..
>
>>
>> I think you should
>> try to determine why it is doing that instead of working around the
>> issue by changing the WSDL generation code.
>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.

Then I would suggest to review the following code in
WSDL11ActionHelper#getWSAWActionExtensionAttribute:

        if (attribute instanceof QName) {
            QName qn = (QName) attribute;
            attribute = qn.getLocalPart();
        }

The code is used only for the action attribute and we know that the
action is not a QName. Thus, instead of just taking the local part, we
should rebuild the qualified name (prefix + ":" + localPart) to
reconstruct the original value of the attribute. WDYT?

>>
>> > Thanks,
>> > ~Isuru
>> >
>> >>
>> >> Andreas
>> >>
>> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> > Author: isurues
>> >> > Date: Wed Sep  1 05:47:27 2010
>> >> > New Revision: 991441
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> > Log:
>> >> > changing the http prefix from http to http1. This is because, use of
>> >> > http as a prefix causes conflicts with actual URLs like
>> >> > http://foo.com
>> >> >
>> >> > Modified:
>> >> >
>> >> >
>> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >
>> >> > Modified:
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > URL:
>> >> >
>> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > ---
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > (original)
>> >> > +++
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > Wed Sep  1 05:47:27 2010
>> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >
>> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> > -    String HTTP_PREFIX = "http";
>> >> > +    String HTTP_PREFIX = "http1";
>> >> >     String MIME_PREFIX = "mime";
>> >> >     String URN_PREFIX = "urn";
>> >> >     String COLON_SEPARATOR = ":";
>> >> >
>> >> >
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.
>

I suggest opening an issue in WSDL4J and living with the workaround until
they provide the extra method.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> like a quick and dirty workaround for a more fundamental issue.
>> >
>> > Let me explain it further.. I came up with a WSDL generated by our
>> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> > message of some operation.
>> >
>> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >
>> > And also there is a namespace declaration in this WSDL as follows..
>> >
>> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >
>> > When I generate the stub for this WSDL, it sets the Action on the stub
>> > as
>> > follows..
>> >
>> >
>> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >
>> > So this is due to the usage of "http" as a namespace prefix and it has
>> > treated the http://.. URL as <prefix>:<localname>.
>>
>> The SOAP action is a URI, not a QName, so there is no reason why the
>> code generator would interpret "http" as a prefix.
>
> Yes agreed..
>
>>
>> I think you should
>> try to determine why it is doing that instead of working around the
>> issue by changing the WSDL generation code.
>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.

Then I would suggest to review the following code in
WSDL11ActionHelper#getWSAWActionExtensionAttribute:

        if (attribute instanceof QName) {
            QName qn = (QName) attribute;
            attribute = qn.getLocalPart();
        }

The code is used only for the action attribute and we know that the
action is not a QName. Thus, instead of just taking the local part, we
should rebuild the qualified name (prefix + ":" + localPart) to
reconstruct the original value of the attribute. WDYT?

>>
>> > Thanks,
>> > ~Isuru
>> >
>> >>
>> >> Andreas
>> >>
>> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> > Author: isurues
>> >> > Date: Wed Sep  1 05:47:27 2010
>> >> > New Revision: 991441
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> > Log:
>> >> > changing the http prefix from http to http1. This is because, use of
>> >> > http as a prefix causes conflicts with actual URLs like
>> >> > http://foo.com
>> >> >
>> >> > Modified:
>> >> >
>> >> >
>> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >
>> >> > Modified:
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > URL:
>> >> >
>> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > ---
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > (original)
>> >> > +++
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > Wed Sep  1 05:47:27 2010
>> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >
>> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> > -    String HTTP_PREFIX = "http";
>> >> > +    String HTTP_PREFIX = "http1";
>> >> >     String MIME_PREFIX = "mime";
>> >> >     String URN_PREFIX = "urn";
>> >> >     String COLON_SEPARATOR = ":";
>> >> >
>> >> >
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> like a quick and dirty workaround for a more fundamental issue.
>> >
>> > Let me explain it further.. I came up with a WSDL generated by our
>> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> > message of some operation.
>> >
>> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >
>> > And also there is a namespace declaration in this WSDL as follows..
>> >
>> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >
>> > When I generate the stub for this WSDL, it sets the Action on the stub
>> > as
>> > follows..
>> >
>> >
>> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >
>> > So this is due to the usage of "http" as a namespace prefix and it has
>> > treated the http://.. URL as <prefix>:<localname>.
>>
>> The SOAP action is a URI, not a QName, so there is no reason why the
>> code generator would interpret "http" as a prefix.
>
> Yes agreed..
>
>>
>> I think you should
>> try to determine why it is doing that instead of working around the
>> issue by changing the WSDL generation code.
>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.

Then I would suggest to review the following code in
WSDL11ActionHelper#getWSAWActionExtensionAttribute:

        if (attribute instanceof QName) {
            QName qn = (QName) attribute;
            attribute = qn.getLocalPart();
        }

The code is used only for the action attribute and we know that the
action is not a QName. Thus, instead of just taking the local part, we
should rebuild the qualified name (prefix + ":" + localPart) to
reconstruct the original value of the attribute. WDYT?

>>
>> > Thanks,
>> > ~Isuru
>> >
>> >>
>> >> Andreas
>> >>
>> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> > Author: isurues
>> >> > Date: Wed Sep  1 05:47:27 2010
>> >> > New Revision: 991441
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> > Log:
>> >> > changing the http prefix from http to http1. This is because, use of
>> >> > http as a prefix causes conflicts with actual URLs like
>> >> > http://foo.com
>> >> >
>> >> > Modified:
>> >> >
>> >> >
>> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >
>> >> > Modified:
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > URL:
>> >> >
>> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > ---
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > (original)
>> >> > +++
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > Wed Sep  1 05:47:27 2010
>> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >
>> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> > -    String HTTP_PREFIX = "http";
>> >> > +    String HTTP_PREFIX = "http1";
>> >> >     String MIME_PREFIX = "mime";
>> >> >     String URN_PREFIX = "urn";
>> >> >     String COLON_SEPARATOR = ":";
>> >> >
>> >> >
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> like a quick and dirty workaround for a more fundamental issue.
>> >
>> > Let me explain it further.. I came up with a WSDL generated by our
>> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> > message of some operation.
>> >
>> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >
>> > And also there is a namespace declaration in this WSDL as follows..
>> >
>> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >
>> > When I generate the stub for this WSDL, it sets the Action on the stub
>> > as
>> > follows..
>> >
>> >
>> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >
>> > So this is due to the usage of "http" as a namespace prefix and it has
>> > treated the http://.. URL as <prefix>:<localname>.
>>
>> The SOAP action is a URI, not a QName, so there is no reason why the
>> code generator would interpret "http" as a prefix.
>
> Yes agreed..
>
>>
>> I think you should
>> try to determine why it is doing that instead of working around the
>> issue by changing the WSDL generation code.
>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.

Then I would suggest to review the following code in
WSDL11ActionHelper#getWSAWActionExtensionAttribute:

        if (attribute instanceof QName) {
            QName qn = (QName) attribute;
            attribute = qn.getLocalPart();
        }

The code is used only for the action attribute and we know that the
action is not a QName. Thus, instead of just taking the local part, we
should rebuild the qualified name (prefix + ":" + localPart) to
reconstruct the original value of the attribute. WDYT?

>>
>> > Thanks,
>> > ~Isuru
>> >
>> >>
>> >> Andreas
>> >>
>> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> > Author: isurues
>> >> > Date: Wed Sep  1 05:47:27 2010
>> >> > New Revision: 991441
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> > Log:
>> >> > changing the http prefix from http to http1. This is because, use of
>> >> > http as a prefix causes conflicts with actual URLs like
>> >> > http://foo.com
>> >> >
>> >> > Modified:
>> >> >
>> >> >
>> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >
>> >> > Modified:
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > URL:
>> >> >
>> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > ---
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > (original)
>> >> > +++
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > Wed Sep  1 05:47:27 2010
>> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >
>> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> > -    String HTTP_PREFIX = "http";
>> >> > +    String HTTP_PREFIX = "http1";
>> >> >     String MIME_PREFIX = "mime";
>> >> >     String URN_PREFIX = "urn";
>> >> >     String COLON_SEPARATOR = ":";
>> >> >
>> >> >
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.
>

I suggest opening an issue in WSDL4J and living with the workaround until
they provide the extra method.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.
>

I suggest opening an issue in WSDL4J and living with the workaround until
they provide the extra method.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
>> wrote:
>> >
>> >
>> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
>> > <an...@gmail.com>
>> > wrote:
>> >>
>> >> How can a namespace prefix conflict with a URI scheme? That sounds
>> >> like a quick and dirty workaround for a more fundamental issue.
>> >
>> > Let me explain it further.. I came up with a WSDL generated by our
>> > AxisService2WSDL11 class which has the following wsaw:Action for some
>> > message of some operation.
>> >
>> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>> >
>> > And also there is a namespace declaration in this WSDL as follows..
>> >
>> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>> >
>> > When I generate the stub for this WSDL, it sets the Action on the stub
>> > as
>> > follows..
>> >
>> >
>> > _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>> >
>> > So this is due to the usage of "http" as a namespace prefix and it has
>> > treated the http://.. URL as <prefix>:<localname>.
>>
>> The SOAP action is a URI, not a QName, so there is no reason why the
>> code generator would interpret "http" as a prefix.
>
> Yes agreed..
>
>>
>> I think you should
>> try to determine why it is doing that instead of working around the
>> issue by changing the WSDL generation code.
>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.

Then I would suggest to review the following code in
WSDL11ActionHelper#getWSAWActionExtensionAttribute:

        if (attribute instanceof QName) {
            QName qn = (QName) attribute;
            attribute = qn.getLocalPart();
        }

The code is used only for the action attribute and we know that the
action is not a QName. Thus, instead of just taking the local part, we
should rebuild the qualified name (prefix + ":" + localPart) to
reconstruct the original value of the attribute. WDYT?

>>
>> > Thanks,
>> > ~Isuru
>> >
>> >>
>> >> Andreas
>> >>
>> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> >> > Author: isurues
>> >> > Date: Wed Sep  1 05:47:27 2010
>> >> > New Revision: 991441
>> >> >
>> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> >> > Log:
>> >> > changing the http prefix from http to http1. This is because, use of
>> >> > http as a prefix causes conflicts with actual URLs like
>> >> > http://foo.com
>> >> >
>> >> > Modified:
>> >> >
>> >> >
>> >> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> >
>> >> > Modified:
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > URL:
>> >> >
>> >> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >> >
>> >> >
>> >> > ==============================================================================
>> >> > ---
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > (original)
>> >> > +++
>> >> >
>> >> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >> > Wed Sep  1 05:47:27 2010
>> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >> >
>> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> >> > -    String HTTP_PREFIX = "http";
>> >> > +    String HTTP_PREFIX = "http1";
>> >> >     String MIME_PREFIX = "mime";
>> >> >     String URN_PREFIX = "urn";
>> >> >     String COLON_SEPARATOR = ":";
>> >> >
>> >> >
>> >> >
>> >>
>> >> ---------------------------------------------------------------------
>> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> >> For additional commands, e-mail: java-dev-help@axis.apache.org
>> >>
>> >
>> >
>> >
>> > --
>> > Technical Lead,
>> > WSO2 Inc. http://wso2.org/
>> > Blog : http://isurues.wordpress.com/
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Sanjiva Weerawarana <sa...@opensource.lk>.
On Sun, Sep 5, 2010 at 8:42 AM, Isuru Suriarachchi <is...@gmail.com>wrote:

>
> I did have a look into the code generator code. There, wsdl4j returns the
> action as a QName. That is why this issue occurs. Have a look at the
> getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
> WSDL11ActionHelper. Ideally it should provide a method to get the string
> value of the attribute. But currently there's no such method.
>

I suggest opening an issue in WSDL4J and living with the workaround until
they provide the extra method.

Sanjiva.
-- 
Sanjiva Weerawarana, Ph.D.
Founder, Director & Chief Scientist; Lanka Software Foundation;
http://www.opensource.lk/
Founder, Chairman & CEO; WSO2; http://wso2.com/
Founder & Director; Thinkcube Systems; http://www.thinkcube.com/
Member; Apache Software Foundation; http://www.apache.org/
Member; Sahana Software Foundation; http://www.sahanafoundation.org/
Visiting Lecturer; University of Moratuwa; http://www.cse.mrt.ac.lk/

Blog: http://sanjiva.weerawarana.org/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> like a quick and dirty workaround for a more fundamental issue.
> >
> > Let me explain it further.. I came up with a WSDL generated by our
> > AxisService2WSDL11 class which has the following wsaw:Action for some
> > message of some operation.
> >
> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >
> > And also there is a namespace declaration in this WSDL as follows..
> >
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >
> > When I generate the stub for this WSDL, it sets the Action on the stub as
> > follows..
> >
> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >
> > So this is due to the usage of "http" as a namespace prefix and it has
> > treated the http://.. URL as <prefix>:<localname>.
>
> The SOAP action is a URI, not a QName, so there is no reason why the
> code generator would interpret "http" as a prefix.


Yes agreed..


> I think you should
> try to determine why it is doing that instead of working around the
> issue by changing the WSDL generation code.
>

I did have a look into the code generator code. There, wsdl4j returns the
action as a QName. That is why this issue occurs. Have a look at the
getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
WSDL11ActionHelper. Ideally it should provide a method to get the string
value of the attribute. But currently there's no such method.


>
> > Thanks,
> > ~Isuru
> >
> >>
> >> Andreas
> >>
> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> > Author: isurues
> >> > Date: Wed Sep  1 05:47:27 2010
> >> > New Revision: 991441
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> > Log:
> >> > changing the http prefix from http to http1. This is because, use of
> >> > http as a prefix causes conflicts with actual URLs like
> http://foo.com
> >> >
> >> > Modified:
> >> >
> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >
> >> > Modified:
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > URL:
> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >
> >> >
> ==============================================================================
> >> > ---
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > (original)
> >> > +++
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > Wed Sep  1 05:47:27 2010
> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >
> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> >> > -    String HTTP_PREFIX = "http";
> >> > +    String HTTP_PREFIX = "http1";
> >> >     String MIME_PREFIX = "mime";
> >> >     String URN_PREFIX = "urn";
> >> >     String COLON_SEPARATOR = ":";
> >> >
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> like a quick and dirty workaround for a more fundamental issue.
> >
> > Let me explain it further.. I came up with a WSDL generated by our
> > AxisService2WSDL11 class which has the following wsaw:Action for some
> > message of some operation.
> >
> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >
> > And also there is a namespace declaration in this WSDL as follows..
> >
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >
> > When I generate the stub for this WSDL, it sets the Action on the stub as
> > follows..
> >
> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >
> > So this is due to the usage of "http" as a namespace prefix and it has
> > treated the http://.. URL as <prefix>:<localname>.
>
> The SOAP action is a URI, not a QName, so there is no reason why the
> code generator would interpret "http" as a prefix.


Yes agreed..


> I think you should
> try to determine why it is doing that instead of working around the
> issue by changing the WSDL generation code.
>

I did have a look into the code generator code. There, wsdl4j returns the
action as a QName. That is why this issue occurs. Have a look at the
getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
WSDL11ActionHelper. Ideally it should provide a method to get the string
value of the attribute. But currently there's no such method.


>
> > Thanks,
> > ~Isuru
> >
> >>
> >> Andreas
> >>
> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> > Author: isurues
> >> > Date: Wed Sep  1 05:47:27 2010
> >> > New Revision: 991441
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> > Log:
> >> > changing the http prefix from http to http1. This is because, use of
> >> > http as a prefix causes conflicts with actual URLs like
> http://foo.com
> >> >
> >> > Modified:
> >> >
> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >
> >> > Modified:
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > URL:
> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >
> >> >
> ==============================================================================
> >> > ---
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > (original)
> >> > +++
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > Wed Sep  1 05:47:27 2010
> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >
> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> >> > -    String HTTP_PREFIX = "http";
> >> > +    String HTTP_PREFIX = "http1";
> >> >     String MIME_PREFIX = "mime";
> >> >     String URN_PREFIX = "urn";
> >> >     String COLON_SEPARATOR = ":";
> >> >
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> like a quick and dirty workaround for a more fundamental issue.
> >
> > Let me explain it further.. I came up with a WSDL generated by our
> > AxisService2WSDL11 class which has the following wsaw:Action for some
> > message of some operation.
> >
> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >
> > And also there is a namespace declaration in this WSDL as follows..
> >
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >
> > When I generate the stub for this WSDL, it sets the Action on the stub as
> > follows..
> >
> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >
> > So this is due to the usage of "http" as a namespace prefix and it has
> > treated the http://.. URL as <prefix>:<localname>.
>
> The SOAP action is a URI, not a QName, so there is no reason why the
> code generator would interpret "http" as a prefix.


Yes agreed..


> I think you should
> try to determine why it is doing that instead of working around the
> issue by changing the WSDL generation code.
>

I did have a look into the code generator code. There, wsdl4j returns the
action as a QName. That is why this issue occurs. Have a look at the
getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
WSDL11ActionHelper. Ideally it should provide a method to get the string
value of the attribute. But currently there's no such method.


>
> > Thanks,
> > ~Isuru
> >
> >>
> >> Andreas
> >>
> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> > Author: isurues
> >> > Date: Wed Sep  1 05:47:27 2010
> >> > New Revision: 991441
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> > Log:
> >> > changing the http prefix from http to http1. This is because, use of
> >> > http as a prefix causes conflicts with actual URLs like
> http://foo.com
> >> >
> >> > Modified:
> >> >
> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >
> >> > Modified:
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > URL:
> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >
> >> >
> ==============================================================================
> >> > ---
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > (original)
> >> > +++
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > Wed Sep  1 05:47:27 2010
> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >
> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> >> > -    String HTTP_PREFIX = "http";
> >> > +    String HTTP_PREFIX = "http1";
> >> >     String MIME_PREFIX = "mime";
> >> >     String URN_PREFIX = "urn";
> >> >     String COLON_SEPARATOR = ":";
> >> >
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> like a quick and dirty workaround for a more fundamental issue.
> >
> > Let me explain it further.. I came up with a WSDL generated by our
> > AxisService2WSDL11 class which has the following wsaw:Action for some
> > message of some operation.
> >
> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >
> > And also there is a namespace declaration in this WSDL as follows..
> >
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >
> > When I generate the stub for this WSDL, it sets the Action on the stub as
> > follows..
> >
> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >
> > So this is due to the usage of "http" as a namespace prefix and it has
> > treated the http://.. URL as <prefix>:<localname>.
>
> The SOAP action is a URI, not a QName, so there is no reason why the
> code generator would interpret "http" as a prefix.


Yes agreed..


> I think you should
> try to determine why it is doing that instead of working around the
> issue by changing the WSDL generation code.
>

I did have a look into the code generator code. There, wsdl4j returns the
action as a QName. That is why this issue occurs. Have a look at the
getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
WSDL11ActionHelper. Ideally it should provide a method to get the string
value of the attribute. But currently there's no such method.


>
> > Thanks,
> > ~Isuru
> >
> >>
> >> Andreas
> >>
> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> > Author: isurues
> >> > Date: Wed Sep  1 05:47:27 2010
> >> > New Revision: 991441
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> > Log:
> >> > changing the http prefix from http to http1. This is because, use of
> >> > http as a prefix causes conflicts with actual URLs like
> http://foo.com
> >> >
> >> > Modified:
> >> >
> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >
> >> > Modified:
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > URL:
> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >
> >> >
> ==============================================================================
> >> > ---
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > (original)
> >> > +++
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > Wed Sep  1 05:47:27 2010
> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >
> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> >> > -    String HTTP_PREFIX = "http";
> >> > +    String HTTP_PREFIX = "http1";
> >> >     String MIME_PREFIX = "mime";
> >> >     String URN_PREFIX = "urn";
> >> >     String COLON_SEPARATOR = ":";
> >> >
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
<an...@gmail.com>wrote:

> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com>
> wrote:
> >
> >
> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <
> andreas.veithen@gmail.com>
> > wrote:
> >>
> >> How can a namespace prefix conflict with a URI scheme? That sounds
> >> like a quick and dirty workaround for a more fundamental issue.
> >
> > Let me explain it further.. I came up with a WSDL generated by our
> > AxisService2WSDL11 class which has the following wsaw:Action for some
> > message of some operation.
> >
> > wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
> >
> > And also there is a namespace declaration in this WSDL as follows..
> >
> > xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
> >
> > When I generate the stub for this WSDL, it sets the Action on the stub as
> > follows..
> >
> > _operationClient.getOptions().setAction("//
> www.webtest.org/echoStringMethodRequest");
> >
> > So this is due to the usage of "http" as a namespace prefix and it has
> > treated the http://.. URL as <prefix>:<localname>.
>
> The SOAP action is a URI, not a QName, so there is no reason why the
> code generator would interpret "http" as a prefix.


Yes agreed..


> I think you should
> try to determine why it is doing that instead of working around the
> issue by changing the WSDL generation code.
>

I did have a look into the code generator code. There, wsdl4j returns the
action as a QName. That is why this issue occurs. Have a look at the
getWSAWActionExtensionAttribute(AttributeExtensible ae) method in
WSDL11ActionHelper. Ideally it should provide a method to get the string
value of the attribute. But currently there's no such method.


>
> > Thanks,
> > ~Isuru
> >
> >>
> >> Andreas
> >>
> >> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> >> > Author: isurues
> >> > Date: Wed Sep  1 05:47:27 2010
> >> > New Revision: 991441
> >> >
> >> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> >> > Log:
> >> > changing the http prefix from http to http1. This is because, use of
> >> > http as a prefix causes conflicts with actual URLs like
> http://foo.com
> >> >
> >> > Modified:
> >> >
> >> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> >
> >> > Modified:
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > URL:
> >> >
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >> >
> >> >
> ==============================================================================
> >> > ---
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > (original)
> >> > +++
> >> >
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >> > Wed Sep  1 05:47:27 2010
> >> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >> >
> >> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> >> > -    String HTTP_PREFIX = "http";
> >> > +    String HTTP_PREFIX = "http1";
> >> >     String MIME_PREFIX = "mime";
> >> >     String URN_PREFIX = "urn";
> >> >     String COLON_SEPARATOR = ":";
> >> >
> >> >
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> >> For additional commands, e-mail: java-dev-help@axis.apache.org
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> How can a namespace prefix conflict with a URI scheme? That sounds
>> like a quick and dirty workaround for a more fundamental issue.
>
> Let me explain it further.. I came up with a WSDL generated by our
> AxisService2WSDL11 class which has the following wsaw:Action for some
> message of some operation.
>
> wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>
> And also there is a namespace declaration in this WSDL as follows..
>
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>
> When I generate the stub for this WSDL, it sets the Action on the stub as
> follows..
>
> _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>
> So this is due to the usage of "http" as a namespace prefix and it has
> treated the http://.. URL as <prefix>:<localname>.

The SOAP action is a URI, not a QName, so there is no reason why the
code generator would interpret "http" as a prefix. I think you should
try to determine why it is doing that instead of working around the
issue by changing the WSDL generation code.

> Thanks,
> ~Isuru
>
>>
>> Andreas
>>
>> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> > Author: isurues
>> > Date: Wed Sep  1 05:47:27 2010
>> > New Revision: 991441
>> >
>> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> > Log:
>> > changing the http prefix from http to http1. This is because, use of
>> > http as a prefix causes conflicts with actual URLs like http://foo.com
>> >
>> > Modified:
>> >
>> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >
>> > Modified:
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > URL:
>> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > (original)
>> > +++
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > Wed Sep  1 05:47:27 2010
>> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >
>> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> > -    String HTTP_PREFIX = "http";
>> > +    String HTTP_PREFIX = "http1";
>> >     String MIME_PREFIX = "mime";
>> >     String URN_PREFIX = "urn";
>> >     String COLON_SEPARATOR = ":";
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> How can a namespace prefix conflict with a URI scheme? That sounds
>> like a quick and dirty workaround for a more fundamental issue.
>
> Let me explain it further.. I came up with a WSDL generated by our
> AxisService2WSDL11 class which has the following wsaw:Action for some
> message of some operation.
>
> wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>
> And also there is a namespace declaration in this WSDL as follows..
>
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>
> When I generate the stub for this WSDL, it sets the Action on the stub as
> follows..
>
> _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>
> So this is due to the usage of "http" as a namespace prefix and it has
> treated the http://.. URL as <prefix>:<localname>.

The SOAP action is a URI, not a QName, so there is no reason why the
code generator would interpret "http" as a prefix. I think you should
try to determine why it is doing that instead of working around the
issue by changing the WSDL generation code.

> Thanks,
> ~Isuru
>
>>
>> Andreas
>>
>> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> > Author: isurues
>> > Date: Wed Sep  1 05:47:27 2010
>> > New Revision: 991441
>> >
>> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> > Log:
>> > changing the http prefix from http to http1. This is because, use of
>> > http as a prefix causes conflicts with actual URLs like http://foo.com
>> >
>> > Modified:
>> >
>> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >
>> > Modified:
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > URL:
>> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > (original)
>> > +++
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > Wed Sep  1 05:47:27 2010
>> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >
>> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> > -    String HTTP_PREFIX = "http";
>> > +    String HTTP_PREFIX = "http1";
>> >     String MIME_PREFIX = "mime";
>> >     String URN_PREFIX = "urn";
>> >     String COLON_SEPARATOR = ":";
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> How can a namespace prefix conflict with a URI scheme? That sounds
>> like a quick and dirty workaround for a more fundamental issue.
>
> Let me explain it further.. I came up with a WSDL generated by our
> AxisService2WSDL11 class which has the following wsaw:Action for some
> message of some operation.
>
> wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>
> And also there is a namespace declaration in this WSDL as follows..
>
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>
> When I generate the stub for this WSDL, it sets the Action on the stub as
> follows..
>
> _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>
> So this is due to the usage of "http" as a namespace prefix and it has
> treated the http://.. URL as <prefix>:<localname>.

The SOAP action is a URI, not a QName, so there is no reason why the
code generator would interpret "http" as a prefix. I think you should
try to determine why it is doing that instead of working around the
issue by changing the WSDL generation code.

> Thanks,
> ~Isuru
>
>>
>> Andreas
>>
>> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> > Author: isurues
>> > Date: Wed Sep  1 05:47:27 2010
>> > New Revision: 991441
>> >
>> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> > Log:
>> > changing the http prefix from http to http1. This is because, use of
>> > http as a prefix causes conflicts with actual URLs like http://foo.com
>> >
>> > Modified:
>> >
>> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >
>> > Modified:
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > URL:
>> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > (original)
>> > +++
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > Wed Sep  1 05:47:27 2010
>> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >
>> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> > -    String HTTP_PREFIX = "http";
>> > +    String HTTP_PREFIX = "http1";
>> >     String MIME_PREFIX = "mime";
>> >     String URN_PREFIX = "urn";
>> >     String COLON_SEPARATOR = ":";
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> How can a namespace prefix conflict with a URI scheme? That sounds
>> like a quick and dirty workaround for a more fundamental issue.
>
> Let me explain it further.. I came up with a WSDL generated by our
> AxisService2WSDL11 class which has the following wsaw:Action for some
> message of some operation.
>
> wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>
> And also there is a namespace declaration in this WSDL as follows..
>
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>
> When I generate the stub for this WSDL, it sets the Action on the stub as
> follows..
>
> _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>
> So this is due to the usage of "http" as a namespace prefix and it has
> treated the http://.. URL as <prefix>:<localname>.

The SOAP action is a URI, not a QName, so there is no reason why the
code generator would interpret "http" as a prefix. I think you should
try to determine why it is doing that instead of working around the
issue by changing the WSDL generation code.

> Thanks,
> ~Isuru
>
>>
>> Andreas
>>
>> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> > Author: isurues
>> > Date: Wed Sep  1 05:47:27 2010
>> > New Revision: 991441
>> >
>> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> > Log:
>> > changing the http prefix from http to http1. This is because, use of
>> > http as a prefix causes conflicts with actual URLs like http://foo.com
>> >
>> > Modified:
>> >
>> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >
>> > Modified:
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > URL:
>> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > (original)
>> > +++
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > Wed Sep  1 05:47:27 2010
>> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >
>> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> > -    String HTTP_PREFIX = "http";
>> > +    String HTTP_PREFIX = "http1";
>> >     String MIME_PREFIX = "mime";
>> >     String URN_PREFIX = "urn";
>> >     String COLON_SEPARATOR = ":";
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <is...@gmail.com> wrote:
>
>
> On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen <an...@gmail.com>
> wrote:
>>
>> How can a namespace prefix conflict with a URI scheme? That sounds
>> like a quick and dirty workaround for a more fundamental issue.
>
> Let me explain it further.. I came up with a WSDL generated by our
> AxisService2WSDL11 class which has the following wsaw:Action for some
> message of some operation.
>
> wsaw:Action="http://www.webtest.org/echoStringMethodRequest"
>
> And also there is a namespace declaration in this WSDL as follows..
>
> xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
>
> When I generate the stub for this WSDL, it sets the Action on the stub as
> follows..
>
> _operationClient.getOptions().setAction("//www.webtest.org/echoStringMethodRequest");
>
> So this is due to the usage of "http" as a namespace prefix and it has
> treated the http://.. URL as <prefix>:<localname>.

The SOAP action is a URI, not a QName, so there is no reason why the
code generator would interpret "http" as a prefix. I think you should
try to determine why it is doing that instead of working around the
issue by changing the WSDL generation code.

> Thanks,
> ~Isuru
>
>>
>> Andreas
>>
>> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
>> > Author: isurues
>> > Date: Wed Sep  1 05:47:27 2010
>> > New Revision: 991441
>> >
>> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
>> > Log:
>> > changing the http prefix from http to http1. This is because, use of
>> > http as a prefix causes conflicts with actual URLs like http://foo.com
>> >
>> > Modified:
>> >
>> >  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> >
>> > Modified:
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > URL:
>> > http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
>> >
>> > ==============================================================================
>> > ---
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > (original)
>> > +++
>> > axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>> > Wed Sep  1 05:47:27 2010
>> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>> >
>> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
>> > -    String HTTP_PREFIX = "http";
>> > +    String HTTP_PREFIX = "http1";
>> >     String MIME_PREFIX = "mime";
>> >     String URN_PREFIX = "urn";
>> >     String COLON_SEPARATOR = ":";
>> >
>> >
>> >
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
>> For additional commands, e-mail: java-dev-help@axis.apache.org
>>
>
>
>
> --
> Technical Lead,
> WSO2 Inc. http://wso2.org/
> Blog : http://isurues.wordpress.com/
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
<an...@gmail.com>wrote:

> How can a namespace prefix conflict with a URI scheme? That sounds
> like a quick and dirty workaround for a more fundamental issue.
>

Let me explain it further.. I came up with a WSDL generated by our
AxisService2WSDL11 class which has the following wsaw:Action for some
message of some operation.

wsaw:Action="http://www.webtest.org/echoStringMethodRequest"

And also there is a namespace declaration in this WSDL as follows..

xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

When I generate the stub for this WSDL, it sets the Action on the stub as
follows..

_operationClient.getOptions().setAction("//
www.webtest.org/echoStringMethodRequest");

So this is due to the usage of "http" as a namespace prefix and it has
treated the http://.. URL as <prefix>:<localname>.

Thanks,
~Isuru


>
> Andreas
>
> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> > Author: isurues
> > Date: Wed Sep  1 05:47:27 2010
> > New Revision: 991441
> >
> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> > Log:
> > changing the http prefix from http to http1. This is because, use of http
> as a prefix causes conflicts with actual URLs like http://foo.com
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> Wed Sep  1 05:47:27 2010
> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >
> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> > -    String HTTP_PREFIX = "http";
> > +    String HTTP_PREFIX = "http1";
> >     String MIME_PREFIX = "mime";
> >     String URN_PREFIX = "urn";
> >     String COLON_SEPARATOR = ":";
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
<an...@gmail.com>wrote:

> How can a namespace prefix conflict with a URI scheme? That sounds
> like a quick and dirty workaround for a more fundamental issue.
>

Let me explain it further.. I came up with a WSDL generated by our
AxisService2WSDL11 class which has the following wsaw:Action for some
message of some operation.

wsaw:Action="http://www.webtest.org/echoStringMethodRequest"

And also there is a namespace declaration in this WSDL as follows..

xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

When I generate the stub for this WSDL, it sets the Action on the stub as
follows..

_operationClient.getOptions().setAction("//
www.webtest.org/echoStringMethodRequest");

So this is due to the usage of "http" as a namespace prefix and it has
treated the http://.. URL as <prefix>:<localname>.

Thanks,
~Isuru


>
> Andreas
>
> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> > Author: isurues
> > Date: Wed Sep  1 05:47:27 2010
> > New Revision: 991441
> >
> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> > Log:
> > changing the http prefix from http to http1. This is because, use of http
> as a prefix causes conflicts with actual URLs like http://foo.com
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> Wed Sep  1 05:47:27 2010
> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >
> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> > -    String HTTP_PREFIX = "http";
> > +    String HTTP_PREFIX = "http1";
> >     String MIME_PREFIX = "mime";
> >     String URN_PREFIX = "urn";
> >     String COLON_SEPARATOR = ":";
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
<an...@gmail.com>wrote:

> How can a namespace prefix conflict with a URI scheme? That sounds
> like a quick and dirty workaround for a more fundamental issue.
>

Let me explain it further.. I came up with a WSDL generated by our
AxisService2WSDL11 class which has the following wsaw:Action for some
message of some operation.

wsaw:Action="http://www.webtest.org/echoStringMethodRequest"

And also there is a namespace declaration in this WSDL as follows..

xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

When I generate the stub for this WSDL, it sets the Action on the stub as
follows..

_operationClient.getOptions().setAction("//
www.webtest.org/echoStringMethodRequest");

So this is due to the usage of "http" as a namespace prefix and it has
treated the http://.. URL as <prefix>:<localname>.

Thanks,
~Isuru


>
> Andreas
>
> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> > Author: isurues
> > Date: Wed Sep  1 05:47:27 2010
> > New Revision: 991441
> >
> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> > Log:
> > changing the http prefix from http to http1. This is because, use of http
> as a prefix causes conflicts with actual URLs like http://foo.com
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> Wed Sep  1 05:47:27 2010
> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >
> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> > -    String HTTP_PREFIX = "http";
> > +    String HTTP_PREFIX = "http1";
> >     String MIME_PREFIX = "mime";
> >     String URN_PREFIX = "urn";
> >     String COLON_SEPARATOR = ":";
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
<an...@gmail.com>wrote:

> How can a namespace prefix conflict with a URI scheme? That sounds
> like a quick and dirty workaround for a more fundamental issue.
>

Let me explain it further.. I came up with a WSDL generated by our
AxisService2WSDL11 class which has the following wsaw:Action for some
message of some operation.

wsaw:Action="http://www.webtest.org/echoStringMethodRequest"

And also there is a namespace declaration in this WSDL as follows..

xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

When I generate the stub for this WSDL, it sets the Action on the stub as
follows..

_operationClient.getOptions().setAction("//
www.webtest.org/echoStringMethodRequest");

So this is due to the usage of "http" as a namespace prefix and it has
treated the http://.. URL as <prefix>:<localname>.

Thanks,
~Isuru


>
> Andreas
>
> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> > Author: isurues
> > Date: Wed Sep  1 05:47:27 2010
> > New Revision: 991441
> >
> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> > Log:
> > changing the http prefix from http to http1. This is because, use of http
> as a prefix causes conflicts with actual URLs like http://foo.com
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> Wed Sep  1 05:47:27 2010
> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >
> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> > -    String HTTP_PREFIX = "http";
> > +    String HTTP_PREFIX = "http1";
> >     String MIME_PREFIX = "mime";
> >     String URN_PREFIX = "urn";
> >     String COLON_SEPARATOR = ":";
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Isuru Suriarachchi <is...@gmail.com>.
On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
<an...@gmail.com>wrote:

> How can a namespace prefix conflict with a URI scheme? That sounds
> like a quick and dirty workaround for a more fundamental issue.
>

Let me explain it further.. I came up with a WSDL generated by our
AxisService2WSDL11 class which has the following wsaw:Action for some
message of some operation.

wsaw:Action="http://www.webtest.org/echoStringMethodRequest"

And also there is a namespace declaration in this WSDL as follows..

xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"

When I generate the stub for this WSDL, it sets the Action on the stub as
follows..

_operationClient.getOptions().setAction("//
www.webtest.org/echoStringMethodRequest");

So this is due to the usage of "http" as a namespace prefix and it has
treated the http://.. URL as <prefix>:<localname>.

Thanks,
~Isuru


>
> Andreas
>
> On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> > Author: isurues
> > Date: Wed Sep  1 05:47:27 2010
> > New Revision: 991441
> >
> > URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> > Log:
> > changing the http prefix from http to http1. This is because, use of http
> as a prefix causes conflicts with actual URLs like http://foo.com
> >
> > Modified:
> >
>  axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> >
> > Modified:
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> > URL:
> http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> >
> ==============================================================================
> > ---
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> (original)
> > +++
> axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> Wed Sep  1 05:47:27 2010
> > @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
> >
> >     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
> >     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> > -    String HTTP_PREFIX = "http";
> > +    String HTTP_PREFIX = "http1";
> >     String MIME_PREFIX = "mime";
> >     String URN_PREFIX = "urn";
> >     String COLON_SEPARATOR = ":";
> >
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-dev-unsubscribe@axis.apache.org
> For additional commands, e-mail: java-dev-help@axis.apache.org
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/

Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
How can a namespace prefix conflict with a URI scheme? That sounds
like a quick and dirty workaround for a more fundamental issue.

Andreas

On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> Author: isurues
> Date: Wed Sep  1 05:47:27 2010
> New Revision: 991441
>
> URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> Log:
> changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com
>
> Modified:
>    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>
> Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
> +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
> @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>
>     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> -    String HTTP_PREFIX = "http";
> +    String HTTP_PREFIX = "http1";
>     String MIME_PREFIX = "mime";
>     String URN_PREFIX = "urn";
>     String COLON_SEPARATOR = ":";
>
>
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
How can a namespace prefix conflict with a URI scheme? That sounds
like a quick and dirty workaround for a more fundamental issue.

Andreas

On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> Author: isurues
> Date: Wed Sep  1 05:47:27 2010
> New Revision: 991441
>
> URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> Log:
> changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com
>
> Modified:
>    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>
> Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
> +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
> @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>
>     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> -    String HTTP_PREFIX = "http";
> +    String HTTP_PREFIX = "http1";
>     String MIME_PREFIX = "mime";
>     String URN_PREFIX = "urn";
>     String COLON_SEPARATOR = ":";
>
>
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
How can a namespace prefix conflict with a URI scheme? That sounds
like a quick and dirty workaround for a more fundamental issue.

Andreas

On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> Author: isurues
> Date: Wed Sep  1 05:47:27 2010
> New Revision: 991441
>
> URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> Log:
> changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com
>
> Modified:
>    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>
> Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
> +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
> @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>
>     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> -    String HTTP_PREFIX = "http";
> +    String HTTP_PREFIX = "http1";
>     String MIME_PREFIX = "mime";
>     String URN_PREFIX = "urn";
>     String COLON_SEPARATOR = ":";
>
>
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
How can a namespace prefix conflict with a URI scheme? That sounds
like a quick and dirty workaround for a more fundamental issue.

Andreas

On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> Author: isurues
> Date: Wed Sep  1 05:47:27 2010
> New Revision: 991441
>
> URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> Log:
> changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com
>
> Modified:
>    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>
> Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
> +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
> @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>
>     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> -    String HTTP_PREFIX = "http";
> +    String HTTP_PREFIX = "http1";
>     String MIME_PREFIX = "mime";
>     String URN_PREFIX = "urn";
>     String COLON_SEPARATOR = ":";
>
>
>

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


Re: svn commit: r991441 - /axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java

Posted by Andreas Veithen <an...@gmail.com>.
How can a namespace prefix conflict with a URI scheme? That sounds
like a quick and dirty workaround for a more fundamental issue.

Andreas

On Wed, Sep 1, 2010 at 07:47,  <is...@apache.org> wrote:
> Author: isurues
> Date: Wed Sep  1 05:47:27 2010
> New Revision: 991441
>
> URL: http://svn.apache.org/viewvc?rev=991441&view=rev
> Log:
> changing the http prefix from http to http1. This is because, use of http as a prefix causes conflicts with actual URLs like http://foo.com
>
> Modified:
>    axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
>
> Modified: axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java
> URL: http://svn.apache.org/viewvc/axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java?rev=991441&r1=991440&r2=991441&view=diff
> ==============================================================================
> --- axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java (original)
> +++ axis/axis2/java/core/trunk/modules/kernel/src/org/apache/axis2/description/java2wsdl/Java2WSDLConstants.java Wed Sep  1 05:47:27 2010
> @@ -45,7 +45,7 @@ public interface Java2WSDLConstants {
>
>     String HTTP_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/http/";
>     String MIME_NAMESPACE = "http://schemas.xmlsoap.org/wsdl/mime/";
> -    String HTTP_PREFIX = "http";
> +    String HTTP_PREFIX = "http1";
>     String MIME_PREFIX = "mime";
>     String URN_PREFIX = "urn";
>     String COLON_SEPARATOR = ":";
>
>
>

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