Re: [2.0.5] no write methods....

2008-04-15 Thread Mick Knutson
I just tried that, and it works.

On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies [EMAIL PROTECTED]
wrote:

 Hmm, I'll look at that. This rings a portion of a bell.

 On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp [EMAIL PROTECTED] wrote:

 
  It might be due to the setVersion method being protected, not public.
  Thus, it might not see it as a propery as there aren't public getters
  and setters.  Not really sure though.
 
  Dan
 
 
  On Tuesday 15 April 2008, Benson Margulies wrote:
   I've never heard of @Version. I very much doubt that Aegis sees it.
  
   What version of CXF are you using? Could you please post a
   self-contained test case to Jira?
  
  
   On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson [EMAIL PROTECTED]
  
   wrote:
I am getting this error now:
   
*INFO: Interceptor has thrown exception, unwinding now
java.lang.RuntimeException:
org.apache.cxf.aegis.DatabindingException: No write method for
property {http://domain.baselogic.com}version in class
com.baselogic.domain.Address
   at
   
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
   ataReader.java:92) at
   
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
   ataReader.java:44) *
Here is my address object and versioned objects:
   
*Address:*
[EMAIL PROTECTED]
@Table(name = address)
public class Address extends IdentifiedObject implements
Serializable {
   
   private static final long serialVersionUID =
3617859655330969141L; protected String address;
   protected String city;
   protected String province;
   protected String country;
   protected String postalCode;
   
   public Address() {
   }
   
   public Address(Long id) {
   setId(id);
   }
   
*
   
*VersionedObject:
[EMAIL PROTECTED]
public class VersionedObject implements Serializable {
   private static final long serialVersionUID = 1L;
   
   protected Integer version;
   
   @Version
   public Integer getVersion() {
   return version;
   }
   
   protected void setVersion(Integer version) {
   this.version = version;
   }
   
}
*
   
   
So what is the issue with @Version?
When I remove this set/get method, everything is fine.
   
   
   
--
Thanks,
Mick Knutson
   
http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---
 
 
 
  --
  J. Daniel Kulp
  Principal Engineer, IONA
  [EMAIL PROTECTED]
  http://www.dankulp.com/blog
 




-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Re: [2.0.5] no write methods....

2008-04-15 Thread Mick Knutson
But if I have a DAO and a Domain Object in the same package, yet the Domain
Object has a protected setVersion, why would there be an error? I do not
want the version for be public. Only the getter.

On Tue, Apr 15, 2008 at 10:00 AM, Benson Margulies [EMAIL PROTECTED]
wrote:

 Hmm, I guess this is working as designed.

 On Tue, Apr 15, 2008 at 12:58 PM, Mick Knutson [EMAIL PROTECTED]
 wrote:

  I just tried that, and it works.
 
  On Tue, Apr 15, 2008 at 8:33 AM, Benson Margulies [EMAIL PROTECTED]
 
  wrote:
 
   Hmm, I'll look at that. This rings a portion of a bell.
  
   On Tue, Apr 15, 2008 at 11:26 AM, Daniel Kulp [EMAIL PROTECTED]
 wrote:
  
   
It might be due to the setVersion method being protected, not
 public.
Thus, it might not see it as a propery as there aren't public
 getters
and setters.  Not really sure though.
   
Dan
   
   
On Tuesday 15 April 2008, Benson Margulies wrote:
 I've never heard of @Version. I very much doubt that Aegis sees
 it.

 What version of CXF are you using? Could you please post a
 self-contained test case to Jira?


 On Mon, Apr 14, 2008 at 10:03 PM, Mick Knutson 
  [EMAIL PROTECTED]

 wrote:
  I am getting this error now:
 
  *INFO: Interceptor has thrown exception, unwinding now
  java.lang.RuntimeException:
  org.apache.cxf.aegis.DatabindingException: No write method for
  property {http://domain.baselogic.com}version in class
  com.baselogic.domain.Address
 at
 
 
  org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
 ataReader.java:92) at
 
 
  org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamD
 ataReader.java:44) *
  Here is my address object and versioned objects:
 
  *Address:*
  [EMAIL PROTECTED]
  @Table(name = address)
  public class Address extends IdentifiedObject implements
  Serializable {
 
 private static final long serialVersionUID =
  3617859655330969141L; protected String address;
 protected String city;
 protected String province;
 protected String country;
 protected String postalCode;
 
 public Address() {
 }
 
 public Address(Long id) {
 setId(id);
 }
 
  *
 
  *VersionedObject:
  [EMAIL PROTECTED]
  public class VersionedObject implements Serializable {
 private static final long serialVersionUID = 1L;
 
 protected Integer version;
 
 @Version
 public Integer getVersion() {
 return version;
 }
 
 protected void setVersion(Integer version) {
 this.version = version;
 }
 
  }
  *
 
 
  So what is the issue with @Version?
  When I remove this set/get method, everything is fine.
 
 
 
  --
  Thanks,
  Mick Knutson
 
  http://www.baselogic.com
  http://www.blincmagazine.com
  http://www.linkedin.com/in/mickknutson
  http://www.djmick.com
  http://www.myspace.com/mickknutson
  http://www.myspace.com/BLiNCMagazine
  http://tahoe.baselogic.com
  ---
   
   
   
--
J. Daniel Kulp
Principal Engineer, IONA
[EMAIL PROTECTED]
http://www.dankulp.com/blog
   
  
 
 
 
  --
  Thanks,
  Mick Knutson
 
  http://www.baselogic.com
  http://www.blincmagazine.com
  http://www.linkedin.com/in/mickknutson
  http://www.djmick.com
  http://www.myspace.com/mickknutson
  http://www.myspace.com/BLiNCMagazine
  http://tahoe.baselogic.com
  ---
 




-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Re: Can‘t find how to access the webservice when deployed into tomcat

2008-04-15 Thread Mick Knutson
=xs:int/
  xs:element minOccurs=0 name=user type=tns:User/
  /xs:sequence
  /xs:complexType
  /xs:schema
/wsdl:types
wsdl:message name=sayHiToUserResponse
  wsdl:part element=tns:sayHiToUserResponse name=parameters
  /wsdl:part
/wsdl:message
wsdl:message name=getUsers
  wsdl:part element=tns:getUsers name=parameters
  /wsdl:part
/wsdl:message
wsdl:message name=sayHiToUser
  wsdl:part element=tns:sayHiToUser name=parameters
  /wsdl:part
/wsdl:message
wsdl:message name=sayHi
  wsdl:part element=tns:sayHi name=parameters
  /wsdl:part
/wsdl:message
wsdl:message name=sayHiResponse
  wsdl:part element=tns:sayHiResponse name=parameters
  /wsdl:part
/wsdl:message
wsdl:message name=getUsersResponse
  wsdl:part element=tns:getUsersResponse name=parameters
  /wsdl:part
/wsdl:message
wsdl:portType name=HelloWorld
  wsdl:operation name=sayHi
wsdl:input message=tns:sayHi name=sayHi
  /wsdl:input
wsdl:output message=tns:sayHiResponse name=sayHiResponse
  /wsdl:output
  /wsdl:operation
  wsdl:operation name=sayHiToUser
wsdl:input message=tns:sayHiToUser name=sayHiToUser
  /wsdl:input
wsdl:output message=tns:sayHiToUserResponse
  name=sayHiToUserResponse
  /wsdl:output
  /wsdl:operation
  wsdl:operation name=getUsers
wsdl:input message=tns:getUsers name=getUsers
  /wsdl:input
wsdl:output message=tns:getUsersResponse
 name=getUsersResponse
  /wsdl:output
  /wsdl:operation
/wsdl:portType
wsdl:binding name=HelloWorldImplServiceSoapBinding
  type=tns:HelloWorld
  soap:binding style=document transport=
  http://schemas.xmlsoap.org/soap/http/
 http://schemas.xmlsoap.org/soap/http%22/
 
  wsdl:operation name=sayHi
soap:operation soapAction= style=document/
wsdl:input name=sayHi
  soap:body use=literal/
/wsdl:input
wsdl:output name=sayHiResponse
  soap:body use=literal/
/wsdl:output
  /wsdl:operation
  wsdl:operation name=sayHiToUser
soap:operation soapAction= style=document/
wsdl:input name=sayHiToUser
  soap:body use=literal/
/wsdl:input
wsdl:output name=sayHiToUserResponse
  soap:body use=literal/
/wsdl:output
  /wsdl:operation
  wsdl:operation name=getUsers
soap:operation soapAction= style=document/
wsdl:input name=getUsers
  soap:body use=literal/
/wsdl:input
wsdl:output name=getUsersResponse
  soap:body use=literal/
/wsdl:output
  /wsdl:operation
/wsdl:binding
wsdl:service name=HelloWorldImplService
  wsdl:port binding=tns:HelloWorldImplServiceSoapBinding
  name=HelloWorldImplPort
soap:address
  location=http://localhost:9000/helloWorld/
 http://localhost:9000/helloWorld%22/
 
  /wsdl:port
/wsdl:service
  /wsdl:definitions
 
  Anyone could give me a hint?
 
  Thanks in advance
 
  Jackey
 




-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


[2.0.5] Help to get soap message from Spring service...

2008-04-14 Thread Mick Knutson
I am trying to setup a UserService via Spring that takes a userId, and
returns a User object.

I setup a LoggingInterceptor, and I seem to be getting a user object back:
*INFO: Outbound Message
---
Encoding: UTF-8
Headers: {SOAPAction=[], Accept=[*]}
Messages:
Payload: soap:Envelope xmlns:soap=
http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUser
xmlns:ns1=http://service.baselogic.com/;
userId-1/userId/ns1:getUser/soap:Body/soap:Envelope
--
14-Apr-2008 10:02:32 org.apache.cxf.interceptor.LoggingInInterceptor logging
INFO: Inbound Message

Encoding: UTF-8
Headers: {Content-Length=[1576], Date=[Mon, 14 Apr 2008 17:02:32 GMT],
SOAPAction=[], Server=[Apache-Coyote/1.1], content-type=[text/xml;charse
t=UTF-8]}
Messages:
Message:

Payload: soap:Envelope xmlns:soap=
http://schemas.xmlsoap.org/soap/envelope/;soap:Bodyns1:getUserResponse
xmlns:ns1=http://service.baselogi
c.com/returnns2:address xmlns:ns2=http://domain.baselogic.com
ns2:address725 Florida Street #5/ns2:addressns2:citySan
Francisco/ns2
:cityns2:countryUS/ns2:countryns2:id-1
/ns2:idns2:postalCode94110/ns2:postalCodens2:provinceCA/ns2:provincens2:version1/ns2:ve
rsion/ns2:addressns2:confirmPassword xmlns:ns2=
http://domain.baselogic.com; xmlns:ns3=
http://www.w3.org/2001/XMLSchema-instance; ns3:nil=t
rue /ns2:email xmlns:ns2=http://domain.baselogic.com;
[EMAIL PROTECTED]/ns2:emailns2:firstName xmlns:ns2=
http://domain.baselogic.com;
Mick/ns2:firstNamens2:id
xmlns:ns2=http://domain.baselogic.com;-1/ns2:idns2:lastName
xmlns:ns2=http://domain.baselogic.com;Knutson/ns
2:lastNamens2:password
xmlns:ns2=http://domain.baselogic.com;12dea96fec20593566ab75692c9949596833adc9/ns2:passwordns2:passwordHint
xmlns:n
s2=http://domain.baselogic.com;A male
kitty./ns2:passwordHintns2:phoneNumber xmlns:ns2=
http://domain.baselogic.com;(415) 555-1804/ns2:pho
neNumberns2:roles xmlns:ns2=http://domain.baselogic.com; xmlns:ns3=
http://www.w3.org/2001/XMLSchema-instance; ns3:nil=true /ns2:username
xmlns:ns2=http://domain.baselogic.com;mickknutson/ns2:usernamens2:version
xmlns:ns2=http://domain.baselogic.com;1/ns2:versionns2:websit
e xmlns:ns2=http://domain.baselogic.com;http://baselogic.com
/ns2:website/return/ns1:getUserResponse/soap:Body/soap:Envelope
*


So when I do this:

*UserManager userManager = (UserManager) factory.create();*
then *userManager.getUser(-1);* I get a null User Object. Not the object
I see in my soap envelope above.

How do I get my User Object? All the examples I see show me to do the same
thing I am already doing, but this does not work
Thanks for your help


-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


[2.0.5] no write methods....

2008-04-14 Thread Mick Knutson
I am getting this error now:

*INFO: Interceptor has thrown exception, unwinding now
java.lang.RuntimeException: org.apache.cxf.aegis.DatabindingException: No
write method for property {http://domain.baselogic.com}version in class
 com.baselogic.domain.Address
at
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:92)
at
org.apache.cxf.aegis.databinding.XMLStreamDataReader.read(XMLStreamDataReader.java:44)
*
Here is my address object and versioned objects:

*Address:*
[EMAIL PROTECTED]
@Table(name = address)
public class Address extends IdentifiedObject implements Serializable {

private static final long serialVersionUID = 3617859655330969141L;
protected String address;
protected String city;
protected String province;
protected String country;
protected String postalCode;

public Address() {
}

public Address(Long id) {
setId(id);
}

*

*VersionedObject:
[EMAIL PROTECTED]
public class VersionedObject implements Serializable {
private static final long serialVersionUID = 1L;

protected Integer version;

@Version
public Integer getVersion() {
return version;
}

protected void setVersion(Integer version) {
this.version = version;
}

}
*


So what is the issue with @Version?
When I remove this set/get method, everything is fine.



-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Re: Unexpected EOF in prolog

2008-04-12 Thread Mick Knutson
I am using *2.0.5-incubator* for my testing.

I started looking into the spring examples as well, and notice that the ant
task is starting up a new instance of Jetty in a different JVM...? Is that
correct?

So basically, here is what I am trying to do when this error occurs.

   1. startup embeded tomcat on port 8080
   2. war up test application
   3. deploy test application to the embeded tomcat
   4. start up testNG with a test applicationContext pointing to the
   localhost:8080/cxf/EchoService
   5. Get an EchoService object.
   6. Print the details of that Object for debugging (which shows all the
   valid operations)
   7. Invoke the EchoService
   8. BANG! I get the mentioned error.




On Fri, Apr 11, 2008 at 7:54 PM, Glen Mazza [EMAIL PROTECTED] wrote:

 I don't know what version of CXF you're using but 2.0.5 has some changes
 that *might* reduce the number of com.ctc.wstx.exc.WstxEOFExceptions you
 will be getting, and hopefully provide you a more useful error message:
 http://www.jroller.com/gmazza/date/20080327

 HTH,
 Glen

 Am Freitag, den 11.04.2008, 10:26 -0800 schrieb Mick Knutson:
  I have an echo web service working when deployed to tomcat 5.5 and
 sending
  requests through soapUI. It seems to work great.
 
  But now I am trying to create a client via spring 2.5, and test this
 through
  testNG. *I keep getting this error when I create this client:*
 
  *!-- Web service dynamic proxy --
  bean id=echoClient
class=com.baselogic.service.EchoImpl
factory-bean=echoClientFactory
factory-method=create/
 
  !-- Factory to create the dynamic proxy --
  bean id=echoClientFactory
  class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
  property name=serviceClass
  value=com.baselogic.service.EchoService/
  property name=address value=
  http://localhost:8080//cxf/EchoService/
  property name=serviceFactory
 ref=jaxwsAndAegisServiceFactory/
  /bean
 
  *
  *And here is my testNG test:*
  *@Test(groups = {functional})
  public void testEcho() throws Exception {
  log.debug(testGetUser);
 
  try {
  Object echo1 = applicationContext.getBean(echoClient);
 
  log.debug(==);
  log.debug(StringUtil.toString(echo1.getClass()));
 
  log.debug(==);
  EchoService echo = (EchoService)
  applicationContext.getBean(echoClient);
 
 
  log.debug(==);
  log.debug(echo.echoString(this is a
  test)); //-- This lines throws the error
 
  log.debug(==);
  AssertJUnit.assertNotNull(echo.echoString(this is a
  test));
  //AssertJUnit.assertEquals(mknutson, user.getUsername());
  }
  catch (Exception e) {
  e.printStackTrace();
  throw e;
  }
  }
  *
 
 
  *Here is my error:*
 
  *  exception class=javax.xml.ws.soap.SOAPFaultException
  message
![CDATA[Error reading XMLStreamReader.]]
  /message
  full-stacktrace
![CDATA[javax.xml.ws.soap.SOAPFaultException: Error
 reading
  XMLStreamReader.
  at
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:211)
  at $Proxy39.echoString(Unknown Source)
  at
  com.baselogic.service.UserServiceTest.testEcho(UserServiceTest.java:79)
  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:585)
  at
 org.testng.internal.MethodHelper.invokeMethod(MethodHelper.java:580)
  at org.testng.internal.Invoker.invokeMethod(Invoker.java:478)
  at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:607)
  at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:874)
  at
 
 org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:125)
  at
 org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:109)
  at org.testng.TestRunner.runWorkers(TestRunner.java:689)
  at org.testng.TestRunner.privateRun(TestRunner.java:566)
  at org.testng.TestRunner.run(TestRunner.java:466)
  at org.testng.SuiteRunner.runTest(SuiteRunner.java:301)
  at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:296)
  at org.testng.SuiteRunner.privateRun(SuiteRunner.java:276)
  at org.testng.SuiteRunner.run(SuiteRunner.java:191)
  at org.testng.TestNG.createAndRunSuiteRunners(TestNG.java:808)
  at org.testng.TestNG.runSuitesLocally(TestNG.java:776)
  at org.testng.TestNG.run(TestNG.java:701

Re: Unexpected EOF in prolog

2008-04-12 Thread Mick Knutson
I also downloaded 2.0.5-incubator and imported all the jars I needed instead
into my local repository instead of using my original import:

*dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-frontend-jaxws/artifactId
version2.0.5-incubator/version
/dependency
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http/artifactId
version2.0.5-incubator/version
/dependency

dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-databinding-aegis/artifactId
version2.0.5-incubator/version
/dependency

!-- Jetty is needed if you're are not using the CXFServlet --
dependency
groupIdorg.apache.cxf/groupId
artifactIdcxf-rt-transports-http-jetty/artifactId
version2.0.2-incubator/version
/dependency*

Just to make sure I might have the right jar that I needed. But I still get
the same error.

Any other ideas?



On Sat, Apr 12, 2008 at 6:10 AM, Mick Knutson [EMAIL PROTECTED] wrote:

 I am using *2.0.5-incubator* for my testing.

 I started looking into the spring examples as well, and notice that the
 ant task is starting up a new instance of Jetty in a different JVM...? Is
 that correct?

 So basically, here is what I am trying to do when this error occurs.

1. startup embeded tomcat on port 8080
2. war up test application
3. deploy test application to the embeded tomcat
4. start up testNG with a test applicationContext pointing to the
localhost:8080/cxf/EchoService
5. Get an EchoService object.
6. Print the details of that Object for debugging (which shows all
the valid operations)
7. Invoke the EchoService
8. BANG! I get the mentioned error.




 On Fri, Apr 11, 2008 at 7:54 PM, Glen Mazza [EMAIL PROTECTED]
 wrote:

  I don't know what version of CXF you're using but 2.0.5 has some changes
  that *might* reduce the number of com.ctc.wstx.exc.WstxEOFExceptions you
  will be getting, and hopefully provide you a more useful error message:
  http://www.jroller.com/gmazza/date/20080327
 
  HTH,
  Glen
 
  Am Freitag, den 11.04.2008, 10:26 -0800 schrieb Mick Knutson:
   I have an echo web service working when deployed to tomcat 5.5 and
  sending
   requests through soapUI. It seems to work great.
  
   But now I am trying to create a client via spring 2.5, and test this
  through
   testNG. *I keep getting this error when I create this client:*
  
   *!-- Web service dynamic proxy --
   bean id=echoClient
 class=com.baselogic.service.EchoImpl
 factory-bean=echoClientFactory
 factory-method=create/
  
   !-- Factory to create the dynamic proxy --
   bean id=echoClientFactory
   class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
   property name=serviceClass
   value=com.baselogic.service.EchoService/
   property name=address value=
   http://localhost:8080//cxf/EchoService/
   property name=serviceFactory
  ref=jaxwsAndAegisServiceFactory/
   /bean
  
   *
   *And here is my testNG test:*
   *@Test(groups = {functional})
   public void testEcho() throws Exception {
   log.debug(testGetUser);
  
   try {
   Object echo1 = applicationContext.getBean(echoClient);
  
   log.debug(==);
   log.debug(StringUtil.toString(echo1.getClass()));
  
   log.debug(==);
   EchoService echo = (EchoService)
   applicationContext.getBean(echoClient);
  
  
   log.debug(==);
   log.debug(echo.echoString(this is a
   test)); //-- This lines throws the error
  
   log.debug(==);
   AssertJUnit.assertNotNull(echo.echoString(this is a
   test));
   //AssertJUnit.assertEquals(mknutson,
  user.getUsername());
   }
   catch (Exception e) {
   e.printStackTrace();
   throw e;
   }
   }
   *
  
  
   *Here is my error:*
  
   *  exception class=javax.xml.ws.soap.SOAPFaultException
   message
 ![CDATA[Error reading XMLStreamReader.]]
   /message
   full-stacktrace
 ![CDATA[javax.xml.ws.soap.SOAPFaultException: Error
  reading
   XMLStreamReader.
   at
  
  org.apache.cxf.jaxws.JaxWsClientProxy.invoke(JaxWsClientProxy.java:211)
   at $Proxy39.echoString(Unknown Source)
   at
  
  com.baselogic.service.UserServiceTest.testEcho(UserServiceTest.java:79)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at
  
  sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39

[2.0.5] need help creating client in TestNG and Spring

2008-04-12 Thread Mick Knutson
I have tried the example
http://cwiki.apache.org/CXF20DOC/writing-a-service-with-spring.html for
setting up a service. My service has a DAO going against my database. This
service works just fine external using SoapUI when deployed into tomcat.

But I want to deploy to embeded tomcat, and execute via testNG. When I use
the following test client:

*bean id=userClient
class=com.baselogic.service.impl.UserManagerImpl
  factory-bean=userClientFactory factory-method=create/

!-- Factory to create the dynamic proxy --
bean id=userClientFactory
class=org.apache.cxf.jaxws.JaxWsProxyFactoryBean
property name=serviceClass
value=com.baselogic.service.UserManager/
property name=address value=
http://localhost:8080/webapp-2.2/cxf/UserService/
/bean


**From my UserManagerImpl:
**
**public User getUser(String userId) throws UserNotFoundException {*
*
log.debug(==);*
*log.debug(getUser(String userId)  + userId);*
*
log.debug(==);*

*User user = userDao.read(Long.valueOf(userId));*
*if(user == null){*
*throw new UserNotFoundException(user  + userId +  Not
Found);*
*}*
*return user;*
*}*
*
*
I seem to get a version of com.baselogic.service.UserManager that was
proxied that does not have any of my debug statements or the doa. Thus I get
back a null object, and nothing is printed.

So what is the proper usage for me to start a cxf client to access a
deployed webservice to my embeded container so that is uses the deployed
service, and does not re-create a new one?



-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---


Unexpected EOF in prolog

2008-04-11 Thread Mick Knutson
(HTTPConduit.java:1976)
at
org.apache.cxf.transport.http.HTTPConduit$WrappedOutputStream.close(HTTPConduit.java:1812)
at
org.apache.cxf.transport.AbstractConduit.close(AbstractConduit.java:66)
at org.apache.cxf.transport.http.HTTPConduit.close(HTTPConduit.java:582)
at
org.apache.cxf.interceptor.MessageSenderInterceptor$MessageSenderEndingInterceptor.handleMessage(MessageSenderInterceptor.java:62)
at
org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:220)
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:170)
... 31 more
Caused by: com.ctc.wstx.exc.WstxEOFException: Unexpected EOF in prolog
 at [row,col {unknown-source}]: [1,0]
at
com.ctc.wstx.sr.StreamScanner.throwUnexpectedEOF(StreamScanner.java:661)
at
com.ctc.wstx.sr.BasicStreamReader.handleEOF(BasicStreamReader.java:2134)
at
com.ctc.wstx.sr.BasicStreamReader.nextFromProlog(BasicStreamReader.java:2040)
at com.ctc.wstx.sr.BasicStreamReader.next(BasicStreamReader.java:1069)
at
com.ctc.wstx.sr.BasicStreamReader.nextTag(BasicStreamReader.java:1095)
at
org.apache.cxf.binding.soap.interceptor.ReadHeadersInterceptor.handleMessage(ReadHeadersInterceptor.java:85)
... 44 more
]]
/full-stacktrace
  /exception
*


-- 
Thanks,
Mick Knutson

http://www.baselogic.com
http://www.blincmagazine.com
http://www.linkedin.com/in/mickknutson
http://www.djmick.com
http://www.myspace.com/mickknutson
http://www.myspace.com/BLiNCMagazine
http://tahoe.baselogic.com
---