HI,
I'm sorry, I'm not clear about your question. Too much info :)

However, if you need to passthrough a non-standard content type, add
following message formatter and builder to your axis2.xml.

<messageFormatter contentType="application/binary" class="
org.wso2.carbon.relay.ExpandingMessageFormatter"/>
<messageBuilder contentType="application/binary" class="
org.wso2.carbon.relay.BinaryRelayBuilder"/>


Here the content type should be whatever content type your backend is
sending. Refer [1] for more info on message Relay.

[1] - https://docs.wso2.com/display/ESB500/Message+Relay

Regards,
Vinod

On Thu, Jan 11, 2018 at 11:47 PM, Marcos Tarín Esteve <
[email protected]> wrote:

> Hi …
>
> I’m making a soap call to an endpoint service through ESB6.1.1 from SOAPUI
>
> PROXY CONFIGURATION
>
> ((( I bloted out some information with xxxx )))
>
>
>
> <?xml version="1.0" encoding="UTF-8"?><proxy xmlns="http://ws.apache.org/
> ns/synapse" name="xxxxWsV2_Based_Proxy" startOnLoad="true"
> statistics="disable" trace="enable" transports="http,https">
>
>     <target>
>
>         <inSequence>
>
>             <property name="FORCE_HTTP_1.0" scope="axis2" type="STRING"
> value="true"/>
>
>             <property name="DISABLE_CHUNKING" scope="axis2" type="STRING"
> value="true"/>
>
>             <property name="EXPECT-100" scope="axis2" type="STRING"
> value="true"/>
>
>             <log level="full"/>
>
>         </inSequence>
>
>         <outSequence>
>
>             <log level="full"/>
>
>             <send/>
>
>         </outSequence>
>
>         <endpoint>
>
>             <wsdl port="xxxxWsV2Port" service="xxxxxWsV2Service"
> uri="file:/var/www/html/xxxxWsV2.wsdl"/>
>
>         </endpoint>
>
>     </target>
>
>     <description/>
>
> </proxy>
>
> SOAPUI receives a correct response when the endpoint service returns a
> ‘SOAP response’.
>
> But i have other soap call that is returning the next non-soap formatted
> response:
>
> NON-SOAP ENDPOINT RESPONSE
>
> --urn:uuid:ax7xx36-98xx9-4ex1-bxxc-ax1xxxxx8bxc
>
> Content-Type: text/xml; charset=utf-8
>
> Content-Transfer-Encoding: 8bit
>
> Content-ID: <urn:uuid:3xcxxx4b-x9ea-xxf6-81c3-8a8xxxxe6bx7>
>
>
>
> <?xml version="1.0" encoding="UTF-8"?>
>
> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/
> envelope/" xmlns:ns1="https://xxxx.es/xxxx/ws/xxxxws_v2/1.0/infoEnvioV2";>
>
> <SOAP-ENV:Body>
>
> <resultadoInfoEnvioV2>
>
> <ns1:identificador>xa3x2xxxxx8xx7</ns1:identificador>
>
> </resultadoInfoEnvioV2>
>
> </SOAP-ENV:Body>
>
> </SOAP-ENV:Envelope>
>
>
>
> --urn:uuid:a07xxx6-9xxx9-4xxa1-xx9c-a91dxxbcc
>
> Content-Type: application/octet-stream; charset=utf-8
>
> Content-Transfer-Encoding: binary
>
> Content-ID: <urn:uuid:69xxx17b-x96c-xx3e-9x78-721dxxxxxxa23>
>
> http://xx.x.x.xxx/Texto_de_prueba.txt
>
> --urn:uuid:a07xxx6-9xxx9-4ea1-bxxc-a9xxx0c8bcc—
>
> The problem is that wso2-esb doesn’t return the response to SOAPUI because
> this ESB error:
>
> TID: [-1234] [] [2017-12-21 17:15:38,305] ERROR
> {org.apache.synapse.transport.passthru.util.RelayUtils} -  Error while
> building Passthrough stream {org.apache.synapse.transport.
> passthru.util.RelayUtils}
>
> org.apache.axiom.om.OMException: com.ctc.wstx.exc.WstxUnexpectedCharException:
> Unexpected character '-' (code 45) in prolog; expected '<'
>
> I'm only interested in reading last SOAP-ENV response from SOAPUI.
>
> For getting the solution. I would like to TRANSFORM ‘ONLY’ THE PROXY
> RESPONSE to a format that SOAPUI can read.
>
> For solving the problem. I added the property messageBuilder to the
> proxy’s out-sequence configuration:
>
> NEW OUT-SEQUENCE PROXY CONFIGURATION
>
>         <outSequence>
>
>             <builder>
>
>                 <messageBuilder 
> class="org.wso2.carbon.relay.BinaryRelayBuilder"
> contentType="text/xml" formatterClass="org.apache.axis2.transport.http.
> SOAPMessageFormatter"/>
>
>             </builder>
>
>             <log level="full"/>
>
>             <send/>
>
>         </outSequence>
>
> Note: When i added the last property messageBuilder. WSO2 editor added
> itself this new properties:
>
> <outSequence>
>
>     <builder>
>
>         <messageBuilder class="org.apache.axis2.builder.ApplicationXMLBuilder"
> contentType="application/xml" formatterClass="org.apache.
> axis2.transport.http.ApplicationXMLFormatter"/>
>
>         <messageBuilder class="org.apache.axis2.builder.MIMEBuilder"
> contentType="multipart/related"/>
>
>         <messageBuilder class="org.apache.axis2.builder.SOAPBuilder"
> contentType="application/soap+xml" formatterClass="org.apache.
> axis2.transport.http.SOAPMessageFormatter"/>
>
>         <messageBuilder class="org.apache.axis2.json.JSONBuilder"
> contentType="application/json" formatterClass="org.apache.axis2.json.
> JSONMessageFormatter"/>
>
>         <messageBuilder class="org.apache.axis2.builder.MTOMBuilder"
> contentType="application/xop+xml"/>
>
>         <messageBuilder 
> class="org.apache.axis2.builder.XFormURLEncodedBuilder"
> contentType="application/x-www-form-urlencoded"
> formatterClass="org.apache.axis2.transport.http.
> XFormURLEncodedFormatter"/>
>
>     </builder>
>
>     <log level="full"/>
>
>     <send/>
>
> </outSequence>
>
> But unfortunately i don’t get any response in SOAPUI :(
>
> After I make other tests adding the next properties in outsequence. But
> with no effect:
>
> <property name="ContentType" value="text/xml" scope="axis2"/>
>
> <property name="messageType" value="text/xml" scope="axis2"/>
>
> Note: I have used always the axis2.xml default file.
>
> ¿ Do you know which property should i use in my proxy configuration for
> managing this kind of text responses?
>
> Thanks …
>
>
>
> _______________________________________________
> Dev mailing list
> [email protected]
> http://wso2.org/cgi-bin/mailman/listinfo/dev
>
>


-- 
Vinod Kavinda
Senior Software Engineer
*WSO2 Inc. - lean . enterprise . middleware <http://www.wso2.com>.*
Mobile : +94 (0) 712 415544
Blog : http://soatechflicks.blogspot.com/
[image: http://wso2.com/signature]
<http://wso2.com/signature>
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to