You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ivelin Ivanov <iv...@apache.org> on 2002/07/23 04:27:25 UTC

[Q] How to match an empty query parameter ?WSDL

I am trying to create a WSDL file for the Feedback wizard to show that it
can be used a web service via HTTP GET binding.

What is an elegant way to match "?WSDL" in the sitemap. The request matcher
acts against the URI and doesn't recognize the query string. The request
parameter matcher on the other hand will only match parameters which have
values. Since the standard for exposing a WSDL descriptor for a service is
to add "?WSDL" to it, it won't be polite to require "?WSDL=true".

So, in the wizard sitemap, I match

<map:match pattern="">
... for the actual wizard ...

how do I do this:

<map:match pattern="?WSDL">
... to display the WSDL file ...



Ivelin




----- Original Message -----
From: "Johannes Koch" <ko...@pixelpark.com>
To: "cocoon-users ML" <co...@xml.apache.org>
Sent: Monday, July 22, 2002 11:21 AM
Subject: How to match jsessionid?


Hi,

I have URLs like this:
'foo.do;jsessionid=abcdefg?bar=blah'

When I try to match it with the wildcard matcher
<map:match pattern="foo*">
   ...
</map:match>
{1} is only '.do'. How can I match the jsessionid part?
--
Johannes Koch  . IT Developer
Pixelpark AG   . http://www.pixelpark.com
Rotherstraße 8 . 10245 Berlin  .  Germany
phone: +49 30 5058 - 1288  .  fax: - 1355


---------------------------------------------------------------------
Please check that your question  has not already been answered in the
FAQ before posting.     <http://xml.apache.org/cocoon/faq/index.html>

To unsubscribe, e-mail:     <co...@xml.apache.org>
For additional commands, e-mail:   <co...@xml.apache.org>



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [Q] How to match an empty query parameter ?WSDL

Posted by Ivelin Ivanov <iv...@apache.org>.

Makes sence now.
Thanks for the assistance, I'll look at the spec and respond.



----- Original Message ----- 
From: "Vadim Gritsenko" <va...@verizon.net>
To: <co...@xml.apache.org>
Sent: Monday, July 22, 2002 10:56 PM
Subject: RE: [Q] How to match an empty query parameter ?WSDL


> > From: Ivelin Ivanov [mailto:ivelin@apache.org]
> > 
> > I still can't get it to work.
> > JDK 1.4, Tomcat 4.0.4, Cocoon 2.1 HEAD, Win XP
> > 
> > Can you send me the whole sitemap?
> 
> Nothing special:
> 
> ...
>     <map:matchers default="wildcard">
>       <map:matcher name="wildcard" logger="sitemap.matcher.wildcard"
> src="org.apache.cocoon.matching.WildcardURIMatcher"/>      <map:matcher
> name="request"  logger="sitemap.matcher.request"
> src="org.apache.cocoon.matching.RequestParameterMatcher"/>
>     </map:matchers>
> ...
>   <map:pipelines>
>     <map:pipeline>
>       <map:match pattern="test">
>         <map:match type="request" pattern="WSDL">
>           <map:redirect-to uri="welcome"/>
>         </map:match>
>       </map:match>
>     </map:pipeline>
>   </map:pipelines>
> 
> 
> 
> > What is your environment?
> 
> JDK 1.3.1, Resin 2.0.4, Cocoon 2.0.3-dev, Win 2K (if it matters).
> 
> 
> ... It seems that difference is feature of Tomcat 4.0.4: it does not
> show request parameter.
> 
> Under resin:
>   REQUEST PARAMETERS:
>   PARAM: 'WSDL' VALUES: '[]'
> 
> Under Tomcat:
>   REQUEST PARAMETERS:
> 
> 
> What servlet spec says about this situation?
> 
> Vadim
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [Q] How to match an empty query parameter ?WSDL

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Ivelin Ivanov [mailto:ivelin@apache.org]
> 
> I still can't get it to work.
> JDK 1.4, Tomcat 4.0.4, Cocoon 2.1 HEAD, Win XP
> 
> Can you send me the whole sitemap?

