Dims, Jonathan,

I tested it as what dims says and the result is ok.

I modifed the petstore sample a little bit, but I think that it will not affect 
the result.
The result soap message looks like this:

<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"; 
xmlns:xsd="http://www.w3.org/2001/XMLSchema"; 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
   <soapenv:Body>
      <listCategoriesResponse 
xmlns="http://beehive.apache.org/PetStoreInventoryManager";>
         <listCategoriesReturn>
            <ns1:catId 
xmlns:ns1="http://model.petstore.samples.beehive.apache.org";>100</ns1:catId>
            <ns2:description 
xmlns:ns2="http://model.petstore.samples.beehive.apache.org";>Desc1</ns2:description>
            <ns3:image 
xmlns:ns3="http://model.petstore.samples.beehive.apache.org";>Sample.jpg</ns3:image>
            <ns4:name 
xmlns:ns4="http://model.petstore.samples.beehive.apache.org";>Category1</ns4:name>
            <ns5:attachedImage 
xmlns:ns5="http://ws.model.petstore.samples.beehive.apache.org";>Sample.jpg</ns5:attachedImage>
         </listCategoriesReturn>
         <listCategoriesReturn>
            <ns6:catId 
xmlns:ns6="http://model.petstore.samples.beehive.apache.org";>200</ns6:catId>
            <ns7:description 
xmlns:ns7="http://model.petstore.samples.beehive.apache.org";>Desc2</ns7:description>
            <ns8:image 
xmlns:ns8="http://model.petstore.samples.beehive.apache.org";>Sample.jpg</ns8:image>
            <ns9:name 
xmlns:ns9="http://model.petstore.samples.beehive.apache.org";>Category2</ns9:name>
            <ns10:attachedImage 
xmlns:ns10="http://ws.model.petstore.samples.beehive.apache.org";>Sample.jpg</ns10:attachedImage>
         </listCategoriesReturn>
      </listCategoriesResponse>
   </soapenv:Body>
</soapenv:Envelope>

The namespaces are correct. Also note that the order of element is correct. 
(attachedImage is the last).

The test procedure is : 
(1) I ran java2wsdl with modified java code and got a WSDL. 
(2) I ran wsdl2java with --helperGen option to the WSDL in step (1) and 
implemented a service and deployed it on tomcat.

The point is that I deployed the generated helper classes in step (2) along 
with the original java classes in step(1).
Without helpers the result is same as what you get. 

AFAIK, JSR 181 does not specify the java class and its xml mapping. (which 
corresponds to <java-xml-type-mapping> of JSR-109).
The Axis's solution for this area is Helper class (which corresponds to 
generated Serializer class in WebLogic server).

I did not investigate the handler class in WSM but I think the Helper and/or 
Serializer generation phase is needed.

/Jongjin



----- Original Message ----- 
From: "Davanum Srinivas" <[EMAIL PROTECTED]>
To: "Jonathan Colwell" <[EMAIL PROTECTED]>
Cc: "Beehive Developers" <[email protected]>
Sent: Thursday, October 28, 2004 4:22 AM
Subject: Re: Beehive WSM - AXIS integration issue


