Git Product home page Git Product logo

Comments (11)

ctoestreich avatar ctoestreich commented on August 11, 2024

Without more code, hard to tell. You may want to consider trying renaming the end point to something other than get maybe calculateTax. Slight chance that Groovy/Grails is treating the get prefix as a property.

from grails-cxf.

gcstang avatar gcstang commented on August 11, 2024

That didn't work would you like me to send you some code in an archive like
rar or zip?

On Mon, Mar 18, 2013 at 8:35 AM, Christian Oestreich <
[email protected]> wrote:

Without more code, hard to tell. You may want to consider trying renaming
the end point to something other than get maybe calculateTax. Slight chance
that Groovy/Grails is treating the get prefix as a property.


Reply to this email directly or view it on GitHubhttps://github.com/thorstadt/grails-cxf/issues/28#issuecomment-15054773
.

from grails-cxf.

ctoestreich avatar ctoestreich commented on August 11, 2024

A zip would be fine. I can look at it today or tomorrow. acetrike at gmail

from grails-cxf.

ctoestreich avatar ctoestreich commented on August 11, 2024

I have added your domain classes and service to the test project https://github.com/ctoestreich/grails-cxf-tax-project-test

I wrote a functional spec that is passing just fine as well as added an additional soap ui project under docs/taxcalc-wsdl-soapui-project.xml

The operation is working just fine over both soap and the functional test. If something else is broken please provide some detailed commentary on the exact problem of what the expectation vs realty is as I can not seem to reproduce what I understand the issue to be from your comments.

from grails-cxf.

gcstang avatar gcstang commented on August 11, 2024

Your project or mine I get this when using SoapUI

<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
soap:Body
soap:Fault
soap:Client
Unmarshalling Error: 1
/soap:Fault
/soap:Body
/soap:Envelope

On Thu, Mar 21, 2013 at 11:17 AM, Christian Oestreich <
[email protected]> wrote:

I have added your domain classes and service to the test project
https://github.com/ctoestreich/grails-cxf-tax-project-test

I wrote a functional spec that is passing just fine as well as added an
additional soap ui project under docs/taxcalc-wsdl-soapui-project.xml

The operation is working just fine over both soap and the functional test.
If something else is broken please provide some detailed commentary on the
exact problem of what the expectation vs realty is as I can not seem to
reproduce what I understand the issue to be from your comments.


Reply to this email directly or view it on GitHubhttps://github.com/thorstadt/grails-cxf/issues/28#issuecomment-15248531
.

from grails-cxf.

ctoestreich avatar ctoestreich commented on August 11, 2024

Can you change the values of the test request so you can narrow down the field. make all that are 1 sequencial like 1,2,3,4 so you can pinpoint the field. Let me know which it is.

from grails-cxf.

ctoestreich avatar ctoestreich commented on August 11, 2024

What happens when running test-app on my project I provided?

from grails-cxf.

gcstang avatar gcstang commented on August 11, 2024

I'll try to narrow it down but when I run your app in test it passes.

Running 1 spock test... 1 of 1
| Completed 1 spock test, 0 failed in 2247ms
| Tests PASSED - view reports in
D:\GitRepositories\grails-cxf-tax-project-test\target\test-reports

On Thu, Mar 21, 2013 at 2:09 PM, Christian Oestreich <
[email protected]> wrote:

What happens when running test-app on my project I provided?


Reply to this email directly or view it on GitHubhttps://github.com/thorstadt/grails-cxf/issues/28#issuecomment-15259178
.

from grails-cxf.

gcstang avatar gcstang commented on August 11, 2024

Ok it was my version field, I'm past that now and receiving this error:

