Need assistance re: ServiceConstructionException

2008-03-09 Thread Wolf, Chris (IT)
Before posting this, I looked at the JAX-WS spec (although I could only
find 2.1) and searched
the message archives.  Before resorting to downloading the CXF source
and building 
CXF from scratch so I can debug this problem, I am hoping someone can
help.
 
I created a service with a number of operations, based on the
wsdl_first sample.
Everything works great in the Jetty-embedded configuration, however,
when I try
to prepare a WAR deployment, and deploy to Tomcat, I receive the
following cryptic error:

Mar 09 10:01:15 bw26wolfch  [] 2 Error
org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadmin
]
Servlet /secadmin threw load() exception
org.apache.cxf.service.factory.ServiceConstructionException:
Could not find definition for service
{http://services.secadmin.cis.ms.com/}SecAdminImplService.

The generated service interface is:
com.ms.cis.secadmin.services.SecAdmin

The implementation class is:
com.ms.cis.secadmin.services.SecAdminImpl

*** So why is it looking for SecAdminImplService?  Why is it appending
Service?


The relevant configuration settings are:

WSDL:

wsdl:definitions name=SecAdmin
targetNamespace=http://services.secadmin.cis.ms.com; 
[...]
wsdl:portType name=SecAdmin
[...]
wsdl:binding name=SecAdmin_SOAPBinding type=tns:SecAdmin
[...]
wsdl:service name=SecAdmin
wsdl:port binding=tns:SecAdmin_SOAPBinding name=secadmin
soap:address location=http://localhost:8080/secadmin/
/wsdl:port
/wsdl:service

CXF-SERVLET:

beans xmlns=http://www.springframework.org/schema/beans;
[...]
  jaxws:endpoint
id=secadmin
implementor=com.ms.cis.secadmin.services.SecAdminImpl
wsdlLocation=WEB-INF/wsdl/secadmin.wsdl
address=/secadmin
jaxws:features
  bean class=org.apache.cxf.feature.LoggingFeature/
/jaxws:features
  /jaxws:endpoint
/beans


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.


Exposing java Map fields using CXF to C++ code

2008-03-09 Thread Maxim Veksler
Hi,


I would like to get the general idea of what can be done with CXF or with
SOAP in general.

Can I use this library to expose java.util.Map based interface for Java,
C++, php, python and co. code.
I would like my user to pass me a list of parameters of Map String,
ListString, which would be used as parameters for implementation class.


Is this possible with CXF or even with SOAP in general ?


Thank you,
Maxim.

-- 
Cheers,
Maxim Veksler

Free as in Freedom - Do u GNU ?


Re: Exposing java Map fields using CXF to C++ code

2008-03-09 Thread Benson Margulies
CXF can expose a Map in one of three ways:

1) Using the Aegis databinding, CXF will automatically generate a schema
from a Map. Other fully-compliant kits should be able to build clients from
the WSDL that results. It won't, however, necessarily translate into a 'Map'
on the client side.

2) Using CXF 2.1, still in snapshot only, you can use the complex JAXB
mechanisms that allow support for maps.

3) You can roll your own: probably more like an explicit

ListMap.Entrykey, value



On Sun, Mar 9, 2008 at 10:34 AM, Maxim Veksler [EMAIL PROTECTED]
wrote:

 Hi,


 I would like to get the general idea of what can be done with CXF or with
 SOAP in general.

 Can I use this library to expose java.util.Map based interface for Java,
 C++, php, python and co. code.
 I would like my user to pass me a list of parameters of Map String,
 ListString, which would be used as parameters for implementation class.


 Is this possible with CXF or even with SOAP in general ?


 Thank you,
 Maxim.

 --
 Cheers,
 Maxim Veksler

 Free as in Freedom - Do u GNU ?



Re: Need assistance re: ServiceConstructionException

2008-03-09 Thread Glen Mazza
Check your serviceName value for the @javax.jws.WebService annotation
preceding your web service's implementation class, like here:
http://www.jroller.com/gmazza/date/20080308#MTstep6

HTH,
Glen