> obvious adavantage of this approach is its easy to report bugs :)
> 
> -- dims
> 
> On Wed, 27 Oct 2004 10:56:38 -0700, Jonathan Colwell <[EMAIL PROTECTED]> 
> wrote:
> > Sounds good, I'll see what I can come up with using that approach.
> > 
> > 
> > 
> > 
> > -----Original Message-----
> > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > Sent: Wednesday, October 27, 2004 10:43 AM
> > To: Beehive Developers
> > Subject: Fwd: Beehive WSM - AXIS integration issue
> > 
> > FYI
> > 
> > ---------- Forwarded message ----------
> > From: Davanum Srinivas <[EMAIL PROTECTED]>
> > Date: Wed, 27 Oct 2004 13:40:30 -0400
> > Subject: Re: Beehive WSM - AXIS integration issue
> > To: Jonathan Colwell <[EMAIL PROTECTED]>
> > 
> > This list is ok (but this email is private as asf lists reject zip
> > files). Here's what we can do...See enclosed zip for Catalog.java,
> > Product.java and Category.java. Let's work off these 3 files. First step
> > is to run Java2WSDL with "--style WRAPPED --use LITERAL" to get the wsdl
> > file (see enclosed). Then run WSDL2Java in another directory with "-s
> > -t" option to generate both the server and client side (and test case).
> > See if this gives us the results that we are looking for by deploying in
> > Axis. If this does not work, we can start tweaking parameters to J2W or
> > W2J or edit the WSDL to get the SOAP Response you are looking for.  Can
> > you help me do this?
> > 
> > Once we get the "correct" response, we can check the code generated by
> > wsdl2java and mimic the same programatically in WSM code. Does this look
> > like a good game plan?
> > 
> > Thanks,
> > dims
> > 
> > On Wed, 27 Oct 2004 10:04:21 -0700, Jonathan Colwell <[EMAIL PROTECTED]>
> > wrote:
> > > Hi Dims,
> > >
> > > Sorry for confusing the issue by posting that namespace fix to the
> > > Axis board.  These two pieces are related but separate since one is
> > > for WSDL generation and the other for invocation time behavior.
> > >
> > > Regarding your diff below, I wasn't setting the Use and Style on the
> > > OperationDesc since it already inherits those values from it's parent
> > > ServiceDesc.
> > >
> > > The removal of meth.getWrTargetNamespace() means that the return QName
> > 
> > > never has a custom namespace which is not the behavior I am looking
> > for.
> > >
> > > What I do want is that the return QName can have a custom namespace
> > > but the child elements should use the namespace declared in the schema
> > 
> > > defining the return type.
> > >
> > > for example:
> > >
> > > <ns1:Category
> > > xmlns:ns1="http://some.namespace.that.is.not.the.default.for.the.web.s
> > > er
> > > vice">
> > >         <ns1:attachedImage
> > href="cid:0B3CE1E8B9F062370E7FD61FED9D78BE"/>
> > >         <ns1:catId>DOGS</ns1:catId>
> > >         <ns1:description>Various Breeds</ns1:description>
> > >         <ns1:image>dogs_icon.gif</ns1:image>
> > >         <ns1:name>Dogs</ns1:name>
> > > </ns1:Category>
> > >
> > > I think should look like
> > >
> > > <ns1:Category
> > > xmlns:ns1="http://some.namespace.that.is.not.the.default.for.the.web.s
> > > er
> > > vice"
> > >
> > > xmlns:ns2="http://model.petstore.samples.beehive.apache.org";
> > >
> > > xmlns:ns3="http://ws.model.petstore.samples.beehive.apache.org";>
> > >         <ns3:attachedImage
> > href="cid:0B3CE1E8B9F062370E7FD61FED9D78BE"/>
> > >         <ns2:catId>DOGS</ns1:catId>
> > >         <ns2:description>Various Breeds</ns1:description>
> > >         <ns2:image>dogs_icon.gif</ns1:image>
> > >         <ns2:name>Dogs</ns1:name>
> > > </ns1:Category>
> > >
> > > but from looking over how the BeanSerializer works it may be hard to
> > > get this in place.
> > >
> > > Thanks again for looking into this issue and for checking the WSDL
> > > patches into AXIS for me.  I took this discussion off the Beehive list
> > 
> > > since it's very specific to AXIS integration.  If you think this is a
> > > legitimate issue for AXIS developers we can bring the discussion over
> > > to that list or just spam everyone including ourselves by posting to
> > > both lists :)
> > >
> > >
> > >
> > > cheers,
> > >
> > > Jonathan
> > >
> > > -----Original Message-----
> > > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > > Sent: Tuesday, October 26, 2004 8:18 PM
> > > To: Jonathan Colwell
> > > Cc: Beehive Developers
> > > Subject: Re: Beehive WSM - AXIS integration issue
> > >
> > > Jonathan,
> > >
> > > here's the diff needed on your end to get the desired behavior....Yes,
> > 
> > > you have to add some if conditions before you use "" or
> > > meth.getWrTargetNamespace() [for example is it literal, is  the
> > > elementFormDefault qualified or not etc]
> > >
> > > -- dims
> > >
> > > Index: wsm/src/runtime/org/apache/beehive/wsm/axis/AxisHook.java
> > > ===================================================================
> > > --- wsm/src/runtime/org/apache/beehive/wsm/axis/AxisHook.java
> > > (revision 55667)
> > > +++ wsm/src/runtime/org/apache/beehive/wsm/axis/AxisHook.java
> > (working
> > > copy)
> > > @@ -111,6 +111,8 @@
> > >                  od.setElementQName(new QName(operationName));
> > >                  od.setName(operationName);
> > >                  allowedMethods.add(operationName);
> > > +                od.setUse(sd.getUse());
> > > +                od.setStyle(sd.getStyle());
> > >
> > >                  od.setSoapAction(meth.getWmAction());
> > >
> > > @@ -118,7 +120,7 @@
> > >                      od.setMep(OperationType.ONE_WAY);
> > >                  }
> > >                  else {
> > > -                    od.setReturnQName(new
> > > QName(meth.getWrTargetNamespace(),
> > > +                    od.setReturnQName(new QName("",
> > >                                                  meth.getWrName()));
> > >                      Class returnType = meth.getJavaReturnType();
> > >                      QName type = configureTypeMapping(sd,
> > > returnType);
> > >
> > > On Mon, 25 Oct 2004 11:46:55 -0700, Jonathan Colwell
> > > <[EMAIL PROTECTED]>
> > > wrote:
> > > > Hi Dims,
> > > >
> > > > I'm running into some issues getting the Bean Serializer to set the
> > > > namespaces properly for subelements when using Document/Literal.
> > > > While the element within the response envelope uses the target
> > > > namespace of the overall web service, the inner elements which I
> > > > believe should be using the namespace of their container type are
> > > > also
> > >
> > > > inheriting the web services namespace.
> > > >
> > > > The sample response from the Beehive petstore demo shows the
> > > > namespace
> > >
> > > > issue.  Note that while I believe the Category element should be
> > > > using
> > >
> > > > the ns1 namespace the children should either be using the namespace
> > > > of
> > >
> > > > their declaring schema or possibly no namespace, but in no event
> > > > should they be using the ns1 namespace as displayed below.  I
> > > > attempted to add a TypeDesc containing FieldDesc elements for each
> > > > child but it made no apparent difference.
> > > >
> > > > <soapenv:Envelope
> > > > xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/";
> > > > xmlns:xsd="http://www.w3.org/2001/XMLSchema";
> > > > xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
> > > >         <soapenv:Body>
> > > >                 <listCategoriesResponse xmlns="">
> > > >                         <ns1:Category
> > > > xmlns:ns1="http://beehive.apache.org/PetStoreInventoryManager";>
> > > >                                 <ns1:attachedImage
> > > > href="cid:0B3CE1E8B9F062370E7FD61FED9D78BE"/>
> > > >                                 <ns1:catId>DOGS</ns1:catId>
> > > >                                 <ns1:description>Various
> > > > Breeds</ns1:description>
> > > >                                 <ns1:image>dogs_icon.gif</ns1:image>
> > > >                                 <ns1:name>Dogs</ns1:name>
> > > >                         </ns1:Category>
> > > >                 </listCategoriesResponse>
> > > >         </soapenv:Body>
> > > > </soapenv:Envelope>
> > > >
> > > > Before I ran into these namespace issues, I found that even though
> > > > the
> > >
> > > > SerializationContext should be setting a Literal service to not send
> > 
> > > > the types, I had to explicitly force this setting using the
> > > > Call.SEND_TYPE_ATTR property on the MessageContext or else it would
> > > > always treat the service as encoded.  My guess is that some other
> > > > requirement is missing to allow this to work without the forced
> > > > override.
> > > >
> > > > I'm not sure if these issues should be directed to the AxisDev list
> > > > since it's not directly relevant to Axis development, but let me
> > > > know if that would be a better place for these sorts of questions.
> > > >
> > > > thanks,
> > > >
> > > > Jonathan
> > > >
> > > > -----Original Message-----
> > > > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > > > Sent: Wednesday, October 20, 2004 5:25 PM
> > > > To: Jonathan Colwell
> > > > Cc: Beehive Developers
> > > > Subject: Re: [FYI] An article on WSM
> > > >
> > > > Great!!! Will take a look as soon as i get a chance. Please don't be
> > 
> > > > quiet...Any question is welcome :)
> > > >
> > > > -- dims
> > > >
> > > > On Wed, 20 Oct 2004 14:53:31 -0700, Jonathan Colwell
> > > > <[EMAIL PROTECTED]>
> > > > wrote:
> > > > > Hi Dims,
> > > > >
> > > > > I've been working on the Beehive WSM components that integrate
> > > > > with AXIS.  While I may have been a bit too quiet while working on
> > 
> > > > > this, I did submit a patch in late August so the JavaCompiler
> > > > > could compile annotated .jws files which was important to have in
> > > > > place before the release.
> > > > >
> > > > > I have spent the last couple months trying to get a solid
> > > > > understanding of how AXIS works figuring that I should understand
> > > > > it
> > >
> > > > > and be sure I'm using it properly before asking for fixes to
> > > > > features that may already be working as designed.  Now that we
> > > > > have a functioning WSM implementation based on Axis, we can start
> > > > > looking
> > >
> > > > > at specific problem areas to figure out if there is in fact a
> > > > > problem with AXIS itself or my usage of it.  I realize you have
> > > > > your
> > >
> > > > > hands pretty full with other projects but I'd be grateful if you
> > > > > have a chance to look over some of the code that integrates with
> > > > > Axis and bring up any obvious usage errors I may have made.
> > > > >
> > > > > I look forward to discussing this further with you and would also
> > > > > like
> > > >
> > > > > to follow up with Chathura about using XmlBeans in the Axis2 WSDL
> > > > > object model he is working on as we discussed on AxisDev back on
> > > > October 11th.
> > > > >
> > > > > cheers,
> > > > >
> > > > > Jonathan
> > > > >
> > > > >
> > > > >
> > > > > -----Original Message-----
> > > > > From: Davanum Srinivas [mailto:[EMAIL PROTECTED]
> > > > > Sent: Wednesday, October 20, 2004 2:02 PM
> > > > > To: Beehive Developers
> > > > > Subject: Re: [FYI] An article on WSM
> > > > >
> > > > > Kyle,
> > > > >
> > > > > Am sure Ias is NOT complaining about that specific article not
> > > > > talking
> > > >
> > > > > about Axis. He is wondering IF a similar effort needs to be done
> > > > > for
> > >
> > > > > Axis and how useful it could be for both WSM and Axis.
> > > > >
> > > > > Am personally SPECIFICALLY bothered that there is no emails on
> > > > > either Axis dev or users from any bea folks about WSM. I don't
> > > > > even know if there are any problems being faced by the WSM team
> > > > > with Axis
> > >
> > > > > 1.2 RC1 that needs to be fixed in RC2 or Final as there is no
> > > > > feedback in terms of emails or bugs in JIRA.
> > > > >
> > > > > thanks,
> > > > > dims
> > > > >
> > > > > On Wed, 20 Oct 2004 07:19:44 -0700, Kyle Marvin <[EMAIL PROTECTED]>
> > > wrote:
> > > > > > Hi Ias,
> > > > > >
> > > > > > I understand what you are saying, but just as we should really
> > > > > > avoid
> > > > > discussing BEA-specific technologies or downstream use cases of
> > > > > Beehive here, you also have to expect that this is exactly the
> > > > > type of
> > > >
> > > > > content that is going to be found on a BEA developer's web site.
> > > > > I'd be equally in favor of Axis-oriented WSM content where
> > > > > relevant and appropriate in online communities that target Axis
> > > > > users.  I see
> > >
> > > > > both as good for Beehive as a platform and for end users of
> > Beehive.
> > > > > >
> > > > > > In a lot of ways, this could be viewed is goodness and
> > > > > > validation of
> > > > > the neutrality of the Beehive programming model (that WSM can be
> > > > > mapped to both Axis and J2EE web services runtimes).
> > > > > >
> > > > > > My $0.02.
> > > > > >
> > > > > > -- Kyle
> > > > > >
> > > > > >
> > > > > >
> > > > > > > -----Original Message-----
> > > > > > > From: Ias [mailto:[EMAIL PROTECTED]
> > > > > > > Sent: Wednesday, October 20, 2004 7:36 AM
> > > > > > > To: 'Beehive Developers'
> > > > > > > Subject: [FYI] An article on WSM
> > > > > > >
> > > > > > >
> > > > > > > I've read "Introduction to Web Services Metadata" at
> > > > > > > http://dev2dev.bea.com/technologies/webservices/articles/Anil_
> > > > > > > WServices.jsp?
> > > > > > > PC=04-AA19-GEN99 and found that it would be (more) practical
> > > > > > > if it
> > > >
> > > > > > > demonstrated how to use WSM with Beehive WSM and Axis.
> > > > > > >
> > > > > > > Regards,
> > > > > > >
> > > > > > > Ias
> > > > > > >
> > > > > >
> > > > >
> > > > > --
> > > > > Davanum Srinivas - http://webservices.apache.org/~dims/
> > > > >
> > > > >
> > > >
> > > > --
> > > > Davanum Srinivas - http://webservices.apache.org/~dims/
> > > >
> > > >
> > >
> > > --
> > > Davanum Srinivas - http://webservices.apache.org/~dims/
> > >
> > >
> > 
> > --
> > 
> > Davanum Srinivas - http://webservices.apache.org/~dims/
> > 
> > --
> > Davanum Srinivas - http://webservices.apache.org/~dims/
> > 
> > 
> 
> 
> -- 
> Davanum Srinivas - http://webservices.apache.org/~dims/
> 

Reply via email to