AW: trying to use ClientProxyFactoryBean but failing

2008-03-07 Thread Holger Stolzenberg
I can´t tell you whats going on, just wanted to mention that it seems that your 
problem is related to mine, which I originally postet under thread

http://www.nabble.com/-2.0.4--Service-unit-tests-fail-after-upgrade-from-2.0.2-to15610639.html

Somehow my last response on that thread didn´t make it to the list. What I can 
say is that this probable issue also happens with CXF 2.0.2. I have put 
together a simple maven test project that can reproduce the issue. It is 
available under:

http://lando23.net/simple-cxf-test.zip (12,6 KB)

The project contains a simple service interface+impl, 1 spring config file and 
1 test case. Running 'mvn test' will throw the exception described by Dan 
Lipofsky.

Maybe someone of the CXF crew can have a look at it ;-)

Thanks in advance

-Ursprüngliche Nachricht-
Von: Daniel Lipofsky [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 7. März 2008 01:00
An: cxf-user@incubator.apache.org
Betreff: trying to use ClientProxyFactoryBean but failing

Can anyone tell me why the first form works but the second doesn't?
I am trying to start using the factory stuff but it is failing.
What am I doing wrong?

Works:

  TxService txService = new TxService();
  TxPortType txPort = txService.getTxPort();
  MapString, Object context = ((BindingProvider) txPort).getRequestContext();
  context.put(BindingProvider.USERNAME_PROPERTY, me);
  context.put(BindingProvider.PASSWORD_PROPERTY, hello);
  context.put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY,
  http://localhost/ws/services/Tx;);
  txPort.getObjects(searchTerms, 0, 0);

Fails:

  ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
  factory.setServiceClass(TxPortType.class);
  factory.setUsername(me);
  factory.setPassword(hello);
  factory.setAddress(http://localhost/ws/services/Tx;);
  TxPortType client = (TxPortType)factory.create();
  client.getObjects(searchTerms, 0, 0);

Error:

org.apache.cxf.interceptor.Fault: Could not send Message.
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:64)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorC
hain.java:208)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
at
org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at org.apache.cxf.frontend.ClientProxy.invoke(ClientProxy.java:68)
at $Proxy36.getObjects(Unknown Source)
at client.WSClient1.download(WSClient1.java:41)
at client.WSClient1.main(WSClient1.java:29)
Caused by: java.net.HttpRetryException: cannot retry due to server 
authentication, in streaming mode
at
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnec
tion.java:1012)
at
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:367)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResp
onse(HTTPConduit.java:1863)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTP
Conduit.java:1791)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at
org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingI
nterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 8 more


Thanks,
Dan



[2.0.4] Service unit tests fail after upgrade from 2.0.2

2008-02-21 Thread Holger Stolzenberg
We are using CXF for a shop backend. After we upgraded from 2.0.2 - 2.0.4 the 
unit tests (TestNG) for the CXF services all fail with the same exception like 
the one below:

FAILED: testSaveCustomer
javax.xml.ws.soap.SOAPFaultException: Could not send Message.
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:175)
at $Proxy78.saveCustomer(Unknown Source)
at 
com.ewerk.shop.backend.wsapi.customer.CustomerServiceTest.testSaveCustomer(CustomerServiceTest.java:246)
Caused by: org.apache.cxf.interceptor.Fault: Could not send Message.
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:64)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:208)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:276)
at org.apache.cxf.endpoint.ClientImpl.invoke(ClientImpl.java:222)
at org.apache.cxf.frontend.ClientProxy.invokeSync(ClientProxy.java:73)
at 
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:135)
... 24 more
Caused by: java.net.SocketException: Connection reset
at java.net.SocketInputStream.read(SocketInputStream.java:168)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:218)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:258)
at java.io.BufferedInputStream.read(BufferedInputStream.java:317)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:687)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:632)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:652)
at 
sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1000)
at 
java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:373)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.handleResponse(HTTPConduit.java:1863)
at 
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1791)
at 
org.apache.cxf.io.CacheAndWriteOutputStream.postClose(CacheAndWriteOutputStream.java:47)
at 
org.apache.cxf.io.CachedOutputStream.close(CachedOutputStream.java:157)
at 
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:575)
at 
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
... 29 more

