Re: Exception object has all fields set to NULL on client side

2008-01-10 Thread rkannan

I did some debugging of the CXF code and figured the following: There is a
call to a method in StaxUtils that parses the SOAP fault response. It
correctly identifies values for all headers except detail. As a result a
NULL value is returned for fault detail; the created exception object
therefore has its member variables uninitialized. This could be a bug in
CXF. Maybe we need to include some jar file that has correct implementation
for parsing the SOAP fault. This is a serious block. 

- Kannan 


rkannan wrote:
 
 I am throwing an exception from server side but on the client side the
 exception object has all the fields set to NULL. I checked the incoming
 SOAP fault message and it has correct values for the fields. I believe the
 correct jar files are not being used because I had a similar problem in
 sending List data types as parameters and it was fixed by adding asm.jar.
 I am using Wrapped Doc/Lit with the following dependencies on client:
 
 --
 dependency
 groupIdjunit/groupId
 artifactIdjunit/artifactId
 version4.1/version
 scopeprovided/scope
 /dependency
   
dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-frontend-jaxws/artifactId
 version${cxf.version}/version
 /dependency
   
   
   dependency
 groupIdorg.apache.cxf/groupId
 artifactIdcxf-rt-transports-http/artifactId
 version${cxf.version}/version
 /dependency
   
   dependency
 groupIdasm/groupId
 artifactIdasm/artifactId
 version3.0/version
 /dependency
 --
 
 If it really is a problem with using the correct jar files, it will be
 very helpful to get a list of jars that need to be used on server and
 client side to enable web service using CXF. I read the WHICH_JARS file
 that is part of CXF download, but adding them has not solved my problem.
 Can someone point out which classes are absolutely needed to handle
 fault/exception objects properly? 
 
 Thanks,
 Kannan
 

-- 
View this message in context: 
http://www.nabble.com/Exception-object-has-all-fields-set-to-NULL-on-client-side-tp14723440p14729912.html
Sent from the cxf-user mailing list archive at Nabble.com.



Some basic question on wsdl generated services

2008-01-10 Thread Mayank Thakore
Hi,

Few basic questions:

1. If we generate service implementation objects using wsdl2java, is it
possible to avoid it referring back to the wsdl file in the annotations?

2. The generated implementation mentions the port name in the annotations.
So how can we use the same implementation for two ports (say one http, other
jms)? Will we have to delegate the calls to some common class?

Thanks!

Regards
Mayank 
 


 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!





Question regarding jms destination

2008-01-10 Thread Mayank Thakore
Hi,

For JMS, we specify the endpoint to register the service when invoking
Endpoint.publish(address, impl)

Also, we specify the url as the jndiDestinationName attribute of jms:address
element in the wsdl port definition.

The jndiDestinationName must be registered in jndi server or name not found
exception is thrown.

So, if we are giving the jndi destination url in wsdl file, what is the use
of giving the endpoint address when calling Endpoint.publish(string,
object)?

