What are you putting in the WAR file--the web service or the SOAP
client?

Also, I'm unsure if you should be relying on the autogenerated
client--that is primarily a helper file not really part of JAX-WS
(GlassFish Metro I don't think provides it.)  I've never bothered using
it.

The first thing to check is to make sure that you can access the Web
Service's wsdl from a browser after you have deployed it to Tomcat--if
you can't, then no client will ever work.  (Check [2] for how WSDL URLs
are created using Tomcat and CXF.) Once you know you can access the wsdl
from a browser, you should be able to manually create a client similar
in appearance to the example here[3] or here[4].

HTH,
Glen

[1] http://www.jroller.com/gmazza/date/20080308#MTstep9
[2] http://www.jroller.com/gmazza/date/20071019#notes (note #4)
[3] http://www.jroller.com/gmazza/entry/using_the_ebay_shopping_api1
(step #7)
[4] http://www.jroller.com/gmazza/date/20070929

Am Montag, den 10.03.2008, 00:01 -0400 schrieb Wolf, Chris (IT):
> I know this issue has been discussed before, because I found a
> description
> and apparent fix here: 
> 
> http://www.mail-archive.com/[email protected]/msg04687.html 
> 
> However, putting the updated Xerces and Xalan in the
> TOMCAT/common/endorsed
> directory did not solve the issue for me.
> 
> If I deploy my service as a standalone service embedded in Jetty, 
> (generated via "wsdl2java -server")it works,
> but when I configure it for WAR deployment in Tomcat-5.5, the client 
> (generated via "wsdl2java -client")  throws the exception shown below.
> 
> Also when deployed in standalone mode I can retrieve the WSDL via HTTP
> GET,
> but when depoyed as a WAR in Tomcat, I just get a 404 error.  
> 
> When I used the TCP/IP Monitor (Eclipse plugin similar to tcpmon) I see
> the
> that Client is sending the expected SOAP envelope, but is getting
> nothing
> back, however, with HTTP 301 or 302 response codes.  I double checked my
> proxy settings
> in Eclipse and browser and have verified that both "localhost" and the
> canonical
> hostname are excluded from proxying.  I tried both "localhost" and the
> canonical
> hostname in the request. (overriding via
> BindingProvider.ENDPOINT_ADDRESS_PROPERTY)
> 
> Any help would be greatly appreciated.
> 
>    -Chris
> 
> Mar 9, 2008 6:00:44 PM org.apache.cxf.phase.PhaseInterceptorChain
> doIntercept
> INFO: Interceptor has thrown exception, unwinding now
> org.apache.cxf.binding.soap.SoapFault: Error reading XMLStreamReader.
>       at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
> sage(ReadHeadersInterceptor.java:191)
> [...]
>       at
> com.ms.cis.secadmin.services.SecAdmin_Secadmin_Client.main(SecAdmin_Seca
> dmin_Client.java:60)
> Caused by: javax.xml.stream.XMLStreamException: ParseError at
> [row,col]:[1,1]
> Message: Premature end of file.
>       at com.sun.xml.stream.XMLReaderImpl.next(XMLReaderImpl.java:563)
>       at
> com.sun.xml.stream.XMLReaderImpl.nextTag(XMLReaderImpl.java:1177)
>       at
> org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMes
> sage(ReadHeadersInterceptor.java:85)
>       ... 15 more
> --------------------------------------------------------
> 
> NOTICE: If received in error, please destroy and notify sender. Sender does 
> not intend to waive confidentiality or privilege. Use of this email is 
> prohibited when received in error.

Reply via email to