Return-Path: Delivered-To: apmail-cxf-users-archive@www.apache.org Received: (qmail 37641 invoked from network); 13 Oct 2010 20:28:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 13 Oct 2010 20:28:31 -0000 Received: (qmail 49525 invoked by uid 500); 13 Oct 2010 20:28:30 -0000 Delivered-To: apmail-cxf-users-archive@cxf.apache.org Received: (qmail 49481 invoked by uid 500); 13 Oct 2010 20:28:30 -0000 Mailing-List: contact users-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@cxf.apache.org Delivered-To: mailing list users@cxf.apache.org Received: (qmail 49473 invoked by uid 99); 13 Oct 2010 20:28:30 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 20:28:30 +0000 X-ASF-Spam-Status: No, hits=4.7 required=10.0 tests=FREEMAIL_FROM,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_NONE,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL,WEIRD_PORT X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of jjrodgers@gmail.com designates 74.125.82.49 as permitted sender) Received: from [74.125.82.49] (HELO mail-ww0-f49.google.com) (74.125.82.49) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 13 Oct 2010 20:28:24 +0000 Received: by wwd20 with SMTP id 20so4505935wwd.6 for ; Wed, 13 Oct 2010 13:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:received:in-reply-to :references:date:message-id:subject:from:to:cc:content-type; bh=SHfoz9zVuOv6+Ryb5hz8Qw0QgEZHijJzu5/Vv6u4LDg=; b=IBisUcY0vIK7oiWI8zJsLUoSJOaWfvMkck0Mv2dVxnbg4/tSd+bkZ+45XwuQXS5cSL Pwizz1QxD7gUR6NOcOa2xjY2nSpv+jzEV/bd6326iBOlGubCodlWPAWAjIaUGoPE11o3 wIO+qwJ5mLYdfOYwhDxKzGrMNAA5owNf1gy6Q= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=kWtAE78EyDHBvgTelT52VlKB7JD9n04sNk+FWFDUSZ8Zc6+iB/5ZBd1Mw5+xkn3lfS IoftnxQlUprAmUeKr9Ob54sORlzfbC55+blq1uS3SKQ3ND3JxHhjhCTcLOypG4IZrqPI T0hggSpoVYT+1eBRMNwIL2NBk8iKXVgtdry6o= MIME-Version: 1.0 Received: by 10.216.8.138 with SMTP id 10mr473891wer.57.1287001683400; Wed, 13 Oct 2010 13:28:03 -0700 (PDT) Received: by 10.216.52.196 with HTTP; Wed, 13 Oct 2010 13:28:03 -0700 (PDT) In-Reply-To: <201010131608.08929.dkulp@apache.org> References: <201010131608.08929.dkulp@apache.org> Date: Wed, 13 Oct 2010 16:28:03 -0400 Message-ID: Subject: Re: CXF w/ .NET Generated Web Service & Complex Datatype From: Jeffrey Rodgers To: users@cxf.apache.org Cc: Daniel Kulp Content-Type: multipart/alternative; boundary=0016364c7b4f2a16dc0492856e2d X-Virus-Checked: Checked by ClamAV on apache.org --0016364c7b4f2a16dc0492856e2d Content-Type: text/plain; charset=ISO-8859-1 I have one @XmlSeeAlso in the SrvSoap SEI, the block as follows: @WebService(targetNamespace = "http://foo/moo/", name = "SrvSoap") @XmlSeeAlso({ObjectFactory.class}) public interface SrvSoap { @WebResult(name = "GetLatestSubjectsDSResult", targetNamespace = " http://foo/moo/") @RequestWrapper(localName = "GetLatestSubjectsDS", targetNamespace = " http://foo/moo/", className = "com.srv.GetLatestSubjectsDS") @WebMethod(operationName = "GetLatestSubjectsDS", action = " http://foo/moo/GetLatestSubjectsDS") @ResponseWrapper(localName = "GetLatestSubjectsDSResponse", targetNamespace = "http://foo/moo/", className = "com.srv.GetLatestSubjectsDSResponse") public com.srv.GetLatestSubjectsDSResponse.GetLatestSubjectsDSResult getLatestSubjectsDS( @WebParam(name = "numSubjects", targetNamespace = "http://foo/moo/") int numSubjects, @WebParam(name = "lastId", targetNamespace = "http://foo/moo/") int lastId ); The JAXB unmarshaller was the first place I went to earlier, but since _any is an Object and doesn't want to accept an obvious cast from me, I have not been able to properly pass it to unmarshall method (maybe I am missing something very obvious with accessing the innards of that any property). Thanks, Jeff On Wed, Oct 13, 2010 at 4:08 PM, Daniel Kulp wrote: > > If CXF generated the code for that schema, there should also be an > @XmlSeeAlso > annotation on the SEI that points to the OjbectFactory for that schema. > That SHOULD make it more or less just work. Can you check to see if the > XmlSeeAlso is there? > > If it IS a DOM, you can always do something along the lines of: > > > JAXBContext.newContext(SubjectsDS.class).createUnmarshaller().unmarshall(dom, > SubjectsDS.class); > > > > Dan > > > On Wednesday 13 October 2010 4:02:56 pm Jeffrey Rodgers wrote: > > Benson, > > > > Thanks for the help and back/forth- > > > > I'm pretty sure CXF does know the schema though, no? Part of the WSDL > has > > a schema import for that particular s:any namespace in the form of: > > > > > > > > > > The schema for that particular object is gigantic, since the owners of > that > > web service decided to put everything into a single table back on the DS. > > It's essentially dozens of ints, strings, a couple timestamps, and some > > binary data. CXF's wsdl2java code generation did in fact generate a > fully > > featured SubjectsDS to at least contain the schema (equally bloated but > it > > is what it is) too. > > > > I guess at the most basic level, what's the preferred way to actually > > access the XML inside that any? I can likely make the translation and > > mapping myself, but I can't seem to bust into that abstract object. > > > > Jeff > > > > On Wed, Oct 13, 2010 at 3:52 PM, Benson Margulies > wrote: > > > The 'any' means that Microsoft knows the structure of this data but > > > isn't telling us. Since it isn't telling us, we can't do anything > > > about it. You could ask them what's up with the 'any':-) > > > > > > If you could come up with your own XML schema for what shows up in > > > there, I could offer some suggestions for how to use it. > > > > > > On Wed, Oct 13, 2010 at 3:50 PM, Jeffrey Rodgers > > > > > > wrote: > > > > Benson, > > > > > > > > Yes, that was my suspicion - the xs:any is in fact part of the WSDL. > I > > > > can't seem to crack the nut on how to use that any property or the > > > > getAny accessor to unmarshall back to the generated java equivalent > of > > > > my .NET > > > > > > DS > > > > > > > (essentially a couple pages of public properties in SubjectsDS.java) > > > > > > > > The WSDL for that particular section: > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > name="GetLatestSubjectsDSResult"> > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > Thanks, > > > > Jeffrey > > > > > > > > On Wed, Oct 13, 2010 at 3:41 PM, Benson Margulies > > > > > > > > > > >wrote: > > > >> Jefferson, > > > >> > > > >> It sounds as if the XML Schema in the WSDL uses an xs:any particle, > > > >> and that .NET has magic ways of turning this into a DS. > > > >> > > > >> All CXF can do with an 'any', by default, is give you the XML DOM > for > > > >> whatever arrives. > > > >> > > > >> In the data bindings, you can add custom handling, or you can work > > > >> with the DOM object. > > > >> > > > >> Please have a look at the schema and see if I'm right about the > 'any'. > > > >> > > > >> --benson > > > >> > > > >> > > > >> On Wed, Oct 13, 2010 at 2:29 PM, Jeffrey Rodgers < > jjrodgers@gmail.com> > > > >> > > > >> wrote: > > > >> > Hello, > > > >> > > > > >> > I've used the wsdl2java application to generate the following > > > >> > classes > > > > > > for > > > > > > >> my > > > >> > > > >> > particular WSDL: > > > >> > > > > >> > GetLatestSubjectsDS.java > > > >> > GetLatestSubjectsDSResponse.java > > > >> > Init.java > > > >> > InitResponse.java > > > >> > ObjectFactory.java > > > >> > package-info.java > > > >> > SaveSubject.java > > > >> > SaveSubjectResponse.java > > > >> > SrvSoap.java > > > >> > Srv.java > > > >> > SrvSoap_SrvSoap_Client.java > > > >> > SrvSoap_SrvSoap12_Client.java > > > >> > SubjectsDS.java > > > >> > > > > >> > Which I then pulled into Eclipse for usage. The most basic basic > > > >> > web service calls are working as expected, but I am having > > > >> > difficulties > > > > > > using > > > > > > >> > our GetLatestSubjects web service call which should a set of > > > > > > "Subjects" > > > > > > >> data > > > >> > > > >> > to the client, in which I would ideally unmarshalling into a > > > > > > SubjectsDS > > > > > > >> > object. We treat this as a dataset in .NET but I understand that > > > > > > won't > > > > > > >> be > > > >> > > > >> > happening here. Within SubjectsDS is a multitude of properties > > > >> > (more > > > >> > > > >> than a > > > >> > > > >> > dozen). > > > >> > > > > >> > As far as I can tell, the only accessors that I can play with in > the > > > >> > GetLatestSubjectsDSResponse is an "any" property which looks like > a > > > >> > DOM-esque object in the debugger (as expected given the web > > > >> > service's origin). I'm unsure what to do with this from here, but > > > >> > more > > > > > > importantly > > > > > > >> > may fear that I'm going about this in a wrong way given my > > > > > > inexperience > > > > > > >> with > > > >> > > > >> > CXF. > > > >> > > > > >> > Thanks in advance, > > > >> > Jefferson > > -- > Daniel Kulp > dkulp@apache.org > http://dankulp.com/blog > --0016364c7b4f2a16dc0492856e2d--