Return-Path: Delivered-To: apmail-ws-axis-user-archive@www.apache.org Received: (qmail 74205 invoked from network); 2 Oct 2004 13:12:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur-2.apache.org with SMTP; 2 Oct 2004 13:12:54 -0000 Received: (qmail 92227 invoked by uid 500); 2 Oct 2004 13:12:36 -0000 Delivered-To: apmail-ws-axis-user-archive@ws.apache.org Received: (qmail 92205 invoked by uid 500); 2 Oct 2004 13:12:36 -0000 Mailing-List: contact axis-user-help@ws.apache.org; run by ezmlm Precedence: bulk Reply-To: axis-user@ws.apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list axis-user@ws.apache.org Received: (qmail 92195 invoked by uid 99); 2 Oct 2004 13:12:36 -0000 X-ASF-Spam-Status: No, hits=1.7 required=10.0 tests=NO_REAL_NAME,SPF_HELO_FAIL,SUBJ_YOUR_OWN X-Spam-Check-By: apache.org Received-SPF: pass (hermes.apache.org: local policy) Received: from [198.144.96.76] (HELO wonko.inow.com) (198.144.96.76) by apache.org (qpsmtpd/0.28) with ESMTP; Sat, 02 Oct 2004 06:12:34 -0700 Received: from localhost (raiden@localhost) by wonko.inow.com (8.11.6/8.11.6) with ESMTP id i92DBIZ13395 for ; Sat, 2 Oct 2004 06:11:18 -0700 Date: Sat, 2 Oct 2004 06:11:18 -0700 (PDT) From: raiden@wonko.inow.com To: axis-user@ws.apache.org Subject: RE: RPC vs. building your own SOAP messages In-Reply-To: Message-ID: References: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Checked: Checked X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N Thanks Anne! I guess in the example below I could just surround the whole series of tags with a "wrapper" tag, so that I can avoid the attributes on the top level. (Like put the example below inside a tag.) Anyhow, thank you for your assistance with this! -Raiden Johnson On Sat, 2 Oct 2004, Anne Thomas Manes wrote: > Attributes are mapped to properties. > > The wrapped style doesn't permit attributes at the top level (no complex > content in the wrapper element). The wrapper element must be defined as a > type comprising a sequence of elements. But these elements within the > wrapper element may contain attributes. > > In a situation where you require attributes at the top level, then you must > use either "document" style or "message" style. With "document" style, Axis > maps the entire contents of the SOAP body to a Java object. With "message" > style, Axis maps the contents to a DOM. > > Anne > > -----Original Message----- > From: raiden@wonko.inow.com [mailto:raiden@wonko.inow.com] > Sent: Friday, October 01, 2004 7:49 PM > To: axis-user@ws.apache.org > Subject: RE: RPC vs. building your own SOAP messages > > Ok, that makes sense. And Axis' "wrapped" style will support nested tags > by creating nested Java objects? > > If so, how does it handle attributes that are on tags? Like: > > > john > doe > > 24 > > > I would imagine that the "wrapped" style would create a Member object that > has an age, but also contains a Name object. And then the Name object > contains the firstname and lastname. > > But, how would it represent the "type=1" in the java objects? (Assuming > I'm right about how it would represent the nested objects.) > > Thank you for your help! Axis is very exciting... I wish I had converted > over sooner. > > -Raiden Johnson > > > > > On Fri, 1 Oct 2004, Anne Thomas Manes wrote: > > > As a rule of thumb, you should use the Axis "wrapped" style. (Sometimes > you > > can't, but the example you cite below is fine.) The "wrapped" generates > > document/literal messages, and it manages the message building process for > > you. Axis automatically maps the XML message to Java objects based on the > > schema of the message. When developing a "wrapped" style service, you > should > > start by defining the XML schema of your input and output messages. > > > > Anne > > > > -----Original Message----- > > From: raiden@wonko.inow.com [mailto:raiden@wonko.inow.com] > > Sent: Friday, October 01, 2004 10:39 AM > > To: axis-user@ws.apache.org > > Subject: RPC vs. building your own SOAP messages > > > > Hello, > > > > I am having a hard time grasping when to use RPC calls and when to build > > your own messages. I used to use Apache SOAP, and I used to build my own > > SOAP message via JAXM. > > > > However, I am now trying to upgrade to AXIS, and to make full use of its > > feature set... which seems to have a huge emphasis on using RPC, and > > seems to abstract out message building. > > > > Every guide and tutorial that I have read seems to revolve around RPC, and > > how easy it is to implement in AXIS. I can see the benefits of RPC for > > simple calls (pass in a few arguments, get back a single result... even > > if the result is a complex type). RPC seems great for that. > > > > However, I need to pass much more complex messages, and receive much more > > complex results. Does that mean that RPC is not the best solution for me? > > > > For example, here is a typical message that I will send to a SOAP server: > > > > > xmlns:soap-env="http://schemas.xmlsoap.org/soap/envelope/"> > > > > > > > > > > > > > > > > > > 1 > > > > 4001775 > > MaggieDuke > > > >
123 Test St.
> > > > City > > CT > > US > > 06524 > > test@test.com > > > >
> > > > 20040928 > > > > 29731Y > > 12341Y > > > > > >
> >
> >
< > > /soap-env:Envelope> > > > > > > and here is a typical response: > > > > > > > xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" > > SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/" > > xmlns:xsd="http://www.w3.org/1999/XMLSchema/" > > xmlns:xsi="http://www.w3.org/1999/XMLSchema/instance/"> > > > > > > > > > > > > > > > > 863262802 > > 9136214 > > 961704 > > > > > > > > > > > > > > > > Are complex SOAP packets like these not appropriate for RPC? It seems to > > me, like you really need to build your own requests, and parse your own > > responses to make something like this work. Am I correct in that? > > > > Thank you, > > -Raiden Johnson > > >