So how do I configure the jsr181 endpoint to use document/literal wrapped?
This is how I'm configuring it currently:
<jsr181:endpoint
pojoClass="com.edgenet.service.security.acegi.AcegiSecurityService"
style="document"
service="edgenet:SecurityService"
endpoint="securityJsr181Endpoint"/>
The http endpoint configuration looks like:
<http:endpoint service="edgenet:HttpSecurityService"
endpoint="securityHttpEndpoint"
targetService="edgenet:SecurityService"
role="consumer"
locationURI="http://0.0.0.0:8192/SecurityService/"
defaultMep="http://www.w3.org/2004/08/wsdl/in-out"
soap="true" />
The generated wsdl uses document/literal (but not wrapped):
.
.
.
<wsdl:binding name="securityHttpEndpointBinding"
type="tns:SecurityServicePortType">
<wsdlsoap:binding style="document"
transport="http://schemas.xmlsoap.org/soap/http"/>
<wsdl:operation name="authenticate">
<wsdlsoap:operation soapAction=""/>
<wsdl:input name="authenticateRequest">
<wsdlsoap:body use="literal"/>
</wsdl:input>
.
.
.
gnodet wrote:
>
> Defining wsdl with several parts in the soap body is not
> compliant with the WS-I Basic Profile, so it is not
> recommented. The jsr181 can generate such wsdls
> because using an appropriate soap binding, you
> could bind one message part to a header.
> Unfortunately, this is not yet supported by servicemix-http.
> So you should use doc/lit wrapped instead of bare
> parameters.
>
> On 10/2/06, KBerthelot <[EMAIL PROTECTED]> wrote:
>>
>> I'm getting an error with ServiceMix 3.0 when exposing a jsr181:endpoint
>> externally using a http:endpoint. The wsdl that is auto-generated does
>> not
>> use wrapped style parameters (i.e. the message has more than one part),
>> but
>> when consuming a soap request generated from that wsdl, I get an error
>> because SoapReader does not correctly parse the document.
>>
>> The generated wsdl looks like this:
>>
>> <xsd:schema attributeFormDefault="qualified"
>> elementFormDefault="qualified"
>> targetNamespace="http://edgenet.com"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>>
>> <xsd:element name="userName" type="xsd:string"/>
>> <xsd:element name="pwd" type="xsd:string"/>
>> .
>> .
>> .
>> </xsd:schema>
>>
>> <!-- NOTE: Not using wrapped style -->
>> <wsdl:message name="authenticateRequest">
>> <wsdl:part element="tns:userName" name="userName"/>
>> <wsdl:part element="tns:pwd" name="pwd"/>
>> </wsdl:message>
>>
>>
>> The soap request generated using this wsdl looks like:
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>>
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema">
>> <soap:Body>
>> <userName xmlns="http://edgenet.com">bsmith</userName>
>> <pwd xmlns="http://edgenet.com">mypassword</pwd>
>> </soap:Body>
>> </soap:Envelope>
>>
>>
>> This results in the following soap fault:
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <fault>
>> <message>Not enough message parts were received for the
>> operation.</message>
>> </fault>
>>
>> When I turn debugging on, I can see that the original message is getting
>> truncated:
>>
>>
>> DEBUG - DeliveryChannelImpl - Sent: InOut[
>> id: ID:kberthe-m675-4657-1159820294925-7:0
>> status: Active
>> role: consumer
>> service: {http://edgenet.com}SecurityService
>> operation: {http://edgenet.com}authenticate
>> in: <?xml version="1.0" encoding="UTF-8"?><userName
>> xmlns="http://edgenet.com"
>> xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/"
>> xmlns:xsd="http://www.w3.org/2001/XMLSchema"
>> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">bsmith</userName>
>>
>> Notice the document ends after the <userName> element (<pwd> is dropped,
>> eventually causing XFire to fault because it's expecting a second
>> parameter).
>>
>> Debugging through the code, it looks like SoapReader.readSoapUsingStax()
>> stops parsing after it gets the first child element of the <body>
>> element.
>>
>> I then forced it to use dom to parse the entire document and
>> SoapReader.readSoapUsingDom() explicitly throws an Exception when the
>> body
>> element has more than one child.
>>
>> So the question is, should the jsr181 endpoint be generating wsdls that
>> only
>> use one message part, or should SoapReader be able to handle the wsdl
>> that
>> it's currently generating?
>> --
>> View this message in context:
>> http://www.nabble.com/SoapReader-assumes-wrapped-style--tf2372333.html#a6609335
>> Sent from the ServiceMix - User mailing list archive at Nabble.com.
>>
>>
>
>
> --
> Cheers,
> Guillaume Nodet
>
>
--
View this message in context:
http://www.nabble.com/SoapReader-assumes-wrapped-style--tf2372333.html#a6619782
Sent from the ServiceMix - User mailing list archive at Nabble.com.