The services STILL just work fine from the backend system (a webapp), only the 
tests fail.

--

The unit test setup is the following:

Maven dependencies: cxf-rt-frontend-jaxws, cxf-rt-transports-http (2.0.4)

SNIP Service interface

@WebService( name = CustomerService )
public interface ICustomerService   
{
@WebMethod( operationName = saveCustomer )
@WebResult( name = saveCustomerResult )
public BackendServiceStatus saveCustomer( @WebParam( name = 
auth ) ServiceAuthentication auth,

@WebParam( name = customer ) Customer customer );
}

/SNIP


SNIP CXF Server

JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean ();
sf.setServiceClass( ICustomerService.class ); 
sf.setServiceBean( getServiceImplementation() ); -- returns the 
service impl bean from spring context ('CustomerServiceImpl')
sf.setAddress( 
http://localhost:8080/Shop_Backend/wsapi/CustomerService; );

// additionally setup JAXB context

Server server = sf.create();

/SNIP

SNIP CXF Client

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass( ICustomerService.class );
factory.setAddress( 
http://localhost:8080/Shop_Backend/wsapi/CustomerService; );
ICustomerService client = (ICustomerService)factory.create();

// call service
BackendServiceStatus status = customerServiceProxy.saveCustomer( auth, 
customer );

/SNIP

SNIP spring context

bean id=CustomerServiceImpl 
class=com.ewerk.shop.backend.wsapi.customer.CustomerServiceImpl /
jaxws:server   id=CustomerService
serviceBean=#CustomerServiceImpl 
address=/CustomerService
/jaxws:server
/SNIP

--

Any solution is really appreciated. Thanks in advance.

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler

CXF Logging issues

2007-09-25 Thread Holger Stolzenberg
In my project I am using log4j. 

I have configured it to log the cxf packages with level warn. Nearly everything 
is fine. There are some outputs that are written to 'System.out' I think and 
therefore they are always printed out (e.g. during maven build tests). Below 
are examples of the messages that are always printed out.


25.09.2007 13:15:24 org.apache.cxf.service.factory.ReflectionServiceFactoryBean 
buildServiceFromClass
INFO: Creating Service {http://backend.shop.eex.com/ws-api}CouponService from 
class com.ewerk.eex.shop.backend.wsapi.coupon.CouponServiceImpl


25.09.2007 13:17:27 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Logging to org.slf4j.impl.JDK14LoggerAdapter(org.mortbay.log) via 
org.mortbay.log.Slf4jLog
25.09.2007 13:17:27 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: jetty-6.1.0
25.09.2007 13:17:27 sun.reflect.NativeMethodAccessorImpl invoke0
INFO: Started SelectChannelConnector @ 0.0.0.0:8080

How can I get rid of this messages ???

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 


AW: Passing method parameters using PHP SoapClient failing

2007-08-24 Thread Holger Stolzenberg
The PHP call to your WS method seems to be false. You have to provide a 
associative array for the WS method params. Following code shows how we do it:


// the wsdl URL of your service to test
$serviceWsdl = 
'http://127.0.0.1:8080/EEX_Shop_Backend/ws-api/CustomerService?wsdl';

// the parmeters to initialize the client with
$serviceParams = array( 'trace' = 1, 'soap_version' = SOAP_1_1, 'style' = 
SOAP_DOCUMENT, 'use' = SOAP_LITERAL );

// create the SOAP client
$client = new SoapClient( $serviceWsdl, $serviceParams );

// method call
$res = $client-getCustomerById( array( 'auth' = passwd, 'customerId' = 2 ) 
);
var_dump( $res );

-Ursprüngliche Nachricht-
Von: Kaleb Walton [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 23. August 2007 14:55
An: cxf-user@incubator.apache.org
Betreff: Passing method parameters using PHP SoapClient failing



As a requirement for our customers I'm trying to get SOAP communication going 
using PHPs SoapClient object. Calling methods with no parameters works fine (I 
get results) but when I pass in parameters I get a Fault occurred while 
processing error message returned which I assume is coming somewhere within 
the CXF framework.

The PHP code is pretty simple:

$client = new SoapClient('http://localhost:8080/services/Person?wsdl');
$client-testString('abc'); -- This line returns an error message of 'Fault 
occurred while processing'


Service object:

@WebService(endpointInterface = a.b.c.webservices.PersonService)
public class PersonServiceImpl implements PersonService {
  public String testString(String id) {
System.out.println(PersonServiceImpl: testString: +id);
return id;
  }
}

Config:
  bean id=personServiceImpl
class=a.b.c.webservices.PersonServiceImpl/
  jaxws:endpoint id=personServer implementor=#personServiceImpl
address=/Person /
  bean id=personService class=net.iss.mss.webservices.PersonService
factory-bean=clientFactory factory-method=create /

  bean id=clientFactory
class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
property name=serviceClass value=a.b.c.webservices.PersonService/
property name=address
value=http://localhost:8080/services/Person/
  /bean

Also, it looks like CXF uses Java's Logging implementation, however, I cannot 
seem to get it to log anywhere. Does anyone have any quick pointers on how to 
get that going?

Regards,
Kaleb Walton


AW: Enforce complex type definition in WSDL

2007-08-22 Thread Holger Stolzenberg
Ok I have read through CXF-340. After I applied the solution to my project I 
noticed that this 'jaxb.additionalContextClasses' property is set for the 
'jaxws:server' element.

I tried to specify it in the same way for a 'jaxws:endpoint' element but it did 
not work. So I changed my declarations to 'jaxws:server' elements.

Everything works fine.

Would it make sense to specify these additional classes at endpoint? And could 
someone please figure out in short what the main difference is between server 
and endpoint (specific to CXF) and for which use cases the choose one of them?


-Ursprüngliche Nachricht-
Von: Julio Arias [mailto:[EMAIL PROTECTED] 
Gesendet: Mittwoch, 22. August 2007 04:35
An: cxf-user@incubator.apache.org
Betreff: Re: Enforce complex type definition in WSDL

Hi Holger -

You can add extra classes to your JAXB context, look at https:// 
issues.apache.org/jira/browse/CXF-340 for more info.

On Aug 21, 2007, at 9:13 AM, Holger Stolzenberg wrote:

 Hi folks,


 Using CXF 2.0.1-INCUBATOR + JAXB Databinding:


 I have a ProductService SEI with the following signature:

 public ServiceStatus getProductById( int id ); public ServiceStatus 
 getProductByToken( String token );


 So for this WS the ServiceStatus object is defined in the WSDL.  
 This ServiceStatus object is a wrapper that holds the services status 
 outcome, e.g. code ... , and the product itself if loaded.
 For that it also has a geberic method

 public Object getObject();

 In an special use case this method should return an Object of the type 
 lets say 'Product'. Because the Product class itself has never been 
 declared or used in the SEI it won´t show up in the WSDL. But there I 
 need the complex type definition for 'Product' in order to ensure 
 class mapping for a PHP client.

 As a workaround I put the following method to the SEI:

 public void noop( Product product );

 Now the Product class has been declared in the SEI abd therefore a 
 complex type definition is created in the WSDL. Everything works fine 
 now.

 My question is how can I force the creation of a complex type in the 
 WSDL that my service may return but has not been declared or used 
 somewhere in the SEI??

 Mit lieben Grüßen aus dem eWerk

   |  Holger Stolzenberg
   |  Softwareentwickler
   |
   |  Geschäftsführer:
   |  Frank Richter, Erik Wende, Hendrik Schubert
   |
   |  eWerk IT GmbH
   |  Markt 16
   |  Leipzig 04109
   |  http://www.ewerk.com
   |  HRB 9065, AG Leipzig
   |  Hauptniederlassung Leipzig
   |
   |  fon +49.341.4 26 49-0
   |  fax +49.341.4 26 49-88
   |  mailto:[EMAIL PROTECTED]
   |
   |  Support:
   |  fon 0700 CALLME24 (0700 22556324)
   |  fax 0700 CALLME24 (0700 22556324)
   |
   | Auskünfte und Angebote per Mail
   | sind freibleibend und unverbindlich.




Julio Arias
Java Developer
Roundbox Global : enterprise : technology : genius
-
Avenida 11 y Calle 7-9, Barrio Amón, San Jose, Costa Rica
tel: 404.567.5000 ext. 2001 | cell: 011) 506.849.5981
email: [EMAIL PROTECTED] | www.rbxglobal.com
-



Enforce complex type definition in WSDL

2007-08-21 Thread Holger Stolzenberg
Hi folks,


Using CXF 2.0.1-INCUBATOR + JAXB Databinding:


I have a ProductService SEI with the following signature:

public ServiceStatus getProductById( int id );
public ServiceStatus getProductByToken( String token );


So for this WS the ServiceStatus object is defined in the WSDL. This 
ServiceStatus object is a wrapper that holds the services status outcome, e.g. 
code ... , and the product itself if loaded. For that it also has a geberic 
method

public Object getObject();

In an special use case this method should return an Object of the type lets say 
'Product'. Because the Product class itself has never been declared or used in 
the SEI it won´t show up in the WSDL. But there I need the complex type 
definition for 'Product' in order to ensure class mapping for a PHP client.

As a workaround I put the following method to the SEI:

public void noop( Product product );

Now the Product class has been declared in the SEI abd therefore a complex type 
definition is created in the WSDL. Everything works fine now.

My question is how can I force the creation of a complex type in the WSDL that 
my service may return but has not been declared or used somewhere in the
SEI??

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 


cxf-2.0.1-incubator - dependency incompatibility with hibernate

2007-08-14 Thread Holger Stolzenberg
)
at 
org.apache.catalina.core.StandardService.start(StandardService.java:450)
at 
org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
at org.apache.catalina.startup.Catalina.start(Catalina.java:537)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)

I noticed that the or.objectweb ASM library version has grown from 1.5.x - 
3.0. I think because it is a direct dependency of cxf-2.0.1-incubator.
But as you can see hibernate cannot use this version of ASM as I think the ASM 
API has chnged to much between this versions. So I had to redefine my 
dependencies the following way:

dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-frontend-jaxws/artifactId
version2.0.1-incubator/version
exclusions
exclusion
groupIdasm/groupId
artifactIdasm/artifactId
/exclusion
/exclusions
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http/artifactId
version2.0.1-incubator/version
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-databinding-aegis/artifactId
version2.0.1-incubator/version
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http-jetty/artifactId
version2.0.1-incubator/version
scopetest/scope
/dependency
dependency
groupIdorg.hibernate/groupId
artifactIdhibernate/artifactId
version3.2.4.sp1/version
/dependency

But the problem is that I do not know if this causes any side effects in CXF. 
All my tests are still running, but I do not like the way of excluding ASM.
Is there a better approach.

Maybe you should consider the define a dependency range in maven if ASM 3.0 is 
not absolutely required for cxf-2.0.1-incubator. For me, direct compatibility 
to Hibernate is essential.


Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 


AW: Complex Types contain all null values...

2007-07-27 Thread Holger Stolzenberg
I am not sure if this helps but:

How do you get the object, are using a debugging breakpoint at the return 
statement of the service method or at the object returned by your client?

I also have an WS returning a business object (gets loaded through Spring AOP 
transaction demarcation and hibernate). The problem is that the object returned 
by the service itself has all fields filled (set a breakpoint at the return 
statement of the service), but when calling the service from a CXF client proxy 
all the fields in the object are null.

Just thought that could be the same problem posted for it to the list with the 
subject 'WS client returning uninitialized objects' but got no answer yet.


-Ursprüngliche Nachricht-
Von: Brad Harper [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 27. Juli 2007 17:01
An: cxf-user@incubator.apache.org
Betreff: Complex Types contain all null values...

Simple types are returning correctly.  I have four methods on the service 
below... methods returning Strings are working... other methods return business 
objects.  I can step through the service on the server and those methods are 
returning the correct values.  No exceptions are thrown and the object contains 
all null values in the client.

Spring Wiring:
   !-- Local --
bean id=PricingServiceImpl class=
com.gdservices.service.thirdparty.PricingServiceImpl
property name=daoFactory
ref bean=hibernateDAOFactory/
/property
/bean
!-- Web --
jaxws:endpoint
  id=pricingService
  implementor=#PricingServiceImpl
  address=/pricingService /


I'm currently only using the @Webservice annotation and no method level
annotations.   Anyone else seen this?


AW: Complex Types contain all null values...

2007-07-27 Thread Holger Stolzenberg
Me to.

There is another strange thing in this:

The service causing the problems returns the Subscription.class object. In it 
all fields BUT ONE are set to null when returned from the client proxy!!! This 
field is another complex domain object of mine that is also loaded via 
hibernate spring aop (Customer.class foreign key). That is so strange, I also 
have no clue where to go but I think that this is scrambled up somewhere deep 
down in the reflection call to the WS method done by the client proxy.


-Ursprüngliche Nachricht-
Von: Brad Harper [mailto:[EMAIL PROTECTED] 
Gesendet: Freitag, 27. Juli 2007 17:17
An: cxf-user@incubator.apache.org
Betreff: Re: Complex Types contain all null values...

That's exactly the same issue I'm seeing.  It's just for complex types...
Strings, Longs both return successfully.  Sorry for the duplicate topic...
I'm pretty much standing still at this point.


On 7/27/07, Holger Stolzenberg [EMAIL PROTECTED] wrote:

 I am not sure if this helps but:

 How do you get the object, are using a debugging breakpoint at the 
 return statement of the service method or at the object returned by your 
 client?

 I also have an WS returning a business object (gets loaded through 
 Spring AOP transaction demarcation and hibernate). The problem is that 
 the object returned by the service itself has all fields filled (set a 
 breakpoint at the return statement of the service), but when calling 
 the service from a CXF client proxy all the fields in the object are null.

 Just thought that could be the same problem posted for it to the list 
 with the subject 'WS client returning uninitialized objects' but got 
 no answer yet.


 -Ursprüngliche Nachricht-
 Von: Brad Harper [mailto:[EMAIL PROTECTED]
 Gesendet: Freitag, 27. Juli 2007 17:01
 An: cxf-user@incubator.apache.org
 Betreff: Complex Types contain all null values...

 Simple types are returning correctly.  I have four methods on the 
 service below... methods returning Strings are working... other 
 methods return business objects.  I can step through the service on 
 the server and those methods are returning the correct values.  No 
 exceptions are thrown and the object contains all null values in the client.

 Spring Wiring:
!-- Local --
 bean id=PricingServiceImpl class=
 com.gdservices.service.thirdparty.PricingServiceImpl
 property name=daoFactory
 ref bean=hibernateDAOFactory/
 /property
 /bean
 !-- Web --
 jaxws:endpoint
   id=pricingService
   implementor=#PricingServiceImpl
   address=/pricingService /


 I'm currently only using the @Webservice annotation and no method level
 annotations.   Anyone else seen this?



Null values for web service parameters

2007-07-26 Thread Holger Stolzenberg
If I have a WS with the following signature:

public void doSomething( Object param1, Object param2, Object param2 );

Not all params are required. If I call the service via a client and for example 
param2 set to NULL I get the following exception:

org.apache.cxf.interceptor.Fault: wrong number of arguments
at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:88)
at 
org.apache.cxf.jaxws.JAXWSMethodInvoker.invoke(JAXWSMethodInvoker.java:82)
at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:56)
at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1.run(ServiceInvokerInterceptor.java:56)
at 
org.apache.cxf.workqueue.SynchronousExecutor.execute(SynchronousExecutor.java:37)
at 
org.apache.cxf.interceptor.ServiceInvokerInterceptor.handleMessage(ServiceInvokerInterceptor.java:87)
at 
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:206)
at 
org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:67)
at 
org.apache.cxf.transport.servlet.ServletDestination.doMessage(ServletDestination.java:100)
at 
org.apache.cxf.transport.servlet.ServletController.invokeDestination(ServletController.java:224)
at 
org.apache.cxf.transport.servlet.ServletController.invoke(ServletController.java:137)
at 
org.apache.cxf.transport.servlet.CXFServlet.invoke(CXFServlet.java:261)
at 
org.apache.cxf.transport.servlet.CXFServlet.doPost(CXFServlet.java:239)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.springframework.orm.hibernate3.support.OpenSessionInViewFilter.doFilterInternal(OpenSessionInViewFilter.java:198)
at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:75)
at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve..java:213)
at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve..java:178)
at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at 
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at 
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at 
org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at 
org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
at 
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.IllegalArgumentException: wrong number of arguments
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at 
org.apache.cxf.service.invoker.AbstractInvoker.invoke(AbstractInvoker.java:69)
... 32 more

