Attaching the wsdl and the schema..

Thanks,
~Isuru

On Tue, Sep 7, 2010 at 2:06 AM, Andreas Veithen
<[email protected]>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 <[email protected]>
> wrote:
> >
> >
> > On Sun, Sep 5, 2010 at 2:24 PM, Andreas Veithen <
> [email protected]>
> > wrote:
> >>
> >> On Sun, Sep 5, 2010 at 05:12, Isuru Suriarachchi <[email protected]>
> >> wrote:
> >> >
> >> >
> >> > On Sat, Sep 4, 2010 at 5:26 PM, Andreas Veithen
> >> > <[email protected]>
> >> > wrote:
> >> >>
> >> >> On Thu, Sep 2, 2010 at 08:39, Isuru Suriarachchi <[email protected]>
> >> >> wrote:
> >> >> >
> >> >> >
> >> >> > On Thu, Sep 2, 2010 at 1:47 AM, Andreas Veithen
> >> >> > <[email protected]>
> >> >> > 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,  <[email protected]> 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: [email protected]
> >> >> >> For additional commands, e-mail: [email protected]
> >> >> >>
> >> >> >
> >> >> >
> >> >> >
> >> >> > --
> >> >> > Technical Lead,
> >> >> > WSO2 Inc. http://wso2.org/
> >> >> > Blog : http://isurues.wordpress.com/
> >> >> >
> >> >>
> >> >> ---------------------------------------------------------------------
> >> >> To unsubscribe, e-mail: [email protected]
> >> >> For additional commands, e-mail: [email protected]
> >> >>
> >> >
> >> >
> >> >
> >> > --
> >> > Technical Lead,
> >> > WSO2 Inc. http://wso2.org/
> >> > Blog : http://isurues.wordpress.com/
> >> >
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: [email protected]
> >> For additional commands, e-mail: [email protected]
> >>
> >
> >
> >
> > --
> > Technical Lead,
> > WSO2 Inc. http://wso2.org/
> > Blog : http://isurues.wordpress.com/
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>


-- 
Technical Lead,
WSO2 Inc. http://wso2.org/
Blog : http://isurues.wordpress.com/
<wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"; xmlns="http://schemas.xmlsoap.org/wsdl/"; xmlns:wsaw="http://www.w3.org/2006/05/addressing/wsdl"; xmlns:tns="http://www.webtest.org/jaxws"; xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"; xmlns:xsd="http://www.w3.org/2001/XMLSchema"; xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"; xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"; xmlns:soap12="http://schemas.xmlsoap.org/wsdl/soap12/"; targetNamespace="http://www.webtest.org/jaxws";>
    <wsdl:types>
        <xsd:schema attributeFormDefault="unqualified" elementFormDefault="unqualified">
            <xsd:import namespace="http://www.webtest.org/jaxws"; schemaLocation="JAXWSService2Service?xsd=JAXWSService2Service_schema1.xsd"/>
        </xsd:schema>
    </wsdl:types>
    <wsdl:message name="echoStringMethod">
        <wsdl:part name="parameters" element="tns:echoStringMethod"/>
    </wsdl:message>
    <wsdl:message name="echoStringMethodResponse">
        <wsdl:part name="parameters" element="tns:echoStringMethodResponse"/>
    </wsdl:message>
    <wsdl:portType name="JAXWSService2ServicePortType">
        <wsdl:operation name="echoStringMethod">
            <wsdl:input message="tns:echoStringMethod" wsaw:Action="http://www.webtest.org/jaxws/WSASJAX_Service2/echoStringMethodRequest"/>
            <wsdl:output message="tns:echoStringMethodResponse" wsaw:Action="http://www.webtest.org/jaxws/WSASJAX_Service2/echoStringMethodResponse"/>
        </wsdl:operation>
    </wsdl:portType>
    <wsdl:binding name="WSASJAX_Service2PortBinding" type="tns:JAXWSService2ServicePortType">
        <soap:binding transport="http://schemas.xmlsoap.org/soap/http"; style="document"/>
        <wsdl:operation name="echoStringMethod">
            <soap:operation soapAction="" style="document"/>
            <wsdl:input>
                <soap:body use="literal"/>
            </wsdl:input>
            <wsdl:output>
                <soap:body use="literal"/>
            </wsdl:output>
        </wsdl:operation>
    </wsdl:binding>
    <wsdl:service name="JAXWSService2Service">
        <wsdl:port name="JAXWSService2ServicehttpWSASJAX_Service2PortBindingEndpoint" binding="tns:WSASJAX_Service2PortBinding">
            <soap:address location="http://10.100.1.137:9763/services/JAXWSService2Service.JAXWSService2ServicehttpWSASJAX_Service2PortBindingEndpoint/"/>
        </wsdl:port>
        <wsdl:port name="JAXWSService2ServicehttpsWSASJAX_Service2PortBindingEndpoint" binding="tns:WSASJAX_Service2PortBinding">
            <soap:address location="https://10.100.1.137:9443/services/JAXWSService2Service.JAXWSService2ServicehttpsWSASJAX_Service2PortBindingEndpoint/"/>
        </wsdl:port>
    </wsdl:service>
</wsdl:definitions>

Attachment: JAXWSService2Service_schema1.xsd
Description: XML document

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to