[User] RESTBC - unexpected XML header when using text/plain

Paul Perez paul.perez at pymma.com
Thu Jul 12 15:35:49 BST 2018


Hello Dave, 

We Are working on your Topic. 
First could you tell me why you want to use the text/plain media-type. 
OpenESB requires structured messages such as JSON and XLM.
AFAIK and contrary to the documentation, the text/plain is not supported. 
Further to your email, we are working on fixing the issue with the request
body in JSON. 

Please let me know 

Best regards

Paul Perez Chief Architect
Pymma Consulting
--------------------------
Tel: +44 79 44 36 04 65 
Skype ID : polperez

-----Original Message-----
From: User <user-bounces at lists.open-esb.net> On Behalf Of Dave Woodman via
User
Sent: 12 July 2018 15:06
To: user at lists.open-esb.net
Cc: Dave Woodman <dave at naffnet.org.uk>
Subject: Re: [User] RESTBC - unexpected XML header when using text/plain

In case they are of any use, some more details - I'd love to know what I am
doing wrong (or failing to do right :-) ).

The BPEL design - as simple as simple can be:-
 
<http://openesb-community-forum.794670.n2.nabble.com/file/t395940/SimpleCA.p
ng> 


The mapping;-
<http://openesb-community-forum.794670.n2.nabble.com/file/t395940/mapper.png
> 

The result:-
<http://openesb-community-forum.794670.n2.nabble.com/file/t395940/result.png
> 

And finally, the WSDL used:-

<definitions name="newWSDL"
    targetNamespace="http://j2ee.netbeans.org/wsdl/RESTtest/src/newWSDL"
    xmlns="http://schemas.xmlsoap.org/wsdl/"
    xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema"
    xmlns:rest="http://schemas.sun.com/jbi/wsdl-extensions/rest/"
    xmlns:plnk="http://docs.oasis-open.org/wsbpel/2.0/plnktype"
xmlns:tns="http://j2ee.netbeans.org/wsdl/RESTtest/src/newWSDL">
    <types>
        <xsd:schema
targetNamespace="http://j2ee.netbeans.org/wsdl/RESTtest/src/newWSDL"/>
    </types>
    <message name="TestRequest">
        <part name="part1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
type="xsd:anyType"/>
    </message>
    <message name="TestResponse">
        <part name="part1" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
type="xsd:anyType"/>
    </message>
    <portType name="RestInboundPortType">
        <operation name="Test">
            <input name="TestInput"
xmlns:tns="http://j2ee.netbeans.org/wsdl/RESTtest/src/newWSDL"
message="tns:TestRequest"/>
            <output name="TestOutput"
xmlns:tns="http://j2ee.netbeans.org/wsdl/RESTtest/src/newWSDL"
message="tns:TestResponse"/>
        </operation>
    </portType>
    <binding name="RestInboundBinding" type="tns:RestInboundPortType">
        <rest:binding/>
        <operation name="Test">
            <rest:operation>
<![CDATA[
# optional, name of HTTP listener to bind to, defaults to "default-listener"
http-listener-name=default-listener

# required, path to this resource
path=/test/path 

# optional, HTTP verb to access the resource, defaults to GET method=GET

# optional, acceptable MIME types for request payload, defaults to
"application/json", "application/xml"
consume-types=[ "text/plain" ]

# optional, all possible MIME types of response payload, defaults to
"application/json", "application/xml"
produce-types=[ "text/plain" ]

forward-as-attachment=false

]]></rest:operation>
            <input name="TestInput"/>
            <output name="TestOutput"/>
        </operation>
    </binding>
    <service name="RestInboundService">
        <port name="RestInboundWSDL_InboundPort"
binding="tns:RestInboundBinding">
            <rest:address/>
        </port>
    </service>
    <plnk:partnerLinkType name="RestInboundWSDL">
        
        <plnk:role name="RestInboundPortTypeRole"
portType="tns:RestInboundPortType"/>
    </plnk:partnerLinkType>
</definitions>






--
Sent from: http://openesb-community-forum.794670.n2.nabble.com/



More information about the User mailing list