What does this message in the logs imply (I gave this url to
Endpoint.publish whereas, in wsdl I am using the url jms://MyQueue):

INFO: Setting the server's publish address to be jms://MyNew2Queue

I realize that it works properly if we give the same url at both the places
and have the destination registered in jndi.

Thanks much for the help!

Regards
Mayank
 


 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!





Re: WS-Security

2008-01-10 Thread priya j

Hi William,
The sample WS-Security works fine, when i try implementing to my application
i face the prob in wsdl2java
I think the prob is b'cos i have some reference bean, can you tell me how to
over come.
My server and client works fine without the security.
this is my wsdl file
  ?xml version=1.0 encoding=utf-8 ? 
- wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:tns=http://server.news.wssoap.sfe.sphsearch.sg/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=NewsWebService
targetNamespace=http://server.news.wssoap.sfe.sphsearch.sg/;
- wsdl:types
- xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://sfe.sphsearch.sg;
xmlns:ns1=http://server.news.wssoap.sfe.sphsearch.sg/;
attributeFormDefault=unqualified elementFormDefault=qualified
targetNamespace=http://sfe.sphsearch.sg;
  xs:import namespace=http://server.news.wssoap.sfe.sphsearch.sg/; / 
- xs:complexType name=searchFrontEndService
- xs:sequence
  xs:element minOccurs=0 name=service
type=ns1:comperioFrontEndServiceSearch / 
  /xs:sequence
  /xs:complexType
  /xs:schema
- xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://server.news.wssoap.sfe.sphsearch.sg/;
xmlns:ns0=http://sfe.sphsearch.sg; attributeFormDefault=unqualified
elementFormDefault=unqualified
targetNamespace=http://server.news.wssoap.sfe.sphsearch.sg/;
  xs:complexType name=comperioFrontEndServiceSearch / 
  xs:element name=getService type=getService / 
- xs:complexType name=getService
  xs:sequence / 
  /xs:complexType
  xs:element name=getServiceResponse type=getServiceResponse / 
- xs:complexType name=getServiceResponse
- xs:sequence
  xs:element minOccurs=0 name=return type=ns0:searchFrontEndService
/ 
  /xs:sequence
  /xs:complexType
  xs:element name=WebService type=WebService / 
- xs:complexType name=WebService
- xs:sequence
  xs:element minOccurs=0 name=arg0 type=xs:string / 
  xs:element minOccurs=0 name=arg1 type=xs:string / 
  xs:element minOccurs=0 name=arg2 type=xs:int / 
  /xs:sequence
  /xs:complexType
  xs:element name=WebServiceResponse type=WebServiceResponse / 
- xs:complexType name=WebServiceResponse
- xs:sequence
  xs:element minOccurs=0 name=return type=xs:string / 
  /xs:sequence
  /xs:complexType
  xs:element name=setService type=setService / 
- xs:complexType name=setService
- xs:sequence
  xs:element minOccurs=0 name=arg0 type=ns0:searchFrontEndService / 
  /xs:sequence
  /xs:complexType
  xs:element name=setServiceResponse type=setServiceResponse / 
- xs:complexType name=setServiceResponse
  xs:sequence / 
  /xs:complexType
  /xs:schema
  /wsdl:types
- wsdl:message name=setService
  wsdl:part element=tns:setService name=parameters / 
  /wsdl:message
- wsdl:message name=WebService
  wsdl:part element=tns:WebService name=parameters / 
  /wsdl:message
- wsdl:message name=getService
  wsdl:part element=tns:getService name=parameters / 
  /wsdl:message
- wsdl:message name=WebServiceResponse
  wsdl:part element=tns:WebServiceResponse name=parameters / 
  /wsdl:message
- wsdl:message name=getServiceResponse
  wsdl:part element=tns:getServiceResponse name=parameters / 
  /wsdl:message
- wsdl:message name=setServiceResponse
  wsdl:part element=tns:setServiceResponse name=parameters / 
  /wsdl:message
- wsdl:portType name=INewsWebService
- wsdl:operation name=getService
  wsdl:input message=tns:getService name=getService / 
  wsdl:output message=tns:getServiceResponse name=getServiceResponse / 
  /wsdl:operation
- wsdl:operation name=WebService
  wsdl:input message=tns:WebService name=WebService / 
  wsdl:output message=tns:WebServiceResponse name=WebServiceResponse / 
  /wsdl:operation
- wsdl:operation name=setService
  wsdl:input message=tns:setService name=setService / 
  wsdl:output message=tns:setServiceResponse name=setServiceResponse / 
  /wsdl:operation
  /wsdl:portType
- wsdl:binding name=NewsWebServiceSoapBinding type=tns:INewsWebService
  soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http; / 
- wsdl:operation name=getService
  soap:operation soapAction= style=document / 
- wsdl:input name=getService
  soap:body use=literal / 
  /wsdl:input
- wsdl:output name=getServiceResponse
  soap:body use=literal / 
  /wsdl:output
  /wsdl:operation
- wsdl:operation name=WebService
  soap:operation soapAction= style=document / 
- wsdl:input name=WebService
  soap:body use=literal / 
  /wsdl:input
- wsdl:output name=WebServiceResponse
  soap:body use=literal / 
  /wsdl:output
  /wsdl:operation
- wsdl:operation name=setService
  soap:operation soapAction= style=document / 
- wsdl:input name=setService
  soap:body use=literal / 
  /wsdl:input
- wsdl:output name=setServiceResponse
  soap:body use=literal / 
  /wsdl:output
  /wsdl:operation
  /wsdl:binding
- wsdl:service name=NewsWebService
- wsdl:port binding=tns:NewsWebServiceSoapBinding
name=NewsWebServicePort
  soap:address location=http://localhost:8080/sfe/news; / 
  /wsdl:port
  /wsdl:service
  

Re: WS-Security

2008-01-10 Thread priya j

Hi William,
The sample WS-Security works fine, when i try implementing to my application
i face the prob in wsdl2java
I think the prob is b'cos i have some reference bean, can you tell me how to
over come.
My server and client works fine without the security.
this is my wsdl file
  ?xml version=1.0 encoding=utf-8 ?
- wsdl:definitions xmlns:wsdl=http://schemas.xmlsoap.org/wsdl/;
xmlns:soap=http://schemas.xmlsoap.org/wsdl/soap/;
xmlns:tns=http://server.news.wssoap.sfe.sphsearch.sg/;
xmlns:xsd=http://www.w3.org/2001/XMLSchema; name=NewsWebService
targetNamespace=http://server.news.wssoap.sfe.sphsearch.sg/;
- wsdl:types
- xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://sfe.sphsearch.sg;
xmlns:ns1=http://server.news.wssoap.sfe.sphsearch.sg/;
attributeFormDefault=unqualified elementFormDefault=qualified
targetNamespace=http://sfe.sphsearch.sg;
  xs:import namespace=http://server.news.wssoap.sfe.sphsearch.sg/; /
- xs:complexType name=searchFrontEndService
- xs:sequence
  xs:element minOccurs=0 name=service
type=ns1:comperioFrontEndServiceSearch /
  /xs:sequence
  /xs:complexType
  /xs:schema
- xs:schema xmlns:xs=http://www.w3.org/2001/XMLSchema;
xmlns=http://server.news.wssoap.sfe.sphsearch.sg/;
xmlns:ns0=http://sfe.sphsearch.sg; attributeFormDefault=unqualified
elementFormDefault=unqualified
targetNamespace=http://server.news.wssoap.sfe.sphsearch.sg/;
  xs:complexType name=comperioFrontEndServiceSearch /
  xs:element name=getService type=getService /
- xs:complexType name=getService
  xs:sequence /
  /xs:complexType
  xs:element name=getServiceResponse type=getServiceResponse /
- xs:complexType name=getServiceResponse
- xs:sequence
  xs:element minOccurs=0 name=return type=ns0:searchFrontEndService
/
  /xs:sequence
  /xs:complexType
  xs:element name=WebService type=WebService /
- xs:complexType name=WebService
- xs:sequence
  xs:element minOccurs=0 name=arg0 type=xs:string /
  xs:element minOccurs=0 name=arg1 type=xs:string /
  xs:element minOccurs=0 name=arg2 type=xs:int /
  /xs:sequence
  /xs:complexType
  xs:element name=WebServiceResponse type=WebServiceResponse /
- xs:complexType name=WebServiceResponse
- xs:sequence
  xs:element minOccurs=0 name=return type=xs:string /
  /xs:sequence
  /xs:complexType
  xs:element name=setService type=setService /
- xs:complexType name=setService
- xs:sequence
  xs:element minOccurs=0 name=arg0 type=ns0:searchFrontEndService /
  /xs:sequence
  /xs:complexType
  xs:element name=setServiceResponse type=setServiceResponse /
- xs:complexType name=setServiceResponse
  xs:sequence /
  /xs:complexType
  /xs:schema
  /wsdl:types
- wsdl:message name=setService
  wsdl:part element=tns:setService name=parameters /
  /wsdl:message
- wsdl:message name=WebService
  wsdl:part element=tns:WebService name=parameters /
  /wsdl:message
- wsdl:message name=getService
  wsdl:part element=tns:getService name=parameters /
  /wsdl:message
- wsdl:message name=WebServiceResponse
  wsdl:part element=tns:WebServiceResponse name=parameters /
  /wsdl:message
- wsdl:message name=getServiceResponse
  wsdl:part element=tns:getServiceResponse name=parameters /
  /wsdl:message
- wsdl:message name=setServiceResponse
  wsdl:part element=tns:setServiceResponse name=parameters /
  /wsdl:message
- wsdl:portType name=INewsWebService
- wsdl:operation name=getService
  wsdl:input message=tns:getService name=getService /
  wsdl:output message=tns:getServiceResponse name=getServiceResponse /
  /wsdl:operation
- wsdl:operation name=WebService
  wsdl:input message=tns:WebService name=WebService /
  wsdl:output message=tns:WebServiceResponse name=WebServiceResponse /
  /wsdl:operation
- wsdl:operation name=setService
  wsdl:input message=tns:setService name=setService /
  wsdl:output message=tns:setServiceResponse name=setServiceResponse /
  /wsdl:operation
  /wsdl:portType
- wsdl:binding name=NewsWebServiceSoapBinding type=tns:INewsWebService
  soap:binding style=document
transport=http://schemas.xmlsoap.org/soap/http; /
- wsdl:operation name=getService
  soap:operation soapAction= style=document /
- wsdl:input name=getService
  soap:body use=literal /
  /wsdl:input
- wsdl:output name=getServiceResponse
  soap:body use=literal /
  /wsdl:output
  /wsdl:operation
- wsdl:operation name=WebService
  soap:operation soapAction= style=document /
- wsdl:input name=WebService
  soap:body use=literal /
  /wsdl:input
- wsdl:output name=WebServiceResponse
  soap:body use=literal /
  /wsdl:output
  /wsdl:operation
- wsdl:operation name=setService
  soap:operation soapAction= style=document /
- wsdl:input name=setService
  soap:body use=literal /
  /wsdl:input
- wsdl:output name=setServiceResponse
  soap:body use=literal /
  /wsdl:output
  /wsdl:operation
  /wsdl:binding
- wsdl:service name=NewsWebService
- wsdl:port binding=tns:NewsWebServiceSoapBinding
name=NewsWebServicePort
  soap:address location=http://localhost:8080/sfe/news; /
  /wsdl:port
  /wsdl:service
  /wsdl:definitions

Thanks inadvance, Pls reply 

RE: Question regarding jms destination

2008-01-10 Thread Bhole, Ulhas
Hi Mayank,

JMS transport ignores the address specified in endpoint.publish() and acts upon 
anything that is set in JMS WSDL Entensor. Having said this, you do need the 
address starting with jms:// to let CXF stack know which transport to pickup if 
you skip this CXF will assume default HTTP transport and will try to load HTTP 
transport. 

Regards,

Ulhas Bhole

-Original Message-
From: Mayank Thakore [mailto:[EMAIL PROTECTED] 
Sent: 10 January 2008 09:48
To: cxf-user@incubator.apache.org
Subject: Question regarding jms destination

Hi,

For JMS, we specify the endpoint to register the service when invoking
Endpoint.publish(address, impl)

Also, we specify the url as the jndiDestinationName attribute of jms:address
element in the wsdl port definition.

The jndiDestinationName must be registered in jndi server or name not found
exception is thrown.

So, if we are giving the jndi destination url in wsdl file, what is the use
of giving the endpoint address when calling Endpoint.publish(string,
object)?

What does this message in the logs imply (I gave this url to
Endpoint.publish whereas, in wsdl I am using the url jms://MyQueue):

INFO: Setting the server's publish address to be jms://MyNew2Queue

I realize that it works properly if we give the same url at both the places
and have the destination registered in jndi.

Thanks much for the help!

Regards
Mayank
 


 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


RE: Question regarding jms destination

2008-01-10 Thread Mayank Thakore
Hi Ulhas,

If we want to publish the same service over multiple jms channels will we
have to define a port for each of them in the wsdl file?

Thanks!

Regards
Mayank 

-Original Message-
From: Bhole, Ulhas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 15:59
To: cxf-user@incubator.apache.org; [EMAIL PROTECTED]
Subject: RE: Question regarding jms destination

Hi Mayank,

JMS transport ignores the address specified in endpoint.publish() and acts
upon anything that is set in JMS WSDL Entensor. Having said this, you do
need the address starting with jms:// to let CXF stack know which transport
to pickup if you skip this CXF will assume default HTTP transport and will
try to load HTTP transport. 

Regards,

Ulhas Bhole

-Original Message-
From: Mayank Thakore [mailto:[EMAIL PROTECTED] 
Sent: 10 January 2008 09:48
To: cxf-user@incubator.apache.org
Subject: Question regarding jms destination

Hi,

For JMS, we specify the endpoint to register the service when invoking
Endpoint.publish(address, impl)

Also, we specify the url as the jndiDestinationName attribute of jms:address
element in the wsdl port definition.

The jndiDestinationName must be registered in jndi server or name not found
exception is thrown.

So, if we are giving the jndi destination url in wsdl file, what is the use
of giving the endpoint address when calling Endpoint.publish(string,
object)?

What does this message in the logs imply (I gave this url to
Endpoint.publish whereas, in wsdl I am using the url jms://MyQueue):

INFO: Setting the server's publish address to be jms://MyNew2Queue

I realize that it works properly if we give the same url at both the places
and have the destination registered in jndi.

Thanks much for the help!

Regards
Mayank
 


 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland




RE: Question regarding jms destination

2008-01-10 Thread Bhole, Ulhas
Yes that's correct.
One port is only associated with one JMS queue/topic.

Regards,

Ulhas Bhole

-Original Message-
From: Mayank Thakore [mailto:[EMAIL PROTECTED] 
Sent: 10 January 2008 10:33
To: cxf-user@incubator.apache.org
Subject: RE: Question regarding jms destination

Hi Ulhas,

If we want to publish the same service over multiple jms channels will we
have to define a port for each of them in the wsdl file?

Thanks!

Regards
Mayank 

-Original Message-
From: Bhole, Ulhas [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 15:59
To: cxf-user@incubator.apache.org; [EMAIL PROTECTED]
Subject: RE: Question regarding jms destination

Hi Mayank,

JMS transport ignores the address specified in endpoint.publish() and acts
upon anything that is set in JMS WSDL Entensor. Having said this, you do
need the address starting with jms:// to let CXF stack know which transport
to pickup if you skip this CXF will assume default HTTP transport and will
try to load HTTP transport. 

Regards,

Ulhas Bhole

-Original Message-
From: Mayank Thakore [mailto:[EMAIL PROTECTED] 
Sent: 10 January 2008 09:48
To: cxf-user@incubator.apache.org
Subject: Question regarding jms destination

Hi,

For JMS, we specify the endpoint to register the service when invoking
Endpoint.publish(address, impl)

Also, we specify the url as the jndiDestinationName attribute of jms:address
element in the wsdl port definition.

The jndiDestinationName must be registered in jndi server or name not found
exception is thrown.

So, if we are giving the jndi destination url in wsdl file, what is the use
of giving the endpoint address when calling Endpoint.publish(string,
object)?

What does this message in the logs imply (I gave this url to
Endpoint.publish whereas, in wsdl I am using the url jms://MyQueue):

INFO: Setting the server's publish address to be jms://MyNew2Queue

I realize that it works properly if we give the same url at both the places
and have the destination registered in jndi.

Thanks much for the help!

Regards
Mayank
 


 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!



IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


WS-SecureConversation and WS-SecurityTrust

2008-01-10 Thread Davide Gesino

I've read a post on ws-* advanced features in future CXF versions.
These features are not present in the JIRA, so I guess these features will
not be in CXF 2.1.
Are these features definitively shifted to future versions? 
-- 
View this message in context: 
http://www.nabble.com/WS-SecureConversation-and-WS-SecurityTrust-tp14732255p14732255.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: How to deploy a CXF WAR file onto JBoss 4.0.5

2008-01-10 Thread Landslide

Glen,

I understand that I am facing a challenging problem of class loaders and
class loading sequence, specifically for JBoss. As you can see, my CXF WAR
has everything it needs to run as I have included ALL jars from CXF lib
folder in its WEB-INF\lib.

My case is a very simple HelloWorld CXF WAR (the sample from Release 2.0.3)
onto JBoss 4.0.5 GA (directly unzipped from JBoss download without adding
any additional jar). In other words, it would be very easy for you or anyone
else to reproduce the errors.

From the following URL link, it seems that you have already had some lucks
with JBoss 4.0.5 GA + CXF. What version of CXF did you use in this case?
Would I have a better luck if I pacakge my HelloWorld CXF in an EAR together
with the modified jboss-app.xml? For your info, I did not have the problem
of LinkageErrors involving the QName class in my case so far.
http://cwiki.apache.org/CXF20DOC/appserverguide.html

Thanks for your help!
-- 
View this message in context: 
http://www.nabble.com/How-to-deploy-a-CXF-WAR-file-onto-JBoss-4.0.5-tp14714988p14732262.html
Sent from the cxf-user mailing list archive at Nabble.com.



New 2.1 snapshot with anyType fix

2008-01-10 Thread Benson Margulies
I posted a snapshot which at least should succeed in delivering a DOM
Node for each anyType'ed item.

I will work on using xsi:type to deliver more useful objects but not
today.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
I shall give it a spin directly.  Thank you!

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 9:29 AM
To: Vespa, Anthony J; cxf-user
Subject: New 2.1 snapshot with anyType fix

I posted a snapshot which at least should succeed in delivering a DOM
Node for each anyType'ed item.

I will work on using xsi:type to deliver more useful objects but not
today.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Benson Margulies

On Thu, 2008-01-10 at 10:05 -0500, Vespa, Anthony J wrote:
 Out of curiousity, are there examples or docs of the overrideTypeList
 usage?  I did a few web services and looked in the mailing list archives
 and can't seem to find references to how to use it.

The best place to look right now in CXF is the
file ./rt/javascript/src/test/resources/AegisBeans.xml
 in the source tree. There is probably doc on the old XFire site,
related to exception subclasses.

I've made the process a lot simpler, but I haven't updated doc or that
file yet.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
So the aegis.xml looks similar to my beans.xml, so I could do maybe
something like this in the endpoint:

jaxws:endpoint
id=sBoardService
implementor=com.cbs.bos.ws.soap.BoardServiceImpl
address=/sBoardService
jaxws:serviceFactory
ref bean='jaxws-and-aegis-service-factory' /
property name=properties
map
entry
key=overrideTypesList
list
 
valuecom.bos.cbs.data.ws.wsMessageBoard/value
/list
/entry
/map
/property
/jaxws:serviceFactory

/jaxws:endpoint

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 10:12 AM
To: Vespa, Anthony J
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix


On Thu, 2008-01-10 at 10:05 -0500, Vespa, Anthony J wrote:
 Out of curiousity, are there examples or docs of the overrideTypeList
 usage?  I did a few web services and looked in the mailing list
archives
 and can't seem to find references to how to use it.

The best place to look right now in CXF is the
file ./rt/javascript/src/test/resources/AegisBeans.xml
 in the source tree. There is probably doc on the old XFire site,
related to exception subclasses.

I've made the process a lot simpler, but I haven't updated doc or that
file yet.




Digest Authentication with CXF?

2008-01-10 Thread Barrie Selack
It appears that the only option for Digest Authentication is to use Apache 
Axis2 instead of CXF. Am I missing something? It seems that this would be a 
somewhat basic function in CXF, but I can only find code that references Basic 
Authentication. I have found e-mail exchanges with some discussion, but is 
anything planned or happening in this area?

Regards,
Barrie



Disclaimer: This e-mail message is intended only for the personal use of
the recipient(s) named above. If you are not an intended recipient, you
may not review, copy or distribute this message. If you have received this
communication in error, please notify us immediately by e-mail and delete
the original message.

This e-mail expresses views only of the sender, which are not to be
attributed to Rite Aid Corporation and may not be copied or distributed
without this statement.


RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Vespa, Anthony J
Actually, got that to work in my bean declaration so now it appears in
the WSDL.

Is there a list of these types of lists/properties somewhat that can be
used?  I tried browsing the DTD and doing some searching but have found
it is more trial and error.

-Original Message-
From: Vespa, Anthony J 
Sent: Thursday, January 10, 2008 10:22 AM
To: Benson Margulies
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix

So the aegis.xml looks similar to my beans.xml, so I could do maybe
something like this in the endpoint:

jaxws:endpoint
id=sBoardService
implementor=com.cbs.bos.ws.soap.BoardServiceImpl
address=/sBoardService
jaxws:serviceFactory
ref bean='jaxws-and-aegis-service-factory' /
property name=properties
map
entry
key=overrideTypesList
list
 
valuecom.bos.cbs.data.ws.wsMessageBoard/value
/list
/entry
/map
/property
/jaxws:serviceFactory

/jaxws:endpoint

-Original Message-
From: Benson Margulies [mailto:[EMAIL PROTECTED] 
Sent: Thursday, January 10, 2008 10:12 AM
To: Vespa, Anthony J
Cc: cxf-user
Subject: RE: New 2.1 snapshot with anyType fix


On Thu, 2008-01-10 at 10:05 -0500, Vespa, Anthony J wrote:
 Out of curiousity, are there examples or docs of the overrideTypeList
 usage?  I did a few web services and looked in the mailing list
archives
 and can't seem to find references to how to use it.

The best place to look right now in CXF is the
file ./rt/javascript/src/test/resources/AegisBeans.xml
 in the source tree. There is probably doc on the old XFire site,
related to exception subclasses.

I've made the process a lot simpler, but I haven't updated doc or that
file yet.




RE: New 2.1 snapshot with anyType fix

2008-01-10 Thread Benson Margulies

On Thu, 2008-01-10 at 10:41 -0500, Vespa, Anthony J wrote:
 Actually, got that to work in my bean declaration so now it appears in
 the WSDL.
 
 Is there a list of these types of lists/properties somewhat that can be
 used?  I tried browsing the DTD and doing some searching but have found
 it is more trial and error.

You really have to read the source, I'm afraid.




Re: How to deploy a CXF WAR file onto JBoss 4.0.5

2008-01-10 Thread Landslide

Here are some clues to this puzzle, but no luck so far.

After I included the “spring.jar” from the Spring Framework Release 2.0.6
download in my WEB-INF\lib, I was able to resolve all the exceptions related
to “java.lang.ClassNotFoundException:
org.springframework.scripting.config.LangNamespaceHandler”.

Although my CXF HelloWorld WAR application built on top of CXF 2.0.3 still
refuses to work on JBoss 4.0.5 after the above mentioned change, I did
notice the following:

2008-01-10 11:20:08,250 ERROR [STDERR] Jan 10, 2008 11:20:08 AM
org.apache.cxf.configuration.spring.ConfigurerImpl init
INFO: Could not find the configuration file cxf.xml on the classpath.

2008-01-10 11:20:09,046 ERROR [STDERR] Jan 10, 2008 11:20:09 AM
org.apache.cxf.service.factory.ReflectionServiceFactoryBean
buildServiceFromClass
INFO: Creating Service {http://spring.demo/}HelloWorldService from class
demo.spring.HelloWorldImpl

2008-01-10 11:20:09,796 ERROR [STDERR] Jan 10, 2008 11:20:09 AM
org.apache.cxf.endpoint.ServerImpl initDestination
INFO: Setting the server's publish address to be /HelloWorld

2008-01-10 11:20:09,859 ERROR [STDERR] Jan 10, 2008 11:20:09 AM
org.apache.cxf.transport.servlet.CXFServlet loadSpringBus
INFO: Load the bus with application context

2008-01-10 11:20:09,890 ERROR [STDERR] Jan 10, 2008 11:20:09 AM
org.apache.cxf.transport.servlet.AbstractCXFServlet
replaceDestinationFactory
INFO: Servlet transport factory already registered

In my “beans.xml” file, there is a reference to the file “cxf.xml” as below
but this file does not exist anywhere in my WAR file:
beans xmlns=http://www.springframework.org/schema/beans;
xmlns:xsi=http://www.w3.org/2001/XMLSchema-instance;
xmlns:jaxws=http://cxf.apache.org/jaxws;
xsi:schemaLocation=
http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schemas/jaxws.xsd;

import resource=classpath:META-INF/cxf/cxf.xml /
import resource=classpath:META-INF/cxf/cxf-extension-soap.xml /
import resource=classpath:META-INF/cxf/cxf-servlet.xml /

jaxws:endpoint 
  id=helloWorld 
  implementor=demo.spring.HelloWorldImpl 
  address=/HelloWorld /
  
/beans

Where should I include this “cfx.xml” configuration file that the Spring
Framework needs in my CXF HelloWorld WAR file and what is the content of
this file?
-- 
View this message in context: 
http://www.nabble.com/How-to-deploy-a-CXF-WAR-file-onto-JBoss-4.0.5-tp14714988p14738564.html
Sent from the cxf-user mailing list archive at Nabble.com.



Strong-typing in CFX/Spring Web Methods

2008-01-10 Thread johnoverbaugh

Cross-posted from http://forum.springframework.org

Greetings - we are implementing a web services project in CXF/spring and
have discovered in testing that the web services are not enforcing input
types. Web services build in .NET/Visual Studio by default enforce input
types and do not allow clients to 'submit' mal-formatted data (ie, a string
when an int is expected).

Is there similar 'strong typing' functionality in the Spring framework and,
if yes, could someone point me to documentation that explains how to enable
this?

BTW: there's a chance this belongs in the spring framework forum and I have
posted there.

Thanks,

John O.
-- 
View this message in context: 
http://www.nabble.com/Strong-typing-in-CFX-Spring-Web-Methods-tp14739150p14739150.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Strong-typing in CFX/Spring Web Methods

2008-01-10 Thread Daniel Kulp

FYI:

CXF can enforce this for JAXB databinding based  services.   There are 
flags to turn on Schema validation such that the XML will be validated 
at read/write time.See the wsdl_first example that we ship.   It 
enables it.  

It's turned OFF by default due to the performance impact, but it is 
enablable.

Dan


On Thursday 10 January 2008, johnoverbaugh wrote:
 Cross-posted from http://forum.springframework.org

 Greetings - we are implementing a web services project in CXF/spring
 and have discovered in testing that the web services are not enforcing
 input types. Web services built in .NET/Visual Studio by default
 enforce input types and do not allow clients to 'submit' mal-formatted
 data (ie, a string when an int is expected).

 Is there similar 'strong typing' functionality in the Spring framework
 and, if yes, could someone point me to documentation that explains how
 to enable this?

 BTW: there's a chance this belongs in the spring framework forum and I
 have posted there.

 Thanks,

 John O.



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Aegis Collection binding problem with CGLib generated objects

2008-01-10 Thread Britt Crawford

I am having a problem getting Aegis to bind collections, it is throwing an
org.apache.cxf.aegis.DatabindingException.  

My web service generates its classes using the CGLib Enhancer, and the
binding problem appears to be isolated to any Collection of ay type on a
CGLib generated class.  I have tried overriding the mapping using a
*.aegis.xml file but with no success.  

Does anyone have an idea why this might be happening?

Thanks,

Britt Crawford

java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException:
Couldn't create type for property colors on class
com.cafepress.storage.domains.product.ProductImpl: 
at
org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:104)
at
org.apache.cxf.aegis.databinding.XMLStreamDataWriter.write(XMLStreamDataWriter.java:44)
at
org.apache.cxf.interceptor.AbstractOutDatabindingInterceptor.writeParts(AbstractOutDatabindingInterceptor.java:93)
at
org.apache.cxf.interceptor.BareOutInterceptor.handleMessage(BareOutInterceptor.java:68)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.interceptor.OutgoingChainInterceptor.handleMessage(OutgoingChainInterceptor.java:74)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
at
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
at
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:79)
at
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:256)
at
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:160)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.invoke(AbstractCXFServlet.java:170)
at
org.apache.cxf.transport.servlet.AbstractCXFServlet.doPost(AbstractCXFServlet.java:148)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:269)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:188)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:174)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:117)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:108)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:151)
at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:874)
at
org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:665)
at
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:528)
at
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:81)
at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:689)
at java.lang.Thread.run(Thread.java:613)
Caused by: org.apache.cxf.aegis.DatabindingException: Couldn't create type
for property colors on class
com.cafepress.storage.domains.product.ProductImpl: 
at
org.apache.cxf.aegis.type.DefaultTypeCreator.createCollectionType(DefaultTypeCreator.java:59)
at
org.apache.cxf.aegis.type.java5.Java5TypeCreator.createCollectionType(Java5TypeCreator.java:137)
at
org.apache.cxf.aegis.type.XMLTypeCreator.createCollectionType(XMLTypeCreator.java:236)
at
org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:114)
at
org.apache.cxf.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:377)
at
org.apache.cxf.aegis.type.XMLTypeCreator.createTypeFromGeneric(XMLTypeCreator.java:480)
at
org.apache.cxf.aegis.type.XMLTypeCreator.getOrCreateGenericType(XMLTypeCreator.java:466)
at
org.apache.cxf.aegis.type.AbstractTypeCreator.createCollectionTypeFromGeneric(AbstractTypeCreator.java:210)
at
org.apache.cxf.aegis.type.XMLTypeCreator.createCollectionType(XMLTypeCreator.java:233)
at
org.apache.cxf.aegis.type.AbstractTypeCreator.createTypeForClass(AbstractTypeCreator.java:114)
at
org.apache.cxf.aegis.type.AbstractTypeCreator.createType(AbstractTypeCreator.java:360)
at
org.apache.cxf.aegis.type.basic.BeanTypeInfo.getType(BeanTypeInfo.java:199)
at org.apache.cxf.aegis.type.basic.BeanType.getType(BeanType.java:524)
at 
org.apache.cxf.aegis.type.basic.BeanType.writeObject(BeanType.java:324)
at