Nothing special:

...
    <map:matchers default="wildcard">
      <map:matcher name="wildcard" logger="sitemap.matcher.wildcard"
src="org.apache.cocoon.matching.WildcardURIMatcher"/>      <map:matcher
name="request"  logger="sitemap.matcher.request"
src="org.apache.cocoon.matching.RequestParameterMatcher"/>
    </map:matchers>
...
  <map:pipelines>
    <map:pipeline>
      <map:match pattern="test">
        <map:match type="request" pattern="WSDL">
          <map:redirect-to uri="welcome"/>
        </map:match>
      </map:match>
    </map:pipeline>
  </map:pipelines>



> What is your environment?

JDK 1.3.1, Resin 2.0.4, Cocoon 2.0.3-dev, Win 2K (if it matters).


... It seems that difference is feature of Tomcat 4.0.4: it does not
show request parameter.

Under resin:
  REQUEST PARAMETERS:
  PARAM: 'WSDL' VALUES: '[]'

Under Tomcat:
  REQUEST PARAMETERS:


What servlet spec says about this situation?

Vadim



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [Q] How to match an empty query parameter ?WSDL

Posted by Ivelin Ivanov <iv...@apache.org>.
I still can't get it to work.
JDK 1.4, Tomcat 4.0.4, Cocoon 2.1 HEAD, Win XP

Can you send me the whole sitemap?
What is your environment?


----- Original Message ----- 
From: "Vadim Gritsenko" <va...@verizon.net>
To: <co...@xml.apache.org>
Sent: Monday, July 22, 2002 10:13 PM
Subject: RE: [Q] How to match an empty query parameter ?WSDL


> > From: Ivelin Ivanov [mailto:ivelin@apache.org]
> > 
> > 
> > I am trying to create a WSDL file for the Feedback wizard to show that
> it
> > can be used a web service via HTTP GET binding.
> > 
> > What is an elegant way to match "?WSDL" in the sitemap. The request
> matcher
> > acts against the URI and doesn't recognize the query string. The
> request
> > parameter matcher on the other hand will only match parameters which
> have
> > values. Since the standard for exposing a WSDL descriptor for a
> service is
> > to add "?WSDL" to it, it won't be polite to require "?WSDL=true".
> > 
> > So, in the wizard sitemap, I match
> > 
> > <map:match pattern="">
> > ... for the actual wizard ...
> > 
> > how do I do this:
> > 
> > <map:match pattern="?WSDL">
> > ... to display the WSDL file ...
> 
> Works *just* fine:
> 
>       <map:match pattern="x">
>         <map:match type="request" pattern="WSDL">
>           <map:redirect-to uri="welcome"/>
>         </map:match>
>       </map:match>
> 
> With URL: http://localhost:8080/cocoon/x?WSDL
> 
> (?wsdl does not work though: matcher is case-sensitive)
> 
> 
> Vadim
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: [Q] How to match an empty query parameter ?WSDL

Posted by Vadim Gritsenko <va...@verizon.net>.
> From: Ivelin Ivanov [mailto:ivelin@apache.org]
> 
> 
> I am trying to create a WSDL file for the Feedback wizard to show that
it
> can be used a web service via HTTP GET binding.
> 
> What is an elegant way to match "?WSDL" in the sitemap. The request
matcher
> acts against the URI and doesn't recognize the query string. The
request
> parameter matcher on the other hand will only match parameters which
have
> values. Since the standard for exposing a WSDL descriptor for a
service is
> to add "?WSDL" to it, it won't be polite to require "?WSDL=true".
> 
> So, in the wizard sitemap, I match
> 
> <map:match pattern="">
> ... for the actual wizard ...
> 
> how do I do this:
> 
> <map:match pattern="?WSDL">
> ... to display the WSDL file ...

Works *just* fine:

      <map:match pattern="x">
        <map:match type="request" pattern="WSDL">
          <map:redirect-to uri="welcome"/>
        </map:match>
      </map:match>

With URL: http://localhost:8080/cocoon/x?WSDL

(?wsdl does not work though: matcher is case-sensitive)


Vadim



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org