It was a namespace issue. The web service I was trying to call has confused itself by having two namespaces - one for the service call and one for the objects it deals with and WSGen used the namespace from the service for the response object but objects within the other namespace were returned. So when I hacked the generated client code to use the other namespace everything worked fine. Now if I can get the developer to fix his web service :)
Thanks for the help especially Dragos! Daniel King, R2D2, C3P0 Application Engineer Web Team Nemours Office: (904) 288-5643 Fax: (904) 288-5758 *** Call me Daniel *** NOTICE...This electronic transmission is intended only for the person(s) named. It may contain information that is (i) proprietary to the sender, and/or (ii) privileged, confidential and/or otherwise exempt from disclosure under applicable State and Federal law, including, but not limited to, privacy standards imposed pursuant to the federal Health Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named recipient(s) is not a waiver of any applicable privilege. If you received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message from your system. -----Original Message----- From: Daniel King [mailto:[EMAIL PROTECTED] Sent: Friday, May 18, 2007 3:28 PM To: [email protected] Subject: RE: [xfire-user] Empty/Null contents in JAXB objects I'm using XFire 1.2.6. If anyone has seen this help would be appreciated even if it's RFTM or can point me in some direction. This is the debug I get which doesn't make any sense to me as to why my response object is null. As you can see the wire got back the xml data. However for some reason that data doesn't get put into my object and no exceptions/errors are logged anywhere. Unfortunately I didn't write the service I'm calling which doesn't have a good name for the namespace as its http://www.w3.org. I do wonder if that specific namespace is causing a problem. So I used the XFire eclipse plugin's code generation from a WSDL to create the client. I call the service using Eclipse's web service explorer and the same xml data comes back no problem. I would've expected some marshalling exception/error if the xml data couldn't be put into the corresponding java objects but null? I am very new to XFire but it looks like the handler is getting nothing if you see around line 4047 you'll see \r \n 0 \r \n. Is the marshalling from xml to an object handled by *Handlers* or *Phase Handlers* in XFire? I'm testing this with a JUnit test and have tried to deploy it to my JBoss server and get the same result. 3843 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.isResponseAvailable(int) 3859 [main] DEBUG httpclient.wire.content - << "4" 3859 [main] DEBUG httpclient.wire.content - << "b" 3859 [main] DEBUG httpclient.wire.content - << "2" 3859 [main] DEBUG httpclient.wire.content - << "[\r]" 3859 [main] DEBUG httpclient.wire.content - << "[\n]" 3859 [main] DEBUG httpclient.wire.content - << "<?xml version="1.0" encoding="UTF-8"?><soapenv:Envelope xmlns:soapenv=" http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/200 1/XMLSchema-instance"><soapenv:Body><ns1:GetOrderResponse xmlns="http://www.w3.org" xmlns:xsd="http://www.w3.org/2001/XM LSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:ns1="http://www.w3.org">[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9]<ns1:order>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9]<ns1:id>5000</ns1:id>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9]<ns1:submitter>danking</ns1:submitter>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9]<ns1:items>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9]<ns1:item>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:id>1</ns1:id>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:service>das boat!!</ns1:service>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:data>Test discrete data</ns1:data>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:requestedBy>vrak</ns1:requestedBy>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:requestedFor>kranjit</ns1:requestedFor>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:approvers>danking</ns1:approvers>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:Status>New</ns1:Status>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9]</ns1:item>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9]<ns1:item>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:id>2</ns1:id>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:service>das boat!!</ns1:service>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:data>Test discrete data</ns1:data>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:requestedBy>ddowling</ns1:requestedBy>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:requestedFor>amistric</ns1:requestedFor>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:approvers>danking</ns1:approvers>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9][0x9]<ns1:Status>New</ns1:Status>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9][0x9]</ns1:item>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9][0x9]</ns1:items>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "[0x9]</ns1:order>[\n]" 3859 [main] DEBUG httpclient.wire.content - << "</ns1:GetOrderResponse></soapenv:Body></soapenv:Envelope>" 3937 [main] DEBUG org.codehaus.xfire.client.Client - Received message to http://nemapp13.nemours.org/arsys7/services/AR Service?server=nem08&webService=OSSOrder2 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.client.CorrelatorHandl [EMAIL PROTECTED] to phase pre-dispatch 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.soap.handler.ReadHeade [EMAIL PROTECTED] to phase parse 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.soap.handler.ValidateH [EMAIL PROTECTED] to phase pre-invoke 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.handler.LocateBindingH [EMAIL PROTECTED] to phase dispatch 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.soap.handler.SoapActio [EMAIL PROTECTED] to phase dispatch 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.soap.handler.SoapBodyH [EMAIL PROTECTED] to phase dispatch 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase transport 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase parse 3937 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.ReadHea dersHandler in phase parse 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase pre-dispatch 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.client.CorrelatorHan dler in phase pre-dispatch 3953 [main] DEBUG org.codehaus.xfire.client.Client - Correlating context with ID 11795120066891-932735222 3953 [main] DEBUG org.codehaus.xfire.client.Client - Found correlated context with ID 11795120066891-932735222 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - adding handler org.codehaus.xfire.client.ClientReceiveHa [EMAIL PROTECTED] to phase service 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase dispatch 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.handler.LocateBindin gHandler in phase dispatch 3953 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.SoapBod yHandler in phase dispatch 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.SoapAct ionInHandler in phase dispatch 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase policy 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase user 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase pre-invoke 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.soap.handler.Validat eHeadersHandler in phase pre-invoke 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking phase service 4047 [main] DEBUG org.codehaus.xfire.handler.HandlerPipeline - Invoking handler org.codehaus.xfire.client.ClientReceive Handler in phase service 4047 [main] DEBUG httpclient.wire.content - << "[\r]" 4047 [main] DEBUG httpclient.wire.content - << "[\n]" 4047 [main] DEBUG httpclient.wire.content - << "0" 4047 [main] DEBUG httpclient.wire.content - << "[\r]" 4047 [main] DEBUG httpclient.wire.content - << "[\n]" 4047 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HeaderParser.parseHeaders(InputStream, String) 4047 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readLine(InputStream, String) 4047 [main] DEBUG org.apache.commons.httpclient.HttpParser - enter HttpParser.readRawLine() 4047 [main] DEBUG httpclient.wire.content - << "[\r]" 4047 [main] DEBUG httpclient.wire.content - << "[\n]" 4047 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Resorting to protocol version default close connection policy 4047 [main] DEBUG org.apache.commons.httpclient.HttpMethodBase - Should NOT close connection, using HTTP/1.1 4047 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.isResponseAvailable() 4047 [main] DEBUG org.apache.commons.httpclient.HttpConnection - enter HttpConnection.releaseConnection() 4047 [main] DEBUG org.apache.commons.httpclient.HttpConnection - Releasing connection back to connection manager. 4047 [main] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - enter HttpConnectionManager.releas eConnection(HttpConnection) 4047 [main] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Freeing connection, hostConfig=Hos tConfiguration[host=http://nemapp13.nemours.org] 4047 [main] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - enter HttpConnectionManager.Connec tionPool.getHostPool(HostConfiguration) 4047 [main] DEBUG org.apache.commons.httpclient.util.IdleConnectionHandler - Adding connection at: 1179512007830 4047 [main] DEBUG org.apache.commons.httpclient.MultiThreadedHttpConnectionManager - Notifying no-one, there are no wai ting threads 4047 [main] DEBUG org.codehaus.xfire.client.XFireProxy - Result [EMAIL PROTECTED] 4047 [main] DEBUG org.nemours.estore.service.impl.TCCartService - order is null Thanks, Daniel King, R2D2, C3P0 Application Engineer Web Team Nemours Office: (904) 288-5643 Fax: (904) 288-5758 *** Call me Daniel *** NOTICE...This electronic transmission is intended only for the person(s) named. It may contain information that is (i) proprietary to the sender, and/or (ii) privileged, confidential and/or otherwise exempt from disclosure under applicable State and Federal law, including, but not limited to, privacy standards imposed pursuant to the federal Health Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named recipient(s) is not a waiver of any applicable privilege. If you received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message from your system. -----Original Message----- From: Daniel King [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 3:08 PM To: [email protected] Subject: RE: [xfire-user] Empty/Null contents in JAXB objects I have four web services in total where two I created and two were created by Remedy which uses Axis. For one service I created, I wrote the service using POJOs with an interface. Then I created a services.xml file for the service. Then I used the XFire eclipse plugin to generate code from the generated WSDL using the "http://myWebAppContext/services/MyService?wsdl" format to generate the client. The web service is in one project and another project houses the client. I had no trouble sending/receiving data with this client/service as far as input/output. The other service I created the same way except for generating client code. A Remedy application is calling the service. There isn't a problem with sending/receiving data with this client/service as far as input/output either. But I'm not sending a reponse to the Remedy application except that everything went fine which I think is a boolean. The other two services created by Remedy are the ones I'm having trouble with getting data from the Java objects. The xml data is there as it shows up in the log but nothing comes out in the response object. As far as the generated WSDL, when I went to create every client I had to go in and make a change were nillable="true" and minOccurs="0" to set the nillable="false". I even tried to generate the client code using WSGen on the command line with 1.2.5 since at the time the XFire eclipse plugin I had was using 1.2.4. Both generated the exact same thing. If I didn't change the nillable="true" then part of my schema was missing. Hopefully this answers your questions. Thanks, Daniel King, R2D2, C3P0 Application Engineer Web Team Nemours Office: (904) 288-5643 Fax: (904) 288-5758 *** Call me Daniel *** NOTICE...This electronic transmission is intended only for the person(s) named. It may contain information that is (i) proprietary to the sender, and/or (ii) privileged, confidential and/or otherwise exempt from disclosure under applicable State and Federal law, including, but not limited to, privacy standards imposed pursuant to the federal Health Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt by anyone other than the named recipient(s) is not a waiver of any applicable privilege. If you received this confidential communication in error, please notify the sender immediately by reply e-mail message and permanently delete the original message from your system. -----Original Message----- From: Dragos Pavel [mailto:[EMAIL PROTECTED] Sent: Thursday, May 17, 2007 2:36 PM To: [email protected] Subject: RE: [xfire-user] Empty/Null contents in JAXB objects Yup, when I deploy it will go under META-INF\xfire directory. Aside: when you used JAXB 2.0, your generated schema was correct? , respecting your original wsdl (this in the case you took top-down design approach) ? On Thu, 2007-17-05 at 14:16 -0400, Daniel King wrote: > I believe the schemas should go into the META-INF\xfire directory where > your services.xml file is. > > However I'm not using XMLBeans on this project but JAXB 2.0. > > Thanks, > Daniel King, R2D2, C3P0 > Application Engineer > Web Team > Nemours > Office: (904) 288-5643 > Fax: (904) 288-5758 > > *** Call me Daniel *** > > NOTICE...This electronic transmission is intended only for the person(s) > named. It may contain information that is (i) proprietary to the > sender, and/or (ii) privileged, confidential and/or otherwise exempt > from disclosure under applicable State and Federal law, including, but > not limited to, privacy standards imposed pursuant to the federal Health > Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt > by anyone other than the named recipient(s) is not a waiver of any > applicable privilege. If you received this confidential communication > in error, please notify the sender immediately by reply e-mail message > and permanently delete the original message from your system. > > > -----Original Message----- > From: Dragos Pavel [mailto:[EMAIL PROTECTED] > Sent: Thursday, May 17, 2007 2:10 PM > To: [email protected] > Subject: RE: [xfire-user] Empty/Null contents in JAXB objects > > Yes you are probably right. > > Quick question please (cause I'm new to XMLBeans bindings): > > These are the Steps for XMLBeans Integration: > > 1. Create your Schema > 2. Create your XMLBeans > 3. Create your Service > 4. Register your service > > Now I am clear about 2,3,4. > > For 1. after I create a myschema.xsd file I will place it under WEB-INF > right ? = that's the right location ? And how the service will know to > reference properly this schema when needed ? There is a special config > that has to be done ? > Need some more info about point 1. > > Thanks in advance, > Dragos > > > On Thu, 2007-17-05 at 13:48 -0400, Daniel King wrote: > > Thanks Dragos. Unfortunately for this service/client I'm not using > > XMLBeans. The web service is being created by Remedy. So unless the > > client can apply that hack I wouldn't be able to do it. However I am > > pretty sure it must be a namespace problem since the data is there in > > the xml. > > > > Thanks, > > Daniel King, R2D2, C3P0 > > Application Engineer > > Web Team > > Nemours > > Office: (904) 288-5643 > > Fax: (904) 288-5758 > > > > *** Call me Daniel *** > > > > NOTICE...This electronic transmission is intended only for the > person(s) > > named. It may contain information that is (i) proprietary to the > > sender, and/or (ii) privileged, confidential and/or otherwise exempt > > from disclosure under applicable State and Federal law, including, but > > not limited to, privacy standards imposed pursuant to the federal > Health > > Insurance Portability and Accountability Act of 1996 (HIPAA). Receipt > > by anyone other than the named recipient(s) is not a waiver of any > > applicable privilege. If you received this confidential communication > > in error, please notify the sender immediately by reply e-mail message > > and permanently delete the original message from your system. > > > > > > -----Original Message----- > > From: Dragos Pavel [mailto:[EMAIL PROTECTED] > > Sent: Thursday, May 17, 2007 1:41 PM > > To: [email protected] > > Subject: Re: [xfire-user] Empty/Null contents in JAXB objects > > > > Read this: > > Problems with XMLBeans (XMLBeans Namespace Hack) > > from: > > http://xfire.codehaus.org/XMLBeans+Integration > > > > and this: > > > http://archive.xfire.codehaus.org/user/[EMAIL PROTECTED] > > om > > > > You most probably have to implement the namespace hack... > > > > Hope that helps, > > Dragos > > > > On Thu, 2007-17-05 at 13:20 -0400, Daniel King wrote: > > > I'm using XFire 1.2.5. I have a service and a client. If I call > the > > > service using the Web Services Explorer in Eclipse then I have no > > > problems. > > > > > > > > > > > > However when I use my client that was generated from the WSDL using > > > WSGen, then the objects from the response are null. > > > > > > > > > > > > I can see from the log that the response contains the xml data which > > > is correct. And I'm not getting any exceptions, warnings or errors > in > > > the log. > > > > > > > > > > > > So I'm wondering if the marshalling/unmarshalling from xml to > > > generated Java objects isn't correct somehow. > > > > > > > > > > > > Anyone else have this type of issue where they call a service, can > see > > > the returned xml and then have nothing in the objects? > > > > > > > > > > > > Daniel King, R2D2, C3P0 > > > > > > Application Engineer > > > > > > Web Team > > > > > > Nemours > > > > > > Office: (904) 288-5643 > > > > > > Fax: (904) 288-5758 > > > > > > > > > > > > *** Call me Daniel *** > > > > > > NOTICE...This electronic transmission is intended only for the > > person(s) > > > named. It may contain information that is (i) proprietary to the > > > sender, and/or (ii) privileged, confidential and/or otherwise exempt > > > from disclosure under applicable State and Federal law, including, > but > > > not limited to, privacy standards imposed pursuant to the federal > > > Health Insurance Portability and Accountability Act of 1996 (HIPAA). > > > Receipt by anyone other than the named recipient(s) is not a waiver > of > > > any applicable privilege. If you received this confidential > > > communication in error, please notify the sender immediately by > reply > > > e-mail message and permanently delete the original message from your > > > system. > > > > > > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe from this list please visit: > > > > http://xircles.codehaus.org/manage_email > > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > > > > --------------------------------------------------------------------- > To unsubscribe from this list please visit: > > http://xircles.codehaus.org/manage_email > --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email --------------------------------------------------------------------- To unsubscribe from this list please visit: http://xircles.codehaus.org/manage_email