Re: Exception object has all fields set to NULL on client side

2008-01-10 Thread Daniel Kulp

Kannan,

Any chance you could come up with an example so I can see what the issue 
is in a debugger?   A modified hello world or something would be great.   
The samples that I've written seem to be OK.

Dan


On Thursday 10 January 2008, rkannan wrote:
 I did some debugging of the CXF code and figured the following: There
 is a call to a method in StaxUtils that parses the SOAP fault
 response. It correctly identifies values for all headers except
 detail. As a result a NULL value is returned for fault detail; the
 created exception object therefore has its member variables
 uninitialized. This could be a bug in CXF. Maybe we need to include
 some jar file that has correct implementation for parsing the SOAP
 fault. This is a serious block.

 - Kannan

 rkannan wrote:
  I am throwing an exception from server side but on the client side
  the exception object has all the fields set to NULL. I checked the
  incoming SOAP fault message and it has correct values for the
  fields. I believe the correct jar files are not being used because I
  had a similar problem in sending List data types as parameters and
  it was fixed by adding asm.jar. I am using Wrapped Doc/Lit with the
  following dependencies on client:
 
  
 -- dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version4.1/version
  scopeprovided/scope
  /dependency
 
   dependency
  groupIdorg.apache.cxf/groupId
  artifactIdcxf-rt-frontend-jaxws/artifactId
  version${cxf.version}/version
  /dependency
 
 
  dependency
  groupIdorg.apache.cxf/groupId
  artifactIdcxf-rt-transports-http/artifactId
  version${cxf.version}/version
  /dependency
 
  dependency
  groupIdasm/groupId
  artifactIdasm/artifactId
  version3.0/version
  /dependency
  
 --
 
  If it really is a problem with using the correct jar files, it will
  be very helpful to get a list of jars that need to be used on server
  and client side to enable web service using CXF. I read the
  WHICH_JARS file that is part of CXF download, but adding them has
  not solved my problem. Can someone point out which classes are
  absolutely needed to handle fault/exception objects properly?
 
  Thanks,
  Kannan