From SOAP Response:
null id in com.oursite.webservice.TaxCalculationRequestLineItem entry
(don't flush the Session after an exception occurs)

I'm guessing there is an issue with this line that is causing the problem:
96 | retrievePlus4 in com.oursite.taxcalc.TaxProcessingService

This is the code from that line:
def retrievePlus4(String zip, String zipp4) {
log.debug "Finding By Zip : "+zip
def c = CCH_ZipPlus4.createCriteria()
def results = c {
eq("zip", zip)
and {
le("plus4Lo", zipp4)
}
and {
ge("plus4Hi", zipp4)
}
maxResults(1)
order("plus4Lo", "asc")
}
if(log.isDebugEnabled()) {
if(results != null) {
results.each {
log.debug "Low: "+ it.plus4Lo + " High: " + it.plus4Hi
}
}
}
if(log.isDebugEnabled()) {
if(results == null) {
log.debug "plus4 NOT found"
}
}
return results
}

From GGTS 3.2.0 Console:
| Error 2013-03-21 15:28:59,188 [http-bio-8080-exec-5] ERROR
hibernate.AssertionFailure - an assertion failure occured (this may
indicate a bug in Hibernate, but is more likely due to unsafe use of the
session)
Message: null id in com.oursite.webservice.TaxCalculationRequestLineItem
entry (don't flush the Session after an exception occurs)
Line | Method
->> 1616 | invokeMethod in grails.orm.HibernateCriteriaBuilder


| 96 | retrievePlus4 in com.oursite.taxcalc.TaxProcessingService
| 237 | calculateTaxes . in
com.oursite.taxcalc.TaxCalculationService$$EO0kpa99
| 514 | processTaxRequest in com.oursite.taxcalc.TaxProcessingService
| 21 | calculateTax . . in com.oursite.soap.TaxcalcService
| 180 | performInvocation in
org.apache.cxf.service.invoker.AbstractInvoker
| 96 | invoke . . . . . in ''
| 178 | invoke in
org.apache.cxf.jaxws.AbstractJAXWSMethodInvoker
| 64 | invoke . . . . . in org.apache.cxf.jaxws.JAXWSMethodInvoker
| 75 | invoke in
org.apache.cxf.service.invoker.AbstractInvoker
| 58 | run . . . . . . . in
org.apache.cxf.interceptor.ServiceInvokerInterceptor$1
| 471 | call in
java.util.concurrent.Executors$RunnableAdapter
| 334 | innerRun . . . . in java.util.concurrent.FutureTask$Sync
| 166 | run in java.util.concurrent.FutureTask
| 37 | execute . . . . . in org.apache.cxf.workqueue.SynchronousExecutor
| 107 | handleMessage in
org.apache.cxf.interceptor.ServiceInvokerInterceptor
| 262 | doIntercept . . . in org.apache.cxf.phase.PhaseInterceptorChain
| 121 | onMessage in
org.apache.cxf.transport.ChainInitiationObserver
| 211 | invoke . . . . . in
org.apache.cxf.transport.http.AbstractHTTPDestination
| 213 | invokeDestination in
org.apache.cxf.transport.servlet.ServletController
| 193 | invoke . . . . . in ''
| 130 | invoke in
org.apache.cxf.transport.servlet.CXFNonSpringServlet
| 221 | handleRequest . . in
org.apache.cxf.transport.servlet.AbstractHTTPServlet
| 141 | doPost in ''
| 197 | service . . . . . in ''
| 46 | doFilterInternal in org.grails.jaxrs.web.JaxrsFilter
| 1145 | runWorker . . . . in java.util.concurrent.ThreadPoolExecutor
| 615 | run in
java.util.concurrent.ThreadPoolExecutor$Worker
^ 722 | run . . . . . . . in java.lang.Thread

Is there a reason you prefixed all your domain packages with "grails." ?

Thank you for your help.

On Thu, Mar 21, 2013 at 2:45 PM, G C [email protected] wrote:

I'll try to narrow it down but when I run your app in test it passes.

Running 1 spock test... 1 of 1
| Completed 1 spock test, 0 failed in 2247ms
| Tests PASSED - view reports in
D:\GitRepositories\grails-cxf-tax-project-test\target\test-reports

On Thu, Mar 21, 2013 at 2:09 PM, Christian Oestreich <
[email protected]> wrote:

What happens when running test-app on my project I provided?


Reply to this email directly or view it on GitHubhttps://github.com/thorstadt/grails-cxf/issues/28#issuecomment-15259178
.

from grails-cxf.

ctoestreich avatar ctoestreich commented on August 11, 2024

I can't really tell you the issue without debugging the code directly, but what I will say is that using Domain objects as service method in/out params can cause side effects like this to occur since you are dealing with unbound/non-persisted instances of domain classes. I don't specifically see where you are using the tax line item in the code above so it might be up the stack a bit, but there will not be an ID on that object since it is essentially just a POGO at that point. If you don't need to persist the in/out you may want to consider moving them into src/groovy and making them simple POGOs and then map to domain classes when you need to persist.

You certainly CAN use domain classes, but when you receive a request you may want to call .save() on it so all the objects have IDs/version/etc. Also before sending a response you would need to call .save() on it or it will always have id/version/etc as 0/null since it isn't a persisted object.

If you are using domain objects simply for constraints there is a @Validatable annotation you can put on POGOs and use a constraints map and call validate().

I didn't prefix grails for any reason in the demo project. That is just the default that IDEA uses creating classes via their helpers.

from grails-cxf.

gcstang avatar gcstang commented on August 11, 2024

Excellent information.

Thank you for you help I'll give it a try.

On Thu, Mar 21, 2013 at 4:02 PM, Christian Oestreich <
[email protected]> wrote:

I can't really tell you the issue without debugging the code directly, but
what I will say is that using Domain objects as service method in/out
params can cause side effects like this to occur since you are dealing with
unbound/non-persisted instances of domain classes. I don't specifically see
where you are using the tax line item in the code above so it might be up
the stack a bit, but there will not be an ID on that object since it is
essentially just a POGO at that point. If you don't need to persist the
in/out you may want to consider moving them into src/groovy and making them
simple POGOs and then map to domain classes when you need to persist.

You certainly CAN use domain classes, but when you receive a request you
may want to call .save() on it so all the objects have IDs/version/etc.
Also before sending a response you would need to call .save() on it or it
will always have id/version/etc as 0/null since it isn't a persisted object.

If you are using domain objects simply for constraints there is a
@Validatable annotation you can put on POGOs and use a constraints map and
call validate().

I didn't prefix grails for any reason in the demo project. That is just
the default that IDEA uses creating classes via their helpers.


Reply to this email directly or view it on GitHubhttps://github.com/thorstadt/grails-cxf/issues/28#issuecomment-15265197
.

from grails-cxf.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.