Hi Thomas , cant you do this with just string or please write your own bean to represent EPR related data. If you use Axis2 EndpointReference when generating wsdl (as you have specified) it will show all the fields in the EndpointReference class using java reflection and there is no way to avoid that. Therefore writing ur own EPR class will help in the case.
Thanks Deepal. > Hi, > > I'm trying to upgrade our services to use Axis 2 (we're currently using > Axis 1.4). > > However, I'm having some trouble with methods which take or return > WS-Addressing EPRs. e.g. on a factory service we have: > > public EndpointReference createResource(String label); > > The generated WSDL looks like this: > > <xs:schema xmlns:ax268="http://addressing.axis2.apache.org/xsd" > xmlns:ax269="http://util.java/xsd" attributeFormDefault="qualified" > elementFormDefault="qualified" > targetNamespace="http://addressing.axis2.apache.org/xsd"> > <xs:import namespace="http://util.java/xsd"/> > <xs:complexType name="EndpointReference"> > <xs:sequence> > <xs:element minOccurs="0" name="address" nillable="true" > type="xs:string"/> > > <xs:element minOccurs="0" name="addressAttributes" nillable="true" > type="xs:anyType"/> > <xs:element minOccurs="0" name="allReferenceParameters" nillable="true" > type="ns14:Map"/> > <xs:element minOccurs="0" name="attributes" nillable="true" > type="xs:anyType"/> > <xs:element minOccurs="0" name="extensibleElements" nillable="true" > type="xs:anyType"/> > <xs:element minOccurs="0" name="logCorrelationIDString" nillable="true" > type="xs:string"/> > <xs:element minOccurs="0" name="metaData" nillable="true" > type="xs:anyType"/> > <xs:element minOccurs="0" name="metadataAttributes" nillable="true" > type="xs:anyType"/> > <xs:element minOccurs="0" name="name" nillable="true" type="xs:string"/> > <xs:element minOccurs="0" name="referenceParameters" nillable="true" > type="ns14:Map"/> > > </xs:sequence> > </xs:complexType> > </xs:schema> > > This doesn't match the schema given in the WS-Addressing spec, which is: > > <xs:complexType name="EndpointReferenceType" mixed="false"> > <xs:sequence> > <xs:element name="Address" type="tns:AttributedURIType"/> > <xs:element ref="tns:ReferenceParameters" minOccurs="0"/> > > <xs:element ref="tns:Metadata" minOccurs="0"/> > <xs:any namespace="##other" processContents="lax" minOccurs="0" > maxOccurs="unbounded"/> > </xs:sequence> > <xs:anyAttribute namespace="##other" processContents="lax"/> > </xs:complexType> > > The problem is worse if I use the Axis 1 type EndpointReferenceType; e.g. > > <xs:complexType name="EndpointReferenceType"> > <xs:sequence> > <xs:element minOccurs="0" name="address" nillable="true" > type="ns18:AttributedURI"/> > <xs:element minOccurs="0" name="metadata" nillable="true" > type="ns18:MetadataType"/> > <xs:element minOccurs="0" name="parameters" nillable="true" > type="ns18:ReferenceParametersType"/> > <xs:element minOccurs="0" name="portType" nillable="true" > type="ns18:AttributedQName"/> > <xs:element minOccurs="0" name="serviceName" nillable="true" > type="ns18:ServiceNameType"/> > > <xs:element minOccurs="0" name="typeDesc" nillable="true" > type="ns5:TypeDesc"/> > <xs:element maxOccurs="unbounded" minOccurs="0" name="_any" > nillable="true" type="ns10:MessageElement"/> > </xs:sequence> > </xs:complexType> > > (note the "typeDesc" and "MessageElement" parts!) > > > What's the correct way to handle EndpointReferences in Axis 2? > > Thanks, > > > -- Thanks, Deepal ................................................................ "The highest tower is built one brick at a time" --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