-- 
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog


Re: exposed methods with Aegis binding

2008-01-10 Thread Nacharya

We have used the ServerFactoryBean with Aegis databinding and the exclude
annotation didn't work. How can we get this simple annotation to work?

-- 
View this message in context: 
http://www.nabble.com/exposed-methods-with-Aegis-binding-tp14697814p14743951.html
Sent from the cxf-user mailing list archive at Nabble.com.



Re: Aegis Collection binding problem with CGLib generated objects

2008-01-10 Thread Britt Crawford

Update: It turns out that this has nothing to do with CGLIB.  

The collections in the CGLIB generated objects work just fine, as long as
you just serialize the object.  However, I was wrapping them in another
object and it turns out that the problem only occurs when I use the wrapper. 

The ServiceResponse wrapper and the object being return are from different
namespaces.  Could this be the cause of the problem?  
-- 
View this message in context: 
http://www.nabble.com/Aegis-Collection-binding-problem-with-CGLib-generated-objects-tp14740824p14743770.html
Sent from the cxf-user mailing list archive at Nabble.com.



marshallerProperties setter missing in org.apache.cxf.jaxb.JAXBDataBinding

2008-01-10 Thread bdm

All,

I am trying to set an xml processing instruction in the result from a web
service call.  I have gone through the JAXB instructions in the user guide
and have not been able to set the marshallerProperties property on the
JAXBDataBinding class.  In looking at the code in SVN it seems that there is
a setter for contextProperties in the JAXBDataBinding class, but not one for
marshallerProperties even though the map is created in the class.  Am I
missing something?