How can I call a WS method with some or all parameters set to null 


Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 


AW: Determine which services are registered

2007-07-25 Thread Holger Stolzenberg
No problem, the solution with the ServerRegistry worked perfectly. I am using 
tapestry 4.1.2. and additionally tapestry-spring, so it was very easy for me to 
inject the ServerRegistry into my Tapestry page and create a dynamic list of 
the registered servers there.


-Ursprüngliche Nachricht-
Von: Glen Mazza [mailto:[EMAIL PROTECTED] 
Gesendet: Dienstag, 24. Juli 2007 17:54
An: cxf-user@incubator.apache.org
Betreff: Re: Determine which services are registered

I don't know if UDDI would help you--you might want to try to find out what 
XMethods (http://www.xmethods.net/ve2/index.po) does.

Otherwise, that might be application server dependent--i.e., no generalized way 
of doing so would exist. I say this because GlassFish and (I believe) Geronimo 
both provide a list of deployed web services in their respective web 
administration consoles.  (Alternatively, Axis2, has a separate web app that 
has that information.)  But how to retrieve that information would be dependent 
on the app server and web server framework you are using.

Another issue is that I'm not certain, for security reasons, if you would be 
able to obtain that information from a spring context.  That would be like one 
web application being hosted in a servlet container being able to query 
information on other web apps within that same container.

Glen


Am Freitag, den 20.07.2007, 15:53 +0200 schrieb Holger Stolzenberg:
 I have a web page that should dynamically show a list of all registered 
 services.
 
 Is there a class that knows all the web services (endpoints) that have been 
 registered. If yes how can get this class or bean from the spring context? 
 
 Mit lieben Grüßen aus dem eWerk
 
   |  Holger Stolzenberg
   |  Softwareentwickler
   |
   |  Geschäftsführer: 
   |  Frank Richter, Erik Wende, Hendrik Schubert
   |
   |  eWerk IT GmbH
   |  Markt 16
   |  Leipzig 04109
   |  http://www.ewerk.com
   |  HRB 9065, AG Leipzig
   |  Hauptniederlassung Leipzig
   |
   |  fon +49.341.4 26 49-0
   |  fax +49.341.4 26 49-88
   |  mailto:[EMAIL PROTECTED]
   |
   |  Support:
   |  fon 0700 CALLME24 (0700 22556324)
   |  fax 0700 CALLME24 (0700 22556324)
   |
   | Auskünfte und Angebote per Mail
   | sind freibleibend und unverbindlich. 



WS client returning uninitialized objects

2007-07-25 Thread Holger Stolzenberg
I have the following bug that where I cannnot figure out where the
problem is. I have a Web Service with the following definition:

=== INTERFACE 

@WebService( name = SubscriptionService )
public interface ISubscriptionService extends IBackendService
{
@WebMethod( operationName = getSubscriptionById )
@WebResult( name = getSubscriptionByIdResult )
public Subscription getSubscriptionById(@WebParam( name
= auth ) ServiceAuthentication auth,

@WebParam( name = subscriptionId ) int subscriptionId ) throws
BackendServiceException;
}


=== IMPL ===

@WebService( serviceName = SubscriptionService, endpointInterface =
ISubscriptionService )
public class SubscriptionServiceImpl extends BackendServiceImpl
implements ISubscriptionService
{
public Subscription getSubscriptionById( ServiceAuthentication
auth, int subscriptionId ) throws SubscriptionServiceException
{
try
{
// here we use a Spring transaction proxy
(Hibernate, TransactionManager, TransactionDemarcation ...)
ISubscriptionDaoProxy proxy =
(ISubscriptionDaoProxy) getDaoProxyProvider().getDaoProxy(
ISubscriptionDaoProxy.class );
Subscription subscription =
proxy.getSubscriptionById( subscriptionId );

return subscription;  If I set
a breakPoint here in my TestNG Test, I can see a valid object was loaded
and returned
}
catch ( Exception e )
{
...
}
}
}

The web service itself is declared as spring bean (excerpt):

?xml version=1.0 encoding=UTF-8 ?
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-2.0.xsd

http://cxf.apache.org/jaxws classpath:/schemas/jaxws.xsd

!-- Load Celtixfire configuration stuff --
import resource=classpath:META-INF/cxf/cxf.xml /
import resource=classpath:META-INF/cxf/cxf-extension-*.xml /
import resource=classpath:META-INF/cxf/cxf-servlet.xml /

... all needed beans defined here ...

!-- Subscription service --
bean id=SubscriptionServiceImpl
class=com.ewerk.eex.shop.backend.wsapi.subscription.SubscriptionService
Impl
property name=daoProxyProvider
ref=DaoProxyProvider/
property name=eventModule ref=EventModule/
property name=serviceAuthenticationValidator
ref=ServiceAuthenticationValidator/
/bean
jaxws:endpoint id=SubscriptionService
address=/SubscriptionService
jaxws:implementor
ref bean=SubscriptionServiceImpl /
/jaxws:implementor
/jaxws:endpoint
 
/beans

Everything is working fine, the Tomcat starts up without problems and I
can access the WSDL of the service. I also can call the service via a
PHP client and a fully initialized Subscription object is returned.

I also have an TestNG test class that test the service. Here lies the
problem:

=== TEST CODE ===

@Test( groups = ServiceTestGroup )
public void testGetSubscriptionById() throws Exception
{
// start server
JaxWsServerFactoryBean sf = new JaxWsServerFactoryBean ();
sf.setBus( bus );
sf.setServiceClass( ISubscriptionService.class );
sf.setServiceBean( impl );  gets injected from spring
context
sf.setAddress( http://localhost:8080/SubscriptionService; );
sf.getServiceFactory().setDataBinding( new AegisDatabinding() );
sf.create();

// create client
ClientProxyFactoryBean factory = new ClientProxyFactoryBean();
factory.setBus( bus );
factory.setServiceClass( ISubscriptionService.class );
factory.setAddress( http://localhost:8080/SubscriptionService;
);
factory.getServiceFactory().setDataBinding( new
AegisDatabinding() );

ISubscriptionService client =
(ISubscriptionService)factory.create();

int testId = IBackendTestConstants.TEST_SUBSCRIPTION_ID;
Subscription loaededSubscription = client.getSubscriptionById(
getServiceAuthentication(), testId );  when invoked I can see a
valid
Subscription object 

loaded at the breakpoint in the impl class BUT

assert ( subscription != null ) : Subscription is null;
assert ( subscription.getId() == testId ) : Ids are not
matching;This assert fails because the local
variable
'loadedSubscription' is only PARTIALLY initialized. Every field
is null except fields that are foreing key references.
Subscription.class bean is not only the return value of the web

Determine which services are registered

2007-07-20 Thread Holger Stolzenberg
I have a web page that should dynamically show a list of all registered 
services.

Is there a class that knows all the web services (endpoints) that have been 
registered. If yes how can get this class or bean from the spring context? 

Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 


AW: http://schemas.xmlsoap.org/soap/http

2007-07-12 Thread Holger Stolzenberg
I experienced this problem when creating a client for my services. For me the 
schema itself did not help it was more likely a bug in the client setup. I had 
to call setBus( ... ) on the client factory then the error had gone. Example:

NOT WORKING:
JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setServiceClass( getServiceInterface() );
factory.setAddress( getRealAddress() ); 


WORKING:
Bus bus = new SpringBusFactory().createBus();

JaxWsProxyFactoryBean factory = new JaxWsProxyFactoryBean();
factory.setBus( bus );
factory.setServiceClass( getServiceInterface() );
factory.setAddress( getRealAddress() );
 Create client


Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 

-Ursprüngliche Nachricht-
Von: Marc Baumgartner [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 12. Juli 2007 17:01
An: cxf-user@incubator.apache.org
Betreff: http://schemas.xmlsoap.org/soap/http

Hi all,

I get an org.springframework.beans.factory.BeanCreationException: Error 
creating bean with name 'helloWorldWS': Invocation of init method failed; 
nested exception is java.lang.RuntimeException: Could not find destination 
factory for transport http://schemas.xmlsoap.org/soap/http

Where can I find this schema? How do I have to include it in my spring conf?

Regards,
Marc
--
Der GMX SmartSurfer hilft bis zu 70% Ihrer Onlinekosten zu sparen! 
Ideal für Modem und ISDN: http://www.gmx.net/de/go/smartsurfer



AW: Could not find destination factory for transport

2007-07-12 Thread Holger Stolzenberg
I think you shouls set the 'bus' property of your 'clientFactory' bean.

You can achive this using new SpringBusFactory().createBus(). For usage in 
Spring you need to define the SpringBusFactory and the Bus itself as separate 
beans and then inject the bus property into the client factory.

Something liek this (pseudo code):

bean id=BusFactory class=full.qualified.SpringBusFactory /

bean id=CXFBus factory-bean=BusFactory factory-method=createBus /

bean id=clientFactory class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
property name=bus ref=CXFBus /
property name=serviceClass 
value=com.acme.services.server.TestService /
property name=address value=/testService /
/bean

Hope this helps. Do not know if this is the best solution because I am new to 
CXF but for me it worked.


Mit lieben Grüßen aus dem eWerk

  |  Holger Stolzenberg
  |  Softwareentwickler
  |
  |  Geschäftsführer: 
  |  Frank Richter, Erik Wende, Hendrik Schubert
  |
  |  eWerk IT GmbH
  |  Markt 16
  |  Leipzig 04109
  |  http://www.ewerk.com
  |  HRB 9065, AG Leipzig
  |  Hauptniederlassung Leipzig
  |
  |  fon +49.341.4 26 49-0
  |  fax +49.341.4 26 49-88
  |  mailto:[EMAIL PROTECTED]
  |
  |  Support:
  |  fon 0700 CALLME24 (0700 22556324)
  |  fax 0700 CALLME24 (0700 22556324)
  |
  | Auskünfte und Angebote per Mail
  | sind freibleibend und unverbindlich. 

-Ursprüngliche Nachricht-
Von: Richard Lawrence [mailto:[EMAIL PROTECTED] 
Gesendet: Donnerstag, 12. Juli 2007 17:39
An: cxf-user@incubator.apache.org
Betreff: Could not find destination factory for transport

 
I am getting the following error when trying to call a client using spring with 
CXF:

16:26:12,499 ERROR DispatcherUtils:245 - Could not execute action
javax.xml.ws.soap.SOAPFaultException: Could not find destination factory for 
transport http://schemas.xmlsoap.org/soap/http
at
org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:168)
at $Proxy40.test(Unknown Source)

I have browsed the mailing list and it states I should put the following jar on 
the classpath:

cxf-rt-transports-http-jetty-2.0-incubator.jar

I have this jar on my classpath and am not getting any joy. My service works as 
expected its just the corresponding client.

I am hosting the code in Tomcat 6.0.10 and using Webwork as my application 
framework (Essentially it's using the Spring IOC).

I have the following client-beans.xml:

?xml version=1.0 encoding=UTF-8?
!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
License); you may not use this file except in compliance
with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing,
software distributed under the License is distributed on an
AS IS BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, either express or implied. See the License for the
specific language governing permissions and limitations
under the License.
--
!-- START SNIPPET: beans --
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-2.0.xsd
http://cxf.apache.org/jaxws http://cxf.apache.org/schema/jaxws.xsd;

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

import
resource=classpath:META-INF/cxf/cxf-extension-http-jetty.xml /  


bean id=client class=com.acme.services.server.TestService 
  factory-bean=clientFactory factory-method=create/

bean id=clientFactory
class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
  property name=serviceClass
value=com.acme.services.server.TestService/
  property name=address value=/testService/
/bean
  
/beans
!-- END SNIPPET: beans --

Does anybody know what could be causing this error?
 
Regards

Richard Lawrence 

CONFIDENTIALITY NOTICE

This e-mail is confidential to the addressee. It may also be privileged. 
Neither the confidentiality nor any privilege attaching to this e-mail is 
waived lost or destroyed by reason that it has been mistakenly transmitted to a 
person or entity other than the addressee. If you are not the addressee please 
notify us immediately by telephone or fax at the numbers provided above or 
e-mail by Reply To Author and return the printed e-mail to us by post at our 
expense. We believe, but do not warrant, that this e-mail