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/