I have tried both the 2.0.4 and 2.1 snapshot versions of the jars but still
no initialization works.

This context file initializes correctly (modified version of the sample from
the web page):

...snip...
jaxws:endpoint id=PersonRestService
implementor=#PersonRestServiceImpl
address=/PersonRest
bindingUri=http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
property name=wrapped value=true/
property name=dataBinding
bean class=org.apache.cxf.jaxb.JAXBDataBinding
property name=contextProperties
   map
entry
   
keyvaluecom.sun.xml.bind.defaultNamespaceRemap/value/key
valueuri:ultima:thule/value
/entry
/map
   /property
/bean
/property
/bean
/jaxws:serviceFactory
/jaxws:endpoint

...snip...

This one doesn't work - Spring throws the error below:

...snip...
jaxws:endpoint id=PersonRestService
implementor=#PersonRestServiceImpl
address=/PersonRest
bindingUri=http://apache.org/cxf/binding/http;
jaxws:serviceFactory
bean
class=org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean
property name=wrapped value=true/
property name=dataBinding
bean class=org.apache.cxf.jaxb.JAXBDataBinding
property name=marshallerProperties
map
entry
   
keyvaluecom.sun.xml.bind.xmlHeaders/value/key
value![CDATA[?xml-stylesheet
type=text/xsl href=test.xsl?]]/value
/entry
/map

   /property
