You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cxf.apache.org by "Glen Mazza (JIRA)" <ji...@apache.org> on 2008/04/02 02:49:25 UTC

[jira] Commented: (CXF-1497) Supplied WSDL soap:address not being updated with actual host name when queried.

    [ https://issues.apache.org/jira/browse/CXF-1497?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12584372#action_12584372 ] 

Glen Mazza commented on CXF-1497:
---------------------------------

OK, Brent, I tried to duplicate your issue with my ReallySlowAdder web service sample[1].  Good news-- I *wasn't* able to duplicate your problem with either CXF or Metro.  In the pre-WAR wsdl directory I placed both a dummy soap:address of "sdkljfh" and another of an empty string, and in both cases, calling the WSDL URL (http://localhost:8080/ReallySlowAdder/services/ReallySlowAdder?wsdl) from the browser gave the correct soap:address.

Please note, if you are trying to view the WSDL by using a file system viewer from within Tomcat  (such as from Windows explorer), you will *not* see the translation.  The WSDL file does *not* change when viewed from the file system--it is only when you access it from the browser using an http:// request will you see the address updated.

As for your Echo sample, I was able to duplicate your problem but noticed some issues, any of which might be the problem:

1.)  Following my note #4 here[2], you are not providing a "C" in your web.xml--you tie it just to * while I am using "/services/*" (see Step #7 of [2]).  The CXF link given at the bottom of note #4 seems to indicate a "C" is needed.

2.) You are not using a cxf-servlet.xml file (see Step #8 of [2], "cxf-servlet.xml")--that is used for "D", however your alternative instantiation method of relying on org.springframework.web.context.ContextLoaderListener in your web.xml should be OK anyway, but you are *not* defining an apparently necessary url-pattern in your application context (see Step #8 of [2], "sun-jaxws.xml", and the cxf link given at the bottom of note #4 at [1])

3.) The way you are declaring your wsdl in your servicecontext.xml seems suspect--this is what I see:

<jaxws:endpoint id="EchoService" implementor="#EchoServiceImpl"
        address="/EchoService" wsdlLocation="../wsdl/EchoService.wsdl">
</jaxws:endpoint>

I'm unsure, but wsdlLocation may mean "hardcoded WSDL, don't change the soap:address", but anyway Step #8 of [2], "sun-jaxws.xml", and the cxf link given at the bottom of note #4 at [1] seems to indicate -->wsdl="WEB-INF/<--...." should be used instead.  I changed this, and it still wouldn't work.  I think the biggest problem may be that you're missing the url-pattern in your jaxws:endpoint, but am unsure.

Long story short:  Give yourself a "C" value for (1), provide a url-pattern for (2), and (3) switch to wsdl="WEB-INF..." instead of wsdlLocation="../wsdl..."
If that still doesn't work revert to a cxf-servlet.xml file as in my example([1] or [2]) and remove ContextLoaderListener from your web.xml.  If the last part works, then we have a CXF bug, because configuration via ContextLoaderListener in addition to cxf-servlet.xml does need to work.

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20080308
[2] http://www.jroller.com/gmazza/date/20071019#notes


> Supplied WSDL soap:address not being updated with actual host name when queried.
> --------------------------------------------------------------------------------
>
>                 Key: CXF-1497
>                 URL: https://issues.apache.org/jira/browse/CXF-1497
>             Project: CXF
>          Issue Type: Test
>            Reporter: Brent Moore
>         Attachments: echo-ws.war.zip
>
>


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.