Win a copy of Beginning Java 17 Fundamentals: Object-Oriented Programming in Java 17 this week in the Java in General forum!

Michael Phoenix

Greenhorn
+ Follow
since Oct 24, 2013
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Michael Phoenix

Just letting everybody know that the answer to this is at Stack Overflow topic
8 years ago
So nobody has any idea what might be going on here or have any idea how I could find an answer?
8 years ago
The SOAP responae listed above shows that the Company data is being returned by SOAP, at least when I use the NetBeans tester. However. when I run my client program the Company member object is returned as null. Anybody have any idea why this would happen? I'm under a deadline and am getting really desperate.
8 years ago
Entering the line you gave me wouldn't even pass the NetBeans Java compiler
I tried this:



And it blew up when the app server tried to load it.


Caused by: com.sun.xml.bind.v2.runtime.IllegalAnnotationsException: 1 counts of IllegalAnnotationExceptions
Class has two properties of the same name "company"
this problem is related to the following location:
at public com.lingosys.attask.ws.Company com.lingosys.attask.ws.User.getCompany()
at com.lingosys.attask.ws.User
at public com.lingosys.attask.ws.User com.lingosys.attask.ws.jaxws.CreateLinguistInformation.userObject
at com.lingosys.attask.ws.jaxws.CreateLinguistInformation
this problem is related to the following location:
at private com.lingosys.attask.ws.Company com.lingosys.attask.ws.User.company
at com.lingosys.attask.ws.User
at public com.lingosys.attask.ws.User com.lingosys.attask.ws.jaxws.CreateLinguistInformation.userObject
at com.lingosys.attask.ws.jaxws.CreateLinguistInformation
at com.sun.xml.bind.v2.runtime.IllegalAnnotationsException$Builder.check(IllegalAnnotationsException.java:106)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.getTypeInfoSet(JAXBContextImpl.java:471)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:303)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl.<init>(JAXBContextImpl.java:142)
at com.sun.xml.bind.v2.runtime.JAXBContextImpl$JAXBContextBuilder.build(JAXBContextImpl.java:1174)
at com.sun.xml.bind.v2.ContextFactory.createContext(ContextFactory.java:162)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:168)
at com.sun.xml.bind.api.JAXBRIContext.newInstance(JAXBRIContext.java:112)
at com.sun.xml.ws.developer.JAXBContextFactory$1.createJAXBContext(JAXBContextFactory.java:113)
at com.sun.xml.ws.db.glassfish.JAXBRIContextFactory.newContext(JAXBRIContextFactory.java:92)
... 66 more
8 years ago
Sure thing here is the SOAP response.

8 years ago
I really am out of ideas. Am wondering if going from Java 1.6 to 1.7 might not be part of the problem. I'm including some code below if anybody could look at it and give me some idea what might be happening, I would appreciate it. All the other data is coming across OK. Only the company data is missing.

Here's the client code. It is right after the getUser call that we see the data loss:



Here is the Webservice operation code. the variable ret contains the User with it's Company member.


Here is the User class.



And the Company class.

8 years ago
OK, I used the NB WebService tester and the SOAP response appears to be correct, it is sending all the data. The problem has to be in between SOAP and the client, because the client only sees a null where the company should be. Anybody have an ideas on how to catch what is going on between the client and the SOAP response?

There is no persistance involved here. The objects are created in the service and passed back to the client via SOAP.
8 years ago
I am using the debugger from NB to show that it is not being returned. I assume that means that it is not being passed back from SOAP.
8 years ago
I am in the process of upgrading an application from NetBeans 6.9 /Glassfish 2 to NB7.3.1/GF4. I have an class called "user" which contains a member object of a class called "company".

In the new environment my SOAP Webservice creates the user with a company successfully. However when the client receives the user object returned by the WS operation, the company is null. In the old version it returns the user with the company member object no problem. I've looked at the schema for both WSDKs and they look OK, exactly the same as far as the relationship between the two complex types. I have used the debugger to verify that it is somewhere between the service handing off the object and the client

Any idea what might be going on or how I can debug this?
8 years ago