Am Sonntag, den 09.03.2008, 11:04 -0400 schrieb Wolf, Chris (IT):
 Before posting this, I looked at the JAX-WS spec (although I could only
 find 2.1) and searched
 the message archives.  Before resorting to downloading the CXF source
 and building 
 CXF from scratch so I can debug this problem, I am hoping someone can
 help.
  
 I created a service with a number of operations, based on the
 wsdl_first sample.
 Everything works great in the Jetty-embedded configuration, however,
 when I try
 to prepare a WAR deployment, and deploy to Tomcat, I receive the
 following cryptic error:
 
 Mar 09 10:01:15 bw26wolfch  [] 2 Error
 org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadmin
 ]
 Servlet /secadmin threw load() exception
 org.apache.cxf.service.factory.ServiceConstructionException:
 Could not find definition for service
 {http://services.secadmin.cis.ms.com/}SecAdminImplService.
 
 The generated service interface is:
 com.ms.cis.secadmin.services.SecAdmin
 
 The implementation class is:
 com.ms.cis.secadmin.services.SecAdminImpl
 
 *** So why is it looking for SecAdminImplService?  Why is it appending
 Service?
 
 
 The relevant configuration settings are:
 
 WSDL:
 
 wsdl:definitions name=SecAdmin
 targetNamespace=http://services.secadmin.cis.ms.com; 
 [...]
 wsdl:portType name=SecAdmin
 [...]
 wsdl:binding name=SecAdmin_SOAPBinding type=tns:SecAdmin
 [...]
 wsdl:service name=SecAdmin
 wsdl:port binding=tns:SecAdmin_SOAPBinding name=secadmin
 soap:address location=http://localhost:8080/secadmin/
 /wsdl:port
 /wsdl:service
 
 CXF-SERVLET:
 
 beans xmlns=http://www.springframework.org/schema/beans;
 [...]
   jaxws:endpoint
 id=secadmin
 implementor=com.ms.cis.secadmin.services.SecAdminImpl
 wsdlLocation=WEB-INF/wsdl/secadmin.wsdl
 address=/secadmin
 jaxws:features
   bean class=org.apache.cxf.feature.LoggingFeature/
 /jaxws:features
   /jaxws:endpoint
 /beans
 
 
 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.



RE: Need assistance re: ServiceConstructionException

2008-03-09 Thread Wolf, Chris (IT)
Glen,

Thanks so much for helping me - that was the issue.  I actually did not
even have
a WebService annotation in my implementation class, because I did
wsdl-first and
thought the WebService annotation in the generated SEI was sufficient.
If the implementation
class implements the SEI, I don't see why the WebService annotation is
needed in both,
but whatever, all I care about (right now) is that it no longer throws
an exception.

Thanks,

  -Chris



-Original Message-
From: Glen Mazza [mailto:[EMAIL PROTECTED] 
Sent: Sunday, March 09, 2008 5:09 PM
To: cxf-user@incubator.apache.org
Subject: Re: Need assistance re: ServiceConstructionException

Check your serviceName value for the @javax.jws.WebService annotation
preceding your web service's implementation class, like here:
http://www.jroller.com/gmazza/date/20080308#MTstep6

HTH,
Glen

Am Sonntag, den 09.03.2008, 11:04 -0400 schrieb Wolf, Chris (IT):
 Before posting this, I looked at the JAX-WS spec (although I could 
 only find 2.1) and searched the message archives.  Before resorting to

 downloading the CXF source and building CXF from scratch so I can 
 debug this problem, I am hoping someone can help.
  
 I created a service with a number of operations, based on the 
 wsdl_first sample.
 Everything works great in the Jetty-embedded configuration, however, 
 when I try to prepare a WAR deployment, and deploy to Tomcat, I 
 receive the following cryptic error:
 
 Mar 09 10:01:15 bw26wolfch  [] 2 Error 
 org/apache/catalina/core/ContainerBase/[Catalina]/[localhost]/[/secadm
 in
 ]
 Servlet /secadmin threw load() exception
 org.apache.cxf.service.factory.ServiceConstructionException:
 Could not find definition for service
 {http://services.secadmin.cis.ms.com/}SecAdminImplService.
 
 The generated service interface is:
 com.ms.cis.secadmin.services.SecAdmin
 
 The implementation class is:
 com.ms.cis.secadmin.services.SecAdminImpl
 
 *** So why is it looking for SecAdminImplService?  Why is it 
 appending Service?
 
 
 The relevant configuration settings are:
 
 WSDL:
 
 wsdl:definitions name=SecAdmin
 targetNamespace=http://services.secadmin.cis.ms.com; 
 [...]
 wsdl:portType name=SecAdmin
 [...]
 wsdl:binding name=SecAdmin_SOAPBinding type=tns:SecAdmin [...] 
 wsdl:service name=SecAdmin
 wsdl:port binding=tns:SecAdmin_SOAPBinding name=secadmin
 soap:address location=http://localhost:8080/secadmin/
 /wsdl:port
 /wsdl:service
 
 CXF-SERVLET:
 
 beans xmlns=http://www.springframework.org/schema/beans;
 [...]
   jaxws:endpoint
 id=secadmin
 implementor=com.ms.cis.secadmin.services.SecAdminImpl
 wsdlLocation=WEB-INF/wsdl/secadmin.wsdl
 address=/secadmin
 jaxws:features
   bean class=org.apache.cxf.feature.LoggingFeature/
 /jaxws:features
   /jaxws:endpoint
 /beans
 
 
 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.


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.


Need help for XMLStreamException: ParseError at [row,col]:[1,1]

2008-03-09 Thread 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/cxf-user@incubator.apache.org/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.


Re: Need help for XMLStreamException: ParseError at [row,col]:[1,1]

2008-03-09 Thread Glen Mazza
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/cxf-user@incubator.apache.org/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.