users@jax-rpc.java.net

Re: [BUG?] uniqueness constraint violation on correct(?) wsdl

From: Rama Pulavarthi <Rama.Pulavarthi_at_Sun.COM>
Date: Mon, 24 Jan 2005 12:26:59 -0800

Please send the modified wsdl you are using.
thanks,
Rama Pulavarthi
Alessio Cervellin wrote:

> Thanks for the answer Rama, but even changing the wsdl as suggested by
> you the same "uniqueness constraint violation" error occurs.
> I also tried to change the name of the elements of the response
> message to have them different from the ones in the request message
> (though shouldn't be needed) but nothing changes.
> The only interesting thing is that the error disappear if I delete
> this element
> <wsdl:part element="myns:ComplexElement1" name="mybody"/>
> from the response message (or if I change its type).
> This weird behaviour lets me think to a bug...
> Do you have any other tip? Maybe I mispelled something else in the
> wsdl...
>
> Rama Pulavarthi wrote:
>
>> The WSDL seems to be wrong. The input and output definitions in the
>> binding section of "myWSOperation" are incorrectly defined. The
>> soap:body is defined twice.
>> The elements <soap:body parts="mybody" use="literal"/> and
>> <soap:header message="tns:request" part="myheader" use="literal"/>
>> should be inside </mime:multipartRelated> as a mime part.
>> The correct definition would be like this.
>> <wsdl:input>
>> <mime:multipartRelated>
>> <mime:part>
>> <soap:body parts="mybody" use="literal"/>
>> <soap:header message="tns:request"
>> part="myheader" use="literal"/>
>> </mime:part>
>> <mime:part>
>> <mime:content part="myattachment"
>> type="text/xml"/>
>> </mime:part>
>> </mime:multipartRelated> </wsdl:input>
>>
>> thanks,
>> Rama Pulavarthi
>>
>> Alessio Cervellin wrote:
>>
>>> The wscompile of jwsdp1.5 reports a "uniqueness constraint
>>> violation" error (w/out further info) on this wsdl which describes
>>> an operation w/ attachment (mime multipart)... but it seems fine to
>>> me. Is this a bug or did I mispell something in the wsdl?
>>>
>>> [xpost on users_at_jwsdp.dev.java.net]
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> <?xml version="1.0" encoding="UTF-8"?>
>>>
>>> <wsdl:definitions
>>>
>>> name="myWS"
>>>
>>> targetNamespace="http://domain/mywsdl.wsdl"
>>>
>>> xmlns:myns="http://www.mydomain.com/"
>>>
>>> xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
>>>
>>> xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
>>>
>>> xmlns:tns="http://domain/mywsdl.wsdl"
>>>
>>> xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
>>>
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>
>>> <wsdl:types>
>>>
>>> <xsd:schema
>>>
>>> attributeFormDefault="unqualified"
>>>
>>> elementFormDefault="qualified"
>>>
>>> targetNamespace="http://www.mydomain.com/"
>>>
>>> xmlns="http://www.mydomain.com/"
>>>
>>> xmlns:SOAP_ENV="http://schemas.xmlsoap.org/soap/envelope/"
>>>
>>> xmlns:myns="http://www.mydomain.com/"
>>>
>>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>>
>>> <xsd:import
>>>
>>> namespace="http://schemas.xmlsoap.org/soap/envelope/"
>>>
>>>
>>> schemaLocation="http://schemas.xmlsoap.org/soap/envelope/"/>
>>>
>>> <xsd:element name="ComplexElement1">
>>>
>>> <xsd:complexType>
>>>
>>> <xsd:sequence>
>>>
>>> <xsd:element maxOccurs="unbounded"
>>> ref="ComplexElement2"/>
>>>
>>> </xsd:sequence>
>>>
>>> </xsd:complexType>
>>>
>>> </xsd:element>
>>>
>>> <xsd:element name="ComplexElement2">
>>>
>>> <xsd:attribute name="anattribute"
>>> type="xsd:string" use="required"/>
>>>
>>> </xsd:element>
>>>
>>> <xsd:element name="Header">
>>>
>>> <xsd:complexType>
>>>
>>> <xsd:sequence>
>>>
>>> <xsd:element ref="Header2"/>
>>>
>>> </xsd:sequence>
>>>
>>> </xsd:complexType>
>>>
>>> </xsd:element>
>>>
>>> <xsd:element name="Header2">
>>>
>>> <xsd:attribute name="anotherattribute"
>>> type="xsd:string" use="required"/>
>>>
>>> </xsd:element>
>>>
>>> </xsd:schema>
>>>
>>> </wsdl:types>
>>>
>>> <wsdl:message name="request">
>>>
>>> <wsdl:part element="myns:Header" name="myheader"/>
>>>
>>> <wsdl:part name="myattachment" type="xsd:base64Binary"/>
>>>
>>> <wsdl:part element="myns:ComplexElement1" name="mybody"/>
>>>
>>> </wsdl:message>
>>>
>>> <wsdl:message name="response">
>>>
>>> <wsdl:part element="myns:Header" name="myheader"/>
>>>
>>> <wsdl:part name="myattachment" type="xsd:base64Binary"/>
>>>
>>> <wsdl:part element="myns:ComplexElement1"
>>> name="mybody"/> </wsdl:message> <wsdl:portType
>>> name="myWSPortType">
>>>
>>> <wsdl:operation name="myWSOperation">
>>>
>>> <wsdl:input message="tns:request"/>
>>>
>>> <wsdl:output message="tns:response"/>
>>>
>>> </wsdl:operation>
>>>
>>> </wsdl:portType>
>>>
>>> <wsdl:binding name="myWSBinding" type="tns:myWSPortType">
>>>
>>> <soap:binding style="document"
>>> transport="http://schemas.xmlsoap.org/soap/http"/>
>>>
>>> <wsdl:operation name="myWSOperation">
>>>
>>> <soap:operation style="document"/>
>>>
>>> <wsdl:input>
>>>
>>> <mime:multipartRelated>
>>>
>>> <mime:part>
>>>
>>> <soap:body parts="mybody" use="literal"/>
>>>
>>> </mime:part>
>>>
>>> <mime:part>
>>>
>>> <mime:content part="myattachment"
>>> type="text/xml"/>
>>>
>>> </mime:part>
>>>
>>> </mime:multipartRelated>
>>> <soap:body parts="mybody" use="literal"/>
>>>
>>> <soap:header message="tns:request"
>>> part="myheader" use="literal"/>
>>>
>>> </wsdl:input>
>>>
>>> <wsdl:output>
>>>
>>> <mime:multipartRelated>
>>>
>>> <mime:part>
>>>
>>> <soap:body parts="mybody" use="literal"/>
>>>
>>> </mime:part>
>>>
>>> <mime:part>
>>>
>>> <mime:content part="myattachment"
>>> type="text/xml"/>
>>>
>>> </mime:part>
>>>
>>> </mime:multipartRelated>
>>> <soap:body parts="mybody"
>>> use="literal"/> <soap:header
>>> message="tns:response" part="myheader" use="literal"/>
>>>
>>> </wsdl:output>
>>>
>>> </wsdl:operation>
>>>
>>> </wsdl:binding>
>>>
>>> <wsdl:service name="myWS">
>>>
>>> <wsdl:port binding="tns:myWSBinding" name="myWSPort">
>>>
>>> <soap:address location="http://localhost:8080/myWS/myWS"/>
>>>
>>> </wsdl:port>
>>>
>>> </wsdl:service>
>>>
>>> </wsdl:definitions>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ------------------------------------------------------------------------
>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>>> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>>
>>>
>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
>> For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jwsdp.dev.java.net
> For additional commands, e-mail: users-help_at_jwsdp.dev.java.net
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jax-rpc.dev.java.net
For additional commands, e-mail: users-help_at_jax-rpc.dev.java.net