/bean
/property
/bean
/jaxws:serviceFactory
/jaxws:endpoint

...snip...


Spring throws this error:

14:37:17,194 ERROR main [[/personService]] Exception sending context
initialized event to listener instance of class
org.springframework.web.context.ContextLoaderListener
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.jaxws.support.JaxWsServiceFactoryBean' defined in
URL
[file:/opt/workspace/personService-cxf-ws/target/personService-ws/WEB-INF/classes/serviceContext.xml]:
Cannot create inner bean 'org.apache.cxf.jaxb.JAXBDataBinding#c0f654' while
setting bean property 'dataBinding'; nested exception is
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.jaxb.JAXBDataBinding#c0f654' defined in URL
[file:/opt/workspace/personService-cxf-ws/target/personService-ws/WEB-INF/classes/serviceContext.xml]:
Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'marshallerProperties' of bean class [org.apache.cxf.jaxb.JAXBDataBinding]:
Bean property 'marshallerProperties' is not writable or has an invalid
setter method. Does the parameter type of the setter match the return type
of the getter?
Caused by: 
org.springframework.beans.factory.BeanCreationException: Error creating bean
with name 'org.apache.cxf.jaxb.JAXBDataBinding#c0f654' defined in URL
[file:/opt/workspace/personService-cxf-ws/target/personService-ws/WEB-INF/classes/serviceContext.xml]:
Error setting property values; nested exception is
org.springframework.beans.NotWritablePropertyException: Invalid property
'marshallerProperties' of bean class [org.apache.cxf.jaxb.JAXBDataBinding]:
Bean property 'marshallerProperties' is not writable or has an invalid
setter method. Does the parameter type of the setter match the return type
of the getter?
Caused by: 
org.springframework.beans.NotWritablePropertyException: Invalid property
'marshallerProperties' of bean class [org.apache.cxf.jaxb.JAXBDataBinding]:
Bean property 'marshallerProperties' is not writable or has an invalid
setter method. Does the parameter type of the setter match the return type
of the getter?
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:748)
at
org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:606)
at

Handlers and Client target - How do I do that in cxf

