You are correct - it should look like the last fragment in your email.
Going with your other example, if you look at the WSN spec, you will see
sample SOAP fragments that confirm you (and Muse's XML fragment) are
correct. Looks like an XmlBeans issue.
Incidentally, if you want to send EPRs as parameters from the client side,
you can write code like this:
import org.apache.muse.ws.addressing.EndpointReference;
...
public void myOperation(EndpointReference epr)
{
Object[] params = new Object[1];
params[0] = epr;
ProxyHandler handler = getHandler("myOperation");
invoke(handler, params);
}
The code that wsdl2java generates should already look like this, except it
will have "Element" instead of "EndpointReference". Just change Element to
EndpointReference and you should be all set. The code works because our
EndpointReference class implements
org.apache.muse.util.xml.XmlSerializable, so the client code knows what
method to call to convert it to XML.
Dan
"José Antonio Sánchez" <[EMAIL PROTECTED]> wrote on 12/15/2006 09:31:15
AM:
> Hello, I'm trying to send a complex type with an operation. That
> complex type has a EndpointReference element included in the following
> form:
>
> <element name="HostLocation" type="wsa:EndpointReferenceType"/>
>
> I try to generate a serializer using xmlbeans but when I print the xml
> code of a HostLocationDocument I get this:
>
> <HostLocation xmlns="http://lsd.org/wsdm/HostInstallationSchema">
> <wsa:EndpointReference
xmlns:wsa="http://www.w3.org/2005/08/addressing">
> <wsa:Address>http://localhost</wsa:Address>
> </wsa:EndpointReference>
> </HostLocation>
>
> Also, for example, WS-Notification types has EndpointReferenceType
> elements, for example, the ProducerReference element defined as:
>
> <xsd:element name="ProducerReference" type="wsa:EndpointReferenceType"
/>
>
> but in a notification, I see the following XML code:
>
> <wsnt:ProducerReference>
> <wsa:ReferenceParameters
> xmlns:wsa="http://www.w3.org/2005/08/addressing"/>
> <wsa:Address
> xmlns:wsa="http://www.w3.org/2005/08/addressing">http://127.0.0.1:
> 8081/NotificationService/services/Notification</wsa:Address>
> </wsnt:ProducerReference>
>
> So which one is the right choice? Is it a bug in the xmbeans
> generation process? Shouldn't it be like that?
>
> <HostLocation xmlns="http://lsd.org/wsdm/HostInstallationSchema" >
> <wsa:Address
>
xmlns:wsa="http://www.w3.org/2005/08/addressing">http://localhost</wsa:Address>
> </HostLocation>
>
>
> --
> Saludos.
> José Antonio Sánchez
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]