2008-01-10 Thread George McKinney
Hi all,
I'm new to cxf, though have used Weblogic, Axis, and JAX-WS tools ( beginning 
from wsdl . ( And I don't have access to the code base at the moment - 
otherwise I'd flail around a while longer :)

3 questions
server side, I am used to defining a a logging handler chain in ( for instance 
) sun-jaxws.xml in WEB-INF - just to log the SOAP messages to a log4J logger. 
What is the cxf equivalent?

client side, I
  1 programatically create a list of Handlers ( the same logging Handler, and 
another Handler that adds a specific http headers and values.
  2 set the BindingProvider.ENDPOINT_ADDRESS_PROPERTY to the url of the 
webservice to be consumed. 

doing both by casting to a BindingProvider and doing stuff.

Will this kind of thing work with cxf, or is there another way?

Thanks
--
George McKinney
Senior Software Developer/Analyst
MemberDirect(r) Product Development
phone: 604 737 5900
email: [EMAIL PROTECTED]
website: memberdirect.ca





Use Tomcat

2008-01-10 Thread Pawel Janusz

Hello
How to setup CXF not to use Jetty when defining adress in 
jaxws:endpoint. When I try to pass such:
address=/service i got error. Only when I give full address port (port 
has to be different from Tomcat's).


eg. (this one works fine)

jaxws:endpoint id=MyServiceService
 implementor=#MyServiceServiceImpl
   address=http://localhost:8081/MyService
/


I want to use this one but not working :(

jaxws:endpoint id=MyServiceService
 implementor=#MyServiceServiceImpl
   address=/MyService/



Re: Use Tomcat

2008-01-10 Thread Ian Roberts

Pawel Janusz wrote:

I want to use this one but not working :(

jaxws:endpoint id=MyServiceService
 implementor=#MyServiceServiceImpl
   address=/MyService/


This form works fine for me in Tomcat.  Remember that the address is 
relative to the CXFServlet mapping in your webapp.  So with the 
following in the web.xml for my-webapp:


  servlet-mapping
servlet-nameCXFServlet/servlet-name
url-pattern/services/*/url-pattern
  /servlet-mapping

the service appears at http://localhost:8080/my-webapp/services/MyService

If you really want it at the top level (http://localhost:8080/MyService) 
you'd have to put CXF in the ROOT webapp and map it to a url-pattern of /*


Ian

--
Ian Roberts   | Department of Computer Science
[EMAIL PROTECTED]  | University of Sheffield, UK


Re: Aegis Collection binding problem with CGLib generated objects

2008-01-10 Thread Britt Crawford

The object that is causing the problem is a relatively simple implementation
of this interface:

public interface ServiceContainerT {
T getInstance();
int getVersion();
}

and is declared as ServiceContainerProduct on the web service.

The WSDL seems to be getting generated properly, I have no idea why this is
causing such problems.

http://www.nabble.com/file/p14747455/halp-cat.jpeg 
-- 
View this message in context: 
http://www.nabble.com/Aegis-Collection-binding-problem-with-CGLib-generated-objects-tp14740824p14747455.html
Sent from the cxf-user mailing list archive at Nabble.com.



RE: Handlers and Client target - How do I do that in cxf

2008-01-10 Thread Liu, Jervis


 -Original Message-
 From: George McKinney [mailto:[EMAIL PROTECTED]
 Sent: 2008年1月11日 6:22
 To: cxf-user@incubator.apache.org
 Subject: Handlers and Client target - How do I do that in cxf
 
 Hi all,
 I'm new to cxf, though have used Weblogic, Axis, and JAX-WS tools
 ( beginning from wsdl . ( And I don't have access to the code base at the
 moment - otherwise I'd flail around a while longer :)
 
 3 questions
 server side, I am used to defining a a logging handler chain in ( for 
 instance )
 sun-jaxws.xml in WEB-INF - just to log the SOAP messages to a log4J logger.
 What is the cxf equivalent?
 
[Liu, Jervis] CXF supports the standard way per JAX-WS spec to configure 
handler chain on the server side. An example of this can be found in 
samples\jaxws_handlers in CXF distribution..

 client side, I
   1 programatically create a list of Handlers ( the same logging Handler, and
 another Handler that adds a specific http headers and values.
   2 set the BindingProvider.ENDPOINT_ADDRESS_PROPERTY to the url of
 the webservice to be consumed.
 
 doing both by casting to a BindingProvider and doing stuff.
 
[Liu, Jervis] Both 1 and 2 should work, as long as you are using standard 
JAX-WS APIs.

 Will this kind of thing work with cxf, or is there another way?
 
 Thanks
 --
 George McKinney
 Senior Software Developer/Analyst
 MemberDirect(r) Product Development
 phone: 604 737 5900
 email: [EMAIL PROTECTED]
 website: memberdirect.ca
 


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Re: Some basic question on wsdl generated services

2008-01-10 Thread Willem Jiang

Hi Mayank

My comments are in the mail.

Mayank Thakore wrote:

Hi,

Few basic questions:

1. If we generate service implementation objects using wsdl2java, is it
possible to avoid it referring back to the wsdl file in the annotations?
  
You just need to remove the wsdlLocation attribute from the WebService 
annotation.



2. The generated implementation mentions the port name in the annotations.
So how can we use the same implementation for two ports (say one http, other
jms)? Will we have to delegate the calls to some common class?
  
The implementation part is a kind of physical part of the wsdl. I don't 
think you can use the same implementation for the two ports without 
changing the annotation.
But if you use the JaxWsServerFactoryBean API [1] not the JAXWS API , 
may be you can override it.

[1]http://cwiki.apache.org/CXF20DOC/server-service-and-client-factorybeans.html


Thanks!

Regards
Mayank 
 



 This e-mail and attachments contain confidential information from HUAWEI,
which is intended only for the person or entity whose address is listed
above. Any use of the information contained herein in any way (including,
but not limited to, total or partial disclosure, reproduction, or
dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!




  

Willem.


RE: using multiple values for @ProduceMime

2008-01-10 Thread Liu, Jervis
Hi Akos, it should work now with the latest snapshot.

Cheers,
Jervis

 -Original Message-
 From: Liu, Jervis [mailto:[EMAIL PROTECTED]
 Sent: 2008年1月8日 16:12
 To: cxf-user@incubator.apache.org
 Subject: RE: using multiple values for @ProduceMime
 
 Hi Akos, you definitely should be able to set multiple values for
 @ProduceMime. According to spec, if @ProduceMime contains multiple
 MIME types (or it’s a wild card such as */*), the actual output content
 type being used is determined by:
 
 1. the output Java type: i.e., if your method is declared as:
 @HttpMethod(GET)
 @UriTemplate(/books/{bookId}/)
 @ProduceMime(application/xml, application/json)
 public Book getBook (@UriParam(bookId) String id) throws
 BookNotFoundFault {
 ...
 }
 
 The EntityProvider under consideration (JAXBElementProvider or
 JSONEntityProvider) must support the Book type. In CXF, if your Book class is
 declared with @XmlRootElement annotation, both JAXBElementProvider or
 JSONEntityProvider's supports() method will return true
 
 2. The Accepted header.
 
 3. If there are still multiple EntityProvider selected after step 1 and 2
 (EntityProvider is used to produce output), the first one in the candidate 
 list
 is selected. The candidate list is sorted using  x/y  x/*  */*.
 
 In your case, if your client did not set accepted header, application/json
 should be selected, I guess there is a bug that did not set output MIME type
 correctly. I will fix this. Jira created:
 https://issues.apache.org/jira/browse/CXF-1361
 
 Cheers,
 Jervis
 
 
  -Original Message-
  From: ákos Maróy [mailto:[EMAIL PROTECTED]
  Sent: 2008年1月7日 20:37
  To: cxf-user@incubator.apache.org
  Subject: using multiple values for @ProduceMime
 
  Hi,
 
  I'm experimenting with the JAX-RS implementation in CXF. I'm trying to
  create methods that are able to return content in different formats. The
  JAX-RS spec says that any method can declare multiple MIME types that it
  produces, like:
 
  @ProduceMime({application/xml, application/json})
 
 
  but when trying this out, I see that the CXF implementation effectively
  only allows for a single MIME type declaration. If I declare multiple
  entries, like above, strangely the returned MIME type will be
  application/xml, but the returned format will be application/json
 
  I wonder if it's possible to make this feature work in CXF as in the spec?
 
 
  Akos
 
 
 IONA Technologies PLC (registered in Ireland)
 Registered Number: 171387
 Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


IONA Technologies PLC (registered in Ireland)
Registered Number: 171387
Registered Address: The IONA Building, Shelbourne Road, Dublin 4, Ireland


Re: How to deploy a CXF WAR file onto JBoss 4.0.5

2008-01-10 Thread Glen Mazza

Am Donnerstag, den 10.01.2008, 05:14 -0800 schrieb Landslide:
 Glen,
 
 I understand that I am facing a challenging problem of class loaders and
 class loading sequence, specifically for JBoss. As you can see, my CXF WAR
 has everything it needs to run as I have included ALL jars from CXF lib
 folder in its WEB-INF\lib.
 
 My case is a very simple HelloWorld CXF WAR (the sample from Release 2.0.3)
 onto JBoss 4.0.5 GA (directly unzipped from JBoss download without adding
 any additional jar). In other words, it would be very easy for you or anyone
 else to reproduce the errors.

Not really...I don't know much about JBoss, I've never installed it.  I
would be doing the same guesswork as you in trying to fix the problem,
and app server debugging generally falls outside the scope of a
volunteer committer.  

I do know from experience that there are frequently initial classpath
headaches when moving to a new application server.  Activating classpath
loading logging (assuming JBoss has it, like Oracle App Server does)
might help.  IIRC, also JBoss *might* be having a problem with the
geronimo*.jar files there--I'm not really sure if that's it though.

I would check the JBoss forums--search for CXF--and see if anyone's had
any problems or solutions.  Glassfish Metro is another option if you
continue to have absolutely no luck with CXF on JBoss.

Sorry,
Glen

PS:  If you do find a solution, please respond back so it will be stored
in the email archives, to help others in the future.





Re: Use Tomcat

2008-01-10 Thread Glen Mazza
Note #4 here may also help clarify things for you:
http://www.jroller.com/gmazza/date/200710#notes

HTH,
Glen

Am Donnerstag, den 10.01.2008, 23:29 + schrieb Ian Roberts:
 Pawel Janusz wrote:
  I want to use this one but not working :(
  
  jaxws:endpoint id=MyServiceService
   implementor=#MyServiceServiceImpl
 address=/MyService/
 
 This form works fine for me in Tomcat.  Remember that the address is 
 relative to the CXFServlet mapping in your webapp.  So with the 
 following in the web.xml for my-webapp:
 
servlet-mapping
  servlet-nameCXFServlet/servlet-name
  url-pattern/services/*/url-pattern
/servlet-mapping
 
 the service appears at http://localhost:8080/my-webapp/services/MyService
 
 If you really want it at the top level (http://localhost:8080/MyService) 
 you'd have to put CXF in the ROOT webapp and map it to a url-pattern of /*
 
 Ian
 



Re: Exception object has all fields set to NULL on client side

2008-01-10 Thread rkannan

Dan,
  Sorry, I made a mistake in my previous post. There is nothing wrong with
parsing the SOAP detail. However the problem is with the Unmarshaller piece.
As you said I wrote a simple HelloWorld program that throws an exception and
this is what I found out. 

- HelloWorld program is working fine for exception. The reason is that the
generated WSDL has elementFormDefault=qualified on its schema. As a result,
WSDL2Java generates stub code that has @XmlElement annotation with namespace
attribute on the protected field of exception class. I checked to see what
happens when elementFormDefault is set to unqualified in WSDL. The generated
stub code does not have namespace atttribute in @XmElement annotation. In
this case the fields of exception object are all null (my original post
talks about this problem). I believe while unmarshalling the fault message,
the namespace attribute in SOAP fault message is compared with the
annotation and it fails here. When you said its working fine with your
sample program, I assume its because of qualified schema. Can you check if
it works fine with unqualified also?

- Having figured this, I decided to generate the WSDL of my original problem
with elementFormDefault set to qualified. I followed the instruction in this
post:
http://www.nabble.com/xs%3Aschema-attributeFormDefault%3D%22unqualified%22-elementFormDefault%3D%22unqualified%22-td13604195.html#a13620904
But I am not able to get it to work. There is no change in the WSDL. 

What is the correct way to get this problem resolved? Using qualified in
WSDL (if so how?), or is there a bug. Because even with unqualified schema,
unmarhsalling happens fine for SOAP request/response messages other than
fault messages. 

Thanks,
Kannan


dkulp wrote:
 
 
 Kannan,
 
 Any chance you could come up with an example so I can see what the issue 
 is in a debugger?   A modified hello world or something would be great.   
 The samples that I've written seem to be OK.
 
 Dan
 
 
 On Thursday 10 January 2008, rkannan wrote:
 I did some debugging of the CXF code and figured the following: There
 is a call to a method in StaxUtils that parses the SOAP fault
 response. It correctly identifies values for all headers except
 detail. As a result a NULL value is returned for fault detail; the
 created exception object therefore has its member variables
 uninitialized. This could be a bug in CXF. Maybe we need to include
 some jar file that has correct implementation for parsing the SOAP
 fault. This is a serious block.

 - Kannan

 rkannan wrote:
  I am throwing an exception from server side but on the client side
  the exception object has all the fields set to NULL. I checked the
  incoming SOAP fault message and it has correct values for the
  fields. I believe the correct jar files are not being used because I
  had a similar problem in sending List data types as parameters and
  it was fixed by adding asm.jar. I am using Wrapped Doc/Lit with the
  following dependencies on client:
 
  
 -- dependency
  groupIdjunit/groupId
  artifactIdjunit/artifactId
  version4.1/version
  scopeprovided/scope
  /dependency
 
  dependency
  groupIdorg.apache.cxf/groupId
  artifactIdcxf-rt-frontend-jaxws/artifactId
  version${cxf.version}/version
  /dependency
 
 
 dependency
  groupIdorg.apache.cxf/groupId
  artifactIdcxf-rt-transports-http/artifactId
  version${cxf.version}/version
  /dependency
 
 dependency
  groupIdasm/groupId
  artifactIdasm/artifactId
  version3.0/version
  /dependency
  
 --
 
  If it really is a problem with using the correct jar files, it will
  be very helpful to get a list of jars that need to be used on server
  and client side to enable web service using CXF. I read the
  WHICH_JARS file that is part of CXF download, but adding them has
  not solved my problem. Can someone point out which classes are
  absolutely needed to handle fault/exception objects properly?
 
  Thanks,
  Kannan
 
 
 
 -- 
 J. Daniel Kulp
 Principal Engineer, IONA
 [EMAIL PROTECTED]
 http://www.dankulp.com/blog
 
 

-- 
View this message in context: 
http://www.nabble.com/Exception-object-has-all-fields-set-to-NULL-on-client-side-tp14723440p14749557.html
Sent from the cxf-user mailing list archive at Nabble.com.